Slashdot Mirror


Windows Forensics and Incident Recovery

dba599 (Mark McKinnon) submits this review of Harlan Carvey's Windows Forensics and Incident Recovery, writing "This book takes an unusual approach to computer forensics in that it deals only with live analysis of the system: the compromised computer is left powered on and everything is running. (Compare to a dead analysis, for which the computer is powered off and the hard drive's contents are then analyzed.)" Read on for the rest of McKinnon's review. 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.

9 of 142 comments (clear)

  1. Your typical sharing violations by keryeski · · Score: 2, Interesting

    I can just see the "sharing violation" and "file in use" message boxes flying everywhere.

    1. Re:Your typical sharing violations by the_mad_poster · · 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 like a temp file is created. What happens when one of those overwrites deleted log information on the disk?

      --
      Alito: A vote for Alito is a punch in the eye to put that bitch back in her place!
  2. Non-software solutions? by Limburgher · · Score: 4, Interesting

    Does the book offer any comprehensive ideas beyond tools you can download and hwo to use them? I'm really more interested in knowing where an attacker's footprints are likely to be evident, not in using some sort of footprint detector. Tools are nice, but one should have basics to fall back on when tools are unavailable or untrusted. That said, the best Windows security tool is Nero. It's great for burning Debian .isos. . .:)

    --

    You are not the customer.

  3. Live analysis. by grub · · 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.

    --
    Trolling is a art,
  4. Live "Forensics" by stew1 · · Score: 5, Interesting

    "Forensics" on a live system is a misnomer. For incident response, collecting live data on open ports, running processes, logged on users, and mounted devices is useful and sometimes necessary. Investigators should be sure to check -- gingerly -- whether any encrypted volumes are mounted.

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

  5. OS integrated DRM and Steath "hiding" technique by NZheretic · · Score: 4, Interesting
    Microsoft's planned Digital Right Management systems are based on the principle of locking the owner of the computer out of the ability to access sections of memory and disk space used by the DRM mediaplayer systems.

    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.

  6. Re:Who needs books!? by isometrick · · Score: 3, Interesting

    I think you may be right about the private sector, but I went to a presentation by someone in the Dallas FBI "cyber crime" unit, and I wouldn't exactly call him the cream of the crop. (Not that it means all of them sucks) The extent of his comments on analysis was the software they used. Encase was one he mentioned. The presentation included many deterrents to the technologically knowledgeable, with statements such as "Nimbda infects web pages." peppering the fairly contentless background. He seemed fairly uninterested in the deep technical aspects of his job ... he snuffed the few technical questions in the Q&A session and indicated that his division didn't have time to delve into deep technical issues.

  7. Re:what? by Loki_1929 · · Score: 2, Interesting

    Indeed. I use Win2k Pro at home, myself, and I must say that ECC memory has really completed the system in terms of stability. The last time it went down was about a month ago when my Antec TruePower 550 crapped out. (ugh, almost brand new!) The last time it had been rebooted prior to that was back in May when I took some hard drives out of it for use in another machine that I was putting together just for storage, and put in that damned Truepower PSU. Before that, I couldn't tell you the last time it went down for anything. I can say with confidence that it's been at least a year since I've brought it down for software issues (or from an OS crash). I couldn't put my finger on exactly when because it's been so long that I don't remember. I abuse the hell out of it and leave it running 24/7, but it never lets me down. Mozilla and Freenet are my two biggest resource hogs.

    --
    -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
  8. Re:Who needs books!? by dexterpexter · · Score: 2, Interesting

    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.

    Exactly. From my experience, the forensic analysts I have experience with came from Computer Science and Electrical Engineering backgrounds, and are highly trained. The "average nerds and hackers" fail to realize, sometimes, that the best among them sometimes cross the road to become these top-notch forensics analysts. It is not uncommon to find an ex-blackhat pop up in the private sector years later as a computer forensics analyst. In training, they bring in the guys who were on the "other side" and teach you to think like those guys, so that you can catch them.

    And the tools (iLook--which is free to law enforcement, EnCase, Foremost, etc., etc.) are fairly effective against your average case. Some people do not realize that even NASA has a computer forensics division.
    It is, however, the attitude of being invincible that makes most guys all the more catchable.

    As far as #1 goes, anything that doesn't fit under the Dauber rules of evidence (at least, if there is a good DA involved) will be quickly made null, but programs like EnCase certainly qualify.

    --

    *-*-*-*-*-*-*-*
    "We are Linux. Resistance is measured in Ohms."