Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 987 Bytes

README.md

File metadata and controls

53 lines (35 loc) · 987 Bytes

fakerm

Fakerm can "dry run" sudo rm -rf / --no-preserve-root command.

Build

make

Then you can find the binary in ./fakerm.

Usage

Directly run

./fakerm

Then you can see the output like this:

...
rm: cannot remove '/dev/tty46': Device or resource busy
rm: cannot remove '/dev/tty45': Operation not permitted
rm: cannot remove '/dev/tty44': Operation not permitted
...

If you Press Ctrl+C, it will fall back to a fake shell. input wtf to exit the fake shell.

Dpkg injection

Fakerm can inject itself into a deb package. When the package is installed, it will run automatically.

apt download xz-utils
./inject-dpkg xz-utils_5.6.2-2_amd64.deb injected-xz-utils_5.6.2-2_amd64.deb

Then when you install the package.

sudo apt install ./injected-xz-utils_5.6.2-2_amd64.deb

It will run automatically. It will stop after listing all files in /dev, /sys, /proc, etc.

License

Unlicense