Monday, July 30, 2007

HeX liveCD: CD Label - Geek00l

Update for the HeX LiveCD Project, proposed CD Label

Check it out here....


Thursday, July 26, 2007

FreeBSD 6.2 Install Pt 1 of 3

Again, whilst browsing the interweb I came across a fairly detailed instruction set for the base installation of FreeBSD 6.2 at so, why reinvent the wheel?

While this document does cover the install of FreeBSD 6.2, you should still familiarize yourself with the user guide at:

The installation tutorial is located at:

I'll be following up with parts two and three of this series detailing the installation of the security toolkit and required subsystems.


A note on NSM

A common need that many of my clients have is that for network security monitoring (NSM). It is widely believed and understood that some sort of intrusion detection or intrusion prevention system (IDS/IPS) is a valuable addition to enhance their security posture. With this understanding though, the same individuals or corporations that have gained this level of understanding are still missing a piece of the pie.

So, what is this missing piece? Simply put, its a live person or a security analyst. The most sophisticated systems in the world still need a well trained individual to not only tune them but also to monitor their output and validate or even interpret it.

Typically when we put any such system in-place there is an involved process of understanding the normal traffic-patterns of the communication taking place on the existing network. This allows us to, over time, create a baseline and tune out any false-positive items that may be triggered by legitimate traffic and fine-tune other existing rules. Even after all fine-tuning is complete the system needs an individual to analyze output and validate any events that pose risk to the information systems and organization. Depending on the size of the network involved, this individual or individuals could range from the local network Administrator to a team of dedicated security analysts. In the instance of this individual being the local network Administrator there should be adequate training such that this individual is familiar with network security practices, standards, and the usage of the in-place monitoring systems. This training should be refreshed annually to insure that the administrator is kept up to date with newer techniques and technologies.

My main goal behind this article is to impress upon you the need for an analyst of some form. In the absence of an analyst and without proper maintenance, the system becomes useless and will not serve it's proper function.


Tuesday, July 24, 2007

COX Communications HiJacking DNS

Recently while perusing the interweb, I came across the following article; "ISP Seen Breaking Internet Protocol to Fight Zombie Computers". The short of this article is that Cox Communications is attempting to remove bots from customers PC's by way of redirecting infected systems (by way of hijacked DNS records) to a c&c server that they control and issue standard bot uninstall commands to said bots. While I think that this is conceptually a good idea, I foresee several issues with it.

By design, bots are built with some level of security concerning who can issue commands to them, as noted in my previous blog about the disassembly of the RxBot, not to mention the differing commandsets that are built into them. Couple this with the new Fast-Flux Service Networks that we are starting to see and this method that Cox is attempting becomes an all but futile effort.

I am also curious where they are obtaining their list of c&c servers from. Perhaps off of the c&c list that maintains, or from another location? How do they filter out good IRC traffic from bad IRC traffic on public IRC servers that may have been listed as being a c&c in addition to a legitimate IRC server. From the looks of the article, they don't and this poses an issue by way of blocking legitimate IRC traffic for those that connect to those servers.

A brief list of commands issued:
[INFO] Channel view for “#martian_” opened.

-->| YOU (Drew) have joined #martian_

=-= Mode #martian_ +nt by localhost.localdomain

=-= Topic for #martian_ is “.bot.remove”

=-= Topic for #martian_ was set by Marvin_ on Monday, July 23, 2007 9:50:03 AM

=-= Topic for #martian_ is “.remove”

=-= Topic for #martian_ was set by Marvin_ on Monday, July 23, 2007 9:50:03 AM

=-= Topic for #martian_ is “.uninstall”

=-= Topic for #martian_ was set by Marvin_ on Monday, July 23, 2007 9:50:03 AM

=-= Topic for #martian_ is “!bot.remove”

=-= Topic for #martian_ was set by Marvin_ on Monday, July 23, 2007 9:50:03 AM

=-= Topic for #martian_ is “!remove”

=-= Topic for #martian_ was set by Marvin_ on Monday, July 23, 2007 9:50:03 AM

=-= Topic for #martian_ is “!uninstall”

=-= Topic for #martian_ was set by Marvin_ on Monday, July 23, 2007 9:50:03 AM






I would also like to review their customer agreement and see if it indeed gives them the authorization to remove files / uninstall things from the end-users computer. Granted the goal is to remove malware; but what if I have been infected by just such malware and need to glean some information, such as what exactly exfiltrated my system? What if I am a business owner and my system contains information that is sensitive to myself, my business or my clients and I need to know what data exfiltrated my network so that I know what corrective or legal measures need to be taken?

