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.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState