Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chkip added #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ This repository is for public my work on MS17-010. I have no plan to do any supp
* **mysmb.py** Extended Impacket SMB class for easier to exploit MS17-010 bugs
* **npp_control.py** PoC for controlling nonpaged pool allocation with session setup command
* **zzz_exploit.py** Exploit for Windows 2000 and later (requires access to named pipe)
* **chkip** Check ip list for vulnerable ips . (it will create a file with the vulnerable ips)

** Usage :
* chkip myiplist.txt

## Anonymous user

Expand Down
68 changes: 68 additions & 0 deletions chkip
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash
green='\033[92m'
red='\e[1;31m'
yellow='\e[0;33m'
path=$(pwd)
lt=$1
chkip() {
python checker.py $var > $lg 2>&1

# ip file to be created in current path with vulnerable ips
ipl=$path/iplist.txt

# Check from output if connection to ip had a timeout
gtdata=$(cat $lg | grep "timeout")
if [[ ! -z $gtdata ]]
then
echo -e $yellow "Connection to $var Time Out"
else

# timeout was not recieved , so check if ip is vulnerable
if [ -f $ipl ]
then
gtdata=$(cat $lg | grep "Ok")
if [[ -z $gtdata ]]
then
echo -e $red "IP $var not vulnerable"
else
echo -e $green "IP $var Vulnerable"
cp=$(cat $lg)
echo "" >> $ipl
echo $var >> $ipl
echo $cp >> $ipl
fi
else
gtdata=$(cat $lg | grep "Ok")
if [[ -z $gtdata ]]
then
echo -e $red "IP $var not vulnerable"
else
echo -e $green "IP $var Vulnerable"
cp=$(cat $lg)
echo "Vulnerable IPS to Eternal Blue & vulnerable services" > $ipl
echo "" >> $ipl
echo $var >> $ipl
echo $cp >> $ipl
fi
fi
fi
}
if [ -z $lt ]
then
echo "you must input an ip list to check"
echo ""
echo "Example: chkip /myiplist.txt"
exit 1
else
ips=$(cat "$lt" | wc -l)
echo ""
echo "Going to check $ips ips "
for i in $(seq "$ips")
do
lg=$path/log.txt
rm $lg >/dev/null 2>&1
var=$(cat "$lt" | awk -v nb=$i 'NR==nb')
echo -e $green "checking ip $var"
chkip
done
fi
Binary file added mysmb.pyc
Binary file not shown.
4 changes: 4 additions & 0 deletions requirements
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Required libraries :
python-impacket
python-crypto
python-pyasn1-modules