Category Archives: notes

my m0n0wall uptime

System information
Name xxxxxx
Version 1.23b1
built on Mon Jun 5 12:21:09 CEST 2006
Platform generic-pc
Uptime 47 days, 06:08

m0n0wall rocks.

freebsd notes - installing ports using pkg_add

# as root
pkg_add -r sudo
 
## now after a few modifications to your /etc/sudoers you are able to use your own user to perform tasks which require root privledges.
 
# as your own user
 
sudo pkg_add -r bash
 
sudo pkg_add -r bash-completion
 
sudo pkg_add -r nano

freebsd notes - compiling and installing using ports

# compiling and installing using ports
ex.

whereis package
 
cd /usr/ports/package
 
make

# installing bash

cd /usr/ports/shells/bash
 
sudo make
 
sudo make install

# installing screen

cd /usr/ports/sysutils/screen
 
sudo make
 
sudo make install

# installing perl

cd /usr/ports/perl5
 
sudo make
 
sudo make install

# installing wget

cd /usr/ports/ftp/wget
 
sudo make
 
sudo make install

# di

cd /usr/ports/sysutils/di
 
sudo make
 
sudo make install

# php5

cd /usr/ports/lang/php5
 
sudo make install clean

resources
http://www.freebsd.org/doc/handbook/portsnap.html

gentoo toolchain notes

A few critical packages in gentoo were released from ~ to stable recently, and through the upgrade I expericend a couple bumps.

After the upgraded packages were installed in order for things to compile after you will need to select the newer environment. YMMV

sudo binutils-config -l
 
sudo binutils-config 2
 
sudo gcc-config -l
 
sudo gcc-config 6

resources

GF20: C compiler cannot create executables
http://forums.gentoo.org/viewtopic.php?t=294109

my vmware installation notes.

I installed VMware Server on my Gentoo box this morning. Because it’s fairly new to the tree, and I’ve been wanting to try it out for while, and now it’s free. I had a couple simple issues too outlined below, but outside of that it works great.

The first task after the quick 100mb download, and emerge of a few missing dependancies was to add my user to the vmware group so that I will be able to use it.

If your VMware Server is located on another machine like myself, you will most likely need to also remember to add a few lines to your xinetd.conf. As it comes out of the box, it is only accessible to your local machine. You will need to modify your /etc/xinetd.conf/vmware-authd so that it contains;

only_from = xxx.xxx.xxx.xxx/24

Otherwise your VMware Console client will hang and you will have this error in your syslog on the remote machine.

Aug 28 08:32:24 mywhiz xinetd[29408]: FAIL: vmware-authd address from=xxx.xxx.xxx.xxx
Aug 28 08:32:24 mywhiz xinetd[12288]: START: vmware-authd pid=29408 from=xxx.xxx.xxx.xxx
Aug 28 08:32:24 mywhiz xinetd[12288]: EXIT: vmware-authd status=0 pid=29408 duration=0(sec)

Soon after something else was in my way of VMware Server working. While running the console had no errors, the syslog on my remote machine had something.

Aug 28 09:44:09 mywhiz vmware-authd[32121]: The "/opt/vmware/server/lib/bin/vmware-vmx" process did not start properly.  Exit 0xed00

Searching through google revealed nothing of note, just a couple seamingly old unlrelated items. Luckilly there is a debug mode option you can set in Vmware Server. I opened my VM, and then performed this. Edit Virtual Machine Settings -> Options -> Advanced -> Run with debugging information

Note: Gentoo does not install the debugging version of the vmware-vmx binary with setuid permissions.

$ ls -al /opt/vmware/server/lib/bin-debug/vmware-vmx
-rwxr-xr-x 1 root root 5143312 2006-08-28 07:23 /opt/vmware/server/lib/bin-debug/vmware-vmx
 
$ sudo chmod u+s /opt/vmware/server/lib/bin-debug/vmware-vmx
 
