Home | Best Seller | FAQ | Contact Us | ||||
| ||||
|
Harlan Carvey's interest in computer and information security began while he was an officer in the U.S. military, during which time he earned his master's degree in Electrical Engineering. After leaving military service, he began working in the field of commercial and government information security consulting, performing vulnerability assessments and penetration tests. While employed at one company, he was the sole developer of a program for collecting security-specific information (i.e., Registry entries, file information, configuration settings, etc.) from Windows NT systems during vulnerability assessments. The purpose of the product was to overcome shortfalls in commercial scanning products and provide more valuable information to the customer. Harlan has also done considerable work in the area of incident response and forensics, performing internal and external investigations. He has also written a number of proof-of- concept tools for educating users in such topics as Windows null sessions, file signature analysis, and the retrieval of metadata from a variety of files. Harlan's experience with computers began in the early '80s, with a Timex-Sinclair 1000. Around that time, he was learning to program BASIC on an Apple IIe. From there, he moved on to computers such as the Epson QX-10 and the TRS-80, on which he programmed BASIC learned PASCAL, using the TurboPASCAL compiler. Since then, he's worked with SunOS and Solaris systems, as well as various versions of DOS and Windows, OS/2, and Linux. Harlan has presented at Usenix, DefCon9, Black Hat, GMU2003 on various topics specific to issues on Windows platforms, such as data hiding. He has had articles published in the Information Security Bulletin and on the SecurityFocus web site.
Excerpt. © Reprinted by permission. All rights reserved.
Preface Normal Pearson User 2 2004-07-09T19:30:00Z 2004-07-09T19:30:00Z 3 1555 8865 Pearson Inc. 73 17 10886 10.260 0 0 pt 0 pt 0 0 0 pt 0 pt @font-face {font-family:"Times New Roman"; panose-1:0 2 2 6 3 5 4 5 2 3; mso-font-alt:Times; mso-font-charset:77; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:Geneva; panose-1:0 2 11 5 3 3 4 4 4 2; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:50331648 0 0 0 1 0;}@font-face {font-family:"Frutiger 67BoldCn"; mso-font-alt:Arial; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;}@font-face {font-family:"New Caledonia"; mso-font-alt:Arial; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;}@font-face {font-family:"I New Caledonia Italic"; mso-font-alt:Arial; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;}@font-face {font-family:Courier-AddisonWesley; mso-font-alt:Arial; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:Geneva; color:fuchsia;}p.HB, li.HB, div.HB {mso-style-name:HB; mso-style-parent:""; margin-top:12.0pt; margin-right:0in; margin-bottom:71.0pt; margin-left:0in; line-height:36.0pt; mso-line-height-rule:exactly; mso-pagination:widow-orphan; font-size:34.0pt; font-family:"Frutiger 67BoldCn";}p.Body, li.Body, div.Body {mso-style-name:Body; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:48.0pt; margin-bottom:.0001pt; text-align:justify; text-indent:.25in; line-height:13.0pt; mso-line-height-rule:exactly; mso-pagination:widow-orphan lines-together; font-size:11.0pt; font-family:"New Caledonia";}p.BodyNoIndent, li.BodyNoIndent, div.BodyNoIndent {mso-style-name:BodyNoIndent; mso-style-parent:Body; margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:48.0pt; margin-bottom:.0001pt; text-align:justify; line-height:13.0pt; mso-line-height-rule:exactly; mso-pagination:widow-orphan lines-together; font-size:11.0pt; font-family:"New Caledonia";}span.BodyCODE {mso-style-name:BodyCODE; mso-style-parent:""; font-size:9.5pt; letter-spacing:0pt;} @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no; mso-footnote-position:end-of-section; mso-endnote-position:end-of-section; mso-footnote-numbering-start:0; mso-endnote-numbering-style:arabic; mso-endnote-numbering-start:0;}@page Section1 {size:588.0pt 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;}div.Section1 {page:Section1;}-->PrefaceAs long as networks of Microsoft Windows systems aremanaged, administered, and used by people, security incidents will occur.Regardless of whether weÕre talking about hundreds of corporate Windowsworkstations and servers or home user systems running Windows XP on broadbandconnections to the Internet, Windows systems will be attacked, compromised, andused for malicious purposes. This is not to say that only Windows systems willbe attacked; rather, Windows systems are highly pervasive throughout the entirecomputing infrastructure, from home and school systems to high-end e-commercesites. In contrast to this pervasiveness, information regarding conductingeffective incident response and forensic audit activities on Windows systems islimited, to say the least. Attacks may come from insiders who have legitimatephysical access to systems and are authorized to use them or from facelessindividuals hiding in the shapeless ether of the Internet. Knowing this, anyonewho manages or administers Windows systems (including the home user) needs toknow how to react when he suspects that an incident has occurred.When it comes to investigating and resolving computer securityincidents, Windows systems lag well behind Linux and *nix systems. This gapcan be attributed to a variety of reasons. One reason is a lack of detailedtechnical knowledge regarding Windows systems themselves on the part ofadministrators. This lack of understanding may be due at least in part toMicrosoftÕs use of graphical user interfaces (GUIs) to control everything fromthe installation process to all aspects of system administration. Attackers andmalicious users take steps to ensure that their activities remain hidden fromview, particularly from the systemÕs GUI tools such as the Event Viewer and theTask Manager. For example, enabling an audit policy requires that the systemadministrator navigate through multiple layers of the GUI, while an attackercan easily disable (and then reenable, if necessary) that audit policy with asingle command line tool (which, incidentally, is provided for free fromMicrosoft).Other reasons for the "incident response gap" include a lack ofunderstanding regarding how to use available native and third-party tools toretrieve data and how to interpret the data that is collected from potentiallyinfected or compromised systems. Many useful and powerful tools that mirror thefunctionality used on Linux systems are not available through either theMicrosoft operating system distributions or the Resource Kits. Sites that makethese tools available are scattered across the Internet, with no centrallocation cataloguing them. This book was written to aid anyone investigatingincidents that occur on Windows systems by providing information regarding thetools and techniques used to respond to incidents and conduct forensic audits.This book arose out of a need that I, and I am sure others, haveseen in the Microsoft Windows system administration community. MicrosoftÕsnetwork operating systems, beginning with Windows NT, are designed to be easyto use and manage. These systems come with some very powerful tools. As usefulas these tools are to the administrator, they are also very useful to anattacker or to a malicious user. Most system administrators and owners spendtheir time dealing with Windows operating systems through the GUI, and in doingso, miss many of the important aspects of the operating system that go on"under the hood." For example, the Task Manager does not show the complete pathto the executable image for each process, nor does it display the command lineused to launch each process. This information is available using third-partytools, which most folks who work with Windows systems may not be familiar with.Therefore, it may be relatively simple to hide an errant process, such as anetwork backdoor, by renaming the file "svchost.exe" or something similarlyinnocuous. Several years ago, I developed a hands-on course for teachingsystem administrators how to respond to security incidents on Windows 2000systems. While teaching the course to system administrators at variousorganizations, I saw the same things that I saw on listservs and on forums onthe Internet. During the first break on the first day of the course, I would goaround the room and "infect" all of the systems with a "Trojan." This "Trojan"was netcat, renamed to "inetinfo.exe," listening on port 80. When the attendeesreturned to the room, IÕd tell them that I "infected" their systems andchallenged them to find it. The purpose of this exercise was not to find outwho could find the "Trojan" first but to look at the steps that the attendeeswould go through in their incident response activities, to look at their"methodology." Invariably, every attendee would examine the contents of theEvent Log, comb through the Task Manager, and maybe run netstat Ðan from acommand prompt. All of the systems were connected to the Internet, and the onlyinstructions I would give to the class was that they could not use any of thetools from the course CD that IÕd put together. As the course progressedthrough the rest of the two days, the attendees became familiar with the toolsand techniques they could use to retrieve valuable data about a system, as wellas how to interpret that data. IÕve assembled a good deal of unique content for this book,information that IÕve developed because I havenÕt been able to locate it anyplace else and therefore had to do my own research. For example, when I firstbegan researching NTFS alternate data streams, there wasnÕt much informationavailable. Over time, research has revealed additional information, which isincluded in this book. IÕve included tools that IÕve developed (written inPerl) and information, results, and insights from my own research. This bookalso includes information from a variety of sources put together in a singlelocation so that it can be easily referenced. Unlike other books about incident response, this book is specificto Windows systems. Other books on the subject will present a great deal ofinformation regarding Linux and Unix systems, and in some cases, leave it up tothe reader to extrapolate the information to Windows. All of the tools andtechniques presented in this book are specific to Windows (NT, 2000, XP, and2003) systems.The book is organized so that the reader progresses through anunderstanding of incidents, what they are and how they can (and do) occur. Fromthere, the reader is guided through developing an understanding of what isrequired to prevent incidents and how to prepare for them, and then where tolook for data and how to analyze that data, should an incident occur. Datahiding and tools used in incident response and live forensic audits are coveredat great length, and all of the information presented is specific to Windowsoperating systems, file systems (i.e., NTFS), and applications (i.e., MS Word,etc.). This information is presented in a progression, each chapter taking thecontent of the previous chapter further. However, each chapter can also stand onits own, as a reference that the reader can return to time and time again.The main premise of this book is really very simple. Whenincidents occur, an entire spectrum of incident response activities can beperformed. The lower end of the spectrum involves...well...nothing. Noactivity. Basically, the incident goes completely unrecognized or is simplyignored. The opposite end of the spectrum consists of those activities thatpurists think of when they hear the word "forensics": the system is shut down ina forensically sound manner and a bit-level image of the drive is made. Allinvestigative activities are then conducted against that copy. This is usuallyaccompanied by law enforcement involvement and may even lead to prosecution.However, many organizations do not wish to involve law enforcement when anincident occurs and generally conduct non-litigious investigations because theyjust want to get systems back online and in use. In other cases, potentiallycompromised systems may be part of an e-commerce infrastructure, in whichdowntime is measured in hundreds of dollars per minute. In such cases, aninvestigation will occur, but it will not involve law enforcement or legalprosecution, as the goal is determining what, if anything, happened. These stepsmay be required to gather information and facts in order to justify furtheraction, such as taking the system down. In addition, a great deal of extremely valuable informationregarding the state of the system is lost when the system is shut down. This informationis referred to as "volatile" information, and it includes such things asprocess information, network connections, clipboard contents, etc. Thisinformation can be retrieved, parsed, and analyzed in order to determine firstwhether an incident has even occurred, and then the extent of the incident. Insome cases, enough information may have been collected to show that theincident is manageable, and the system does not have to be taken out of serviceto be "cleaned." More importantly, the investigator will want to understand how the system was infectedor compromised so that shortfalls in security policies can be rectified andother systems protected.The Perl programming language is used to programmaticallydemonstrate many of the concepts addressed throughout the book. The underlyingpremise of the book is to get the reader "under the hood" within the Windowssystem, that is, to show the reader how to move beyond the simple GUI toolsprovided with the operating system in order to collect information about thestate of the system. Many third-party tools are discussed, and several Perlscripts are provided in order to support this premise. Perl scripts are alsoused in this book to provide for customization and automation. Bycustomization, we mean that Perl is used to correlate and "massage" the outputof various third-party tools in order to present a more complete picture of thedata. By automation, we mean that Perl is used in this book to implement amethodology so that the investigator does not have to perform the steps byhand, thereby avoiding mistakes and making the overall process more efficient.This book guides the reader through information, tools, andtechniques that are required to conduct incident response and live forensicaudit activities. By providing the necessary background for understanding howincidents occur and how data can be hidden on compromised systems, the readerwill have a better understanding of the "whyÕs" and "howÕs" of incidentresponse and forensic audit activities.
Windows Forensics and Incident Recovery
FROM THE PUBLISHER
If you're responsible for protecting Windows systems, firewalls and anti-virus aren't enough. You also need to master incident response, recovery, and auditing. Leading Windows security expert and instructor Harlan Carvey offers a start-to-finish guide to everything administrators must know to recognize and respond to virtually any attack. Drawing on his widely acclaimed course, Carvey uses real-world examples to cover every significant incident response, recovery, and forensics technique. He delivers a complete toolset that combines today's best open source and freeware tools, his own exclusive software and scripts, and step-by-step instructions for using them. This book's tools and techniques apply to every current version of Windows: NT, 2000, XP, and Windows Server 2003.
|