Forensics: What is RAM Slack?

RAM Slack is data between the end of a logical file and the a sector. (NOT the cluster). A sector, on a standard hard drive takes up 512 bytes, if the last logical sector in the file takes up 400 bytes, the 112 bytes remaining will be RAM slack. Traditionally this space would be filled by a partial dump from the RAM, e.g. 112 bytes of RAM memory would be used to fill this space.

File slack is from the last logical sector of the file to the last physical sector in the cluster.

RAM is no longer relevant to most modern Windows PCs as RAM no contains zeros rather than data from the RAM, i.e there are no forensic artifacts that can be found in RAM slack any more, for Windows systems.

Related Article:

What is Slack

Whats the difference between RAM Slack and File Slack

Forensics: RAM Slack and File Slack

What is the difference between RAM slack and file slack?

Slack, in general, refers to the difference between the logical file size and physical file size.  However slack can be broken down into two different areas, RAM slack and File Slack. 

RAM slack is the slack between the end of the logical file and the rest of that sector. File Slack is the remaining sectors to the end of the cluster. To put it another way RAM slack is the slack at the byte and sector level. File slack is the sectors to the cluster level.

Example

On an NTFS drive with with 512 byte sectors, and 8 sectors per cluster the size of a cluster is 4096 bytes. If a file is 5100 bytes long, this means that there 3092 bytes of slack, this is broken down into 20 bytes of RAM slack and 3072 bytes of file slack (or 6 sectors).

The reason is this:

The file is 5100 bytes which is 9 sectors. But the NTFS file system works on clusters not sectors, therefore the file will be assigned 2 clusters. The first cluster (8 sectors) will be completed filled by the first file, however the second cluster will only contain 1004 bytes of the file (4096+1004 = 5100). 

This means that the first sector (512 bytes) of the second cluster will be completely filled  with the file, but the second sector of the second cluster will only contain 492 bytes. The space at the end of the second sector on the second cluster is known as RAM slack, and is a dump from the RAM, in this case its just 20  bytes (492+20 = 512).

After that there are 6 more sectors to the end of the cluster (the file is assigned two clusters, 16 sectors in total). The 6 sectors remaining are known as file slack.

RAM slack, is therefore very small amounts of data, a maximum of 511 bytes. File slack as the potential to be bigger, but is still small. The maximum size of file slack, assuming a cluster size of 8 sectors, is  7 sectors or 3,584.

Note:

RAM Slack does not exist on a modern version of Windows, and has not done for some time.

Forensics: MFT Slack

The MFT can have slack, though it is slightly different to file slack. As the slack is within the MFT, rather than the end.

Slack, is briefly described as the “spare bit” at the end of the file – its the difference between the logical and physical file size.

An MFT entry is allotted a fixed space of  1024 bytes, as standard. If the MFT entry is less than 1024 bytes, e.g 1000 bytes, the remaining bytes are MFT slack. The contents of this MFT slack will depend, as with file slack, on what was there before it.

Commonly the MFT slack contains the contents of the MFT entry before it was created, this can be particularly interesting for computer forensic examiners if there was resident data.

Example

A password list text file 200 bytes long would be resident within the MFT. If the text file was deleted and a new MFT entry created in its place, with not resident data, e.g. a PST file, then the resident data from the text file would remain as file slack. This means that a detailed examination would reveal the old password list, even though it had been deleted and long gone.

Note

Its hard to identify MFT slack as slack  as tools like FTK and EnCase do not show it as slack, and as its within the MFT itself, which can look complex enough. For this reason identifying slack from the MFT entry can be difficult. Therefore caution must be taken when assigning data within the MFT to a particular file or user.

What is File Slack

What is File Slack?

This article looks at file slack, where it is, how to find it? Below is a video guide of how to view slack data in EnCase 6.10. For  more detailed information on File Slack see this article

Requirements

To understand File Slack, one must first understand the basic concepts of Cluster and Sectors.

File Slack

File slack, in short is what the name implies; it is the “slack”/ the spare bit at the end of a file.

Technically it is the difference between the physical file size and logical file size. The physical size is always the same or greater than the logical size. If the physical size is greater in size than the logical file then the spare data between between the logical and physical file is known as “slack”.

File slack is slightly different to RAM Slack

File Slack

What is File Slack?

This article looks at file slack, in detail,  where it is and how to find it.

Expected Knowledge

To understand File Slack, there must first be an understand the basic concepts of Cluster and Sectors. This article is based on the assumption that the reader understands these concepts. It is also written with the assumption that the hardware under consideration is a standard windows hard drive, with sector size of 512 and a cluster size of 8 sectors.

Clusters and Sectors

As the operating system can only address clusters, rather than sectors which hard drives can, it means that files are stored on a hard drive in units of clusters and not sectors.

Examples:

A 5000 byte file, takes up 9 sectors, however the operating system will allocate the file 2 clusters (16 sectors), as it does not fit into 1 sector. 2 Sectors is 8 KB

A 2500 byte file will fit into 5 sectors, however the operating system will allocate the file 1 full cluster (8 sectors), which is 4 KB

A file which is 10,000 bytes will be allocated 12 KB – 3 sectors.

Different Sizes

From this it can be seen that a file has two different sizes, the logical file size the actual size of the file and the physical file size, the size given to the file on the hard drive.

The physical file size is always greater than or equal to the logical file size (ignoring resident data for the moment).

File Slack

File slack is the difference between the physical file size and logical file size.

E.g for a 5000 byte file, which is given 2 clusters (8192 bytes), the file slack will be 8192 – 5000, which is 3192 bytes. The file slack should always be less than 1 cluster (4096 bytes).

As file slack is literally the space on the hard drive between the logical and physical file size, it means that anything that was in that space before become file slack. As a new file is created by overwriting unallocated space (even if it means deleting a file immediately before the request to write) this means that file slack is essentially old fragments of unallocated file space (RAM slack is not being discussed at this point).

This means that file slack can contain anything at all, from fragments of web pages, emails, and even complete small pictures, to junk text. It is more often than not the latter, however complete EML files, and thumbnail pictures have been recovered than can prove an entire case.

Below is a video showing file slack, using EnCase 6.10. Encase is better at viewing this type of data than FTK.

Follow

Get every new post delivered to your Inbox.

Join 25 other followers