Windows Forensics and Incident Recovery 142
Windows Forensics and Incident Recovery | |
author | Harlan Carvey |
pages | 460 |
publisher | Addison Wesley |
rating | 9 |
reviewer | Mark McKinnon |
ISBN | 0321200985 |
summary | Forensic analysis and incident recovery on a live Microsoft Windows is explained for the system administrator, security administrator and knowledgeable home user. |
The intended audience, according to the author, is "anyone with an interest in Windows security, which includes Windows system and security administrators, consultants, incident response team members, students and even home users." The author assumes the reader is familiar with basic networking (including TCP/IP) and has some Windows administration skills. Some programming ability, though not actually required, will help out greatly with reading and understanding the many examples provided, and will let you make your own modifications (this is encouraged by the author throughout the book).
The chapter on data hiding was a real eye-opener -- it's amazing the things Microsoft has implemented as part of the operating system (and included applications) that can be used to hide things. Discovering the hidden information is talked about, as well how it is hidden. Sample topics include file attributes, alternate data streams, OLE and stenography. This is an excellent chapter with many examples; I found myself stopping after each subject to try out each of the discussed techniques.
The next chapter delves into incident preparation. Carvey addresses some of the things that administrators can do to harden their systems. He goes over the application of security policies in general, as well as intelligent assignment of file permissions. He then covers Windows File Protection and how it is implemented, and includes a perl script to implement your own file watcher. He touches briefly on patch management and anti-virus programs, then moves into monitoring. He provides quite a few scripts, and discusses other means by which you can monitor your system.
The next chapter describes tools that can be used in incident response. This chapter has quite a lot of information and took me the longest to get through, because of all the tools mentioned that I had to download and check while I was reading the book. Carvey uses a mixture of his own perl scripts and programs that can be downloaded from places like Sysinternals, Foundstone, DiamondCS and others. All of the tools used are open source (or are at least freely available). That equips the reader with a low-cost toolkit, especially important to the home user or small business owner who cannot afford to buy the commercial equivalent. Carvey does acknowledge, though, that there are quite a few commercial tools with great functionality out there.
The first part of the incident-response tools chapter deals with the collection of volatile information (processes, services, etc.); this is a vital part of live analysis. The second part deals with the collection of non-volatile information (the content of the Windows registry, file MAC times and hashes, etc.) and tools for analyzing files. Carvey also shows how some of the tools complement each other, and that there is not one almighty tool that will find all the data you need. (This is also proven by example in a later chapter when he talks about rootkits.)
The next chapter deals with developing a security methodology, and it's handled differently than in most books: the author presents the material as a series of dreams that a Windows system administrator has, showing how an individual can come up with and fine tune a methodology as incidents happen. Carvey has used this approach before in a series of articles entitled "No Stone Unturned" for SecurityFocus.com, and the creative approach appeals to me. As he moves from dream to dream, you can relate to the admin's circumstances (and mistakes), and how be and becomes better at responding to different incidents.
The next chapter talks about what to usefully look for with the tools the book has introduced. It discusses infection vectors, types of malware and rootkits, and demonstrates tools and techniques for detecting them. This is where the author makes a clear point of why you would need to run several different tools, even if some overlap. His example uses an installed rootkit; running a particular program from a previous chapter, he shows that it fails to find that anything untoward is running -- it takes another program from the same chapter to actually reveal the rootkit's presence. By cross referencing the output for both programs, you can see why you should run more then one type of analysis tool for certain areas to make sure you are not missing anything.
Finally, the author dedicates an entire chapter to his own Forensic Server Project, a two-pronged approach to live forensic analysis which uses two machines simultaneously. The first piece, the Forensic Server Module, is the listener software; this runs on a clean PC where the data will be sent from the compromised system. The other piece, called the First Responder Utility, runs several of the programs and scripts from the incident tools chapter on the compromised system . After installing everything needed for both parts of this system, I followed the author's instructions on how to run it. What a slick tool! I ran it from a couple of PCs on my home network and was able to get a lot of the information that was described in the book as well as hash values for each log file that was produced, and a general log of everything the First Responder Unit did. The whole principle of this is that when you have an incident there will be very little interaction with the compromised system, since everything is scripted to begin with.
The framework that this software constitutes is very flexible. I was able to add two new features to the Forensic Server Module and the First Responder Utility with very little code. The first addition I made was to mark all the logs as read-only on the file system after they were written from the Forensic Server module. The next addition I made was to add a perl script to scan the c:\ drive of the PC that the First Responder Utility was running on. After I made both additions, I tested everything out, and it worked great. I had my extra log files and they were all read-only. My hat goes off to the author for coming up with and including this in the book, a really nice piece of software.
You can purchase Windows Forensics and Incident Recovery from bn.com. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page.
Your typical sharing violations (Score:2, Interesting)
Re:Your typical sharing violations (Score:2, Interesting)
Not only that, how do you mitigate the risk of losing deleted information to the creation of other files? I've analyzed HDD images up to 40GB and they're no party. It can take quite a bit of time to do a thorough analysis of the disk. It seems to me that you'd run the risk of losing important filesystem information or the contents of unlinked files. If some idiot runs degrag or something you could lose a good bit of critical fs data before it's stopped. Hell, everytime you launch an Office document it seems
Re:Your typical sharing violations (Score:3, Informative)
The solution to this is to go beneath the file system. Read raw sectors from the disk and interpret FAT or NTFS yourself. You run the risk of corrupt data if a file changes while you're reading it, but it's about the only way to snag registry files and the like while the system is up and running.
AccessData [accessdata.com] FTK Imager is capable of doing just that, and it was used for this purpose in Operation Firewall [slashdot.org]. It was als
what? (Score:3, Funny)
Re:what? (Score:1, Funny)
The secret is leaving it at the BIOS screen for weeks on end. It's not very useful but the machine gets wicked uptime before running MS code.
Re:what? (Score:4, Informative)
At times I have Diablo II running in a window, DevStudiodebuggins ome app. A couple of multi megabyte spreadsheets open in OpenOffice, And of course FireFox.
To ensure that the hardware is as unstable as possible, this runs on a dual P4, with a Matrox and an nVidia card, both dual head for a total of 4 displays - all with a mere 512Mb of RAM.
Ironically, FireFox is the real system resource hog.
I have to close it down every two weeks to free up some system memory. It does get restarted about once a month when my domain passwords expire - its the only damned way to ensure that some cached credentials dont lock me out of everything.
Re:what? (Score:2)
Re:what? (Score:2)
Re:what? (Score:2, Funny)
Not only goes that asshat get 10% of our money, he saves on Xeon CPUs too!
Grrr!
Re:what? (Score:2)
Re:what? (Score:3, Interesting)
Re:what? (Score:2)
Re:what? (Score:3, Insightful)
Re:what? (Score:2)
First of all, you pretentious and cowardly little anonymous prick, I don't have to do any of those things. I do those things because I'm paranoid about security (the smart thing to be, in my opinio
Re:what? (Score:2)
2K's pretty cool, iddn't it? I've been running Lightwave plus After Effects for several weeks straight now. Time == money is very much a fact in my line of business. I'd be the first to go running to Linux (Actually, OSX is a more likely candidate...) if Windows behaved like the anti-MS bunch imagines. Yet, rehashed BSOD jokes still get +5 funnys...
Re:what? (Score:2)
Gainward Geforce FX 5200 Pro/660 PCI [gainward.com]
Re:what? (Score:2)
Hiding Data (Score:4, Informative)
" Sample topics include file attributes, alternate data streams, OLE and stenography"
Should that be Steganography? [wikipedia.org]
Re:Hiding Data (Score:4, Funny)
stenography (Score:1, Redundant)
Re:Hiding Data (Score:1)
Has anyone tried the example in the link? I'm not sure what is meant by the bolded statement in the quote from the Wikipedia article.
Re:Hiding Data (Score:2)
image = READ_PNG(Dialog_Pickfile(Filter="*.png"))
TV, (image AND 3)*85
Non-software solutions? (Score:5, Interesting)
Here's my method (Score:3, Funny)
Bring the computer to my office.
Administer a morphine injection.
Ask the computer about his feelings (particularly towards his parenting fab)
Administer another morphine injection (to myself this time).
Play some Diablo 2 on the computer.
Upgrade computer's video card.
Play some more Diablo 2.
Charge computer's owner some big money.
One last morphine injection for the road.
Lather, rinse, repeat and you've got one hell of a business!
Re:Here's my method (Score:2, Funny)
You are one sick puppy, BortQ. For shame.
Good read? (Score:5, Funny)
Cool, I love arcane knowledge *hugs his falconry for dummies book*
Live analysis. (Score:5, Interesting)
We had an SGI IRIX system rooted a while ago. One of those obscure machines that sat in a corner running for years, rarely updated or touched. When it was discovered that the machine was taken over the person that admin'd the machine left it exactly as is but firewalled and VLAN'd the machine from touching anything outside of a test VLAN he set up.
In February he gave us (network guys visiting his branch) a look at the machine and what he found. The machine, the root kit and the IRC bot were all left intact and running. It was pretty neat, he wrote up a lengthy port-mortem of the event.
Don't tease us (Score:2)
Re:Don't tease us (Score:1)
I'm not sure. I have a spiral bound hard copy, I'll contact the author tommorrow and ask.
Re:Don't tease us (Score:1)
It's Steganography (Score:1)
Live "Forensics" (Score:5, Interesting)
Generally, however, if there's any chance that the investigation could wind up in court, it's best to pull the plug (literally) and conduct a static analysis of the hard drive. You lose access to running processes and some live registry keys, but otherwise just about everything exists on the hard drive and is accessible through standard forensic tools.
As a forensic programmer/consultant, one of the biggest problems I run into is when J. Random Sysadmin is tasked with conducting an initial investigation and ends up rampaging through the hard drive like a bull in a china shop. If you ever find yourself in this situation, stop and get the facts. There's no better way for a sysadmin to wind up in the doghouse than to ruin a legal investigation.
Jon
(Disclaimer: I work at Guidance Software [guidancesoftware.com], makers of EnCase, which is the all-in-one tool that can do all of the things mentioned in the review. But not for free...)
Re:Live "Forensics" (Score:4, Insightful)
You have an older server that has a relatively small hard drive. You get a complaint from somebody saying they can't do so and so on the server. You look on it and find that the hard drive is full. You think, oh great, somebody printed a 200mb print job again and filled up the hard drive. Well, time to reboot the server. You have just lost an enormous amount of evidence and you may never know where the pirated games, movies, and music came from.
I am a windows/linux sysadmin and when something goes isn't working right, my first thought is not *I'VE BEEN HACKED*, no its "stupid {some software}, {some company} can't program to save their life. time to restart the service or reboot". I will agree that discovering a problem at this point is too late - you're already 0wN3d. Instead of focusing on forensics, we need to focus on proactive measures - use group policies to enforce better security policies; use ntop, nmap, snort, gfi languard, and ms baseline security analyzer to check your systems; dump your linux and windows boxes to a syslog server that notifies on any irregularities; use SUS, SMS or something similar to patch all systems quickly and efficiently. If we are more proactive, then forensics will be less of an issue.
Re:Live "Forensics" (Score:3, Insightful)
However, at the point that you discover that there's been an incident, you should note what's running (ps), what's open (netstat), who's logged on, and what drives are mounted. Document everything that you do (date/time, action, reason for action), pull the plug, and call your lawyer.
Incident response is difficult as the scale of the "response" can vary so widely. Sometimes it's enough to run a virus scanne
Re:Live "Forensics" (Score:2)
I find that second paragraph interesting - doesn't that directly contradict the purpose of your Encase Enterprise Edition product? (of which my security team happens to be a happy customer, btw.?) Also, isn't there a new Live Analysis feature?
For the uninitiated, Encase is quite possibly the industry standard tool for Forensic analysis. The latest interation, Encase Enterprise Edition, allows for forensic acquisition over a live network with the installation of a 100k agent on the target machine. Idea
Re:Live "Forensics" (Score:1)
The EEE "servlet" will not write anything to the filesystem directly. Acquisitions are made on a low-level sector-by-sector basis.
However, running *any* program on a targetted system necessarily changes it. The operating system has to allocate memory and CPU time for the process, and on any modern system that can invoke a write to the pagefile/swap area. This is just the way life is, and for corporate investigations -- which almost never go criminal -- this is more than good enough.
Whether an in
Re:Live "Forensics" (Score:1)
We do have a forensic group on-site or near-site (quick response available). I seem to recall also that PriceWaterhouse is working with Guidance in piloting EEE as a "valid" tool for crimina
Re:Live "Forensics" (Score:3, Insightful)
Why a "misnomer"? Forensics, in the usage of the phrase "computer forensics", is an extension of our usage of forensics to refer to the presentation of evidence in court. The word initially means "methods pertaining to
Re:Live "Forensics" (Score:3, Insightful)
this is generally suggested for law enforcement who respond to a crime scene for which there is a standalone running machine and a qualified computer forensic examiner is not readily available. In the "bag and tag" process, the responding cops are then told to pull the plug (literally...not from the wall, but from the machine itself) and then bag and tag the machine. This might seem odd at first, and yes things can be lost, but the key is obtaining "forensically sound
Re:Live "Forensics" (Score:1)
You know, all the time that I was reading the previous comments, when people talked about 'plugging the plug', I assumed that they meant the network connection, it didn't occur to me that they meant the power. Unless the process is stomping all over your f
Re:Live "Forensics" (Score:2, Insightful)
My top post isn't about EnCase.
As others note here, standard forensic practice -- especially when you don't know what you're doing -- is to pull the plug. That's what the DOJ says, at least.
In the example that you give, of the OpenSSH vulnerability, it's very likely that the intruder will leave filesystem artifacts. sync() runs every few second
Analogy (Score:1, Funny)
crack whore at the gynecologists
OS integrated DRM and Steath "hiding" technique (Score:5, Interesting)
Crackers and hackers always find ways to exploit the code to access or share protected content. There is not a DRM system that has not been cracked within months of widespread release.
A stealth virus is one that, while active, hides the modifications it has made to files or boot records. It usually achieves this by monitoring the system functions used to read files or sectors from storage media and forging the results of calls to such functions. This means that programs that try to read infected files or sectors see the original, uninfected form instead of the actual, infected form. Thus the virus's modifications may go undetected by antivirus programs.
OS based DRM systems can still successfully lock a user, and any program, even if is running under localsystem/root privilege, out of areas of diskspace and memory. Microsoft's Mediaplayer , Active-X ( used with some DRM protection ), Real's realplayer, and even Microsoft's and Sun's Java JVMs, have in the past had remotely exploitable vulnerabilities. Such enviable offers the malware creator the ability to hide the virus from any antivirus tool or live forensic analysis.
The DRM encryption offers the ability for the malware to store content, and without the keys to decode the content, it is hidden from any forensic analysis.
Re:OS integrated DRM and Steath "hiding" technique (Score:2)
Make up your mind. Which is it? Can the code *always* be exploited to "access or share protected content", or can malware hide itself "from any forensic analysis"?
Re:OS integrated DRM and Steath "hiding" technique (Score:2)
DMCA Vs legitimate security tools AND keys (Score:2)
2) Cracking the DRM code is not the same as cracking the key used to encrypt each item of encrypted content. If the key is not accessable then the content cannot be decrypted without major difficulty . If the virus/malware retains the decrypt key only in DRM OS protected resident memory, then the key is not accessable to the user. Also it is possible to construct polym [cknow.com]
Re:OS integrated DRM and Steath "hiding" technique (Score:2)
Somebody cracked the DRM system for DVD-Audio? I'd love to know where that utility is.
Or does DVD-Audio's encryption system not count as true DRM?
Serious question. Last time I checked (and I search every couple of months), nobody had cracked it yet.
Google DVD-Audio crack (Score:2)
The point is that you have a lot of very clever people trying to reverse engineer the code, which exposes code which has often undergone very little peer review. Most of the times this also exposes vulnerabilities in the decoding software, some of which are remotely or locally exploitable.
Re:OS integrated DRM and Steath "hiding" technique (Score:1)
I have the book (Score:4, Informative)
...and I'd have to say that the review was pretty thorough. I couldn't put the book down when I first got it (which would probably be true for any other self described nerd on here). Here's the link [awprofessional.com] to the book's web site if you want to read anything about it. There is a sample chapter there as I'm sure there probably is on amazon or bn.com.
Fear stenography as data hiding method... (Score:1)
It's always the same (Score:1)
People always confuse these two words,
stenography - typing fast on a weird machine,
steganography - information hiding techniques.
Dupe? (Score:2)
http://books.slashdot.org/article.pl?sid=04/11/
Re:FYI (Score:1, Informative)
Re:FYI (Score:3, Informative)
Or here [amazon.com] if you'd rather not use an affiliate link and pay someone who didn't do anything more than type a few words into a search box.
Re:FYI (Score:1)
That's because you're an idiot and you don't understand the concept behind referrer linking. Since that jackasses that post those links here are only looking to waste space so they can make money, it does not benefit anyone except them to encourage the behavior. If the link had been posted in the article where it was relevant, it would have been acceptable. However, it was posted in the body of messages only as board spam, which is not.
MOD PARENT DOWN (Score:3, Informative)
Re:FYI (Score:2)
Re:FYI (Score:2, Funny)
Re:A much better book! (Score:1)
Re:Who needs books!? (Score:2)
Really ?? How much are you willing to bet [storageheaven.com] on that ??
Hmmm, I wonder if Google will predict roulette numbers for me too
Re:Who needs books!? (Score:2)
* Mirror Copy -- Simple sector-by-sector copying for all proprietary partition types (e.g. MAC, Linux, SUN, OS6).
I wasn't aware that Linux file systems were "proprietary"...
Re:Who needs books!? (Score:2)
Re:Who needs books!? (Score:2)
iLook, however, is free to law enforcement and government agencies and generates rather nice forensics reports. It doesn't have the same bells-and-whistles feel as EnCase does, but it is free and thus provides a nice tool to budget-strapped law enforcement agencies.
However, the grandparent post's attitude is
Re:Who needs books!? (Score:2)
The only way you've any chance of hiding your Pr0n is by using an encrypted filesystem like CryptFS [sunysb.edu], an encrypted loopback or whatever...
Re:Who needs books!? (Score:1)
If you're at the point that your hardware was siezed, you know they already have enough on you to get a warrant. The cops are just trying to make their case against you airtight, but that doesn't mean that it doesnt already float.
Caches? (Score:2)
The big problem I see is that you can have such things in your cache without being a pedo. How many pr0n sites advertise lolita p
Re:Who needs books!? (Score:1)
Re:Who needs books!? (Score:1)
Re:Who needs books!? (Score:2)
Re:Who needs books!? (Score:2, Informative)
I'm willing to bet you're wrong. A SATA-PATA converter is 20 bucks, if thats what it takes. And even if you don't recreate the files, you can still search bit for bit for tags like "JFIF" which denote the start of a jpeg file, and then just grab the data to see what the jpeg file is of.
Believe me, linux is not beyond the long arm of the law. When the FBI raids the big w
Re:Who needs books!? (Score:2, Informative)
Re:Who needs books!? (Score:5, Informative)
If you're going to repost other people's posts, at least preserve the formatting, you lazy turd.
Re:Who needs books!? (Score:5, Informative)
2) Most dedicated computer forensic tools, especially those for examining hard drive images, can work with any filesystem from FAT12 to xfs on a RAID 5 set. Again, the burden falls on the examiner to know the proper tools/methods for examining these file structures.
3) SATA drives can be copied with any dedicated hardware copier (such as Logicube's MD5 or Solitaire), but dd combined with an SATA interface will work just fine. Any memory image (RAM, IDE, SCSI, SATA, etc.) can be imaged with just dd, even over a network.
4) "Average nerds and hackers are so far ahread of the forensics guys"...what nonsense. Computer forensic analysts are without a doubt some of the most talented people in IT period. Computer forensics is multi-discipline and analysts typically have backgrounds in engineering, programming, criminology, and languages. And why are you assuming that most computer forensics experts are in law enforcement? The best analysts are in the private sector, military, and government intelligence.
Re:Who needs books!? (Score:3, Interesting)
Re:Who needs books!? (Score:2)
Re:Who needs books!? (Score:3, Interesting)
Exactly. From my experience, the forensic analysts I have experience with came from Computer Science and Elect
Re:Who needs books!? (Score:2)
There are data recovery shops that probably do have the necessary equipment...though I don't see a problem with taking the drive, booting off of a CD and doing a bit copy to another drive using dd.
In either case, I think your confidence level is a bit too high. The forensics software I've used has checksum ID strings for known files and uses that as the basis for finding the known parts. These checksum databases are a
Re:Who needs books!? (Score:2)
As is always the case, the degree of security you need depends on how much effort anyone is going to put into compromising it. If you're a low-level pot dealer, you're probably right that your obscurity provides adequate secuity. On the other hand, if you're Osama bin Laden, I'm thinking they'll get your drive to someone who can read reiser partitions.
Re:Who needs books!? (Score:2)
No.
It's the only tool they know how to use.
Re:Who needs books!? (Score:1, Informative)
Re:Who needs books!? (Score:2, Informative)
The local Computer Investigation B. has some prety sofisticated stuff, all there software is used much the same way you described in court.
There was a case a few years back here where a guy had some files on his linux box that were incriminating. He set a script to do 10 DOD wipes. That's writing 1's and 0's 7 times over the HD, X 10.
The lab was able to 1:1 the drive, then recreate every file that was saved to the HD since the purchase date.
My friend runs this lab, he said his r
Re:Who needs books!? (Score:2)
Re:Who needs books!? (Score:2, Informative)
EnCase [guidancesoftware.com] supports Reiser3. I don't know whether Reiser4 is so radically different from Reiser3 that we can't decode the filesystem currently, but I'm sure we could roll it out the door quickly if there was a large need. We've done it for our customers before.
We can't yet do XFS, but we could still recover quite a bit of data from unallocated. As others
Re:Who needs books!? (Score:2, Informative)
Re:Who needs books!? (Score:2)
Man, you just the exact situation I had happen last year. My Linux email server was compromised do to a vulnerabilty in squirrelmail/U
Re:Who needs books!? (Score:2)
This is partially true in that most crimes are taken on a "Big fish versus Small fish" basis. This is no different from traditional crime. In the case that a hacker hit a small business with very little effect, it is generally more practical for an incident response team to find out what happened, restore from a trusted backup, and then go about fixing the problem so it doesn't happen again.
However, if you're trading kiddie porn or decide to peruse your lo