|
Foil Wireless Poachers and Have Fun Doing It (Part 2)
Killing and SlayingLast week we learned some fun ways to mess with the minds of wireless freeloaders, and introduced ourselves to some methods for finding out who is on our networks. Today we're going to learn some different ways to kick unwanted visitors off networks, and how to see exactly who is lurking on our airwaves. Who says computer geeks are mild-mannered, non-violent wimps? Why, we have all manner of violent commands at our fingertips. Like
2 users: (1 local, 0 telnet, 0 ssh, 1 other) load: 0.02, 0.12, 0.12 (init) pinball tty2 -bash (kdm) carla :0 - Oy, you exclaim! Pinball should not be logged into the fileserver! Pinball should not even have a login account on the fileserver! This is very bad! What shall I do? First of all, stop panicking. Use the Up/Down arrow keys to navigate to Pinball, then hit Enter. You'll see this: 2 users: (1 local, 0 telnet, 0 ssh, 1 other) load: 0.12, 0.36, 0.29 (init) pinball tty2 6972 - /bin/login -- 6975 `- -bash Select the line with the lowest process number by using the arrow keys, and hit Ctrl+K to kill Pinball. Then you'll see this: 2 users: (1 local, 0 telnet, 0 ssh, 1 other) load: 0.29, 0.34, 0.28 (init) pinball tty2 User logged out Ha. Take that, Pinball. The Enter key toggles between the selected user and the list of users. Press F9 to expose the top menus. Obviously you now need to figure out how an unauthorized user was able to log into your server, repair the breach, and look for rootkits or other nasties. You might even need to rebuild the whole system. But at least you found out there was an intruder, which is always a good thing to know.
Finger
$ finger Login Name Tty Idle Login Time Office Office Phone carla carla *:0 Jan 15 11:22 pinball *tty2 5 Jan 15 15:02 Now use the $ ps auwx |grep tty2 pinball 7748 0.0 0.5 5464 3056 tty2 S+ 15:02 0:00 -bash Then run
Getting Tough With tcpkill and CutterThese are fine when all you need to do is boot bad users off certain computers, but what if you want to fling them off your entire network? For that you need First you need to know the IP address of your unwanted visitor, which you can find with # sudo nmap -sP 192.168.0.* This will find all active hosts on your network, and report hostnames, IP addresses, and MAC addresses. Naturally you'll need to know which ones belong. Then clobber the ones you don't want with # tcpkill -9 net 192.168.0.25 The cutter command makes it even easier. Just do this: # cutter 192.168.0.25 tcpkill and cutter see both wired and wireless users. To zero in on wireless users, use Kismet.
Also, there's an easier, holistic way to keep wireless freeloaders and bad people out. Just upgrade all of your wireless gear to WPA2-compliant devices. Authenticate and encrypt every single bit that travels over your airwaves. It's easy and it works. Don't forget that even when you are successful at preventing intruders from entering your network, it's still trivially easy for them to sniff wireless traffic. WPA2's AES-based encryption will foil this.
Hunting Down Rogue (Not Rouge) Access Points With Kismet
Unfortunately, locking down your wireless access point won't prevent your users or other nefarious persons from setting up their own access points. Even if they don't have nefarious intent, a poorly-secured WAP won't care about good intentions. This is where Kismet more than earns its beans. With Kismet you'll find all access points and wireless users in your vicinity. When you run Kismet you won't have network connectivity on the wireless card doing the monitoring. So, if you need be to on the network at the same time you'll need a second network interface. Start up Kismet. Hit Select one network with the arrow keys, then hit Now that you know how to find access points and users, you can use the violent commands to knock them off your network if you need to do so. Tracking them down physically is a another problem. Kismet measures signal strength, so it will help you find them.
Kismet DronesAs usual, I'm out of room before I'm out of ideas, so here are some quick hints for folks who want to set up a stationary Kismet drone network. This is a slick way to monitor your site all the time, without having to wander around looking like a war-walking dork. Drones need two NICs: one wireless interface for monitoring, and a second NIC for sending data to the server. Wired interfaces are good for this, though you can use wireless if you really really want. Configure the drones in Finally, configure source=kismet_drone,192.168.1.50:3510,drone1 Use one line per drone. The You are now well on your way to wireless wizardry, and foiling the forces of darkness who would dare to trespass and misuse your wireless network. Resources
This article originally appeared on Enterprise Networking Planet, a JupiterWeb site.
|