Wi-Fi Mini Honeypot

Keep in mind that this will block only HTTP requests; all the other traffic will be allowed if you haven't blocked it elsewhere.

Finally, you must tell your router to forward all HTTP traffic to your new proxy. As usual, you can do this with iptables, but first you need to install the iptables-mod-nat-extra package:


opkg install iptables-mod-nat-extra
iptables -A PREROUTING -t nat -p tcp --destination-port 80 
 ↪-j REDIRECT --to-port 8888

From now on, all HTTP requests should be forwarded through tinyproxy and logged to /storage/tinyproxy.log. Listing 3 shows a fragment of such a log. You can see what connections the user tried to make and what has been filtered by the proxy.

Listing 3. tinyproxy.log


CONNECT   Oct 22 16:17:59 [1242]: Connect (file descriptor 7): 
 ↪crimson.lan [192.168.1.200]
CONNECT   Oct 22 16:17:59 [1242]: Request (file descriptor 7): 
 ↪GET / HTTP/1.1
NOTICE    Oct 22 16:17:59 [1242]: Proxying refused on filtered 
 ↪domain "www.google.com"
CONNECT   Oct 22 16:18:05 [1243]: Connect (file descriptor 7): 
 ↪crimson.lan [192.168.1.200]
CONNECT   Oct 22 16:18:05 [1243]: Request (file descriptor 7): 
 ↪GET / HTTP/1.1
CONNECT   Oct 22 16:18:05 [1243]: Established connection to host
 ↪"www.linuxjournal.com" using file descriptor 8.
CONNECT   Oct 22 16:18:06 [1244]: Connect (file descriptor 7): 
 ↪crimson.lan [192.168.1.200]
CONNECT   Oct 22 16:18:06 [1244]: Request (file descriptor 7): 
 ↪GET /pixel/p-a3K3N6enFe9wA.gif HTTP/1.1
NOTICE    Oct 22 16:18:06 [1244]: Proxying refused on filtered 
 ↪domain "pixel.quantserve.com"
CONNECT   Oct 22 16:25:52 [1246]: Connect (file descriptor 7): 
 ↪crimson.lan [192.168.1.200]
CONNECT   Oct 22 16:25:52 [1246]: Request (file descriptor 7): 
 ↪GET / HTTP/1.1
NOTICE    Oct 22 16:25:52 [1246]: Proxying refused on filtered 
 ↪domain "www.google.com"

When tinyproxy filters a connection request, it displays an information page describing what happened. You also can make use of this to hide tinyproxy's presence or to inform or deceive your attackers (or make a joke). The Web site template is in /usr/share/tinyproxy/default.html. You can see a slightly modified version of this in Listing 4 and Figure 2. This doesn't tell users about tinyproxy and the reason for seeing this page; instead, it politely informs them that they shouldn't use this network for Internet access.

Figure 2. Web Site Template

Listing 4. tinyproxy.html


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 ↪"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<h3>Information</h3>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Information</h1>
{clienthost} <br /><br />
You shouldn't use this network for web access.
</body>
</html>

Go with the Evolution

The next step in the evolution would be a full-blown wireless honeypot. You can make one using a machine that can run a typical Linux distribution. Then install, for example, dionaea, use a wireless card configured to run as an access point and forward all traffic to your localhost, on which the attacker will see fake services.

Remember, if you want a really good honeypot, make sure that it looks as close as possible to reality. That means, for example, that you might use some dummy clients just to simulate traffic. Or, use WPA instead of WEP. It all depends on your environment.

Also, it is important to be familiar with your country's laws. Make sure it's not prohibited to sniff your attackers' data. Think about whether it's wise to make an Internet connection available for them. Maybe it would be better not to connect your router's WAN port to anything at all, connect it to your machine simulating the Internet or connect it to the Internet but filter the traffic with iptables?

Finally, don't be discouraged by the DD-WRT or OpenWrt systems. They are based on Linux and are very similar in use, but because of the small resources available, they're stripped down. There are no manual pages and slightly different utilities that you may know from you Linux distribution, even though they are named the same. And, the documentation isn't always accurate. If you have any problems, both projects' wikis are very helpful.

And, last but not least, have fun building your solution and (especially) with browsing the collected data!

______________________

Marcin Teodorczyk is a GNU/Linux user with more than 12 years of experience. For the past four years, he's been using Arch Linux exclusively on his personal computers.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Xorauguynazdbuj

Zikinellelysqno's picture

ontocheme xaikalitag brurcewibra http://usillumaror.com - iziananatt poursotbato http://gussannghor.com Galefelpreelt

It is quiet helping

Anonymous's picture

Initially when public are not aware buy wi-fi system and usage different thoughts came to mind. but with every new day use and reliability of it has een increases. Printers computers mobile every thing is dependent on it. I was facing problem in printer wire the easily solution i fgound ask your hp printer to connect through wireless.

great post

Damilare Bakare's picture

what a great post you have here on the WiFi mini honeypot, learned a lot check out for Cisco wireless router products

Its something we call technology

ellem's picture

Its good but some times its shows abnormal previous while using it. This is just awesome wi-fi changes technology on daily bases. I really wonder that how quickly time changing.My motorcycle tracker can be easily operate by it.I am just looking that some service provider who can provide My motorcycle gloves a unique technology for someone special.

Very nice post. I just

Jiad's picture

Very nice post. I just stumbled upon your blog and wanted to say that I have truly enjoyed surfing around your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!
voyance gratuite

Why using a honeypot anyway?

ΕΠΙΠΛΑ's picture

If you secure your rooter with somethingbetter than WEP ex. WPA why bothering to know who is attacking - they can't break it.

Cheers,

ΕΠΙΠΛΑ

Is better to know the devils

Anonymous's picture

Is better to know the devils there than to hide and hope he goes away,No?

Default SSID or using a

Anonymous's picture

Default SSID or using a dictionary word for the SSID under 10 characters - The use of rainbow tables can crack WPA WPA2. WPA2 Enterprise as a starting point should only be considered "secure".

WPA(2)-PSK with AES cypher

Anonymous's picture

WPA(2)-PSK with AES cypher with 63 characters long, random passphrase cannot be beaten by any rainbow table in some finite time. that is how I secure my WLANs and trust me, no one can beat that.

What about WAPs?

Ant's picture

I have an old Linksys WAP11 (not a router). Will this work too?

Thank you in advance. :)

Live connection needed...

Joejoejoejoe's picture

As far as I know, a live connection to the route/honeypot is mandatory in order to crack WEP and WPA... So if you don't have one, nobody will ever get in your honeypot...

Xorauguyna

Demaemiain's picture

ontocheme xaikalitag brurcewibra http://uillumaror.com - iziananatt poursotbato http://gusannghor.com Galefelpreelt

English only please.

Anonymous's picture

English only please.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix