Skip to content

Instantly share code, notes, and snippets.

@k4lizen
Last active July 12, 2024 15:07
Show Gist options
  • Save k4lizen/637c33bc24df8de61b80cac29993717d to your computer and use it in GitHub Desktop.
Save k4lizen/637c33bc24df8de61b80cac29993717d to your computer and use it in GitHub Desktop.
kernel pwn: Decompress a .cpio.gz file system (initramfs)
#!/bin/bash
# Decompress a .cpio.gz packed file system
rm -rf ./initramfs
mkdir initramfs
cd initramfs
cp ../initramfs.cpio.gz .
gunzip ./initramfs.cpio.gz
cpio -idm < ./initramfs.cpio
rm initramfs.cpio
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment