FirstOnScene.vbs: The 10-second Forensic Data Gatherer

I have a problem.  My Data Center Team has 5 minutes to bring a misbehaving server back to production service levels, or they get their butts kicked by Mr. SLA.

That means that (if I am around) I have just about 1 minute of quality time with the system to determine if a security incident has occurred.  If I'm at lunch, home sleeping, or in the can, the machine has probably been rebooted and put back into production before I even knew it was down.

What to do?  I either have to train my entire Data Center staff to be Incident Handlers, or get cracking on that cloning thing so I can clone myself about 8 times.  Unfortunately, even if the Team had Incident Handling skills, what can you really do in the precious 3-4 minutes before you have to bring that system back online?

So I came up with a compromise called FirstOnScene.vbs.  It's a script that runs in under 10 seconds and gathers forensic information from the target system using about 20 different freely-available tools.

The hope is that I can turn FirstOnScene over to my DC team and let them run it every time a machine misbehaves.  Then I can look over the resulting report at my leisure, without threatening our uptime commitments or SLAs.  On load-balanced systems, where we have more time for analysis, FirstOnScene can also be told to gather dd images of the system's memory and logical disks, or scan for Alternate Data Streams.

Features:

  • Runs in under 10 seconds in the default configuration
  • Gathers forensics information from ~20 different tools
  • Uses only trusted binaries in a remote location, or on a CD (user designates where the binaries are located)
  • Generates output data on a remote location to minimize tampering with the potential crime scene
  • Uses industry-recognized forensics tools that are freely available on the web
  • Can be extended with the /f option to run additional binaries once it is finished
  • Can generate dd images of system RAM or logical disks with the '/m' and '/dd' options, respectively
  • Can scan logical drives for Alternate Data Streams using LADS
  • Can scan local file system for files changed in last n hours (user-specified)
  • Scans known registry and file locations for auto-run entries
  • Enumerates scheduled tasks, of both varieties
  • Identifies hidden files
  • Generates MD5SUMs of all output files when it is finished
  • Open Source!

On My To-Do List:

  • Make it fully-remotable.  Half the tools can already be run remotely, I need to figure out how to get the other half to run.  I tried psexec, but it would not reliably output stdio to the remote logging location.
  • Email the resulting report to a designated address
  • Add a “Baseline“ mode, to generate a baseline report on the system before it enters production, so it can be referenced if it starts misbehaving later
  • Add a compression capability for the resulting output files.  This can be tricky with the way I am calculating the hashes.  I'll work on it.
  • Clean up the code.  Lots of repetition in the code.

Downloading FirstOnScene:

Please feel free to contact me for suggestions and comments.  My vbscript skills are a bit rusty, so I won't be surprised if you find bugs in my code.

UPDATE:  Version 1.3 is now available, which adds hidden file discovery as well as enumerating scheduled tasks (both kinds).

Print | posted @ Tuesday, August 31, 2004 11:31 AM

Comments on this entry:

Gravatar # FirstOnScene, the 10-second Forensic Data Gathering Tool
by Dana Epp's ramblings at the Sanc at 8/2/2004 12:30 AM

bmonday announced that he has released a script called FirstOnScene which basically will take a working forensic snapshot of a system within 10 seconds. Basically he has written an visual basic script wrapper of some of the more common tools from guys like SysInternals and Foundstone. I haven't actually tried it yet, but will definitely follow his progress and see where this tool ends up. It sounds quite interesting. I have something similar that I use, but is based on a bootable live CD. Why a separate bootable CD you ask? Because Windows has a major inherit problem from a forensic analysis point of view. By simply running some of the standard auditing tools you trample on critical evidence as it relates to cache, swap and data access. (This is an issue with the OS, not the tools) Timelines get tainted in an unfortunate way if you do to much on a Windows system for to long after you enter the system. Normally, unless I HAVE to get a map of volitile memory, I just pull the plug, mirror the drive and work on the data on an isolated forensic machine. But thats just me. Anyways, looks like bmonday has been busy. If you got the time, check of FirstOnScene and see if it meets your needs....
  
Gravatar # e-evidence.com (TrackBack)
by Pingback/TrackBack at 8/10/2004 10:29 AM

e-evidence.com (TrackBack)
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by mark kealiher at 9/3/2004 9:33 AM

I'm getting this error whenever I start it:

firstonscene.vbs(238,1) WshShell.Exec: The system cannot find the path specified.

My command entry is this:
d:\cscript firstonscene.vbs d:\tools a:

Any ideas?

Thanks,
Mark
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Beau at 9/3/2004 11:30 AM

At the beginning of the script, it tells you where it's going to be looking for the trusted OS binaries (says "Trusted OS Binaries Used:"). That's where the cmd.exe needs to be located.

In your case, if you are using Windows 2000, the Trusted OS Binaries location should be d:\tools\Win2000, and that is where cmd.exe needs to be located.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by kate at 9/29/2004 5:29 PM