$ ls -al /opt/vmware/server/lib/bin-debug/vmware-vmx
-rwsr-xr-x 1 root root 5143312 2006-08-28 07:23 /opt/vmware/server/lib/bin-debug/vmware-vmx

Oddly VMware Console will be nice enough and it will tell you this error quite verbosely.

VMware Server Error:
VMware Server must be set-UID root, "/opt/vmware/server/lib/bin-debug/vmware-vmx" is not. Are you running /opt/vmware/server/lib/bin-debug/vmware-vmx from its distribution directory? That copy of the program is not set-UID root.
 
Press "Enter" to continue...
End of error message.

Attempting to run the VM this time produced a better error message. It wasn’t able to access my ~/.vmware directory on the remote machine for some reason. So I;

rm -rf ~/.vmware

The problem is gone when I power on the VM again. I think VMware could have saved me the trouble of all that by telling me they couldn’t access the directory without that much extra hassle of a debug mode, but at least it was easy enough to fix.
Hurray for errors! Well no boo errors, ehh who cares. While writing this, another one rears it’s ugly head.

My VMware Console is unable to connect to my remote machine with this error.

"Unable to connect to the remote host: 511 Error connecting to /opt/vmware/server/sbin/vmware-serverd process.."
Running htop shows the issue is quite simple.
PID USER     PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
31337 root      25   0  115M  111M  4352 R 98.7  7.0 30:00.98 /opt/vmware/server/sbin/vmware-server
On my remote machine I perform;
sudo /etc/init.d/vmware-server restart

All is well when it starts back up again. Now to turn off debug mode in the options and take away setuid on the debug binary.

resources:

http://diaryproducts.net/about/operating_systems/unix/installing_vmware_server_on_gentoo_linux.vm

http://gentoo-wiki.com/HOWTO_Install_VMWare_Server

both of these are out of date technically, but they were still helpful to me.

quick fixes for my mysql databases.

It’s the summer, and durring the summer heat servers tend to act more like unstable demons than they should.

My machine has been randomly rebooting, hard locking, and all around pain in the ass the past week or two.

Everytime it does this my mysql databases seem to get funky, and the easiest sign to this is when I view this blog.

Ultimate Tag Warrior tells me there is some kind of error in the wp_postmeta table.

The easy fix for this is to cruise over to my phpmyadmin on the server and run a simple repair table operation on all of my wordpress tables. note: you may or may not have all the same tables I do in my wordpress database.

REPAIR TABLE `wp_categories` , `wp_comments` , `wp_dl` , `wp_dlmap` , `wp_downloads` , `wp_falbum_cache` , `wp_kiwi` , `wp_linkcategories` , `wp_links` , `wp_openid_associations` , `wp_openid_assoc_handles` , `wp_openid_trust` , `wp_options` , `wp_post2cat` , `wp_post2tag` , `wp_postmeta` , `wp_posts` , `wp_tags` , `wp_tag_synonyms` , `wp_usermeta` , `wp_users` , `wp_xspf_player` , `wp_xspf_player_categories` , `wp_xspf_player_tracks_categories` ;

After running your query you have the choice to make this command a bookmark for easier access to it later. I think it’s a good idea to keep the query as I know I’ll likely have to run it a few more times before it cools off again.
Another issue with these broken tables is snort will not be able to log to it’s database too. It will try and report this to your syslog if running. Your errors may vary, but generally I’ve noticed anytime snort compains about database, then it just wants some love.

Aug 11 05:25:07 mywhiz snort[11349]: database: mysql_error: MySQL server has gone away SQL=INSERT INTO reference_system (ref_system_name) VALUES ('cve')
Aug 11 05:25:07 mywhiz snort[11349]: database: mysql_error: MySQL server has gone away
Aug 11 05:25:07 mywhiz snort[11349]: database: Unable to insert unknown reference tag ('2002-0012') used in rule.

Again going to phpmyadmin and selecting all of snorts tables and choosing the repair operation saves things.

