|
| |
|
| |
|
Sponsored by:
Affiliates: ![]() ![]() ![]()
EC-Council ECSA Training Videos
Web Hosting: |
Tracking users, malware and data leaks via the USB serial numbers on flash drives, smart phones and MP3 players
Ω A USB flash drive is found with contraband on it, but none of the suspects claim to own it. If the serial number of the USB flash drive is found in one of suspects' Windows registry this is possible evidence as to who it belongs to. Ω Malware has been spreading though your network, and you think thumb drives are the vector. Using the serial number you could search the network for computers where a known infected drive was used to give you an idea as to which workstations you will have to do clean up on. It may also lead you to know who brought the malware into the network (Patient Zero), or who been the biggest Typhoid Mary. Ω You suspect some data has been stolen from a department server, and you found a suspicious MP3 player’s serial number in the Windows server's registry. MP3 players can be used as generic storage devices. By searching the network for other boxes where that same MP3 player has been plugged-in you may find that the only other box it's ever been use on is Bob's. This makes Bob a likely suspect. I'm guessing you could come up with other scenarios where tracking a USB device’s serial number could be useful. We can see the potential, but how do we get this data, and how do we automate using it? There are two main spots you can pull this information from on a Windows XP/Vista/7 system:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
I cover both of these registry keys in more detail in my article 'Forensically interesting spots in the Windows 7, Vista and XP file system and registry' which you can find here:
USBDeView gives the user a ton of information about what devices are currently plugged-in, and what ones have been plugged-in before but are not currently present. USBDeview /remote \\SomeComputer
Now keep in mind, I had to be logged in with an account that had access to that machine, and certain services have to be accessible. Nir has a nice blog post on what it takes for his tools to work from across the network: USBDeview /remotefile boxes.txt where boxes.txt is a list of computer names/IPs in UNC format. For example: It takes a bit of time for the results to return, so be patient. Once we get the report, we can sort by the 'Serial Number' field, look for repeating serial number by eye, and then scroll over to the 'Computer Name' field to see what computers that particular USB device has been used on. For my screen shots I've reordered the columns to put the fields I'm most interested in first. The 'Created Date' and 'Last Plug/Unplug Date' fields are also usefully for figuring out a time line (really handy for finding a malware Patient Zero or Typhoid Mary based on when a user was logged on last). As you can see from the first screen shot, I have two different thumb drives from Patriot Memory that have been plugged into both my Skynet and Cthulhu workstations, but none of the other boxes I scanned:
From the 2nd screen shot you can see that my IronKey and my former roommate’s Android Phone have only ever been plugged into my workstation named Cthulhu:
This sort of information can be erased, but local attackers rarely think of the tracks that their USB devices leave behind. I cover erasing USB track in more detail in the anti-forensics video which I will link to at the end of this article.
SELECT Myoutput.* To dump your findings to a CSV you could take the results from the GUI, select all of the records (Ctrl-A), then choose the save icon and pick CSV from the drop down, but there is an easier way if you just intent to import the results into a database for sorting and searching. You can tell USBDeview to dump the output to a file without ever bringing up the GUI with this simple command:
USBDeview /remotefile boxes.txt /scomma myoutput.csv
With a little automation you could make regular reports. I'm still interested in finding better ways to track this sort of information, so if you know of any good free or open source asset management systems that log USB serial numbers, or are interested in coding something to help automate these types of searches, please let me know. Links at a glance:
blog comments powered by Disqus
Ten most recent posts on Irongeek.com:
|
If
you would like to republish one of the articles from this site on your
webpage or print journal please contact IronGeek.
Copyright 2010, IronGeek
Louisville / Kentuckiana Information Security Enthusiast