An ext2 filesystem parser and extractor developed for UP Diliman's CS140 class. This tool allows users to explore and extract files from an ext2 disk image without mounting it via the OS (setup scripts use debugfs for population).
Group Members:
- Luteria, Jian Lawrence @Spoofii-pdf
- Rosales, Christian Jay @Gargoth
- Sopungco, Andrew @asopungco
- Path Enumeration: Recursively lists all files and directories within a given ext2 filesystem image.
- Object Extraction: Extracts a specific file or directory from the filesystem image to the host system.
- Indirect Block Support: Handles singly, doubly, and triply indirect blocks for larger files.
- Directory Traversal: Correctly parses directory entries and follows nested structures.
- GCC and G++ compilers
makee2fsprogs(providesmkfs.ext2)debugfs
To build the target executable:
make buildThe binary will be located at build/main.
The program operates in two modes depending on the number of arguments provided.
Recursively lists all files and directories starting from the root of the filesystem image.
Command:
./build/main <fs_image_path>Example:
./build/main testfsExtracts a specific file or directory from the filesystem image to the current working directory on the host system.
Command:
./build/main <fs_image_path> <internal_path>Example (Extracting a file):
./build/main testfs dir1/cs153.txtExample (Extracting a directory):
./build/main testfs dir2Compiles the source files in src/ into build/main.
Creates a 100MB testfs image, formats it as ext2, and populates it with a predefined set of files and directories for testing using debugfs.
The quickest way to test: builds the project, sets up/populates the test filesystem, and runs path enumeration on it.
Deletes all build artifacts, the generated filesystem image, and any extracted output.
Note: This project was originally developed within a private GitHub organization for academic purposes.