Using the Command `mmls` (with Examples)
mmls
is a command-line utility that is part of The Sleuth Kit, a collection of tools that assist in the forensic analysis of disk images and file systems. The primary function of mmls
is to display the partition layout of a volume system. It provides a comprehensive view of the partition table, enabling forensic investigators, system administrators, and IT professionals to understand how storage space is organized on a disk.
Understanding the partition layout is crucial for tasks like data recovery, forensic analysis, or even day-to-day system maintenance, as it helps you to identify the different partitions that exist on a disk and obtain details such as start and end points, sizes, and types.
Use Case 1: Display the Partition Table Stored in an Image File
Code:
mmls path/to/image_file
Motivation:
When dealing with a disk image file, such as one created for data recovery or forensic analysis, an essential first step is to understand the partition layout. By using mmls
, you can quickly ascertain how the disk is partitioned, which is crucial for subsequent analysis or recovery efforts.
Explanation:
mmls
: Invokes themmls
utility.path/to/image_file
: Specifies the path to the disk image file from which the partition table should be read. This file often results from disk cloning or imaging processes.
Example Output:
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: ----- 0000000000 0000002047 0000002048 Primary Table (#0)
01: 00:00 0000002048 0000974847 0000972800 Linux (0x83)
02: 00:01 0000974848 0001953791 0000978944 Extended Partition (0x05)
03: 01:00 0000974848 0001953791 0000978944 Linux Extended (0x83)
Use Case 2: Display the Partition Table with an Additional Column for Partition Size
Code:
mmls -B -i path/to/image_file
Motivation: Adding the partition size as an additional column provides more immediate insight into how much space each partition occupies, which is particularly useful when assessing storage utilization or planning to resize partitions.
Explanation:
mmls
: Initiates the command.-B
: Instructsmmls
to include the size of each partition in the output, enhancing the utility’s capacity to provide a comprehensive overview of disk allocation.-i
: Specifies the input format, necessary for processing certain file types.path/to/image_file
: Indicates the disk image to analyze, ensuringmmls
knows the source of data.
Example Output:
DOS Partition Table with Partition Sizes
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description Size (KiB)
00: ----- 0000000000 0000002047 0000002048 Primary Table (#0) 1024
01: 00:00 0000002048 0000974847 0000972800 Linux (0x83) 486400
02: 00:01 0000974848 0001953791 0000978944 Extended Partition (0x05) 489472
03: 01:00 0000974848 0001953791 0000978944 Linux Extended (0x83) 489472
Use Case 3: Display the Partition Table in a Split EWF Image
Code:
mmls -i ewf image.e01 image.e02
Motivation:
Split EWF (Expert Witness Format) images, often used in forensic digital imaging, consist of multiple segments. To view the partition layout when your disk image is in this format, mmls
can interpret these segments and present a cohesive partition table.
Explanation:
mmls
: Calls the command.-i ewf
: Indicates that the input file is an EWF format image, allowingmmls
to correctly parse the segmented data.image.e01 image.e02
: Lists the segments of the EWF image, which together compose the complete disk image file.
Example Output:
DOS Partition Table for Split EWF
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: ----- 0000000000 0000002047 0000002048 Primary Table (#0)
01: 00:00 0000002048 0000655359 0000653312 NTFS (0x07)
02: 00:01 0000655360 0000983039 0000327680 NTFS (0x07)
Use Case 4: Display Nested Partition Tables
Code:
mmls -t nested_table_type -o offset path/to/image_file
Motivation:
Nested partitions commonly occur in complex storage structures like Logical Volume Managers (LVM) or when exploring virtual machine disk images. By using mmls
to view nested partition tables, more detailed disk layouts within a parent partition can be explored.
Explanation:
mmls
: Initiates the use of the the command.-t nested_table_type
: Specifies the type of table, guidingmmls
to understand the structure within the parent partition.-o offset
: Directsmmls
to the specific offset within the image where the nested partition begins.path/to/image_file
: Targets the source image that either contains or represents the nested partition table setup.
Example Output:
Nested Partition Table
Offset Sector: 2056
Units are in 512-byte sectors
Slot Start End Length Description
00: ----- 0000000000 0000002047 0000002048 Primary Nested Table (#0)
01: 00:00 0000002048 0000031744 0000009696 Swap (0x82)
Conclusion
Throughout these examples, the versatility of mmls
in uncovering and detailing disk partition layouts becomes abundantly clear. Whether it’s handling straightforward image files, accommodating split EWF file segments, or diving into nested partition complexities, mmls
brings transparency to the user’s understanding of storage structures. By utilizing the available options within mmls
, users can customize their approaches to fit specific imaging scenarios, thereby enhancing the efficiency and depth of forensic analysis, data recovery, or system evaluation.