Bios Password

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, December 13, 2008

USB Security: AutoRunGuard, Encryption options, and Forensics

Posted on 11:48 PM by Unknown

Deep into my earlier Security and Forensics Roundup: Heavy Version #2 post, I shared the renewed threat-vector of USB drives in general and the auto-run behavior in particular.

Then I immediately noted the need to get Alvis her own personal USB drive.

Great tips were offered by forensic gurus Hogfly and Harlan on dealing with USB security along with “Steve”.

That led to a minor post-post post NTFS Formatting an Imation USB Disk after which I received additional feedback from school IT administrator reminding me that Alvis would unlikely be able to use TrueCrypt at school due the fact the system-drivers would not load under the students’ restricted account policy settings.

So now I’ve had a bit more time to dwell (and research the subject) and am working on a few new angles worth sharing.

“Semi” Automatic USB device scanning – Foundation

From the first post comments, Steve suggested looking at Didier Stevens’ USBVirusScan which can be configured to launch an AV application when a USB stick gets inserted.

I did so and it looks like it could fit the bill. The way it works is (basically) you download the zip file and unpack.  Then you edit a .bat file to the specific drive letter and CLI path to executable you wish to run.  Set it all up and when the main-program detects a USB device loading, it triggers the pre-configured program to run.

See this Ditii blog post for some popular AV CLI commands to use: USBVirusScan: Automatic virus scanning, when plug in USB Flash Drive

As Steve (and Didier) suggest, this is great when tied to an AV/AM CLI supported software solution to scan the device in question immediately.

However, after reading Didier’s post, I (per usual practice) studied the post comments in depth looking for feedback and some additional practical applications.

Since some time has passed since Didier’s original post, the comments were filled with loads of comments.

And in them was an even better gem built on USBVirusScan.

And then there was AutoRunGuard

Dan McCloy took Didier’s work and expanded it in a pretty awesomely effective way.

But first, Dan shows his chops by breaking down the definitions and operations of Windows AutoRun, AutoPlay, and EDDC.  It really helps to clear up the finer points of what is going on.

Dan McCloy’s Autorun Reference Guide

Well worth reading the concise and organized page. Dan provides a number of strategies for reducing the effectiveness (for security gains) of AutoPlay and AutoRun

(Note: see also How to correct "disable Autorun registry key" enforcement in Windows – Microsoft KB953252)

Then Dan drops the bomb:

AutoRunGuard – freeware bat-file work combined with Didier’s USBVirusScan tool.

In its most basic default configuration, when a USB device is inserted, it opens a CLI window and asks you if you want to scan the drive, inoculate the device against future auto-run threats, or browse the device contents with Windows Explorer.

Cool.

However what takes Dan’s program off the chart is that with some careful cmd-file editing, you can edit it to respond based on a particular device’s volume name, treat cd material differently, do MD5-based authentication of drive items to ensure they were not altered or compromised, and much more.

I have to confess, even for a bat-file builder like myself it was a bit intimidating at first with all the stuff Dan crammed in there. But once I quickly identified the particular drive-letter to be used on my system(s) and had carefully read the attached help-file (well done I might add) I had the program configured in no time.

The setting that you are most likely to need to customize is the command line for your particular anti-virus scanner.  Following are some samples that may match what you need. 

Test it first by running the command exactly as shown except that you should replace %d% with a drive letter and a colon for this test.  Then in the AutoRunGuard.cmd file, scroll down about 135 lines to where it says,

:: [[ Modify the following line to be whatever your system needs for performing a virus scan. ]]

Then replace the setting in the following (set MenuCmd=...) line with the one that worked for you.

Note that the path and parameters that a program uses may vary from one version and edition to another.  You might try browsing your Program Files folder to find the actual .exe files.  Note also that some programs offer both a command-line version (text will appear in the AutoRunGuard window) and a means to call the normal scanning window.

Worked like a charm.

For boot to shutdown protection, add a shortcut for USBVirusScan to the startup folder (or schedule the event to run at login in Vista). It will be ready and waiting for your USB disk to arrive for scanning!

Highly recommended.

Curiosity

As I am currently testing VIPRE Antivirus + Antispyware and wanted to set it up as the target AV scanner for AutoRunGuard’s cmd file.

