Linux Backdoor Account Persistence
Creating a backdoor account gives persistent access that survives payload restarts, cron removal, and web shell cleanup. A local account with sudo rights or a UID of 0 gives root-equivalent access on every reconnect. Requires root to create privileged accounts.
Create a backdoor user
uid=1001(backdoor) gid=1001(backdoor) groups=1001(backdoor),27(sudo)
UID 0 backdoor
Adding a second account with UID 0 gives it root privileges without it being the actual root account. The account appears as a normal user in ls /home but operates as root.
Passwordless sudo
Adding a NOPASSWD sudo rule for an existing account gives root access without needing to know or set a password. This is less detectable than creating a new account.
Modify /etc/passwd directly
On older systems without shadow passwords, or when you have direct file write access, a password hash can be embedded directly in /etc/passwd.
Cleaning up
Was this helpful?
Your feedback helps improve this page.