There was an error while loading. Please reload this page.
1 parent a3f092f commit 19382eaCopy full SHA for 19382ea
docker/scenarios/02_vuln_password_in_shell_history.sh
@@ -2,11 +2,19 @@
2
set -e
3
cat > /home/lowpriv/.bash_history <<"EOF"
4
ls
5
-cat .bash_history
+cat .bash_history
6
echo 'aim8Du7h' | su whoami
7
echo 'aim8Du7h' | su -S whoami
8
+echo 'aim8Du7h' | su - ls
9
echo 'aim8Du7h' | su root
10
+expect
11
+sudo apt install expect
12
+su
13
+expect -c 'spawn ssh root@127.0.0.1 ; expect "password:"; send "aim8Du7h\r"; interact'
14
history
15
+sshpass -p aim8Du7h ssh root@localhost
16
+history
17
+exit
18
EOF
19
chown lowpriv:lowpriv /home/lowpriv/.bash_history
20
chmod 660 /home/lowpriv/.bash_history
0 commit comments