Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic cpio filesystem #531

Merged
merged 9 commits into from
Feb 19, 2024
Merged

Conversation

JSCU-CNI
Copy link
Contributor

@JSCU-CNI JSCU-CNI commented Feb 8, 2024

This PR adds a basic cpio archive loader which should enable you to browse initrd.img files found on most Linux distributions. Currently supports gzip, bz2 and zstd compression (using open_decompress).

$ target-shell /tmp/debian-12.4.0/*.vmx
debian /> enter /boot/initrd.img-6.1.0-15-amd64
initrd.img-6.1.0-15-amd64 /> ls
bin
conf
etc
init
lib
lib64
run
sbin
scripts
usr
initrd.img-6.1.0-15-amd64 /> 

This PR does not include support for initramfs/initrd archives embedded inside MBR files / vmlinuz kernels.

@Schamper Schamper requested a review from Horofic February 14, 2024 20:29
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (c33fcd8) 73.93% compared to head (7276c4d) 73.94%.

Files Patch % Lines
dissect/target/helpers/fsutil.py 76.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #531      +/-   ##
==========================================
+ Coverage   73.93%   73.94%   +0.01%     
==========================================
  Files         283      284       +1     
  Lines       23453    23481      +28     
==========================================
+ Hits        17339    17363      +24     
- Misses       6114     6118       +4     
Flag Coverage Δ
unittests 73.94% <86.66%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Schamper Schamper changed the title Add basic cpio loader Add basic cpio filesystem Feb 14, 2024
Co-authored-by: Stefan de Reuver <[email protected]>
@Horofic Horofic self-requested a review February 19, 2024 11:33
Horofic
Horofic previously approved these changes Feb 19, 2024
@Schamper Schamper requested a review from Horofic February 19, 2024 11:33
@Horofic Horofic requested a review from Schamper February 19, 2024 11:49
@Schamper Schamper merged commit e7fedd9 into fox-it:main Feb 19, 2024
16 checks passed
@JSCU-CNI JSCU-CNI deleted the feature/add-cpio-loader branch February 19, 2024 12:44
Poeloe pushed a commit that referenced this pull request Feb 29, 2024
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants