I purchased a few used disks to analyze. They were low level formatted by the seller and Autopsy (v4.12) reports it cannot determine the file system. Is it that easy for bad guys to just low level format a drive to thwart analysis?
In actual practice though, having a subject wipe a drive before you reach it is somewhat rare. Most digital devices are seized during warrants (without notice) or taken from enterprise settings where the subject is unaware they were the victim of an intrusion or infection, etc.
My friend was having problems with a USB flash drive, and I suggested he do a low-level format. Then it occurred to me that I don't even know how to do that in Linux. So... how can I low-level format flash memory in Linux? My friend tried a "full format" on the drive in Windows and it failed.
"Low level formatting" was done on floppies, where you could write at different densities by choosing to organize the tracks and sectors differently. But this makes no sense for most modern media. Its notion of how to organize the data on the device is fixed and unchangeable. It doesn't make any sense at all for flash, which has discrete bits, rather than magnetic domains. Higher level formatting is possible, which is mkfs in unix-land.
There is no way to do a low-level format on most flash devices, since they have an additional translation layer from USB/ATA/SD/etc. to MTD which obscures the low-level MTD devices (which can be low-level formatted if gotten to directly [which you can't]).
The original meaning was a step needed in the formatting of disks - disk drives need header, sync and other patterns written on the media before it can store data to it. In this way the head can detect when it is A) on a track and B) where it is on the track. Low-level formatting a floppy prepares the disk to be able to read and write blocks. Early MFM and RLL PC hard drives could be low-level formatted, often using a utility built into the hard drive controller's (an ISA card) ROM. Modern IDE and SATA hard drives are low-level formatted too, but only at the factory.
Various other meanings include writing zeros to all blocks, configuring the drive to disable "hidden" areas such as HPA and DCO and then zeroing all blocks, or other things more related to partitioning than formatting.
Raw flash needs a different initial preparatory step at the factory - each flash "eraseblock" (analogus to a "block" on disks) needs to be tested and marked as bad if it is indeed bad. Each "eraseblock" has an additional small "OOB" block that holds error correcting information - and this is where it is marked as bad. You do NOT want to repeat this step as the act of writing to a bad block could prevent you from setting that particular bit again that identifies it as bad.
But you are not dealing with raw flash. You are dealing with a USB flash drive. There is a controller chip in all flash drives that accepts USB commands from the host and talks to the raw flash inside on the host's behalf. Some of these controller chips can be configured to report part of the flash as a separate CD-ROM partition, or act like two separate USB storage devices. Depending on the make and model of the controller chip, you may be able to find a recovery or configuration utility (likely Windows only) that could reset this controller chip. You would begin by opening the flash drive, looking for the smaller of (likely) two chips that are on the small PCB, and doing some Googling. The make and model printed on the outside of the case is not likely to help you find who made the controller inside of it.
I believe some newer USB 3 devices also implement ATA security commands, so you could use _Secure_Erase which is likely to have the effect of resetting the flash translation layer to its factory state (as it typically does with SSDs).
There are manufacturer tools that perform low-level formatting and can write some settings (like LED behaviour, making the drive read-only) and data (like manufacturer name, model name, serial number) to the memory controller chipset, but these tools usually are made only for Windows, and are often in Chinese.
And the software I linked works with it under Windows XP and 10.However - it will crash if you switch the program to English language!Set your preferences in English, then restart the program and don't change the language - it should work. Maybe it'll be fixed in a newer version.
From what I can tell, this will test the memory chip and write a bad sector map to the controller chip so it can present only good memory to the OS. This way even partially damaged chips can be used and sold. These are probably sorted in the factory by quality and low-level formatted to different capacities. This is called binning.
Although low level formatting the way it was done on hard disk drives and floppy drives do not make sense for a flash drive, there does exist manufacturer specific utilities to "low level format" flash drives:This is an example: Alcor low level format utility
Under unixoid systems you can do it with "hdparm". You need to get "root" first, then do the following. This is assuming that the drive you want to low-level format is "/dev/sda" and that you have "hdparm" installed.
The parameter is a capital "i", not a lowercase "l", just in case the font is ambiguous. If the drive shows "frozen" you must first "un-freeze" it. What you need to do to "un-freeze" it depends on the device. Most devices will "un-freeze" if you put the system to "suspend to RAM" mode, then wake it up again. If the device shows "not frozen", you can proceed.
It should now display "enabled" under "Security:". This is quite a critical step. The device is now secured. If you power it down, it will lock and might become inaccessible. When you perform the low-level format NOW, security will be disabled again and you can continue using the device.
Please note that Low-Level formatting a hard drive refers to something completely different and should never be done by an end user. Also note that the notion of formatting a drive comes from the old DOS days. In Unix/Linux creating file systems and partition tables is more common and precise.
Supplemental:There is also the possibility of keeping the partition table and just erasing the boot loader code in the MBR, but you should make a backup first and then try zeroing the boot loader code:
Note that some boot loaders utilize the space between the MBR and the first partition to safe additional data. This is likely not to cause issues in this case, but if you want to do a complete boot loader backup, you should be aware of this.
Please note that this will not effectively overwrite all data on the disk, despite the warning. It will remove the partition table and data will not be accessible easily, but data will still be recoverable by an expert.
A Low Level Format (LLF) means redefining physical disk layout. This is not doable by user on today's HDDs and SSDs. One usually want's to perform LLF to securely erase all data, reallocate bad sectors and/or remove malware.
The parameter is a capital "i", not a lowercase "l", just in case the font is ambiguous. If the drive shows "frozen" you must first "un-freeze" it. What you need to do to "un-freeze" it depends on the device. Most devices will "un-freeze" if you put the system to "suspend to RAM" mode, then wake it up again. If the device shows "not frozen", you can proceed [ed. llformat is just a dummy password].
It should now display "enabled" under "Security:". This is quite a critical step. The device is now secured. If you power it down, it will lock and might become inaccessible. When you perform the low-level format NOW, security will be disabled again and you can continue using the device [ed. try --security-erase-enhanced first if your drive supports it].
Today's HDDs and SSDs reallocate flaky sectors to service areas so that they are no longer visible to the user. How is this done depends on device firmware. Most commonly you can check for sectors that need reallocation using smartctl -x /dev/sdX and check Current_Pending_Sector raw value. Here's more about reading the reallocated sectors related values:
It's so sad that SMART is so poorly understood; I think SMART tells alot about the drive and is the best drive diagnostic available. Sadly, few people know how to interpret the SMART data, and programs that try to interpret for the user do a poor job at it.
Realloacted Sector Count = INVISIBLE bad sectors that have been swapped with reserve sectors. These sectors are NO LONGER VISIBLE to your operating system and as such can NEVER cause any more problems.
However, the value 200 you're seeing is a normalized value where the higher = better. You have to look at the RAW VALUE instead! For example, a raw value of 0 reallocated sectors might be the equivalent of a 200 normalized value. If the normalized value drops below the THRESHOLD value, that SMART attribute counts as a FAILURE. So if the normalized value is 200 and the threshold value is 100, that would be perfect, while the normalized value being 98 and the threshold being 100 would mean that attribute signals a FAILURE.
Important SMART attributes: - Reallocated Sector Count = bad sectors in the past; this might have caused problems in the past but does not have to; drives replace weak sectors as a precaution which may never have caused any problems. - Current Pending Sector = THE MOST DANGEROUS smart attribute; this should ALWAYS BE ZERO or you have severe problems! This can be either weak electric charge with insufficient ECC correction ability -OR- it can be physical damage. Writing to this sector will solve the problem; if there was physical damage it will be realloacted by a reserve sector and the Reallocated Sector Count raw value will increase. - UDMA CRC Error Count = cabling errors; if this is higher than 1000 and increasing you have severe cabling problems; under 100 does not need to trigger any alarm. Technically this means the receiving end did receive a corrupted version of the data that was sent by the transmitter; the corruption was detected by CRC which means the data is NOT accepted and the request will be sent again. Unless you see very high values or it keeps increasing steadily, this usually is not a big issue.
b1e95dc632