REPAIR TABLE `acid_ag` , `acid_ag_alert` , `acid_event` , `acid_ip_cache` , `base_roles` , `base_users` , `data` , `detail` , `encoding` , `event` , `icmphdr` , `iphdr` , `opt` , `reference` , `reference_system` , `schema` , `sensor` , `signature` , `sig_class` , `sig_reference` , `tcphdr` , `udphdr`;

Aggregator Showdown.

I started writing this last week, but with a lack of energy, here’s the skinny on what I’ve written up.

Dave Winer reminds us the other day. “2/3/06: “Aggregator developers could sure use some competition!
I like server side aggregators more than desktop. In a multi-user aggregator ideally it should be customizable by the end-user. One that shows you your feeds how you like to view them, whether it be email style, linear, reverse, upside down, reverse print, etc.
It should also remembers what’s new since the last visit.
I decided I’d see just what the opensource world has to offer in web-based single and multi-user aggregators.
I really wasn’t too impressed from a selection point of view with a multi-user installation in mind.
most opensource aggregators aren’t “pretty” or even still in development.
2004 was last real opensource aggregator development time period.
I even tried to get some of the ones listed in google’s directory to work.
here is some of my results in demo form.

DATE NAME Code Users? In Devel? OPML? Working?
2004.02.14 rnews php single no yes yes - with manual fix
2004.11.06 TALAggregator python single no yes no
2004.08.08 planet python single no no not latest dev version
2004.12.16 feedonfeed php single no import yes

Installation notes.
I first tried the Gentoo ebuild version of planet which is quite old but worked. planet has a nightly snapshot of their devel repo, which is missing a python dependancy I can’t figure out.

TALAggregator lacks a logout button, which makes it difficult to create users, and use your own account to browse feeds. Also logging in doesn’t usually work properly. TALAggregator stores it’s password in an encrypted format in the mysql database.

rnews stores the passwords as plaintext in the mysql database and also lacks a logout button/link. It is also having issues when creating it’s tables in the database. Being able to create the user_prefs table, but not the links, and users’ links table. ex. “links”, “px_links”

Once I applied some force and a crowbar, I now have the sql to create the needed table. It’s support with importing of opml files works fine and also adds your categorized material correctly. And of course the interface is a tad bit clunky.

