Presentation on theme: "Rambling on the Private Data Security"— Presentation transcript:
1Rambling on the Private Data Security Sun BingSyscan’08 Hong Kong China30th May 2008
2PrefaceNowadays “Private Data Security” has become a very hot topic, especially after the HK entertainment circles celebrity pornogate scandal, so it’s necessary to provide ordinary computer users with knowledges and tools to protect their private data.A random talk on some “Data Security” related topics, which will mainly focus on the following subjects:Harddisk Lock PasswordEFS vs. Windows Vista BitlockerWaterBox Software (Information Leakage Prevention)Harddisk Protection/Recovery Software/Card
3Harddisk Lock Password ATA Security Mode Feature SetAbusing the Security Feature SetHarddisk Lock BIOS Configuration of Dell Latitude D620 LaptopCracking the Harddisk Lock Password
4ATA Security Mode Feature Set A password system that restricts access to user data stored on a device. In addition, access to some configuration capabilities is restricted.PasswordUser PasswordMaster PasswordMaster Password CapabilityHighMaximumFrozen ModeThe Security Freeze Lock command prevents changes to all Security states until a following power-on reset or hardware reset, the purpose of this command is to prevent password setting attacks on the security system.
5ATA Security Mode Feature Set (Cont) CommandsSecurity Set PasswordSecurity Unlock (requires a password)Security Erase PrepareSecurity Erase Unit (requires a password)Security Freeze LockSecurity Disable Password (requires a password)Password RulesSee Table 6Password Attempt CounterCounter: set to 5 after a power-on or hardware resetPasswordAttemptCounterExceeded
10Abusing the Security Feature Set However the current BIOS version of most computers have no or only partial supports of this new security mode feature, which would be a very severe security hole that is exploitable by a malware to lock the hard disk with password stealthily to prevent any further hard disk access after the next power-off.In such a circumstance, to prevent the “Security Mode Feature Set” from being abused, a third-party pre-boot software is needed, as the format of either a BIOS extension or a bootable CD, which will issue the ATA command “Security Freeze Lock” to the ATA controller/drive to freeze all security settings until the next cold boot.
12Cracking the Harddisk Lock Password The harddisk will read the firmware area during the power-on process and determine whether it was locked or not, if locked then any other operation is not allowed before unlocking it with a correct password, since the passwords are stored in the negative tracks of the harddisk (a.k.a, firmware area) other than the drive circuit, it can’t be cracked by simply changing the PCB.It is said that someone can break this password protection by using the combination of PCB (Print Circuit Board) hot-swap and the supports of some professional harddisk repair tools (MHDD or PC3000 etc).
13EFS vs. Windows Vista Bitlocker EFS IntroductionEFS CrackingWindows Vista Bitlocker IntroductionTPM IntroductionTPM Security Issues
14EFS Introduction EFS: Encrypted File System Important Keys Used FEK: File Encryption Key (DESX, AES, or 3DES)User’s Public/Private Key Pair (RSA)User’s Master Key (64 bytes)A Key Derived From User’s Password (3DES)Components InvolvedEFS & NTFS DriverKSecDDLsass (Lsasrv)CSP
17EFS Cracking The Basic Concept of EFS Cracking: User’s Password Derived Key Master Key Private Key FEK File Data PlaintextDetailed Cracking Steps:Get the user’s password by SAM attacking. (pwdump, L0pht Crack etc)Compute the derived key based on the user’s password.Decrypt the master key. (%UserProfile%\Application Data\Microsoft\Protect\SID )Decrypt the private key. (%UserProfile%\Application Data\Microsoft\Crypto\RSA\SID)Decrypt the FEK.Decrypt the file data.
18Windows Vista Bitlocker Introduction Full drive volume encryption.Integrity checking of early boot components.Important Keys/Passwords Used:FVEK: Full Volume Encryption KeyVMK: Volume Master KeyPIN: Personal Identification NumberClear KeyRestore Key/PasswordStartup KeySystem Requirements:TPM v1.21v1.2 TCG-compliant BIOSUSB Mass Storage Device Class supportsAt least 2 volumes (OS/Boot & System Volume)
29TPM Security IssuesThree Conditions That Make the Chain of Hashes Trustyworthy:The first code running and extending PCRs after a platform reset (SRTM) is trustworthy and cannot be replaced.The PCRs are not resetable without passing control to trusted code.The chain is contiguous. There is no code in between that is executed but not hashed.TPM Security:Bootloader bugs (Violates condition 3)TPM reset (Violates condition 2)BIOS attack (Violates condition 1, CRTM and TPM MP Driver patchable)TPMKit? (BlackHat USA 2007)
35Waterbox Software Bypassing The Theory of Real-time Transparent File Encryption/Decryption:The file data are encrypted on disk, and the Waterbox will only decrypt/encrypt the file read/write requests that are issued within some specified process contexts, such as Winword.exe…Implementation MethodsUser Mode: File Win32/Native API hooking (Including Memory Mapping functions)Kernel Mode: FS Filter driverBypassing Steps:Inject a DLL into the process which can make the Waterbox decrypt files.Open and read the desired encrypted files.Pass the decrypted file contents to another process via shared memory.Write the received file data to disk within that process.
36Harddisk Protection/Recovery Software/Card Introduction What Can A Harddisk Protection/Recovery Software/Card Do?Any modification made on the protected harddisk will be restored automatically upon the next system boot, many internet bar install this kind of softwares to prevent their PCs from being ruined by customers.Popular Harddisk Protection/Recovery SoftwaresDeepFreeze (Faronics)PowerShadowPowerUser/PowerServerReturnil Virtual System (RVS)Sandboxie
37Harddisk Protection/Recovery Software Penetration The Theory of Harddisk Protection/Recovery:The disk access requests made on the protected disk partitions are intercepted and redirected to other disk locations, for example a hidden reserved disk partition.Implementation Methods:DOS time: PCI/ISA Option ROM, intercept BIOS int13h.Windows: Disk Filter driver, attach on DR0 device object.Penetration Techniques (Used by Machine Dog virus)Detach the filter device object that was stacked on DR0.Create a virtual disk volume object.Passthrough instruction (DeviceIoControl).Direct port I/O.