Tampilkan postingan dengan label hardware. Tampilkan semua postingan
Tampilkan postingan dengan label hardware. Tampilkan semua postingan

Rabu, 21 November 2007

Tap vs Lightning Strike

Earlier this year my lab suffered a near lightning strike. A tree right outside the lab was struck by lightning, causing damage to multiple electronic and electrical devices outside and inside the building.

Outside, the lightning disabled an exterior lighting system and my phone lines. Inside, the lightning took a severe toll on the lab. The cable modem to the outside world was destroyed. The NIC on the lab firewall facing the cable modem was fried, along with a second NIC in the firewall. The NIC on a sensor watching a tap between the cable modem and firewall was also destroyed. So far, this is a grim story.

I have one good piece of news to report, and it involves the tap I mentioned sitting between the cable modem and firewall. The tap survived the lightning strike. More precisely, the tap continued to pass traffic even when its monitoring interface was damaged.

Had the tap been receiving traffic from the modem or firewall, it would have continued to pass it. This truly amazed me. Frequently monitoring practitioners worry that inserting a tap in their network architecture will introduce a single point of failure. In my experience, all of the components around the tap are more likely to fail. A well-engineered tap will continue to pass traffic -- perhaps even when struck by lightning!

The tap that survived my lab lightning strike was built by Net Optics. Congratulations to the Net Optics engineering and manufacturing teams for building quality hardware.

Jumat, 21 September 2007

Tactical Network Security Monitoring Platform

I am working both strategic and tactical network security monitoring projects. On the tactical side I have been looking for a platform that I could carry on a plane and fit in the overhead compartment, or at the very least under the seat in front of me. Earlier in my career I've used Shuttle and Hacom boxes, but I'm always looking for something better.

People often ask "Why don't you use a laptop?" Reasons to not use a laptop include:

  • Laptops don't have PCI, PCI-X or PCI Express slots to accommodate extra NICs, especially for fiber connections.

  • Laptops are not designed to run constantly.

  • Laptop storage is not as robust as server storage, since laptops usually accommodate up to two internal hard drives, with some capacity for external storage.

  • Laptops are consumer devices and not generally built for server-type operations.


Today I think I found the device I needed: NextComputing NextDimension Pro, pictured above. The specs are as follows:

  • Single dual-core 2.2 GHz AMD Opteron 275/940

  • 4 GB RAM (2 GB x 2, PC3200/400 MHz DDRAM)

  • Two Marvell Yukon 88E8052 Gigabit Ethernet

  • One NVIDIA nForce4 CK804 MCP9 Networking Adapter (Marvell 88E1111 Gigabit PHY)

  • Two 160 GB 7200 RPM SATA 2.5" Seagate Momentus HDDs connected to on-board four port SATA controller

  • Four 160 GB 7200 RPM SATA 2.5" Seagate Momentus HDDs connected to PCI-X four port SATA RAID controller

  • Four USB 2.0

  • Two external SATA ports

  • One RS232 serial port and one RS232 serial port with RS422/485 adaptor

  • DVD drive

  • Two PCI-X slots OR two PCI Express slots OR one PCI-X and one PCI Express; mine has one 16x PCI Express slot and one PCI-X full length slot.

  • Graphics out via Nvidia


I tried FreeBSD 7.0-CURRENT-200709-amd64-disc1.iso on this machine and it installed flawlessly. If you want to see dmesg output please visit Dmesgd courtesy of NYCBUG.

Check out the storage available. If I need to I could combine /nsm1 and /nsm2 into /nsm using Gconcat.

$ df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 989M 194M 716M 21% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad4s1e 9.7G 24K 8.9G 0% /home
/dev/ad4s1f 77G 4.0K 71G 0% /nsm1
/dev/da0s1d 577G 4.0K 531G 0% /nsm2
/dev/ad4s1g 9.7G 12K 8.9G 0% /tmp
/dev/ad4s1d 39G 1.2G 34G 3% /usr
/dev/ad6s1d 144G 258K 133G 0% /var

I am really pleased FreeBSD 7.0 installs on this machine. I may try the i386 version at some point, but I hope to stick with the AMD64 version if possible.

Sabtu, 09 Juni 2007

PowerLite S4 Multimedia Projector

This week I taught TCP/IP Weapons School, Layers 2-3 at Techno Security 2007 in Myrtle Beach, SC. I enjoyed teaching the class, especially since several students were repeat customers. Two were even alumni from classes I taught at Foundstone five years ago! Because the cost of renting a projector and screen from the hotel (and even from rentacomputer.com) seemed outrageous, I decided to buy my own. I purchased an Epson PowerLite S4 Multimedia Projector and Da-Lite 72263 Versatol Tripod Screen 70"x70" Matte White with Keystone Elim for use in the class. I was extremely pleased with both. In fact, right after I bought the Epson projector I saw it covered in a USA TODAY review, which helped validate my purchase.

If you're in the market for a projector and screen combination for less than $800 (or even $700 if you're not time-crunched, as I was) then I think you'll like these products.