Although VIPRE wasn’t included in the sample listings for CLI templates, I did find Sunbelt Software Support Answer ID 1759 to guide me in writing my own.

VIPRE offers you the ability to run a scan from the command line scanner.
Note: Using VIPRE's command line scanner is an advanced feature and should only be used by knowledgeable computer users.

The following parameters are available for the command line scanner with the syntax: SBAMCommandLineScanner.exe [parameter]:
Parameter Description

/displaylocaldefversion - gets current version number of risk definitions
/displayvipreversion - gets current VIPRE software version number
/displaysdkversion - gets current SDK version number
/scannowquick - starts a Quick scan
/scannowdeep - starts a Deep System scan
/updatedefs - starts update definition
/enableap - enables active protection

However it didn’t provide information on how to run a scan on a particular drive/volume target. The scannowquick seems to totally skip all additional drives (non-system partitions) and the scannowdeep will get the USB mounted drive, eventually, as it scans ALL mounted volumes/partitions in the process. 

Thus, my line 136 of the AutoRunGuard.cmd file looks like this:

set MenuCmd="%ProgramFiles%\Sunbelt Software\VIPRE\sbamcommandlinescanner.exe" /scannowdeep "f:"

I saved it, launched the main USBVIrusScan executable, inserted my USB stick and then picked the option to scan drive when offered by the CLI window that appeared.

VIPRE began its (full) scan and about an hour and 1/2 later, all the drives including the USB one were scanned.

That’s a long wait in many cases for it to arrive at the USB device with VIPRE’s CLI options.  I might be done using the USB stick and have ejected it by the time it finishes, despite VIPRE’s speed.

I fired off an email to the product support team, and even though it was the weekend, the TIER 1 support rep responded later in the day confirming what I suspected. It appears there are no command-line arguments (documented/undocumented) that will allow a CLI scan for just a particular drive-letter.  That can only be set and handled with a custom scan via the program GUI interface.

That doesn’t help me (and I hope it can be considered as a feature in a future version of VIPRE), but all is not lost.  I will just have to use an alternative Portable Anti-Virus/Malware Security Tool that supports CLI drive-targeted scanning parameters. I listed a number of free ones to pick from.  Just ends up being another AV/AM tool to manually update DAT files for, however.

Users of other popular AV/AM tools won’t have that problem at all as most all support scanning just a particular drive via the CLI arguments they offer.

USB File/Volume Encryption - Revisited

As has been noted, TrueCrypt does require Admin rights to run the drivers, even if they don’t have to be installed.

I did find one alternative to TrueCrypt that seem to get around that limitation and might be a better solution for Alvis and other users desiring USB volume encryptions but working under restricted Windows accounts.

Rohos Mini Drive – freeware – Creates a hidden and encrypted volume on USB devices and does not require admin rights to run on any system. Nice. The interface is much more user-friendly GUI than TrueCrypt. Encryption algorithm: AES 256 bit key length. NIST approved. Size of encrypted volume is 1 GB. While not humongous, this should be more than adequate for the average user’s needs.  It also packs a virtual keyboard to attempt circumvention of any keyloggers. Learn more about it’s features and see screenshots.  Spotted on Download Squad.

I also found the following application that looked promising:

Cypherix LE Free Encryption Software – freeware – Similar to Rohos, this product (formerly known as Cryptainer LE) uses a 128 bit implementation of the Blowfish algorithm in Cipher Block Chaining (CBC) mode with a block size of 64 bytes. And you can create multiple 25 MB sized containers on your USB device. The interface is a bit more advanced than Rohos, but not quite to the TrueCrypt level of complexity. The USB portable version seems to be referred to as Cypherix Mobile.

Now for the administrator rights requirement test:

Can Cryptainer be installed without administrator privileges?

Unfortunately this is not possible. Cryptainer runs as a process within the Windows framework. It needs be enabled as well be started up and shut down on request. It is necessarily constrained, by the overall Windows configuration, of the client machine.
This in turn is derived from the security, permissions, to illustrate just one instance of the client machine.

Please note that while Cypherix Mobile cannot be used without Administrative Privileges, The full version (Cryptainer) can be installed on any machine, with or without Admin privileges.

