UNC faculty member held responsible for security breach

I don’t know any details beyond what’s published here but it seems to me that the prof probably has a point about being scapegoated.  It’s unlikely that she personally set up all the computer systems involved in her research project – at least, I hope she didn’t, she got paid too much to fiddle with that.  Judging from intimate experience with working with faculty, I find it equally likely that she just wasn’t told about issues, or that she was and overrode staff protests.

If she wasn’t told, then shame on the staff, particularly if she’s correct and “everybody knew but me.”  (I would hope though, that if “everybody” included other faculty members, that they tried to impress the scope of potential issues on her; often faculty who won’t listen to staff will listen to other faculty.)  If she was told but overrode the concerns, then I don’t think the discipline was enough – she should be fired.  If she wasn’t told, she shouldn’t be disciplined; the people who didn’t tell her should be dismissed.

However it actually happened, it feels like something is missing from that story, there’s detail missing about interaction between her, her group of researchers, and the support staff involved.  That detail is what would allow the informed reader to judge whether or not the discipline she received was fair.

Suricata and pf_ring on RHEL 5.5

I wanted to evaluate Suricata in its recommended configuration, using libpcap linked against the pf_ring library.  But there are a lot of READMEs out there, a lot of them referring to older versions of pf_ring, and the pf_ring documentation itself isn’t very clear.

It took me some digging around and experimenting, but this blog post has a comment by Wil Metcalf that made it all much easier for me.

Succinctly: check out pf_ring revision 4079, then build the kernel modules, then the userland/lib stuff.  You may need to add /usr/local/lib to /etc/ld.so.conf.  I had troubles with the latest version of pf_ring on my RHEL 5.5 installation.  YMMV by this point, of course.

You may also find this post to be useful, although it still talks about patching kernel sources.

Tangentially but also useful if you’re relatively new to RHEL and kernel sources, you might find this post also to be helpful – I did, but there’s probably nothing new there for experienced RedHat admins.

Once you have pf_ring going, you’ll want to rebuild libpcap to link against pf_ring.  I used vanilla source for this, and it was no problem with a straight ./configure && make.  And now suricata:

./configure –enable-pfring –with-libpfring-libraries=/usr/local/lib –with-libpfring-includes=/usr/local/include

And that was pretty much it for me.

Firewall bypass attempts from China?

While examining flow records for a compromised host, I observed several connection attempts from various Chinese IPs, all in the same /24. The source port was always 80, the destination port always 33824. I don’t see anything obvious on the googles or sites like the Internet Storm Centre, so now there will (eventually) at least be something Google-able. I’d appreciate hearing from any other ITSec types about what this might be, either specifically or in general. My suspicion is this is probing for some botnet or another, with source port 80 to try to get by stupid firewalls, but I lack full content data to prove or disprove this theory.

A snark on modern computing

From an IRC rant of mine.  I took out a few comments, but this is otherwise unredacted.  Sorry if you don’t like strong language, skip to the next post.  I don’t claim the thoughts to be particularly original, but I don’t believe I’ve expressed them here, myself, before.

< kraigu> I don’t find it interesting that we’re reinventing mainframes; I find it depressing and shittacular that we’re not just reinventing them, we’re reinventing them _poorly_
< subdriven> How would you do it differently?
< kraigu> I’d see what a 390 would cost me nowadays
< kraigu> it’s amazing to me that 30 years after the PC revolution, we’re going to be using dual and quad core workstations with no less than 2 or 4GB of RAM to run apps in the ‘cloud’
< kraigu> or even if you’re ipad-enabled, you’re still using about 500 times the amount of computing power my parents had to basically run applications in exactly the same way they did on a keypunch machine.
< kraigu> that’s it
< kraigu> I’m writing a fucking JCL interpreter app for the iphone
< kraigu> it’ll submit jobs to EC2 for you

Except I don’t want to be bothered to give Apple money to develop for a platform I don’t have, so you, Kind Reader, have my permission to steal my wondrous idea.

What the hell, it can’t be any worse than any other job dispatcher out there.

Doing pcap stuff with Ruby on a Mac

This is probably old news to anybody who’s used to Ruby on Macs, but I’m not.  I like using MacPorts when I can, so that’s where my Ruby runs from.

I went looking for pcap modules and found a bunch, but the most promising seemed to be packetfu.  It came with a caveat: “PacketFu is reported to work on OS X, assuming you can get pcaprub installed correctly.”

So the first step was to get pcaprub going.  You can get it at rubyforge, the trick is it has a README, a single C source file, and a small ruby script. It turns out the secret is to do ‘ruby extconf.rb’, which will create a Makefile for you, and you can then ‘sudo make install’.

The author of packetfu recommends sticking with sources, available here. Check them out like this: ‘svn checkout http://packetfu.googlecode.com/svn/trunk/ packetfu-read-only’ – I like doing this in ~/src, but your tastes may differ.  Use the pcaprub_linux directory, and again, ‘ruby extconf.rb’ followed by a make / make install.  The test script bombs out – by default it wants to use the fw0 device.  Nevertheless, I pressed on and did as suggested: ‘cd .. && sudo ruby setup.rb’ which finished with no failures.

Note that following these steps will pollute your MacPorts ruby install with files about which it knows nothing – I generally like to avoid this, but it seems like scripting languages insist on having their own packaging systems that make it not quite impossible to work with other such systems.

Then I wrote a little test script that should just count packets:


require 'packetfu'
filename = ARGV[0] || exit
count = 0
incap = PacketFu::Read.f2a(:file => filename)

incap.each do |pkt|
 p = PacketFu::Packet.parse(pkt)
 count += 1

puts "#{count} packets"

I would not recommend doing as I did and turning it loose on a 711MB pcap trace – top showed the process using 1.9GB of memory before I managed to get a responsive terminal to kill it.  It fared slightly better on a 12MB trace (a subset of the larger ones) and correctly counted 85411 packets, but still hit 265MB:

real    4m0.359s
user    3m16.012s
sys    0m1.891s

I’m a fairly-incompetent Ruby programmer, but the above seems fairly straightforward – I’m not sure I’d want to turn this parser loose on anything of any real size.  While 711MB is a pretty big trace to be parsing, 12 is pretty small.  To be fair, I had other processes running at the time, including a Windows 7 VM that was patching (unbeknownst to me) but it’s a 4GB dual core machine.  I’d been hoping to more easily pull various bits of data out of the larger file, but it looks like I’m stuck with tcpdump and tshark for now.

ETA: I had been going to post again about xtractr, but it’s not a 100% Mac/Ruby solution. It provides an interface so that I could use Mac Ruby installs to talk to an xtractr instance, but so far as I can tell, there’s no 100% Mac solution. So I’m running it on an Ubuntu box, but I won’t bother detailing how I got it going – it was pretty straightforward, although it required some work I’d already done to make gems sane on an 8.04 system.