theWhiteNoise.net - Web Log

5/10/2007, Thursday

Wireless Interception with Re-Broadcast

Filed under: — Brandon @ 4:21 pm

Now, all of the following is strictly hypothetical.  I would never create something like this because it’s technically against the law to intercept a wireless signal or join a wireless network if you don’t own it (yes, even if it’s unencrypted)…

Hypothetically, if someone needed to connect to a wireless access point hundreds of feet away (which they didn’t have the privilege/access to modify settings on) and didn’t feel like buying a wireless card with an antenna jack for their laptop, much less carry a directional antenna around with them, they might consider a rig such as this:

I introduce the good old 54G line of routers…the ones I talk about below happen to be made by Buffalo(WHR-G54S), but Linksys also makes a version (WRT-54G).  The cool thing about these routers is their firmware is flashable with 3rd party firmware which enables a whole host of features not normally available with the default firmware.  For this project a hypothetical person would need to purchase 2.  Good thing there are sweet mail-in rebate deals!  By the way, these are awesome routers not just for a project like this, but for general use.  I use the Linksys model as my main router at home.

BuffaloRouter-Mod

Anyway, both routers need to be flashed with DD-WRT firmware (www.dd-wrt.com).  The flashing process varies by which model of router you have, but there is a wiki for most of the popular models on the DD-WRT website.  From now on, I will refer to the 2 routers as Router A and Router B. 

Router A: needs to be set up with a router IP of something other than the default 192.168.1.1 (192.168.2.1 is a good choice).  It also needs to be set in DHCP mode so it hands out IP’s to any clients attached to it.  Now comes the cool part, with the modified firmware, there is an option under the Wireless section to have the router function in “Client Mode.”  This esentially allows the router to act as a wireless client to an access point (the access point to connect to is set under the Admin section).  When it is connected as a client, it’s wireless capabilities cannot be used as an access point for other clients (this is where the second router comes in later).  However, the hard-wired LAN ports do work as you would expect from a router – any client hard-wired to the router is served internet access via the wireless connection via “Client Mode” signal from the remote access point.  To improve wireless signal reception with the remote access point, Router A should be fitted with a directional antenna.  I suggest this guide for constructing one:  Cantenna How-To.  You will need a N-type Male to RP-SMA Female pigtail (can be found on E-bay) to connect the antenna to the router.

Router B: I bet you can guess what we’re going to do with this guy.  This router should be set up much like any home-use router.  The main point of this router is to serve as a local wireless access point to clients in close proximity.  The router IP should be set to something other than 192.168.1.1 or the IP of Router A (192.168.3.1 is a good choice).  It also needs to be set up in DHCP mode.  The wireless settings should be set up to your liking, providing a SSID, channel #, encryption scheme, etc.  Just make sure you don’t set it to “Client Mode” as you did with Router A.  Once everything is set up, use a short CAT-5 cable to connect the WAN port of Router B to any LAN port of Router A. 

What will happen:  Router A will connect to the remote access point as a client.  Router A will give Router B an IP address via DHCP.  Router B will broadcast an SSID so any local wireless clients can connect to it.  Once they do, Router B will give the client an IP address via DHCP.  All traffic will route from the wireless client (ie. a laptop) wirelessly to Router B which will pass the traffic along to Router A via CAT-5 cable, Router A then passes the traffic on wirelessly to the remote access point. (Obviously, the reverse happens for return traffic).

The result:  You can use a laptop without an antenna to connect to an access point hundreds of feet away.