Wi-Fi Mini Honeypot

OpenWrt and Tinyproxy

If your machine has enough resources, you can go one step further and use a proxy on your router. With this, you will be able to monitor, filter and modify HTTP traffic. Squid is an example of full-blown proxy solution. If you have a router that is capable of running it, go ahead. If you (like me) don't, you'll have to stick with a solution with fewer requirements. An example of such a solution is tinyproxy. To install tinyproxy in your OpenWrt, run:


opkg update
opkg install tinyproxy luci-app-tinyproxy

Then, configure and run it with:


uci set tinyproxy.@tinyproxy[0].enable=1
uci commit
/etc/init.d/tinyproxy enable
/etc/init.d/tinyproxy restart

From now on, your tinyproxy should listen by default on port 8888 on your localhost. You can check this with the netstat command. Since you want to accept connections not only from localhost, but also from LAN, you'll have to change the configuration a little bit. Also, in our case, it's better to run it in so-called stealth mode—that means no added headers in HTTP. You can find the tinyproxy configuration in the /etc/config/tinyproxy file. Listing 2 shows an example of such a configuration. Notice that logfile is specified to be in the /storage directory, which is our pendrive. Another important option is list 'Allow'. These are the IPs that are allowed to connect to the tinyproxy. You should specify your LAN network or a part of it.

Listing 2. Tinyproxy Configuration with Domain Filtering, Stealth Mode and Custom Log Localization


config 'tinyproxy'
        option 'User' 'nobody'
        option 'Group' 'nogroup'
        option 'Port' '8888'
        option 'Listen' '192.168.1.1'
        option 'Timeout' '600'
        option 'DefaultErrorFile' '/usr/share/tinyproxy/default.html'
        option 'StatFile' '/usr/share/tinyproxy/stats.html'
        option 'Logfile' '/storage/tinyproxy.log'
        option 'LogLevel' 'Connect'
        option 'MaxClients' '100'
        option 'MinSpareServers' '5'
        option 'MaxSpareServers' '20'
        option 'StartServers' '10'
        option 'MaxRequestsPerChild' '0'
        list 'Allow' '192.168.1.0/24'
        list 'Allow' '127.0.0.1'
        option 'ViaProxyName' 'tinyproxy'
        option 'DisableViaHeader' '1'
        option 'FilterDefaultDeny' '1'
        option 'Filter' '/storage/filter'
        list 'ConnectPort' '443'
        list 'ConnectPort' '563'
        option 'enable' '1'

Tinyproxy also lets you filter requests by domain. You can specify a blacklist or a whitelist of domains in the Filter file. In our configuration, this is '/storage/filter' Also, here we notify tinyproxy to treat this file as a whitelist (FilterDefaultDeny 1), meaning that requests only for specified domains will be allowed. That way, you can forbid attackers from accessing the Internet with their browsers or let them access only specified domains. An example of a /storage/filter file could be:


linuxjournal.com

That would let them visit only the Linux Journal Web site.

______________________

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