Jumat, 23 Maret 2007

Wireless Ubuntu on Thinkpad x60s

I'm used to doing everything manually when running wireless FreeBSD on older laptops. Running Ubuntu has shielded me from some of the command-line configuration I used to perform on FreeBSD. Linux uses different commands for certain tasks. My new laptop also has a different chipset from my old laptop, so I wanted to see if I could get Kismet working on it.

If I want to find wireless networks via the command line I use this command.

richard@neely:~$ sudo iwlist eth1 scan
eth1 Scan completed :
Cell 01 - Address: 00:13:10:65:2F:AD
ESSID:"shaolin"
Protocol:IEEE 802.11bg
Mode:Master
Channel:1
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=76/100 Signal level=-58 dBm Noise level=-58 dBm
Extra: Last beacon: 68ms ago
...truncated...

If I want to associate with that WAP using WEP I use this command.

richard@neely:~$ sudo iwconfig eth1 essid shaolin channel 1 key KEYDIGITS

I am associated now.

richard@neely:~$ iwconfig eth1
eth1 IEEE 802.11g ESSID:"shaolin"
Mode:Managed Frequency:2.412 GHz Access Point: 00:13:10:65:2F:AD
Bit Rate:54 Mb/s Tx-Power:15 dBm
Retry limit:15 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=76/100 Signal level=-58 dBm Noise level=-59 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:2909 Missed beacon:0

I can grab an IP via DHCP.

richard@neely:~$ sudo dhclient eth1
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:13:02:4c:30:2d
Sending on LPF/eth1/00:13:02:4c:30:2d
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.2.1
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.103 -- renewal in 42728 seconds.

Here is ifconfig output.

richard@neely:~$ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:13:02:4C:30:2D
inet addr:192.168.2.103 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::213:2ff:fe4c:302d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4984 errors:19 dropped:2928 overruns:0 frame:0
TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5491350 (5.2 MiB) TX bytes:188020 (183.6 KiB)
Interrupt:74 Base address:0xc000 Memory:edf00000-edf00fff

I can check my gateway.

richard@neely:~$ netstat -nr -4
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.250.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
172.16.207.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth1

I can change my IP from DHCP to static.

richard@neely:~$ sudo killall dhclient
richard@neely:~$ sudo ifconfig eth1 inet 192.168.2.8 netmask 255.255.255.0 up
richard@neely:~$ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:13:02:4C:30:2D
inet addr:192.168.2.8 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::213:2ff:fe4c:302d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5625 errors:20 dropped:2929 overruns:0 frame:0
TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5492954 (5.2 MiB) TX bytes:192494 (187.9 KiB)
Interrupt:74 Base address:0xc000 Memory:edf00000-edf00
ichard@neely:~$ sudo route add default gw 192.168.2.1
richard@neely:~$ netstat -nr -4
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.250.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
172.16.207.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth1

Here are the changes I made to enable Kismet after checking my wireless card.

richard@neely:~$ sudo lshw -businfo | grep eth1
pci@03:00.0 eth1 network PRO/Wireless 3945ABG Network Connection

richard@neely:~$ diff -u /etc/kismet/kismet.conf.orig /etc/kismet/kismet.conf
--- /etc/kismet/kismet.conf.orig 2007-03-23 09:53:28.000000000 -0400
+++ /etc/kismet/kismet.conf 2007-03-23 09:56:00.000000000 -0400
@@ -7,10 +7,10 @@
version=2005.06.R1

# Name of server (Purely for organizational purposes)
-servername=Kismet
+servername=neely

# User to setid to (should be your normal user)
-#suiduser=your_user_here
+suiduser=richard

# Sources are defined as:
# source=sourcetype,interface,name[,initialchannel]
@@ -19,7 +19,7 @@
# The initial channel is optional, if hopping is not enabled it can be used
# to set the channel the interface listens on.
# YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE
-source=none,none,addme
+source=ipw3945,eth1,addme

Kismet works fine. When operating eth1 is in monitor mode.

richard@neely:~$ iwconfig eth1
eth1 unassociated ESSID:"shaolin"
Mode:Monitor Frequency=2.412 GHz Access Point: 00:13:10:65:2F:AD
Bit Rate:0 kb/s Tx-Power:16 dBm
Retry limit:15 RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0

When Kismet exits I'm able to cleanly use my original connection.

Jumat, 16 Maret 2007

USB to Serial Adapter

My new laptop doesn't have a serial port. This is one of the great tragedies of modern laptops in my opinion. At least for situations where I want to connect to the serial port on a server or system with a serial port, I can use a USB to serial adapter like this adapter I bought at NewEgg. I tested it just now by connecting to the serial port on my old FreeBSD laptop.

First I enabled the serial port in /etc/ttys

#ttyd0 "/usr/libexec/getty std.9600" dialup off secure
ttyd0 "/usr/libexec/getty std.9600" dialup on secure

Then I restarted init to activate it.

# kill -HUP 1