Thus it doesn’t appear to fully fit the bill for students. Too bad, but less competition for Rohos I guess.

USB Related Security Matters

Expanding the USB device theme a bit more:

Prevent Your PC From Booting If Your USB Drive Is Not Inserted - MakeUseOf.com.  Beware! Here be dragons!  Varun Kashyap provides a clear--if not dangerous--way to create a poor-man’s SmartCard boot dongle.  Basically you set your BIOS (if supported) to boot from USB devices first, and move some critical Windows system boot files to a USB device (boot.ini, NTLDR and ntdetect.com).  When the system boots it looks to the USB device and reads the files needed. No USB device with needed files? No boot. Written for XP but should work in principle with Vista as well.

As the article points out, it isn’t “secure” in the sense that a system would be with a whole-disk-encryption method using either freeware software CompuSec or TrueCrypt.  As long as any advanced IT user had a LiveCD to boot the system with (Win PE or Linux) the files on the otherwise non-bootable system would still be accessible, quite easily.

The NOISY U3 Thumb Drive File Access behavior in Windows - SANS Computer Forensics, Investigation, and Response. Great post by J. Michael Butler using the older Sysinternals FileMon (now replaced by the more advanced Process Monitor) tool to capture U3 USB drive application behavior. He even identified a U3 activity log created under the user’s application temp folder containing dates, times and serial numbers. Neat!

Forensic Incident Response: Tales from the field – Great analysis from Hogfly of a malware infection response that also involves a USB drive and autorun behavior execution.

Forensic Incident Response: Old is new - Tales from the field – Hogfly details how old attack methods against the MBR and autorun files on removable devices are being repurposed for renewed system attacks. Good stuff, especially as new discovery techniques are matched against them!

Forensic Incident Response: Beware the key – Last one.  Reminder of applying common sense and some protective measures already discussed in this post against USB device autorun features.

Motto for the night: Plug up your holes before plugging into your USB ports!

--Claus V.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in anti-virus software, command-line interface, hacks, hardware, malware tools, security, utilities, viruses, XP mods | No comments
Newer Post Older Post Home
View mobile version

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Finally! Time to Post! New material list
    After a recent text from my bro reminding me it has been since March since I’ve done a blog post, I was finally able to clear the schedule a...
  • Oscar watch Linkpost
    Alvis and Lavie are watching the Oscars tonight and I’m along for the ride. I wasn’t able to come even close to getting out some of the pos...
  • New Year’s Day - First Post 2011
    Same day I came out with my first post after a long drought, I fell upon this article Blogging Seems To Have Peaked, Says Pew Report over a...
  • Utility Gumbo
    There’s a lot in this pot.  Probably something everyone can find to enjoy. I’m serving it up tonight out of the back of the truck on the s...
  • iodd : Multi-boot madness!
    Like many computer technicians and responders, I seem to always have at hand a collection of bootable media; CD’s, DVD’s, USB-HDD’s, flash m...
  • Ubuntu 13.10 Upgrade - Lessons Learned & VIDMA utility found
    A few weeks ago a new release of Ubuntu came out. Naturally that meant it was update time! I have been getting pretty good at this now so ...
  • Interesting Malware in Email Attempt - URL Scanner Links
    Last weekend I spent some time with extended family helping confirm for them that their on-line email account got hacked and had been used t...
  • Windows 8 Linkage: A Bit Behind the Ball
    CC attribution: behind the eight ball by Ed Schipul on flickr . OK. Confession time. I’m more than a bit exhausted this weekend. Besides a...
  • This Week in Security and Forensics: Beware the cake!
    Cube Party! image used with permission from John Walker at "rockpapershotgun.com" Yeah, the cake is a Portal thing.  Let’s d...
  • ForSec Linkfest - 2013 DST Fallback Edition
    FYI…tomorrow morning at 2 AM here in the United States of America it will be time to “fall back” from DST . One more hour of sleep and then ...

