31
Aug

2.9 Million Proxies

Unless something extraordinary happens today, my previous prediction of “three million proxies by the end of August” is shot down.

I have taken the time to spiff things up a bit.  I have added flags that were missing for one reason or another, including Greece (how did that get missed?), Hong Kong, some tiny island near Finland I forgot the name of, and “APAC”, short for “Asia/PACific” and a peculiarity of the Maxmind geoip database.  I had been using the flag of the Earth for missing flags, but I was tired of looking at it.

Here and there a few duplicate proxies have popped up in the List.  I scour the master database every day for dupes but some have escaped into the gold database.  Fixing that will only take a few minutes when I decide to get around to it.

27
Aug

PoTTy v0.60 Subject To DLL Hijacking

When I released PoTTy into the wild, I noted that I didn’t plan on supporting or improving it.

However, this DLL hijack hack for PuTTy also works against PoTTy.  I suppose that’s expected, since they use the same code.

So… I’d like to fix it.  The problem is, I’m not sure how to go about doing that, but I am currently looking at this MSDN article and scratching my head.

There are other motivations for hacking PoTTy as well.

My Via Bypass Redux hack will come in handy for a few months.  Long ago I considered building that functionality (adding arbitrary headers when connecting via proxy) into PoTTy, so I may be adding that in the future as well.

Still, I’m basically a lazy programmer.  But I am looking into the DLL fix now.

18
Aug

TCP 9415 Proxies Brought To You By Network Solutions

Reports of “millions of infected Web sites” in the past few days have been flooding the Intertubes.  These are due to a malware widget displayed on default parked pages at Network Solutions.

According to this article the widget is dropping a Koobface variant primarily on Chinese browsers.

One potentially limiting factor in this attack was that it seemed to target Chinese Web surfers. The malicious widget caused a fake message box to pop up, similar to a message prompt generated by the instant messaging client Tencent QQ. While this chat client is by far the most popular in China, it is probably unknown to most Westerners.

It doesn’t take a genius to connect the dots on that one.

17
Aug

Via: 1.0 Thunder

If you’ve been poking around the Brazilian proxies that have showed up in the past couple of days, you’re probably familiar with the Via header above.

All of these proxies point to the same upstream server, which identifies itself as, you guessed it, “Thunder”.  And all appear to be running the same version of Mikrotik routerOS, judging by the presence of other open ports on the IP addresses.

Yes, it’s yet another flawed device roll-out.

This fine learning establishment is planting all these boxes as a part of their distance learning program.  So, in a sense it’s a “Back to School Special”, Brazilian style!

Here‘s one of their network techs!

I don’t expect these to be around for long (next Monday at the latest), but they do work.  The fact they’re all transparent proxies and all bounce to the same downstream IP severely limits their usefulness, but there they are.

09
Aug

More Annoying JavaSHIT Obfuscation!

Time and time again the bozos who run proxy lists try to come up with silly JavaSHIT schemes to prevent their pages from getting scraped by list raiders like me.

Consider the following stupidity (click for a larger view):

This is silly on a number of levels.

First, anyone remotely concerned about online security (there’s a couple of us) has JavaSHIT disabled 24×7 and the last place they’d want to enable it would be on a freakin’ proxy list site.