On my Ubuntu laptop I attached the USB to serial adapter to a null modem and a gender changer, then connected it to the FreeBSD laptop serial port.

I installed cu(1) on Ubuntu

# apt-get install cu

then checked dmesg output to ensure I had a device to which I could connect.

[17213831.716000] usb 1-1: new full speed USB device using uhci_hcd and address 2
[17213831.876000] usb 1-1: configuration #1 chosen from 1 choice
[17213831.984000] usbcore: registered new driver usbserial
[17213831.984000] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[17213831.984000] usbcore: registered new driver usbserial_generic
[17213831.984000] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[17213831.988000] drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
[17213831.992000] pl2303 1-1:1.0: pl2303 converter detected
[17213831.992000] usb 1-1: pl2303 converter now attached to ttyUSB0
[17213831.992000] usbcore: registered new driver pl2303
[17213831.992000] drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver

Now that I saw /dev/ttyUSB0 was enabled, I connected to it.

richard@neely:~$ cu -l /dev/ttyUSB0
Connected.

FreeBSD/i386 (orr.taosecurity.com) (ttyd0)

login: richard
Password:
Last login: Fri Mar 16 11:57:49 on ttyv1
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.

FreeBSD 6.1-SECURITY (GENERIC) #0: Wed Feb 14 15:33:28 UTC 2007

Welcome to FreeBSD!

That's it. If I needed to set a different speed I'd use the -s switch. For example, if 9600 above was 19200 in /etc/ttys, I'd use syntax like

richard@neely:~$ cu -l /dev/ttyUSB0 -s 19200

Now I know I can rely on this USB to serial adapter when I visit servers in the data center.

Kamis, 01 Maret 2007

External Monitor on X60s

I decided today to test support for external monitors on my Thinkpad X60s. I figured it was a good idea to make sure it worked before trying to deliver a presentation. It turns out I could not use FN+F7 to send the display to an external monitor. However, I did find a document that recommended making the following modification to xorg.conf. It sends display to the LCD and the VGA out simultaneously.

richard@neely:/etc/X11$ diff -u xorg.conf.orig xorg.conf
--- xorg.conf.orig 2007-03-01 10:43:11.000000000 -0500
+++ xorg.conf 2007-03-01 10:37:47.000000000 -0500
@@ -103,6 +103,8 @@
Identifier "Intel Corporation Mobile Integrated Graphics Controller"
Driver "i810"
BusID "PCI:0:2:0"
+Option "Clone" "yes"
+Option "MonitorLayout" "CRT,LFP"
EndSection

Section "Monitor"

Now when I attach a monitor to the VGA port, the laptop can be seen on it.

Rabu, 17 Januari 2007

Latest Laptop Recommendations

It's been over a year since my last request for comments on a new laptop. I had a scare using my almost 7-year-old Thinkpad a20p today while teaching a private class. I wanted to run VMware Server using a VM configured to need 192 MB RAM. The laptop has 512 MB of physical RAM. When I started the VM, VMware Server complained it didn't have sufficient free RAM. Puzzled, I checked my Windows hardware properties and saw only 256 MB RAM reported! Oh oh.

I guessed that maybe one of the two 256 MB RAM sticks in my laptop had been loosened on the trip to the class site. Using a grounding wrist band thoughtfully provided by my class, I removed my laptop's RAM and reseated it. After booting, I saw all 512 MB again. Whew.< This experience made me again consider buying a new laptop. I am going to buy a Thinkpad, probably something in the T series like a T60p. However, I'm considering a new OS strategy. Currently I dual boot Windows 2000 Professional and FreeBSD 6.x. For my next laptop, I'm thinking of installing an OS fully supported by VMware Server, like Ubuntu, with VMware Server over it. I won't install anything else in Ubuntu. I'll do all my work inside VMware, with one VM running FreeBSD for daily work and another running some version of Windows for Office-like tasks.

I've avoided relying on VMware in the past as a primary work environment because I thought I would regularly need hardware-level access to run wireless assessment tools. This hasn't turned out to be a real need, and I think I would just turn to a live CD like BackTrack that has figured out all the Linux kernel voodoo needed for the cooler wireless tools.

Is anyone else doing this? What has been your experience?

Rabu, 10 Januari 2007

New Laser Printer

My old HP DeskJet 970cxi died, so I decided to finally buy a color laser printer. Owning a color laser printer has been sort of a Holy Grail for me. I owned a black-and-white laser printer in 1994, and I always thought the true day of personal desktop publishing would arrive with reasonably priced color laser printers.

I bought a Lexmark C530dn at NewEgg.com for slightly more than $500 (when shipping is included). Since I bought the DeskJet several years ago for around $300, this new $500 printer seems the right price. There are cheaper color laser printers from Lexmark and Dell, but I wanted an integrated duplex unit. (I dislike wasting paper and I prefer to carry fewer sheets when possible.) The printer got outstanding CNet scores and I found the Better Buys for Business (.pdf) praise convincing.

After lugging the box upstairs (60+ lbs) it took about 15 minutes to set up the printer, install the software on Windows XPSP2 and attach the proper cables. I'm printing through the XP box, although the printer has an integrated Ethernet port if I wished to attach it to the network. Print quality (even in draft, which I made the default) thus far is excellent. The printer supports PCL 5c Emulation, PCL 6 Emulation, Personal Printer Data Stream (PPDS), PostScript 3 Emulation, and PDF 1.5, but I haven't tried printing to it from Unix yet.

Rabu, 04 Oktober 2006

Tell Intel What You Think

This Undeadly.org thread clued me in to the problems OpenBSD is having getting documentation and firmware restribution rights for Intel wireless NICs. Theo's letter is not what I would want an Intel decision-maker to read. However, Kenneth J Hendrickson's comment is exactly what I used as a template for an email to Intel's point of contact on this manner -- majid [dot] awad [at] intel [dot] com.

As a FreeBSD user, I recognize that drivers for Linux are not going to help me use my wireless cards. This Slashdot comment explains key points as well.

If you want to use Intel NICs with native drivers, send an email like the one Kenneth sent (but not a duplicate -- explain the situation in your own words). I just did.

Selasa, 19 September 2006

Suggestions for Testing Bypass Switches

I've acquired a number of bypass devices for testing in the TaoSecurity labs. I'd like to know if any of you have requests to know more about these devices. In other words, how would you like me to test them?

The devices in question include the following. Shore Micro SM-2400 Programmable Bypass Switch: This device has TX copper connectors and may support Gigabit Ethernet. Optical Bypass Switch with Heartbeat: This device has SX fiber connectors and supports Gigabit Ethernet. 10/100/1000 Bypass Switch with Heartbeat: This device has TX copper connectors and supports Gigabit Ethernet. Interface Masters Niagara 2295RJ: This device has TX copper connectors and supports Gigabit Ethernet. I find it interesting that it does not require a power supply, but I wonder how it supports a heartbeat without power? Niagara 2282: This is an internal NIC that acts as a bypass switch. It has SX fiber connectors and supports Gigabit Ethernet. Niagara 2280: This is an internal NIC that acts as a bypass switch. It has SX fiber connectors and supports Gigabit Ethernet. I don't see functional differences between this NIC and the previous, but that is a preliminary assessment. So those are the devices. This is how I intend to deploy them for testing.

traffic generator transmitter NIC

|

bypass switch inbound NIC

bypass switch monitor NIC 1 --> sensor NIC 1

bypass switch monitor NIC 2 --> sensor NIC 2

bypass switch outbound NIC

|

traffic generator receiver NIC

For the internal devices, I will have the internal NIC in the sensor feeding a second NIC in the same sensor.

At the moment my main goals are to fully understand how each device works, feature-wise. I plan to do some limited testing this week with the equipment on hand. Next week I plan to use commercial load generators to stress the devices.

Let me know as a comment on TaoSecurity Blog or email to richard [at] taosecurity.com if you have ideas regarding what I should do with these systems.

Selasa, 29 Agustus 2006

Using FCC Filings to Learn About Wireless Cards

One of the cool hints I learned in Ted Wallingford's 802.11 book involved finding your specific hardware in the FCC Equipment Authorization System Generic Search. My Linksys WPC54gv3, for example, has these exhibits. I entered Q87 as the Grantee Code and -WPC54GV3 as the Product Code (including the leading dash). You can get these codes by reading them on your NIC.

Using the Internal Photos .pdf, I can see that this NIC uses a Broadcom chipset. Plenty of other information is available too.

Rabu, 26 Juli 2006

No PCI Express NICs in PCI Express Graphics Slots?

I own a Shuttle SB81P that has a 32 bit 33 Mhz PCI slot, and a 16x PCI Express slot. Earlier I asked if anyone was using the Intel PRO/1000 PT Dual Port Server Adapter, since I wanted to use that NIC in the PCI Express slot.

It turns out that I cannot use that NIC in my Shuttle. I got a sense that it might not work when I noticed the Shuttle documentation called the 16x slot a "PCI Express Graphics (PEG)" slot.

I inserted the 4x NIC into the 16x slot, but I could never get the Shuttle to recognize it. I even followed helpful advice from this VMware thread pointing me to Intel's ibautil.exe, which is a DOS utility that probes for Intel cards (among other tasks). It didn't see the PCI Express NIC.

I eventually took the NIC to my friend Hank at NetWitness, and we put the NIC into the PCI Express slot of a Dell 850 server. I booted the server with a FreeBSD 6.1 install CD, and then started a shell. Sure enough, FreeBSD detected em0 and em1 -- two new Intel Pro NICs.

This is probably a stretch, but is anyone using PCI Express NICs in Shuttles? I'm considering buying a new Shuttle, if I can find one that has at least one PCI Express slot that accepts PCI Express NICs. It seems Shuttles like the SB95P V2 have 16x slots (probably for PEG/video) and 1x, which doesn't help me with the 4x Intel Pro NIC.