Categories

  • Active Directory
  • anti-virus software
  • Apple
  • architecture
  • art
  • AVG
  • Blogger
  • blogging
  • books
  • boot-cd's
  • browsers
  • cars
  • cell-phones
  • cheat sheets
  • Chrome/Chromium
  • command-line interface
  • cooking
  • crafts
  • crazy
  • curmudgeon
  • DHC
  • Dr. Who
  • E-P1
  • Education
  • family
  • Firefox
  • firewalls
  • For the Gentleman
  • forensics
  • Gmail
  • Google
  • graphics
  • hacks
  • hardware
  • humor
  • hurricanes
  • imagex
  • Internet Explorer
  • iOS
  • iPhone
  • iPod
  • iTunes
  • Kindle
  • Learning
  • Link Fest
  • Linux
  • malware tools
  • Microsoft
  • movies
  • music
  • networking
  • NewsFox
  • NFAT
  • Nook
  • Opera
  • organization
  • PDF's
  • photography
  • politics
  • PowerShell
  • recipes
  • Remote Support
  • RSS
  • science
  • Scripting
  • search engines
  • security
  • Shuttle SFF
  • software
  • Texana
  • Thunderbird
  • troubleshooting
  • TrueCrypt
  • tutorials
  • utilities
  • VBscript
  • video
  • Virtual PC
  • virtualization
  • viruses
  • Vista
  • Vista mods
  • wallpapers
  • Win FE
  • Win PE
  • Win RE
  • Windows 7
  • Windows 8
  • Windows Home Server
  • Windows Live Writer
  • Windows Phone
  • writing
  • XP
  • XP mods
  • Xplico

Blog Archive

  • ►  2013 (83)
    • ►  November (8)
    • ►  October (8)
    • ►  September (14)
    • ►  August (6)
    • ►  July (10)
    • ►  June (10)
    • ►  April (11)
    • ►  March (6)
    • ►  February (7)
    • ►  January (3)
  • ►  2012 (96)
    • ►  December (8)
    • ►  November (4)
    • ►  October (9)
    • ►  September (8)
    • ►  August (12)
    • ►  July (4)
    • ►  June (3)
    • ►  May (7)
    • ►  April (13)
    • ►  March (3)
    • ►  February (5)
    • ►  January (20)
  • ►  2011 (41)
    • ►  December (8)
    • ►  November (7)
    • ►  September (4)
    • ►  August (4)
    • ►  July (2)
    • ►  June (6)
    • ►  March (5)
    • ►  February (1)
    • ►  January (4)
  • ►  2010 (69)
    • ►  December (1)
    • ►  October (3)
    • ►  September (2)
    • ►  August (13)
    • ►  July (17)
    • ►  June (3)
    • ►  May (3)
    • ►  April (3)
    • ►  March (11)
    • ►  February (1)
    • ►  January (12)
  • ►  2009 (177)
    • ►  December (20)
    • ►  November (11)
    • ►  October (7)
    • ►  September (7)
    • ►  August (21)
    • ►  July (17)
    • ►  June (7)
    • ►  May (18)
    • ►  April (9)
    • ►  March (17)
    • ►  February (23)
    • ►  January (20)
  • ▼  2008 (35)
    • ▼  December (23)
      • Calling H-Town Techies: Help Save our Laptop!
      • Merry Christmas and Happy New Year!
      • Early Monday morn Linkfest: Utility Focus
      • Late Sunday Linkfest: Focus on Security
      • Custom Win PE Boot Disk Building: Step Two – PGP I...
      • USB Security: AutoRunGuard, Encryption options, an...
      • Security and Forensics Roundup: Heavy Version #3
      • Browser Bullets: #3
      • Mid-December Linkfest: Snowflake version
      • Utility Bag dump-out
      • (In)Security Response: Room for Improvement
      • Custom Win PE Boot Disk Building: Step One – WAIK up
      • NTFS Formatting an Imation USB Disk
      • Custom Win PE Boot Disk Building Saga: Introduction
      • Security and Forensics Roundup: Heavy Version #2
      • Windows Vista and Slipstreaming: A Primer
      • Software Goodies
      • Windows 7 News Roundup #4
      • Warm things for cool and blustery days
      • Browser Bullets: #2
      • Who are u.exe?
      • Quick Browser and Google Bits
      • Pushing through the wall
    • ►  November (12)
Powered by Blogger.

About Me

Unknown
View my complete profile