I like it! What if you put the whole shebang on a USB thumb drive so that you can collect your output on removeable media.

-K
  
Gravatar # Actualit?s S?curit? » 10 secondes chrono sur la sc?ne du crime? Script!
by Pingback/TrackBack at 11/12/2004 8:32 AM

Actualit?s S?curit? » 10 secondes chrono sur la sc?ne du crime? Script!
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Wayne Dawson at 4/7/2005 8:51 PM

What about collecting mac times between a definable date period, and dumping it to a text file on a
1) share
2) usb drive
3) netcat connected server?

For example, macmatch from ntsecurity.nu or equivalent.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Beau at 4/8/2005 1:02 PM

Hi Wayne,

Check into the /modified switch. I think it does what you are asking?

If not, let me know how you'd like this feature extended.

Thanks
Beau
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Chris at 4/9/2005 7:09 AM

Hi Beau,
First off I wanted to say I enjoy reading your blog, keep up the good work. It looks like you also attend Agora, maybe sometime we'll run into each other. I haven't run your script yet, but it looks a lot like a project I was doing for a recent presentation on Live Host Incident Response and Data Collection for my Information Assurance class at UW. I just created a regular batch file to run with most of the tools you are using and pipe it out to another computer on the network using netcat. My source was chapter five of Incident Response and Computer Forensics, 2nd Edition. Coincidentally, I just came to this particular page from Richard Bejtlich's Tao Security blog, who also happened to contribute material to aforementioned book.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by mp3 at 3/23/2006 2:32 AM

nice to hear u again dude :)
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by irq13 at 5/17/2006 10:47 AM

It would also be slick if it integrated with cryptcat. I wrote a batch file that I use as a wrapper to call it and pipe the output to my cryptcat server, but it would neat to have it built in.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by חברות השמה at 8/2/2006 7:32 AM

I like it! What if you put the whole shebang on a USB thumb drive so that you can collect your output on removeable media.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Pozycjonowanie at 12/2/2006 3:45 AM

Keep up the good work. Greetings
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by BUsess at 12/19/2006 10:55 AM

This the script is very informative, nicely interface. Enjoyed browsing through the site. Keep up the good work. Greetings
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by emule forum at 12/28/2006 7:35 AM

Very impressive. Supreme concept of a personalized web portal. I look forward to using this as my browsers' start page. Keep up the good work!
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Server List at 12/28/2006 7:39 AM

Thanks, great reading and because I'm learning (have to ;-)) this stuff quite useful.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by John at 1/4/2007 8:22 AM

Very impressive, thank you!
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by tworzenie stron at 1/24/2007 11:07 AM

Really helpfull project ! Thank You!
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by versicherung at 1/28/2007 5:20 PM

very helpful, thx!
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Andy James at 2/13/2007 5:18 AM

It's a situation that many of us wouldn't love to be in!
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Verzeichnis at 2/22/2007 5:00 AM

Really helpfull project !
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by URL at 4/24/2007 6:53 AM

social work
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Google排名 at 5/25/2007 9:16 AM

Good ! thank the author.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Przemyśl hotel at 6/5/2007 3:30 AM

Przemysl hotel Marko zaprasza na nocleg przy trasie do Lwowa
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Rejsy morskie at 6/5/2007 3:31 AM

Rejsy po morzu Sródziemnym
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Zucker at 6/5/2007 3:32 AM

Produkty chemiczne dla cukrownictwa
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Pozycjonowanie at 6/5/2007 3:34 AM

Pozycjonowanie stron,reklama w internecie
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by profesjonalne strony www at 6/6/2007 6:45 AM

Thanks for very interesting article. btw. I really enjoyed reading all of your posts. It’s interesting to read ideas, and observations from someone else’s point of view… makes you think more. So please keep up the great work. Greetings
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by tworzenie bannerów flash at 6/6/2007 6:46 AM

Cheers mate !
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Arbeitsspeicher at 12/24/2007 4:07 AM

Hey , thank you very much for this great stuff! Keep up your great work! Greetings Daniel
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Your Hobby at 12/28/2007 7:32 PM

Good website - thank you
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Michael Kelp at 1/23/2008 2:39 PM

Thanks for the interesting article. Greetings
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by projektowanie stron at 2/20/2008 8:33 AM

You are absolutelly right, but it is not good solution for me
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by Jimm at 3/30/2008 2:25 AM

Great stuff man
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by przepisy kulinarne at 6/14/2008 10:34 AM

As a full time developer, this information is exceedingly useful to me. Very interesing article. Thanks for the article! :)
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by szafy metalowe at 7/17/2008 4:41 AM

Thanks for very interesting article.
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by klorane at 7/17/2008 4:42 AM

good post..
  
Gravatar # re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer
by lierac at 7/17/2008 4:43 AM

thank you...
  

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 8 and 8 and type the answer here: