bmonday(dot)com

What a long strange trip this will be

Site Links

Post Categories

Articles

Archives

Image Galleries

Blog Stats

Conferences

Distractions

Security Links

BlogRoll

(* = recently updated)

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).

Posted by Beau Monday on Sunday, August 01, 2004 8:32 PM

Feedback

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

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....

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 9/3/2004 9:33 AM mark kealiher

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

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 9/3/2004 11:30 AM Beau

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.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 9/29/2004 5:29 PM kate

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

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

Actualit?s S?curit? » 10 secondes chrono sur la sc?ne du crime? Script!

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 4/7/2005 8:51 PM Wayne Dawson

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.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 4/8/2005 1:02 PM Beau

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

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

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.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 3/23/2006 2:32 AM mp3

nice to hear u again dude :)

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 5/17/2006 10:47 AM irq13

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.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 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.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 12/2/2006 3:45 AM Pozycjonowanie

Keep up the good work. Greetings

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 12/19/2006 10:55 AM BUsess

This the script is very informative, nicely interface. Enjoyed browsing through the site. Keep up the good work. Greetings

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 12/28/2006 7:35 AM emule forum

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!

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 12/28/2006 7:39 AM Server List

Thanks, great reading and because I'm learning (have to ;-)) this stuff quite useful.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 1/4/2007 8:22 AM John

Very impressive, thank you!

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 1/24/2007 11:07 AM tworzenie stron

Really helpfull project ! Thank You!

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 1/28/2007 5:20 PM versicherung

very helpful, thx!

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 2/13/2007 5:18 AM Andy James

It's a situation that many of us wouldn't love to be in!

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 2/22/2007 5:00 AM Verzeichnis

Really helpfull project !

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 4/24/2007 6:53 AM URL

social work

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

Good ! thank the author.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/5/2007 3:30 AM Przemyśl hotel

Przemysl hotel Marko zaprasza na nocleg przy trasie do Lwowa

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/5/2007 3:31 AM Rejsy morskie

Rejsy po morzu Sródziemnym

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/5/2007 3:32 AM Zucker

Produkty chemiczne dla cukrownictwa

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/5/2007 3:34 AM Pozycjonowanie

Pozycjonowanie stron,reklama w internecie

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/6/2007 6:45 AM profesjonalne strony www

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

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/6/2007 6:46 AM tworzenie bannerów flash

Cheers mate !

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 12/24/2007 4:07 AM Arbeitsspeicher

Hey , thank you very much for this great stuff! Keep up your great work! Greetings Daniel

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 12/28/2007 7:32 PM Your Hobby

Good website - thank you

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 1/23/2008 2:39 PM Michael Kelp

Thanks for the interesting article. Greetings

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 2/20/2008 8:33 AM projektowanie stron

You are absolutelly right, but it is not good solution for me

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 3/30/2008 2:25 AM Jimm

Great stuff man

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 6/14/2008 10:34 AM przepisy kulinarne

As a full time developer, this information is exceedingly useful to me. Very interesing article. Thanks for the article! :)

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 7/17/2008 4:41 AM szafy metalowe

Thanks for very interesting article.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 7/17/2008 4:42 AM klorane

good post..

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

thank you...

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 7/18/2008 6:47 PM Aron

It is the year 2019, 30 years after the first AKIRA project led to the destruction of Tokyo and the start of World War III. The original AKIRA project was a secret experiment to develop a new form of human evolution through the manipulation of the abilities and powers of psychically gifted children. The military hoped to use the children as living weapons, while the scientists had hoped to develop a new genetically superior human being.

But both the military and anime scientists involved in the project learned too late that the power they were seeking could not be controlled. Akira, one of the children involved in the experiment, developed into a force so great, the he literally destroyed everything about him through a terrifying http://vistorg.com
http://feklos.com/index.php?sm=1
http://webkapital.com/index.php?sm=3
burst of psychic energy, setting off a nuclear-like explosion which led to the world war.

Now, 30 years later, the military and scientific communities decide to revive the AKIRA project, deluded by narrow-mindedness into thinking they could control a power their predecessors could not.


# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 7/22/2008 5:41 AM Digital Picture frame

Thanks for very interesting article.

# re: FirstOnScene.vbs: The 10-second Forensic Data Gatherer 7/25/2008 6:30 AM Noclegi

thanks...

Post a new comment about this topic
Title  
Name  
Url

Comments   
Enter the code you see: