Setup Razorback Release 0.3.0 in VirtualBox

If you’ve not yet heard of Razorback, start listening. Sourcefire, the company behind the incredibly popular and effective Snort IPS, are working on a new project to extend detection capabilities beyond their traditional IPS. The best part: much like Snort, Razorback is an open source project, which will likely be incorporated into Sourcefire commercial solutions at some point while still maintaining the free version. In the age of security budget cuts despite the so-called “Year of the Hack” free is a good thing.

So what is it? Razorback is an attempt to separate traffic capturing and detection. Traditional IPS solutions capture traffic and analyze it real time, which has limits in terms of exactly how much analysis and reconstruction it can perform. Razorback takes the approach of capturing data based on what type of data is being exchanged then submitting content for analysis to additional processes, such as ClamAV scans, dissecting PDFs, submitting file types to Virustotal, and more. Check out the Sourcefire team’s presentation at DefCon 18 if you want to learn more about it before diving in.

Razorback is young, but it’s growing up fast and the latest release overcomes one of the biggest obstacles in deploying the solution for testing: setup and configuration. Sourcefire has released a virtual machine appliance that can get you a Razorback installation up and running in less than 20 minutes. I’m going to walk you through doing just that with VirtualBox.

First you’ll need a PC with at least 8gb of RAM and two NICs. You’ll also need the ability to mirror the traffic you want to monitor via port span, hub or tap. You can download VirtualBox here and don’t forget the VirtualBox extensions here. The Razorback VM can be found here.

  1. Install VirtualBox then install the VirtualBox extensions. Defaults in both cases should be fine.
  2. Launch VirtualBox and click File > Import Appliance. Click the Choose button and browse to where you downloaded the Razorback virtual appliance file, Razorback-0.3.0-Release.ova, and click Open then Next. I’d suggest selecting the check box to re-initialize the MAC address of the appliance’s network card then click Import. It should only take a couple minutes to import the appliance.
  3. Once the appliance is imported, the first thing you’ll need to do is edit the VirtualBox network settings. Right-click the Razorback-0.3.0-Release machine name and select Settings. When the Settings window loads, select Network.Razorback VirtualBox Network SettingsFirst we want to make sure the first network adapter is set to Bridged Adapter. Make sure the “Name” field indicates the network card you want to be the management interface. Next click little triangle next to “Advanced.” You’ll need to change the “Adapter Type” to get it to work with FreeBSD so choose “PCnet-PCI II (Am79C970A).” Since this is only a management interface, don’t worry about Promiscuous Mode. Do NOT create or configure a second adapter for the monitor interface…yet. Choose OK when you’re done with the settings.
  4. Right-click the Razorback-0.3.0-Release VM and choose “Start” for your initial boot. It will take a couple minutes to boot and once it’s done you’ll see a command line menu and if you dither you’ll start to see some “razorback masterNugget” log events writing to the console. Click in the VM and press enter to see the menu again if it gets away from you. You should see a URL for the system management web interface.Razorback ConsolePort 8080 is the admin interface, port 80 is the user interface. If you don’t see the URL/IP address or if it’s not valid, reconfirm the network settings above.
  5. Open a web browser and browse to http://<Management IP>:8080/. Login as admin, password: razorback. Click Network > Interfaces > Add Interface. This is where you configure the Razorback management interface. The NIC should be le0. You can give it whatever interface name you like and setup DHCP or a static IP for the management interface. Scroll down and Click OK when you’re done.
  6. Shutdown the appliance. You can do so either from the command line menu or from the web UI.
  7. Once it’s shutdown, go back into VirtualBox Settings > Network (right-click the Razorback VM). Now we need to add a second adapter where your port mirror/span/tap should be. SaaC (Snort as a Collector) will monitor this interface. So click Adapter 2, enable it and set it to bridged. The “Name” should be the physical network card used for the port mirror. Click Advanced and set the “Adapter Type” to “PCnet-PCI II (Am79C970A).” This time we want to set “Promiscuous Mode” to “Allow All.” Click OK.
  8. Restart Razorback virtual appliance.
  9. This is where it gets tricky…if you don’t know vi. Basically, we need to edit /etc/rc.conf to configure Snort to monitor the proper interface. If you don’t know vi you can always learn the basics in 5 minutes here. From the Console Setup text menu on the Razorback VM, enter “9” to get Shell access. Type “vi /etc/rc.conf” and scroll to the bottom of the file. You’re looking for the lines following: “## TAP/Span interface on em1”.We need to change “em1” to the interface name “le1” on both the ifconfig_le1 and snort_interface lines as seen in the screen shot above. Save the file.
  10. Back to the browser, access the Administration web UI at http://<Management IP>:8080. This time, head to Services > Control Services and click the On/Off button next to Snort.Razorback Administration Control ServicesIf everything goes as planned the button should turn blue/on.
  11. Open up a new tab and browse to http://<Management IP>/ and login as admin, password razorback and watch for events and more importantly alerts.