CREATE TABLE `links` (
`id` INT( 16 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`src_id` VARCHAR( 36 ) NOT NULL ,
`link` TEXT NOT NULL ,
`title` TEXT NOT NULL ,
`description` TEXT NOT NULL ,
`state` VARCHAR( 16 ) NOT NULL ,
`pubdate` DATETIME NOT NULL ,
UNIQUE (
`src_id` ,
title( 255 )
)
) ENGINE = MYISAM
CREATE TABLE `px_links` (
`id` INT( 16 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` TEXT NOT NULL ,
`main_link` TEXT NOT NULL ,
`rss_link` TEXT NOT NULL ,
`image_url` TEXT NOT NULL ,
`user_order` INT( 8 ) NOT NULL ,
`category` TEXT NOT NULL ,
`last_update` DATETIME NOT NULL
) ENGINE = MYISAM ;

thunderbird bugs

I hate this bug. It has to be the only thing that makes using Mozilla Thunderbird such a pain in the ass. It’s disapointing that it has been open for ~3 years now and still not fixed, or apparently understood by the developers.

When sending an email, after the mail is sent via SMTP, it gets copied to the designated IMAP Sent Items folder. The email generally gets copied OK to the folder, but hangs the sending window until you cancel the email, and tell it to close and cancel about 3 times. It should only be 1 click to send, and forget about the client doing it’s business. But instead I have to check my Sent items each time to make sure I have a copy.

[update] This kinda seems to help
in the main window
open Tools->Message Filters
click “Filter Log”
Uncheck “Enable Filter Log”
then
Clear the log.
Hopefully it shouldn’t hang as much.

quirks of compiling your own software with gentoo. mysql is being lame. so is some other stuff.

for no reason i can figure out my mysqld is crashing like a mofo. it will be working ok, then boom dead. it seems to work a lil longer if i run it under strace. i’ve even tried recompiling everything from php5, mysql back down to the tool chain. still no love. it’s a real pain in the ass trying to post stuff when the DB is down. i wish i knew what was going on with it. it was working great when i was gone this week. i come home, and it hates me. hrmmf.
strace from mysqld.

clone(child_stack=0xb5add4e4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb5addbf8, {entry_number:6, base_addr:0xb5addbb0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb5addbf8) = 18606
select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
accept(4, {sa_family=AF_FILE, path="??@???zV"}, [2]) = 56
fcntl64(4, F_SETFL, O_RDWR)             = 0
getsockname(56, {sa_family=AF_FILE, path="/var/run/mysql"}, [30]) = 0
fcntl64(56, F_SETFL, O_RDONLY)          = 0
fcntl64(56, F_GETFL)                    = 0x2 (flags O_RDWR)
fcntl64(56, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(56, SOL_IP, IP_TOS, [8], 4)  = -1 EOPNOTSUPP (Operation not supported)
time(NULL)                              = 1150601404
mmap2(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb5a7c000
mprotect(0xb5a7c000, 4096, PROT_NONE)   = 0
clone(child_stack=0xb5aac4e4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb5aacbf8, {entry_number:6, base_addr:0xb5aacbb0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb5aacbf8) = 18618
select(5, [3 4], NULL, NULL, NULL)      = ? ERESTARTNOHAND (To be restarted)
+++ killed by SIGSEGV +++

Also as of lately programs like my gnome-terminal which I was just using are loosing their connection to the X display. *sigh*

at&t whistle-blower’s evidence

(copied from wired.com because news sites like to takedown content.)

AT&T Whistle-Blower’s Evidence

Former AT&T technician Mark Klein is the key witness in the Electronic Frontier Foundation’s class-action lawsuit against the company, which alleges that AT&T illegally cooperated in an illegal National Security Agency domestic-surveillance program.

In this recently surfaced statement, Klein details his discovery of an alleged surveillance operation in an AT&T office in San Francisco, and offers his interpretation of company documents that he believes support his case.

For its part, AT&T is asking a federal judge to keep those documents out of court, and to order the EFF to return them to the company. Here Wired News presents Klein’s statement in its entirety, along with select pages from the AT&T documents.


AT&T’s Implementation of NSA Spying on American Citizens31 December 2005

I wrote the following document in 2004 when it became clear to me that AT&T, at the behest of the National Security Agency, had illegally installed secret computer gear designed to spy on internet traffic. At the time I thought this was an outgrowth of the notorious Total Information Awareness program which was attacked by defenders of civil liberties. But now it’s been revealed by The New York Times that the spying program is vastly bigger and was directly authorized by President Bush, as he himself has now admitted, in flagrant violation of specific statutes and constitutional protections for civil liberties. I am presenting this information to facilitate the dismantling of this dangerous Orwellian project.


AT&T Deploys Government Spy Gear on WorldNet Network– 16 January, 2004

In 2003 AT&T built “secret rooms” hidden deep in the bowels of its central offices in various cities, housing computer gear for a government spy operation which taps into the company’s popular WorldNet service and the entire internet. These installations enable the government to look at every individual message on the internet and analyze exactly what people are doing. Documents showing the hardwire installation in San Francisco suggest that there are similar locations being installed in numerous other cities.

The physical arrangement, the timing of its construction, the government-imposed secrecy surrounding it, and other factors all strongly suggest that its origins are rooted in the Defense Department’s Total Information Awareness (TIA) program which brought forth vigorous protests from defenders of constitutionally protected civil liberties last year:

“As the director of the effort, Vice Adm. John M. Poindexter, has described the system in Pentagon documents and in speeches, it will provide intelligence analysts and law enforcement officials with instant access to information from internet mail and calling records to credit card and banking transactions and travel documents, without a search warrant.” The New York Times, 9 November 2002

To mollify critics, the Defense Advanced Research Projects Agency (Darpa) spokesmen have repeatedly asserted that they are only conducting “research” using “artificial synthetic data” or information from “normal DOD intelligence channels” and hence there are “no U.S. citizen privacy implications” (Department of Defense, Office of the Inspector General report on TIA, December 12, 2003). They also changed the name of the program to “Terrorism Information Awareness” to make it more politically palatable. But feeling the heat, Congress made a big show of allegedly cutting off funding for TIA in late 2003, and the political fallout resulted in Adm. Poindexter’s abrupt resignation last August. However, the fine print reveals that Congress eliminated funding only for “the majority of the TIA components,” allowing several “components” to continue (DOD, ibid). The essential hardware elements of a TIA-type spy program are being surreptitiously slipped into “real world” telecommunications offices.

In San Francisco the “secret room” is Room 641A at 611 Folsom Street, the site of a large SBC phone building, three floors of which are occupied by AT&T. High-speed fiber-optic circuits come in on the 8th floor and run down to the 7th floor where they connect to routers for AT&T’s WorldNet service, part of the latter’s vital “Common Backbone.” In order to snoop on these circuits, a special cabinet was installed and cabled to the “secret room” on the 6th floor to monitor the information going through the circuits. (The location code of the cabinet is 070177.04, which denotes the 7th floor, aisle 177 and bay 04.) The “secret room” itself is roughly 24-by-48 feet, containing perhaps a dozen cabinets including such equipment as Sun servers and two Juniper routers, plus an industrial-size air conditioner.

The normal work force of unionized technicians in the office are forbidden to enter the “secret room,” which has a special combination lock on the main door. The telltale sign of an illicit government spy operation is the fact that only people with security clearance from the National Security Agency can enter this room. In practice this has meant that only one management-level technician works in there. Ironically, the one who set up the room was laid off in late 2003 in one of the company’s endless “downsizings,” but he was quickly replaced by another.

Plans for the “secret room” were fully drawn up by December 2002, curiously only four months after Darpa started awarding contracts for TIA. One 60-page document, identified as coming from “AT&T Labs Connectivity & Net Services” and authored by the labs’ consultant Mathew F. Casamassima, is titled Study Group 3, LGX/Splitter Wiring, San Francisco and dated 12/10/02. (See sample PDF 1-4.) This document addresses the special problem of trying to spy on fiber-optic circuits. Unlike copper wire circuits which emit electromagnetic fields that can be tapped into without disturbing the circuits, fiber-optic circuits do not “leak” their light signals. In order to monitor such communications, one has to physically cut into the fiber somehow and divert a portion of the light signal to see the information.

This problem is solved with “splitters” which literally split off a percentage of the light signal so it can be examined. This is the purpose of the special cabinet referred to above: Circuits are connected into it, the light signal is split into two signals, one of which is diverted to the “secret room.” The cabinet is totally unnecessary for the circuit to perform — in fact it introduces problems since the signal level is reduced by the splitter — its only purpose is to enable a third party to examine the data flowing between sender and recipient on the internet.

The above-referenced document includes a diagram (PDF 3) showing the splitting of the light signal, a portion of which is diverted to “SG3 Secure Room,” i.e., the so-called “Study Group” spy room. Another page headlined “Cabinet Naming” (PDF 2) lists not only the “splitter” cabinet but also the equipment installed in the “SG3″ room, including various Sun devices, and Juniper M40e and M160 “backbone” routers. PDF file 4 shows one of many tables detailing the connections between the “splitter” cabinet on the 7th floor (location 070177.04) and a cabinet in the “secret room” on the 6th floor (location 060903.01). Since the San Francisco “secret room” is numbered 3, the implication is that there are at least several more in other cities (Seattle, San Jose, Los Angeles and San Diego are some of the rumored locations), which likely are spread across the United States.

One of the devices in the “Cabinet Naming” list is particularly revealing as to the purpose of the “secret room”: a Narus STA 6400. Narus is a 7-year-old company which, because of its particular niche, appeals not only to businessmen (it is backed by AT&T, JP Morgan and Intel, among others) but also to police, military and intelligence officials. Last November 13-14, for instance, Narus was the “Lead Sponsor” for a technical conference held in McLean, Virginia, titled “Intelligence Support Systems for Lawful Interception and Internet Surveillance.” Police officials, FBI and DEA agents, and major telecommunications companies eager to cash in on the “war on terror” had gathered in the hometown of the CIA to discuss their special problems. Among the attendees were AT&T, BellSouth, MCI, Sprint and Verizon. Narus founder, Dr. Ori Cohen, gave a keynote speech. So what does the Narus STA 6400 do?

“The (Narus) STA Platform consists of stand-alone traffic analyzers that collect network and customer usage information in real time directly from the message…. These analyzers sit on the message pipe into the ISP (internet service provider) cloud rather than tap into each router or ISP device” (Telecommunications magazine, April 2000). A Narus press release (1 Dec., 1999) also boasts that its Semantic Traffic Analysis (STA) technology “captures comprehensive customer usage data … and transforms it into actionable information…. (It) is the only technology that provides complete visibility for all internet applications.”

To implement this scheme, WorldNet’s high-speed data circuits already in service had to be rerouted to go through the special “splitter” cabinet. This was addressed in another document of 44 pages from AT&T Labs, titled “SIMS, Splitter Cut-In and Test Procedure,” dated 01/13/03 (PDF 5-6). “SIMS” is an unexplained reference to the secret room. Part of this reads as follows:

“A WMS (work) Ticket will be issued by the AT&T Bridgeton Network Operation Center (NOC) to charge time for performing the work described in this procedure document….
“This procedure covers the steps required to insert optical splitters into select live Common Backbone (CBB) OC3, OC12 and OC48 optical circuits.”

The NOC referred to is in Bridgeton, Missouri, and controls WorldNet operations. (As a sign that government spying goes hand-in-hand with union-busting, the entire (Communication Workers of America) Local 6377 which had jurisdiction over the Bridgeton NOC was wiped out in early 2002 when AT&T fired the union work force and later rehired them as nonunion “management” employees.) The cut-in work was performed in 2003, and since then new circuits are connected through the “splitter” cabinet.

Another “Cut-In and Test Procedure” document dated January 24, 2003, provides diagrams of how AT&T Core Network circuits were to be run through the “splitter” cabinet (PDF 7). One page lists the circuit IDs of key Peering Links which were “cut-in” in February 2003 (PDF 8), including ConXion, Verio, XO, Genuity, Qwest, PAIX, Allegiance, AboveNet, Global Crossing, C&W, UUNET, Level 3, Sprint, Telia, PSINet and Mae West. By the way, Mae West is one of two key internet nodal points in the United States (the other, Mae East, is in Vienna, Virginia). It’s not just WorldNet customers who are being spied on — it’s the entire internet.

The next logical question is, what central command is collecting the data sent by the various “secret rooms”? One can only make educated guesses, but perhaps the answer was inadvertently given in the DOD Inspector General’s report (cited above):

“For testing TIA capabilities, Darpa and the U.S. Army Intelligence and Security Command (INSCOM) created an operational research and development environment that uses real-time feedback. The main node of TIA is located at INSCOM (in Fort Belvoir, Virginia)….”

Among the agencies participating or planning to participate in the INSCOM “testing” are the “National Security Agency, the Defense Intelligence Agency, the Central Intelligence Agency, the DOD Counterintelligence Field Activity, the U.S. Strategic Command, the Special Operations Command, the Joint Forces Command and the Joint Warfare Analysis Center.” There are also “discussions” going on to bring in “non-DOD federal agencies” such as the FBI.

This is the infrastructure for an Orwellian police state. It must be shut down!

182853

i like free comic books, and i missed free comic book day, which was saturday, may 6th. hopefully ill remember next year.