All of this said, they also did not notify anyone that they were effectively hijacking DNS records, this somewhat gets back to my second point concerning legitimate IRC traffic that was obviously interupted enough to cause investigation into the matter. This further investigation is what led to the discovery of said hijacking, more here:

To my mind, the concept was an interesting one albeit innefective but the execution was absurd from unauthorized software removal down to DNS hijacking. This makes you wonder what else they are doing that has not yet been discovered.


Wednesday, July 18, 2007


Recently one of my clients became infected with the RxBot, I was able to detect it using SNORT on a FreeBSD 6.2 system running the latest rules from That being said, the issue did not originally manifest as a Bot or c&c destination but as a TCP:3306 or MySQL worm scan / propagation attempt.

Specifically it was sid 1:2001689 and sid 1:2404003 that first alerted us to the issue using the aforementioned system with BASE and Sguil. Further research down the line revealed IRC commands on non-standard found in the bleeding-attack_response.rules.

Without getting into the nitty gritty of the whole thing, disassembly of the bot revealed it to be an RxBot with the following characteristics.
Some of the bot commands and other findings:

auth, logout, wget, port, stop, stats, threads, procs, open, godie, reboot, nick, join, part, http, tftp, rndnick, secure, unsecre, httpstop, logstop, ftfpstop, procsstop, securestop, reconnect, disconnect, quit, status, botid, aliases, clearlog, testdlls, getclip, flusharp, flushdns, crash, killthreads, prefix, server, killproc, killid, delete, list, mirc, read, gethost, addalias, action, cycle, mode, repeat, delay, execute, rename, httpcon, upload, pstore.

Once the bot has found a vulnerable MySQL server it creates a database called 'clown' and dumps a file encoded with base64. The file is then extracted to clown.dll in c:\windows\system32.

This means its a self contained spreader and doesn't need to create additional network connections to spread.

If that fails, it will also use sql xp_cmdshell commands to tftp or ftp the binary from another host.

Over 200 passwords are hardcoded into the binary, which it uses when connecting to both sql and smb shares. Some of those passwords:

staff, teacher, student, intranet, main, winpass, blank, office, control, nokia, siemens, compaq, dell, cisco, oracle, orainstall, sqlpassoainstall, db1234, databasepassword, data, databasepass, dbpassword, dbpass, access, database, domainpassword, domain, domainpass, hello, hell, backup, technical, loginpass, login, mary, kate, george, eric......etc.

channels it sends traffic to:

#nBot-udf pass

some file drops:

The bot then joins with the password s3cr3t.
The bot administrator must have the user host "" to issue commands.
The bot has anti-debugger and anti-vmware code, and is packed with AsPack.
The bot registers as version 2, however we've seen evidence a version 3 exists as well.

I would like to thank Nicholas, Jason and Jamaal for their invaluable assistance in the disassembly and work on this fun.

Aside from detecting IRC commands on non-standard ports and portscans, here are a few rules (more to follow) that should help detect this specific bot:

alert udp $HOME_NET any -> $DNS_SERVERS 53 (msg:"RxBot Trojan Client Lookup of"; content:""; nocase; classtype:trojan-activity; reference:url,; sid:3000005; rev:2;)


Tuesday, July 17, 2007

OSSIM, is it ready?

A project that I have been keeping my eye on for a while is the OSSIM (Open Source Security Information Management) project:

I have been apprehensive to try this one out, due to some fairly negative feedback that I have received from numerous users and peers. That being said, I will be slapping it onto one of my FreeBSD boxes within the next few months and letting you know what happens.


Network Security Center and Toolkit on FreeBSD

Over the course of the next few weeks I will be publishing a comprehensive guide on the installation, securing, configuration and usage of a variety of Open Source security tools to create a comprehensive Network Security Center (NSC). The purpose of this security center will be to perform Network based IDS (NIDS), act as a server for Host based IDS (HIDS), perform vulnerability scanning reporting and management, and create a tool set for Network Security Analysis. All of this accomplished using a core Operating System of FreeBSD 6.2 and a variety of other Open Source applications that we will customize to fit our needs as we go.

I'll begin by covering the base installation and securing of the FreeBSD Operating System then over the following weeks step into the various sections of the NSC to build a truly robust solution.

If you would like to get a jumpstart, I will be using FreeBSD 6.2 obtained from (I also placed a copy of the i386 ISO here:)

The full guide to FreeBSD can be found at the following location, it would not hurt to read through and familiarize yourself with section 2 prior to the upcoming install post.

I will also be working with the guys at and their upcoming formal release of HeX Live. Currently HeX Beta v1.0 is available for download from one of the following sites for more information, please check out the site

Primary Site
Mirror 1