Second, that “eval(unescape(…” bullshit screams “HAXX!!!”

Third, this code simply unescapes to the html that would have been displayed had they not obfuscated it in the first place.  What is the point?

And since it’s JavaSHIT, it’s easy to pull off the page and de-obfuscate.

I bring this up because I have been throwing out the unproductive sites I’ve been pulling data from.  Some have disappeared, including my very last, solid gold Russian proxy site.

Those are some big shoes to fill, so to replace it I Googled “proxy list” to see who’s getting all the hits these days.  For the most part it was the usual suspects, but there were a few new names so I looked into them.

And sure enough, most of them were using JavaSHIT obfuscation.  Even some of the old standby sites have been re-written to leverage JavaSHIT.

And I was surprised to find that I could actually get some good proxies from these sites.  THAT in itself is very unusual.  Typically you go through the hassle of unobfuscating this crap and it’s seldom worth the effort.

As usual, you’re the WINNER!

06
Aug

TCP 9415 Proxies

Recently, a sharp-eyed reader noted that proxies on TCP port 9415 suck ass, and suggested they might be Koobface proxies.  So this morning I did a little reality check and found:

  • They do suck ass
  • They share some aspects of last year’s Koobface spread

I did a special resurrection on every dead port 9415 proxy in the Gold Database (proxies verified at one time or another) and did some manual spot-checking.  In all, out of 5766 dead proxies I found fifteen live ones.  Most were located in China, Hong Kong, or Taiwan.  One was in Alberta, Canada.

The first one I found, in China, gave me two pages before it started resetting connections.

The Canadian proxy – apparently a Shaw Cable residential account – was fine.  It was perky and never refused a request.

However, I just now re-checked it and it’s timing out.

Several of the others simply returned the text string “error” to the browser.

Some took forever and never returned anything.

This report from Japan offers some interesting insights:

As for 9415/tcp, access from multiple sources in overseas (mainly China) observed at multiple monitoring points … has been on the rise since March.

When I look at the Big Database (all proxies scraped but not verified) I see approximately the same results just eyeballing the data, but I see the activity starting way back in August 2009.

It really takes off by the middle of May 2010.  A quick query shows that 60% of all 9415 proxies were discovered after May 15th.

In all there are over 170,000 port 9415 proxies in the database, which would make a decent botnet.

Coincidentally, Koobface “bloomed” in May of 2009.

I’ve always said this was a seasonal business.

11
Jul

419 SPAM From a Texas Hospital

I have a lot of security delicacies “on my plate” but SPAM isn’t one of them.  Back at the salt mines, that’s someone else’s problem.  Suffice to say I’ve ignored the subject for years, considering it’s fairly well handled by all the Web mail accounts I have floating around (Yahoo, Hotmail, Gmail, et cetera).

I never even look at the stuff.

However, there is this woman – let’s call her “Helen Dink” – who is no relation to me but by some strange quirk of fate we share the same ISP.  She believes her e-mail address is hdink@myisp.com, but it’s not.  That’s my email address.  I’ve had that address for almost ten years now, but whenever she goes to fill out Web forms online she plugs in my email address!

So I get a lot of her email.

This has been going on for at least five years.  I know more about this woman than I want to (yes, she’s a Facebook user).  Her friends constantly send me email about a variety of crap, from Girl Scout meeting notices to recipes and the like.  It’s incredibly annoying and for the past few years I’ve been writing them back and letting them know, in no uncertain terms that I am not “Helen Dink” and to please remove my email address from their “Contacts” folder.

So today I got an email from “Andrea Wilson”, a normal-sounding American name.  Thinking it’s one of Helen’s buddies I open it up in order to send my standard reply to these things.

But it’s not.  It’s a 419 scam email…

I am Golan Bradley a staff of Natwest Bank ,I am pleased to pass across to you a very urgent and profitable business proposal which I believe will profit the both of us after completion.I will await to receive a positive response from you to enable me give more details Please send your confidential telephone and fax number in your reply to: golan.bradley@removed.com Golan Bradley(Mr.)

The security wonk inside me kicks in and I decide to look at the SMTP headers, thinking I’d be able to track it back to Nigeria or Cameroon (hi, fellas!).

But the headers were extremely legit.  The email went through 2 Exchange servers, a Symantec Brightmail Gateway (an anti-SPAM device), and a ZIX encryption device before ending up at my ISP.

“Andrea Wilson” turns out to be a Real Person™  who works at a hospital in Texas.  And, not surprisingly, she’s an active Facebook user.  Obviously her workstation or laptop or whatever had been summarily pwn3d and was being used to deliver 419 SPAM for person or persons unknown.

Well, that’s her problem.

I briefly toyed with the idea of writing her back and suggesting she have the IT department check out her box, but that’s a notoriously bad idea and generally frowned upon (this comes from the heyday of email viruses, when sending a “HEY ASSHOLE YOUR COMPUTER HAS A VIRUS” email only served to exacerbate the problem).

Maybe I’ve been away from SPAM for too long, but it seems unusual to see legitimate SMTP headers from an obviously corporate environment, considering that lately the vast majority of SPAM comes from Yahoo, Gmail, Hotmail, et cetera.

Everything old is new again.

01
Jul

Fucking Snort… 64bit Edition

I built 64bit snort (x86-64) on my old friend, Debian 4 (“etch”) and had lots of fun doing it.

It wasn’t quite as hard as I thought it would be, but there were a number of stumbling blocks, so I thought I’d post them here if anyone runs across the same issues.

First, our old pal Libnet1.02a is so fucking ancient it predates the AMD64 processor.  The Makefile simply barfs with an “unknown platform” error.  This was easy enough to fix.  First, locate line #172, which should be a comment starting with  ”Recognize the basic CPU types” (duh).  Right under that line should be a line starting with “vax-*”.  Edit that line to include “| x86_64-* |”.  No quotes, as usual.  Run configure, make, make install and that issue is over and done with.

Libdnet was the next big issue, and it was a problem on my 32bit Deb4 system as well.  Normally I hack shit together in /usr/local/src and libs fall into /usr/local/lib.  Unfortunately, libdnet doesn’t like living there and you can run ldconfig all day long and snort will still bitch about not being able to find it.

So start with “./configure –prefix=/usr” and that problem goes away.

I had to build a few things from scratch because Georgia Tech (gtlib.gatech.edu), my favorite apt repository (they seem to be the fastest around),  apparently stopped mirroring 64bit Deb4 and I was too lazy to look for a working repository.  You shouldn’t have this problem.  I had to build libpcap, flex, and bison from source but there were zero issues with any of those.

It took a while to come up with a decent config for snort but what I finally used was this:

./configure –prefix=/usr \
–sysconfdir=/ \
–localstatedir=/ \
–enable-react –enable-flexresp2 \
–enable-build-dynamic-examples –with-zlib \
–with-libnet-includes=/usr/include \
–with-libnet-libraries=/usr/lib \
–enable-decoder-preprocessor-rules \
–enable-targetbased –enable-64bit-gcc

Some of that may be unnecessary.  The dynamic examples are buggy and you’ll end up deleting them anyway (you’ll figure it out – trust me).

Once building snort64 was out of the way, I downloaded the rule set and tried out the different pre-compiled “so” (Shared Object) rules.

None of them worked.

That is of course my problem for using an ancient (2006) version of 64bit Debian.  There are a limited number of pre-compiled preprocessors for x86_64 and none are compatible with Deb4 (they all want ‘GLIBC_2.4′, which Debian 4.0 doesn’t have).

This is not going to be a problem for you folks on the cutting edge of Linux.  If I was running Lenny (I hate Lenny with a passion) I’m sure I could have used one of the 64bit pre-compiled preprocessors for Ubuntu.

But I’m not, so I had to roll my own.  And that’s when it got ugly.

Due to “contractual obligations” (NDAs no doubt), snort/SourceFire is only allowed to distribute certain rules in binary format.  They include the source for the non-NDA rules, but how to actually compile them is a trip into Undocumented Territory (“here be monsters”).

Sure, there’s a README file but all it does is explain their legal obligations and reassure you that one of the the pre-compiled preprocessors should work.  That’s it.  That’s all it says.

Thanks, Marty.

But there is a Makefile, so you’re halfway there.  I had to do the following to build the so preprocessors.

First, copy all the files in the src folder (that came with your VRT rules) into the folder where your snort source lives.  I called the folder “so_rules”.  Then fix the locations in the Makefile, like so (assuming you installed the snort source in /usr/src):

BASEDIR=/usr/local/src/snort-2.8.6
ENGINEDIR=$(BASEDIR)/src/dynamic-plugins/sf_engine
PLUGINDIR=$(BASEDIR)/src/dynamic-plugins
ENGINE=$(BASEDIR)/src/dynamic-plugins/sf_engine/.libs/libsf_engine.so
SNORT=$(BASEDIR)/src/snort

Note the variable $SNORT assumes snort is already built and living in your source folder.

Then, comment out the line that begins with “PATH” because I absolutely guarantee you don’t have an Intel compiler.

Now, find the line that start with “libs :=” and remove the following:

pop3
web-activex
web-iis
icmp
sql

These must be the NDA-disqualified shared objects because there is no source to build them from.

Next, just for fun, find and comment out this line:

MYCFLAGS+= -DMISSING_DELETED=1

Why?  Check out the “deleted.rules” file that came with your VRT rules.  There is a lot of old crap you may never see again, but you never know.

Save the Makefile and type “make” inside the so_rules folder (not the toplevel make).  If all goes well, move the *.so files you just built to a folder under /etc/snort (I used “so_64″) and edit your snort.conf file to point to them (the very last line in the “Step 4″ part of snort.conf).

Finally, test your new config out and see what happens. You should see “166 preprocessor rules” intead of “0 preprocessor rules” now and 13 new “Rules Object” entires (I’m using the May 2010 VRT set, so YMMV).

Again, you shouldn’t have to go through this crap if you have a relatively modern 64bit distro of Linux (newer than 2006 I’d say) since the distributed shared objects should run just fine.

What do Windows users do about the lack of shared object rules?  Suffer, I guess, since there are no pre-compiled binaries, 32 or 64bit.

Hopefully, SourceFire will fix that soon.

Are you listening, Marty?

27
Jun

Fucking Snort

I got bored with snort and intrusion detection a few years ago.

The last thing I did with snort was try to code a netfilter detector/packet killer for one of Luigi’s UT99 hacks.

It was an epic FAIL.

I even read the docs!

But back in the day I ran snort & ACID (now BASE – how clever) on a number of boxes, both at work and at home.  I got very tired of seeing all those false positives, every day, day after day after day.  And then reading in the snort online docs that a particular rule I was unfamiliar with had “no known” false positives or negatives.

Riiiiight.

And then snort went commercial.  Well, good riddance.

So it’s been at least three years since I touched it.

Suddenly, out of nowhere, my boss the Security Thought Leader decides snort has to be deployed throughout our organization on every-fucking-thing that can run it.  And since I was stupid enough at one time to open my mouth and let the word “snort” fall out of it, it’s my problem.

Lo and behold we’re now up to snort v2.8.6.1.  And it turns out to be a bad time to be implementing snort.

As of June 2010 (Hey!  That’s like… now!) a lot of the old freeware utilities for managing snort are obsolete.  Not that they were any good, but their very existence was helpful in avoiding reinventing the wheel.

And the more things change the more they stay the same.

Like depending on Libnet v1.0.2a.  They still give you a link to a dead Web site in the docs so you can download this ancient piece of code required to build snort.  Luckily (I think it was luck) freebsd.org still had it in their archives.

Also luckily Mr. Security Thought Leader only wants to send snort alerts to a centralized SIM/SIEM syslog server, which simplifies everything (although he doesn’t know that… he would complicate the fuck out of everything if he did know it).  This is the only documented design requirement in the whole project:

Send snort to syslog!

That’s it!  Nothing more.  What he plans to do after that is a mystery.  Right now I have the Proof of Concept running on a few Windows servers and as usual they’re not producing anything of any interest whatsoever.

The Linux servers are another matter entirely.

I hate to say it, but our *ix admins are the biggest newbz I’ve ever met in my long and glorious IT career.  They need to have a vendor hold their hand whenever they do anything and their collective mantra is the age old refrain:

THE VENDOR WON’T SUPPORT IT!!!

To make matters worse, they are going to have to build snort if their vendor doesn’t distribute a 2.8.6 version of snort.  And considering they run Red Hat, they’re going to have a long wait.

So with all that in mind I built snort 2.8.6.1 for my Linux firewall (good old Debian Etch) and configured it for syslog alerts only.

It’s been running for about an hour now and all I’m getting is:

(http_inspect) LONG HEADER [Priority: 3]

… from just about every Web site I visit.  You would think with all this proxy crap running every hour I’d at least get a “Hey! Somebody’s using an external proxy” kind of alert but no.

There’s obviously some tuning that needs to be done (max http header was 750, so I upped it first to 1024, which wasn’t enough, and then to 2048), but with all the doom & gloom about hackers and cybercrime, et cetera, I really expected a shitload more alerts.

I guess my firewall rules are pretty good after all.

FWIW, it took less than ten hours for some idiot named Tedickhead to remove my PoTTY entry at Wikipedia, without any reason given.  Of course, it pissed me off but I refrained from putting it back in for the time being.

25
Jun

More Blatant Self-Promotion

I was Googling something or other today and the Wikipedia PuTTY page turned up in the list of results.  This set some wheels turning in my tiny little brain.

So I went to the page and took a look at the external links section, just for shits & giggles.  Sure enough, there was a list of “Other versions of PuTTY”.

Hmmmm…. it seemed that list was missing a very important version of PuTTY… PoTTY!

So I added it!

And I put it in the wrong place.  I put it under “Other programs related to PuTTY” instead of “Other versions of PuTTY”.

DOH!

Typical Hinky Dink fuck-up.

Anyway, I was going to change it but I’ve been bitch-slapped at Wikipedia before, so I decided to wait-and-see if they decide to delete it before editing it again.

Like most folks, they don’t like me very much. : (