Saturday, 6 February 2010

htrosbif gets better

Alpha 4 is out now.

More signatures, more tests, and even bugs fixed. Imagine.

Git repo: git clone http://anduin.net/~knan/htrosbif.git/

Sunday, 24 January 2010

Perl trick-of-the-day - $USER-local modules

Ever been frustrated by CPAN and scared to upgrade modules as root? Been burned by a perl rpm/deb upgrade overwriting your carefully upgraded modules?

Jon Allen brings us the light in a nice, short revelation. And a perl module. Of course.

Install/upgrade local perl modules in a user homedir, with basically no extra effort. Brilliant.

Thursday, 5 November 2009

introducing htrosbif

htrosbif - Active HTTP server fingerprinting and recon tool

What does it do?

knan@viconia:~/ak-git/htrosbif.git$ ./htrosbif http://localhost:8525/
Match (1200/1200): pound-2.4.5.sig => jetty-4.2.19.sig
Match (1193/1200): pound-2.4.5.sig => jetty-4.2.24.sig
Match (1076/1200): pound-2.4.5.sig => jetty-4.0.6.sig
Match (1042/1200): pound-2.4.5.sig => jetty-4.1.4.sig
Match (1039/1200): pound-2.4.5.sig => apache-1.2.6-php3-used.sig
Match (1033/1200): pound-2.4.5.sig => jetty-3.1.8.sig
Match (1010/1200): pound-2.4.5.sig => jetty-3.0.6.sig
Match (1000/1200): pound-2.4.5.sig => tomcat-4.1.40-oldconnector.sig
Match (1000/1200): pound-2.4.5.sig => tomcat-5.0.30.sig
Match (1000/1200): pound-2.4.5.sig => apache-2.2.13-php-5.3.0-used.sig

Does a bit of Recon by Fire, if you will. Prods the web server in all sorts of old, new, basic, fancy, spec-compliant and spec-breaking ways. Tries to characterise both the well-spoken educated responses and the seriously deviant babble it receives in return. Signatures contain no user data, only header names and http-level quirks. A few dozen sacrifical test installs of servers ancient (cern, 1993) and new have survived its tentacles.

As a (very) useful side effect, might detect reverse proxies, http load balancers, intrusion prevention systems and web application firewalls.

Cool! Download?

Sure. http://anduin.net/~knan/htrosbif/htrosbif-alpha-3.tar.gz

$ git clone http://anduin.net/~knan/htrosbif.git/

License?

GPL v3.

Alpha, huh?

Yup. Signature format(s) are still in flux, and sections of the code are just stubs. But it basically works. Sending me signatures isn't very useful yet. Sending me patches, ideas and comments, however... are extremely welcome @ knan-rosbif at anduin.net.

Why?

Because I wanted to see what could be inferred from behaviour alone.

HTTP load balancers like Pound and HAProxy usually are invisible, ghostly presences, subtly directing traffic and shaping conversations - these touches are detectable, if you think to look.

Replacing a Server: header is trivial effort, mimicking protocol handling quirks much less so.

Monday, 2 November 2009

Bad karma

The 9.10 upgrade losing track of /boot and swap (What, uuid? never seen those uuids anywhere, honest! Wanna buy some slightly used /dev/sda* references? Fell off a truck!) and thus failing to boot was a bit painful.

A bunch of games suddenly growing scratchy/stuttery sound problems not evident in jaunty was more painful. Much debugging ensued.

Wondercure: apt-get remove --purge pulseaudio

... if only all social disorders were as easy to correct.

Tuesday, 6 October 2009

Befuddling web servers for fun

sub test_get_11trailingcrap_knowngood()
{
# So, does trailing crap after the HTTP/1.1 cause a panic?
#
# Lots of fun stuff ... some ignore the crap,
# some think "stupid client, must be 1.0, here you go",
# some get confused about the url and return a 404,
# some reject with 400, some spew an error page
# with no headers at all ("stupid 0.9 client, go away")...
#
# ...and some are just endearingly confused about it all.
# UNKNOWN 400 Bad Request

Wednesday, 23 September 2009

Fingerprinting fun

knan@viconia:~/ak-git/htrosbif.git$ ./htrosbif http://thepiratebay.org/
Fuzzy match (932/1000): lighttpd-1.5-svn2621.sig
Fuzzy match (797/1000): lighttpd-1.4.23.sig
Fuzzy match (797/1000): lighttpd-1.4.21.sig
Fuzzy match (797/1000): lighttpd-1.4.22.sig
Fuzzy match (683/1000): lighttpd-1.4.17.sig
Fuzzy match (683/1000): lighttpd-1.4.18.sig
Fuzzy match (683/1000): lighttpd-1.4.13.sig
Fuzzy match (683/1000): lighttpd-1.4.19.sig

Monday, 6 July 2009

Hairy stunt #1: firmware update via wine

My shiny new LG GGW-H20L blu-ray/alphabet soup reader/writer happened to need a firmware update. For some reason, many hardware vendors think win32 executables are handy for this sort of thing. I really... don't.

But I got intrigued when several people reported success updating the firmware through wine. Copious amounts of wine can of course make almost anything seem like a good idea, so I bravely give it a try - it will probably brick something in an amusing way, at least.

winetricks mfc42 grabs the usual missing dlls for us. Yet, the firmware updater fails with something on the order of ERROR_SUCCESS in informativeness.

Oh well. Last try: running wine as root.
... and it works. Quickly and perfectly. I don't _think_ I'm hallucinating. More voluptuous hallucinations would be expected in that case.

I suspect the kernel's blk_verify_command kicked in when running as a normal user. Fair enough, you don't necessarily want the backup job user to be able to overwrite the tape drive firmware with zeroes. Or a more-evil-than-usual ransomware virus.

Still, I boggle. And salute fellow Wine contributors. Well done.