That’s about all there is to it. Monitor performance as high bandwidth can really tax the system. If you have the resources, adding more RAM to the VM can help.

When you start to see events and alerts you’ll see something like this:Clicking on the Alert count will show you which inspector alerted and provide a little information as to why, in this case OfficeCat found an Office vulnerability. Drilling into the Metadata count can get you a good bit more detail. In this case the vulnerability was found in a downloaded file from Yahoo!Mail.And we can tell from the HTTP Response what file we need to be worried about. This type of data can be really handy for creating indicators of compromise (openioc.org).If you give it a go, please consider joining the Razorback mailing list and supporting the development with testing feedback.

Happy hunting!

Reflections on MIRcon

If you missed MIRcon 2011, you should tune in to Mandiant’s State of the Hack: What really happened at MIRcon webcast on October 28th. (Archived version should be available here.) There were some great talks from the likes of Richard Clarke, Michael Chertoff, and Tony Sager, and a lot of the greatest minds in incident response and cybersecurity either presented or were present. Kevin Mandia has assembled an insanely gifted and giving crew.

What did we learn? Organized crime, hacktivism and nation-states are the attackers and no target is invulnerable. Your only defense is to quickly identify and carefully disrupt attacks. Don’t be a soft target. The harder the attacker has to work, the more likely you’ll either stop them the next time or they’ll move on to a softer target. They understand and have seen firsthand the effects of cyber espionage: the skill, speed and agility of the attackers; the ineffectiveness of standard security infrastructure; the economic impact of personal, corporate and national data loss and compromise.

We cannot put a price on the ultimate impact of cybercrime. Sure, we all know someone who has had to deal with credit card fraud or has received one of those letters stating that your personal information “may” have been lost. That’s a huge hit on our economy. But it’s the tip of the iceberg. It’s what you see in the media and has the most potential to effect you personally. Now think corporate. Stealing PII is valuable. Attacking corporate bank accounts is profitable too. I believe it was Michael Chertoff who referred to “outsider trading” in his talk: stealing confidential corporate communications to leverage that information against the victim company in business negotiations. If you’re a bidder and you know the lowest bid in advance you can pretty much guarantee a win.

It doesn’t stop there. Richard Clarke told a great story about driving down a highway in Dubai where he saw an eighteen wheeler carrying a predator drone. He later asked Dubai officials when they had starting buying predators. “We haven’t.” they said.  “The US won’t sell them to us. That was a Flying Dragon.” Guess who they bought that from?

The ultimate impact seems immeasurable and there are no indications that it’s going to let up. In that sense, MIRcon was as depressing as I had expected. Actually, a little more so. Kevin Mandia’s opening remarks left my co-worker turning to me saying, “Wow. Depressing. Wow.” and me nodding affirmatively. Had it ended there I probably would be looking to buy some farmland and chickens far away from the Interwebs. Instead the next two days were filled with quality presentations, amazing technology and it’s uses, and real-world stories of victories and defeats. By the time Kevin gave his closing remarks I was still depressed, don’t get me wrong. It’s bleak. But some people get it. Some battles are being won. And at least some of the people fighting those battles are interested in helping you wage those battles yourself and providing tools and guidance to do so. There’s a rich, military background in the core of Mandiant. It’s quite apparent they’ve never abandoned service to their country.

/salute Mandiant