fonz said:
Does anyone have any experience with running a honeypot or a tarpit, or perhaps with some other means of retaliation (or having a little fun with them)?
Some experience, though dated. From several years ago when I was still using Solaris 10/x86. Slightly offtopic: Solaris provided a feature called zones which I assume are comparable (to some extend anyway) to the Jails of FreeBSD. Basically an extra kernel thread which fully separated itself and provided a whole new userland. And thanks to features such as DTrace and Auditing I felt pretty confident to set up a honey pot of some sorts.
Basically re-routing every request for port 22 (tcp/udp) to the zone and setting up the zone with a root password you can find back literally in one of the many password dictionaries (for example the one provided with
security/cracklib (just discovered it's also included with FreeBSD):
/usr/local/share/cracklib).
My experiences are dated, but there are a few points I came to learn over the years. The most important one; no matter how sad it is: it's more than often a waste of time & energy to report weird sources and hacking attempts.
I traced back several IP addresses and domains and alerted several hostmaster, network managers and datacentre administrators. Needless to say with full network logs showing both their connection attempts (not merely related to SSH) and in the case of my "dogma zone" (the zones name was
dogma, directly picked up from "Central Dogma"; a term used in the Neon Genesis Evangelion anime series) also full auditing logs. Sometimes you got an automated reply, sometimes people actually answered you, but in most cases the source IP would remain active and keep hitting your firewall.
Needless to say but I gave up on that.
Point two: Don't make it too obvious. Back then the
.ro netblocks became very notorious, almost comparable to what
.cn is now (maybe even more so), so obviously you shouldn't merely allow everyone access. At least block some well known sources of nastyness, that makes it look more real
and makes your box look more appealing as well. Surely if you have something to protect then it must be somewhat good, no?
Point three: Don't bother with all the pre-made honeypot stuff. It may do its job and work to some extend, but I always compare it to using pre-made captchas: because they're well known they're also relatively easy to recognize and that only limits (or hinders) the results. For that reason I always use captcha routines I wrote myself; the major spammers don't know this routine, its hardly feasible for them to program around a routine so sparsely used and all of a sudden you find yourself pretty much protected from spam.
Last but certainly not least: it can be quite some fun, but whatever you do make sure that you know what the heck you're doing. Don't take shortcuts, because in the end you're taking somewhat of a risk with all this.
If you're not going to see it all the way through then it might be best not to bother with this stuff in the first place. But yeah; it can be really funny.
Its been ages, but I used my setup to collect sources of rootkits. So when someone got in and tried using
wget or
curl (sometimes even ftp) to grab his "l33t" hackertools it would actually give him an environment which logged everything, and put a rather nice virtual throttle on the whole thing. You know; making it look as if the download got in at speeds between 100b/second and 1kb/second

And when it finally arrived they got a renamed copy of
nmap (the sourcecode package).
I actually need to laugh out loud when thinking back at re-reading the logs and audits I got. Some even tried to compile that stuff, you could almost imagine the surprised look on their faces
Final point: Realize that you are taking risks. I wouldn't do this on a home network or something, because if you piss people off big enough then you'll always risk them DDoSSing the living daylights out of you.
I don't know about you, but that's not something I'm really into any more these days. In fact, getting tired of crap like that was why I eventually stopped frequenting my, at that time, favourite IRC network / channel; due to the nastiness happening from time to time. To me it felt like I was wasting my time working around all that stuff, while I could be doing much nicer stuff. (having a dynamic IP address besides your more static IP address really helps in those cases).
That about covers my experiences. It can be fun, but you'd better think this through up front before diving into this.