Alternatively, is anyone using PCI Express NICs in any PCI Express slots that are presumably for graphics cards?

Rabu, 05 Juli 2006

The One-Minute Wireless Bridge

I am aware of the several fake access point projects available, like Rfakeap. Since one of the main purposes of my blog is to document how I configure applications for my personal future reference, I am listing the steps I performed to set up a wireless access point on FreeBSD.

The FreeBSD WAP laptop will receive its Internet connectivity via DHCP and a WEP-protected wireless network, from, say a conference. The laptop WAP will provide an encryption-free wireless connection to anyone who cares to connect.

I use two wireless NICs for this project.

First I connect the laptop to the local wireless network.

orr:/root# ifconfig wi0
wi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
ether 00:02:2d:4c:ae:de
media: IEEE 802.11 Wireless Ethernet autoselect (none)
status: no carrier
ssid "" channel 1
stationname "FreeBSD WaveLAN/IEEE node"
authmode OPEN privacy OFF txpowmax 100
orr:/root# kldload wlan_wep
orr:/root# ifconfig wi0 ssid shaolin wepkey 0x[WEP key here] deftxkey 1 wepmode on up
orr:/root# dhclient wi0
DHCPDISCOVER on wi0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 192.168.2.1
DHCPREQUEST on wi0 to 255.255.255.255 port 67
DHCPACK from 192.168.2.1
bound to 192.168.2.102 -- renewal in 43200 seconds.
orr:/root# ifconfig wi0
wi0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::202:2dff:fe4c:aede%wi0 prefixlen 64 scopeid 0x4
inet 192.168.2.102 netmask 0xffffff00 broadcast 192.168.2.255
ether 00:02:2d:4c:ae:de
media: IEEE 802.11 Wireless Ethernet autoselect (DS/2Mbps)
status: associated
ssid shaolin channel 6 bssid 00:13:10:65:2f:ad
stationname "FreeBSD WaveLAN/IEEE node"
authmode OPEN privacy MIXED deftxkey 1 wepkey 1:104-bit txpowmax 100
bintval 100
orr:/root# ping -c 1 www.google.com
PING www.l.google.com (64.233.161.104): 56 data bytes
64 bytes from 64.233.161.104: icmp_seq=0 ttl=229 time=61.857 ms

--- www.l.google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 61.857/61.857/61.857/0.000 ms

The laptop wi0 wireless NIC has been assigned 192.168.2.102 via DHCP and it can reach the outside world.

Next I set up wi1 to be the wireless NIC for the WAP.

orr:/root# ifconfig wi1
wi1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
ether 00:04:e2:29:3b:ba
media: IEEE 802.11 Wireless Ethernet autoselect (none)
status: no carrier
ssid "" channel 1
stationname "FreeBSD WaveLAN/IEEE node"
authmode OPEN privacy OFF txpowmax 100
orr:/root# kldload bridge
orr:/root# sysctl net.link.ether.bridge.enable=1
net.link.ether.bridge.enable: 0 -> 1
orr:/root# sysctl net.link.ether.bridge.config="wi0 wi1"
net.link.ether.bridge.config: -> wi0 wi1
orr:/root# sysctl net.inet.ip.forwarding=1
net.inet.ip.forwarding: 0 -> 1
orr:/root# ifconfig wi1 ssid bejnet channel 11 media DS/11Mbps mediaopt hostap up stationname "BejNet AP"
orr:/root# ifconfig wi1 inet 10.10.10.1 netmask 255.255.255.0 up
orr:/root# ifconfig wi1
wi1: flags=8943 mtu 1500
inet6 fe80::204:e2ff:fe29:3bba%wi1 prefixlen 64 scopeid 0x5
inet 10.10.10.1 netmask 0xffffff00 broadcast 10.10.10.255
ether 00:04:e2:29:3b:ba
media: IEEE 802.11 Wireless Ethernet DS/11Mbps (DS/2Mbps )
status: associated
ssid bejnet channel 11 bssid 00:04:e2:29:3b:ba
stationname "BejNet AP"
authmode OPEN privacy OFF txpowmax 100 dtimperiod 1 bintval 100

At this point the WAP can transmit packets from wi1 to wi0 and vice-versa. However, it would be a good idea for the clients that associate with the WAP to get addresses via DHCP, preferably from a range not in use (e.g., not 192.168.2.0/24). This requires DHCP, which I set up in /etc/rc.conf:

dhcpd_enable="YES" # dhcpd enabled?
dhcpd_flags="-q" # command option(s)
dhcpd_conf="/usr/local/etc/dhcpd.conf" # configuration file
dhcpd_ifaces="wi1" # ethernet interface(s)

and /usr/local/etc/dhcpd.conf:

option domain-name "taosecurity.com";
option domain-name-servers 192.168.2.1;

default-lease-time 6000;
max-lease-time 72000;

ddns-update-style ad-hoc;
log-facility local7;

subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.128 10.10.10.192;
option routers 10.10.10.1;
}

