Home > Midmarket IT Security Tips > Security Operations and Strategies > How to create a bit-image copy of a live server
Midmarket IT Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SECURITY OPERATIONS AND STRATEGIES

How to create a bit-image copy of a live server


Tom Chmielarski
09.24.2009
Rating: -4.40- (out of 5)


Midmarket Security Strategies and Tactics
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Occasionally it is necessary to create a bit-image copy of a computer without, or at least before, shutting that system down. By "bit-image" we mean a copy of every bit on the hard drive regardless of how the operating system sees it, rather than a copy of every file. A bit-image is preferred over a file-level copy of the image since it will include fragments of deleted files or data that is otherwise hidden.

More incident
response resources
How should a company's security program define roles and responsibilities: Follow this implementation plan for your security program in order to help you define incident response roles.
Acceptable use policy for Internet usage helps data protection efforts: Acceptable use policies are an inexpensive, yet effective, control in limiting exposure to data breaches.

A typical scenario for creating a bit-image of a running server is an incident response situation where a critical server may or may not have been compromised or otherwise tampered with and needs to be thoroughly examined, but a server shutdown procedure cannot be justified. For the purposes of this technical tip, we'll assume a simple single-disk Windows server.

One of the most important questions when imaging a server is where to put the image. You can't save it to the drive you're copying. Two good options are a USB drive or over the network. We'll explain copying it over the network.

All you need to create this disk image and copy it over the network to another computer is a Windows version of the common GNU/Linux tools DD and netcat, which are both free and open source. DD creates the bit-image disk copy and netcat will send anything over the network. Of course, you'll need the second computer on the network that will receive the image and has enough capacity for the image. You'll want to put these two tools on safe media -- preferably a CD. This way they are known to be "good" and won't be compromised when used on a compromised system.

DD creates the copy by reading each raw disk cluster, starting at the first on the disk and continuing to the end. On a running computer the drive is often changed, depending on how active the server is, so there may be changes made to the disk after DD has already copied that segment.

For DD we'll use DCFLDD -- this version of DD was created by the U.S. Department of Defense Computer Forensics Lab. It is functionally identical to the normal version of DD but has added capabilities relating to hashing the data it copies. The hash creates a signature that allows us to validate the output is the same as the input (the original disk). Since we're imaging a live server the disk is always changing -- this means a second image will not have a hash that matches the first image.

DCFLDD is a fairly simple tool to use and its documentation can be found at the projects homepage at sourceforge.net. The parameter "if=" is used to specify the input, typically the drive or drive partition you are imaging. Determining the correct name for your input device can be a little tricky -- the cygwin documentation will explain it in-depth. The quick version is that "/dev/sda" refers to the first hard drive, "/dev/sdb" the second drive, "/dev/sdc" the third drive, and so on. Some other builds of DD, that do not support hashing, provide a "--list" command to enumerate the drives on the system for you, which is quite handy. You can use DD to copy an image to a physical drive by using an image file for if and a physical device as of.

dcfldd if=/dev/sdc hash=sha256 hashwindow=512M sha256=mydrivehashes.log / bs=512 conv=noerror split=2G of=mydrive.dd

1 - DCFLDD Example
This example of DCFLDD will:

  • Copy the third hard drive (/dev/sdc) to the file mydrive.dd.
  • Use SHA256 to hash the drive contents in 512 Mb segments.
  • Record the hashes to "mydrivehashes.log."
  • Split the file into 2GB files.
  • Skip over read errors rather than stopping (conv=noerror).

I've now shown how to create a disk image, but only to a local file on the system. That's not helpful when there is no spare physical media present. This is where we use netcat, nc.exe, to redirect the output of DCFLDD over a network connection. This copy will not be encrypted so if the server image contains sensitive material it could be intercepted by anyone who is monitoring your network. When the output (of=) is omitted DCFLDD will copy to standard output. That means you can redirect to another tool, such as netcat. Netcat for Windows can be found online. First, on the destination server, launch netcat as a listener and redirect that to a file. I'll have netcat listen on TCP port 3333 and write the image file to myimage.dd.

nc.exe --l --p 3333 > myimage.dd

Next, you can image the server (10.1.1.1) and send the image (via insecure cleartext) to that destination server by directing the output to netcat, through standard out, by not specifying the output file (of).

dcfldd if=/dev/sdc hash=sha256 hashwindow=512M sha256=mydrivehashes.log / bs=512 conv=noerror split=2G | nc 10.1.1.1 3333

If you do need to do this, and it's for an incident response effort, make sure and document exactly what you do and at what time. This is critical if the resulting evidence is ever going to be used in court. If you don't need this for incident response purposes, and don't need the hash record, then a different version of DD, one supporting --list to enumerate your drives, might be a better choice.

Tom Chmielarski is a senior consultant with GlassHouse Technologies, Inc.

Send comments on this technical tip to editor@searchmidmarketsecurity.com

Join our IT Knowledge Exchange discussion forum; please use the midmarket security tag.


Rate this Tip
To rate tips, you must be a member of SearchMidmarketSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Security vulnerability management
How to choose online data backup services for data protection
How to choose full disk encryption for laptop security, compliance
Get more out of your security event log data
Tool defeats binary diffing, automated reverse engineering of Windows security patches
How to make data loss prevention tools affordable and manageable for midmarket
Examining Conficker: When a worm becomes a botnet
Stolen FTP credentials likely in latest website attacks
Hackers targeting unpatched Microsoft DirectShow flaw
PCI DSS requirement: Protect cardholder data
Adobe shifts to Microsoft patching process, incident response plan

Detecting and preventing network intrusions
How to maintain network control plane security
Validate your perimeter network security devices are working
The keys to locking down Windows Vista User Account Control
Network-based integrity monitoring keeps website hacks in check
Avoid security risks of Free Public WiFi wireless ad hocs
Examining Conficker: When a worm becomes a botnet
Stolen FTP credentials likely in latest website attacks
PCI DSS requirement: Protect cardholder data
Network security begins with device discovery and assessment
Five steps to eliminate rogue wireless access

Security Operations and Strategies
Five things to do before your first PCI DSS compliance audit
How to detect malicious insiders by monitoring antivirus log files
Take four steps toward Macbook security
How to maintain network control plane security
Four things to remember about server virtualization security concerns
How to choose online data backup services for data protection
Validate your perimeter network security devices are working
How to choose an external compliance auditor
PCI DSS: Writing an information security policy
How to choose full disk encryption for laptop security, compliance

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
network scanning  (SearchMidmarketSecurity.com)
port scan  (SearchMidmarketSecurity.com)
vulnerability analysis  (SearchMidmarketSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts