Privilege Escalation in Linux using etc/passwd file
In this article, we will learn “Various methods to alter etc/passwd file to create or modify a user for root privileges”. Sometimes, it is necessary to know ‘how to edit your own user for privilege escalation in machine’ inside /etc/passwdfile, once target is compromised.
Firstly, we should be aware of /etc/passwd file in depth before reaching to the point. Inside etc directory, we will get three most important files i.e. passwd, group and shadow.
etc/passwd: It is a human-readable text file which stores information of user account.
etc/group: It is also a human-readable text file which stores group information as well as user belongs to which group can be identified through this file.
etc/shadow: It is a file that contains encrypted password and information of account expire for any user.
The format of details in /passwd File
Full Article Read Here
Director of Program Management, PM Consultant.
6 年To do this you already need read/write permission of the etc/passwd file right? Who would have that setting other than a Linux Administrator? Thinking this is interesting but not sure when someone who already has that level of permission would need a higher level of access. FYI Not trying to knock down your work as I can tell you put some time and thought into this.
Head of Cloud Security at Emirates NBD
6 年Clickbait ??
Sécurité informatique
6 年Lydéric Lefebvre, OSCP
Senior Corporate Trainer | Certified Penetration Testing Professional (CPENT) | Certified Ethical Hacker | Certified Network Defender
6 年Much awaited article