I'm being a little lazy here. I should replace the "legitimate" name server, 192.168.2.1, with 10.10.10.1 (my WAP), and configure a caching name server on my WAP. I'm going to avoid that step here, but I would probably do it elsewhere.

At this point you might think I am good to go. I have a rogue WAP on wi1 with IP 10.10.10.1 ready to serve IP addresses once I start dhcpd. The problem is I doubt the legitimate conference WAP knows how to reach my 10.10.10.0/24 network. Clients who associate with my laptop WAP will send traffic with source IPs like 10.10.10.192, but the conference WAP gateway at 192.168.2.1 will not know how to reach the 10.10.10.0/24 network.

The answer is to set up NAT on the laptop WAP.

orr:/root# kldload ipfw
orr:/root# kldload ipdivert
orr:/root# natd -dynamic -n wi0
orr:/root# ipfw add divert natd ip from any to any via wi0
00100 divert 8668 ip from any to any via wi0
orr:/root# ipfw add allow ip from any to any
00200 allow ip from any to any

Now the laptop WAP will NAT for connections on the wi1 network. Remember wi0 is closer to the "Internet" so the 192.168.2.0/24 network will see hosts on the 10.10.10.0/24 network coming from 192.168.2.102.

Last I start dhcpd.

orr:/root# /usr/local/etc/rc.d/isc-dhcpd.sh start
Starting dhcpd.
orr:/root# sockstat -4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
dhcpd dhcpd 1047 5 udp4 *:67 *:*
root natd 976 3 div4 *:8668 *:*
root sendmail 474 4 tcp4 127.0.0.1:25 *:*
root sshd 468 4 tcp4 *:22 *:*
root syslogd 320 7 udp4 *:514 *:*

That's it. Now I can watch the wi1 interface for traffic from anyone who associates with my laptop WAP. I check /var/db/dhcpd/dhcpd.leases and see the following:

lease 10.10.10.192 {
starts 3 2006/07/05 15:56:21;
ends 3 2006/07/05 17:36:21;
binding state active;
next binding state free;
hardware ethernet 00:13:02:4c:30:2d;
uid "\001\000\023\002L0-";
client-hostname "neely";
}

I got someone using host neely to associate with my BejNet laptop WAP. Now I watch for traffic.

orr:/root# tcpdump -n -i wi1 -s 1515
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wi1, link-type EN10MB (Ethernet), capture size 1515 bytes
11:55:21.201914 arp who-has 10.10.10.1 tell 10.10.10.192
11:55:21.202170 arp who-has 10.10.10.1 tell 10.10.10.192
11:55:21.202372 arp reply 10.10.10.1 is-at 00:04:e2:29:3b:ba
11:55:21.204930 IP 10.10.10.192.1025 > 192.168.2.1.53: 9367+ A? www.google.com. (32)
11:55:21.484230 IP 192.168.2.1.53 > 10.10.10.192.1025:
9367 3/0/0 CNAME www.l.google.com., A 216.239.37.99, A 216.239.37.104 (84)
11:55:22.195205 IP 10.10.10.192.1025 > 192.168.2.1.53: 9367+ A? www.google.com. (32)
11:55:22.198575 IP 192.168.2.1.53 > 10.10.10.192.1025:
9367 2/0/0 A 216.239.37.99, A 216.239.37.104 (64)
11:55:22.203729 IP 10.10.10.192 > 216.239.37.99: ICMP echo request, id 1024, seq 2304, length 40
11:55:22.246182 IP 216.239.37.99 > 10.10.10.192: ICMP echo reply, id 1024, seq 2304, length 40

There we are. 10.10.10.192 is pinging Google. Here is the view from the other side of the NAT.

orr:/root# tcpdump -n -i wi0 -s 1515
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wi0, link-type EN10MB (Ethernet), capture size 1515 bytes
11:55:21.202186 arp who-has 10.10.10.1 tell 10.10.10.192
11:55:21.205067 IP 192.168.2.102.1025 > 192.168.2.1.53: 9367+ A? www.google.com. (32)
11:55:21.484044 IP 192.168.2.1.53 > 192.168.2.102.1025:
9367 3/0/0 CNAME www.l.google.com., A 216.239.37.99, A 216.239.37.104 (84)
11:55:22.195388 IP 192.168.2.102.1025 > 192.168.2.1.53: 9367+ A? www.google.com. (32)
11:55:22.198491 IP 192.168.2.1.53 > 192.168.2.102.1025:
9367 2/0/0 A 216.239.37.99, A 216.239.37.104 (64)
11:55:22.203809 IP 192.168.2.102 > 216.239.37.99: ICMP echo request, id 1024, seq 2304, length 40
11:55:22.246099 IP 216.239.37.99 > 192.168.2.102: ICMP echo reply, id 1024, seq 2304, length 40

As far as the 192.168.2.0/24 network is concerned, 192.168.2.102 is making the request -- not 10.10.10.192.

That's it. Obviously this is exactly how to set up your own wireless access point for legitimate purposes. It's also how anyone could set up a WAP to watch traffic from anyone who decides to associate with my laptop WAP. This is the reason 802.11i and other systems are needed, although arbitrarily trusting wireless access points is more of a social problem than a technical problem.

Update: There appear to be some problems with comments, so I'll post additional thoughts here.

Chris asked about dispensing with DHCP and NAT.

I tried two approaches along those lines, but neither worked.

First I tried simply removing DHCP and NAT, but leaving wi0 with an IP address and assigning no IP address to wi1. In this scenario, I could see ARP traffic from an associated client for the DHCP server on the "conference" WAP (who has 192.168.2.1?) but the DHCP server on the conference WAP did not respond.

Next I tried doing nothing but setting up wi0 and wi1 as a pure bridge. wi0 associated with the conference WAP, and wi1 set up as an access point. Again, I could not get the DHCP server on the conference WAP to respond.

By the way, when I say "conference" I really mean the Linksys WRT54G WAP in my lab.

Remember that NAT is not strictly necessary if the conference WAP gateway knows how to reach the wi1 segment. This is not realistic, however, because it requires setting a static route for the wi1 segment on the conference WAP.

I also just renamed this article to be "The One Minute Wireless Bridge," since that is more in the spirit of what I'm doing -- providing one WAP to access another WAP.

Sabtu, 24 Juni 2006

Got My Mac Mini

I may have waited seventeen months, but I bought a used PowerPC G4 Mac Mini through eBay. I'm running the Debian PowerPC port on it. Why? It's so darn simple. Download and burn .iso, boot in Mac Mini. Easy. I couldn't do that with FreeBSD. The only wrinkle I encountered involved trying to manually create the partition table. I repeatedly received an error (which I have since forgot), so I let Debian create the partition for me. Here is what it set up:

macmini:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 72G 3.9G 65G 6% /
tmpfs 252M 0 252M 0% /dev/shm
macmini:~# fdisk -l /dev/hda
/dev/hda
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap untitled 1954 @ 64 (977.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 untitled 153281251 @ 2018 ( 73.1G) Linux native
/dev/hda4 Apple_UNIX_SVR2 swap 3018219 @ 153283269 ( 1.4G) Linux swap

Block size=512, Number of Blocks=156301488
DeviceType=0x0, DeviceId=0x0

Why the PowerPC and not the Intel model? Diversity. Diversity equals survivability on the Internet. I buy Dr. Dan Geer's argument, and I want this box to survive the next target-of-opportunity worm or unstructured threat. I realize a structured threat will find G4 assembly programming a slightly higher obstacle than Intel assembly, but that might buy me some time. In any case, I was able to retire a much larger, noisier, slower, and electricity-hungry HP Visualize B2000 workstation by buying the Mini -- without changing how I do business. The PA-RISC box ran Debian too. Beautiful.

Senin, 17 April 2006

Cool News Taps from Net Optics

You know I am always on the prowl for new networking gear to perform network security monitoring. In fact, I may write a whole new book about the subject, pulling enterprise network instrumentation coverage from future editions of The Tao and other books and concentrating it in a single volume.

In the spirit of sharing information on new gear, I am happy to let you know about two cool new products from Net Optics. The first is the 10/100 Teeny Tap, pictured above. This is a fully-functional, dual-power, dual output traditional 10/100 Mbps tap. It's functionally equivalent to the 10/100 Ethernet Tap.

The second neat product is the iTap Gigabit Dual Port Aggregator. This is a Gigabit tap that provides two outputs where each are combinations of the two TX input streams. This tap is similar to the Gigabit Dual Port Aggregator with several major differences, which I noted last month. I ran some traffic through this tap today and I really liked seeing the traffic load on the LCD screen. I did not get a chance to try the remote management features, but I plan to soon.

I took some photos of the Teeny Tap sitting above a traditional Ethernet tap, on top of the copper iTap. (There will also be a fiber iTap.) You can see just how tiny the Teeny Tap is. You can also buy the Teeny Tap online. It ships with a smart black canvas carrying case that looks like a digital camera container. It is big enough to hold the tap and two power supplies, along with some cables. I intend to take one with me on all of my engagements.

Thank you to Net Optics for sharing these with me. Who in your organization could use a Teeny Tap? I'm sure any consultants who travel as frequently as I do with a laptop bag would love to replace their existing setup with a Teeny Tap. As for the iTap, expect to see more of these everywhere -- the statistical functions are awesome.

Jumat, 07 April 2006

Specifications for my Next Laptop

I've been running Windows 2000 and FreeBSD on my Thinkpad a20p for six years, and I've been considering replacements. That machine offered various features for which I had waited many months, such as a graphics card with 16 MB RAM, mini-PCI architecture for onboard Fast Ethernet, etc.

Now I find myself considering the features I would like to see in my next-generation laptop. While I don't have any specific vendor or model in mind, here are the features I want:

I don't see anything on Intel's roadmap which offers these capabilities yet, but The Register indicates units will ship around March 2007. Mike's Hardware and NotebookReview.com provide some tips on Merom models as well.

That should give enough time for vendors to include Windows Vista. I think I will run the 64 bit Enterprise version. I plan to dual-boot with FreeBSD, but I will also use some version of VMware. I might run the new, free VMware Server, as long as it supports the same snapshot features found in VMware Workstation.

Senin, 13 Februari 2006

Virtualization on Low-End Hardware

I have a few really old laptops that I've rescued for use in the TaoSecurity labs. One is a Thinkpad 600e PII 366 MHz with 128 MB RAM, and the other is a Thinkpad 1400 Pentium MMX 300 MHz with 256 MB RAM. Recently I wondered if I could use them as VMware Player running on them. First I needed a supported operating system. I first tried Ubuntu, since it looked like the most recent free OS with which I was familiar. Unfortunately, Ubuntu's live CD and installation CD hung on the two laptops I tried.

I turned next to Red Hat Linux 9, intending to use the Fedora Legacy project to update the OS once installed. RH 9 and Fedora Legacy worked perfectly. I don't need to repeat what I did because the Using Fedora Legacy's yum 2.x for Red Hat Linux 9 documentation is so excellent. I checked the FAQ and used Yum to update the kernel after the userland apps were updated. Impressive all around.

Next came the moment of truth. Would VMware Player run on these old systems? The newer PII ThinkPad installed the Linux .rpm with no problems. When I ran vmware-config.pl, however, I had to let VMware compile the kernel modules it needed. It needed kernel-source-2.4.20-43.9.legacy.i386.rpm installed, and I had to point the installer to /usr/src/include/linux-2.4 instead of /usr/src/include/linux. When the process was done I was able to run VMware Player as root. Awesome.

Then I tried the older Thinkpad. After installing the .rpm, I tried running vmware-config.pl. I encountered this error:

[root@rh9tp1400 root]# vmware-config.pl
Your processor does not support the cmov instruction. VMware Player will not run
on this system.

Your /proc/cpuinfo is:

processor : 0
vendor_id : GenuineIntel
cpu family : 5
model : 8
model name : Mobile Pentium MMX
stepping : 2
cpu MHz : 299.950
fdiv_bug : no
hlt_bug : no
f00f_bug : yes
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8 mmx
bogomips : 598.01

Execution aborted.

Darn. No VMware Player on the Pentium MMX 300 MHz! Well, if VMware Player wouldn't run, what about QEMU? I found a QEMU .rpm at the DAG repository. When I tried installing it, the .rpm complained it needed SDL-1.2.5-3.i386.rpm.

(Note: When I installed RH 9 on these laptops, I did a Workstation install, automatic partitioning, no firewall, and I customized the packages to remove GNOME, Graphical Internet, Office/Productivity, Sound and Video, Graphics, Games and Entertainment, X Software Development, GNOME Software Development, and Printing Support; I added System Tools and Kernel Development. Total package size: 1311 MB.)

I installed the SDL package, and sure enough QEMU ran on the P-MMX! I booted a Linux image to test it. I did not try networking. This was more proof-of-concept, since I do not have QEMU images ready for use as I do VMs.

One of the main reasons I conducted this test was to provide a baseline of hardware I could expect to use when I teach my classes. I plan to suggest a PII with 256 MB RAM running RH 9 as the absolute free-OS minimum for supporting VMware Player.

Jumat, 27 Januari 2006

Soekris Dies, What Replacement?

Yesterday the UPS powering my Soekris Net4801 died. Now the Soekris no longer finds its internal 2.5 hard drive running FreeBSD 6.0. I was able to update the BIOS using this guide and the comms/lrzsz, but it had no effect. The process was simple

> download

Shift ~
Shift C

lsz -X b4801_128.bin

If I want to stick with the Soekris, I may try one of the OS installation options listed here. However, I'm wondering if I should just abandon the Soekris for something more powerful. I saw the 256 MB Net4801 will arrive soon, but I've been looking at these OpenBrick and newer systems.

Does anyone have any recommendations for new small form factor systems? Here are my ideal requirements:

  • Very small and flat -- ideally something that would fit in a consultant's brief case for carrying on a plane, along with a laptop.

  • 3 NICs, preferably one or more with Gigabit capability

  • Can use flash or a laptop HDD

  • Runs FreeBSD 6.x

  • Video and keyboard outputs are not required, but I'm starting to like that option

  • At least 128 MB RAM, preferably 256 MB or more


This is starting to sound like a laptop, but I would prefer not to use a laptop. I do not like leaving laptops at client sites. The temptation to open the screen and touch the keyboard is too great for some clients. I like using a small appliance like a Soekris.

Selasa, 17 Januari 2006

Who Uses PCI Express NICs?

I'd like to buy an Intel PRO/1000 PT Dual Port Server Adapter for the PCI Express slot in my Shuttle SB81P. Has anyone seen these NICs yet, or used similar PCI Express NICs with FreeBSD?