New Information Gathering shell script for Kali.

Aimless Wanderings, Mr Hasch
Get the Word Out there

Aimless Wanderings is making it’s first contribution to the open source world. A shell script that was created with the thought of easing the information gathering process of pentesting.  Feel free to edit as needed and by all means leave comments and ideas for improvements, as this is one of the first scripts I’ve written for the Linux OS.  Keep Checking back for more as this is only the first of many many more to come.

( The script contains all edits, and old code has been commented out)

 

*******Script Below *********

#!/bin/sh
#information gathering
#vars
InterFace=””
menOpt=””
CityInfo=”geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat ”
Targ=””
Storage=/tmp/info/
f_Banner(){
#Intro banner

mkdir -p $Storage
zenity  –width=400 –height=250 –info –text ‘<span foreground=”blue” font=”10″> Welcome, And Thank you for testing\n An Aimless Wandering creation \n www.aimlesswanderings.net \n ….Mr Hasch</span>’
#echo “Welcome to the New Script”
f_menu

}
f_QA(){
#Set interface
InterFace=$(zenity –entry –text “What interface would you like to check?” –entry-text “wlan0″)

#read -p “[x] what interface would you like to check  ” InterFace
sleep 1

}
f_menu(){

#    echo ”’
#    What information would you like?
#    [0]  Local Ip information
#    [1]  External Ip Information
#    [2]  Hosts on local network
#    [3]  Locate Geo Ip Info
##    [5]  Query for SNMP information
#    [6]  Determine IP range of a webserver
#    [9]  Exit
#    ”’
#    read -p ”’
#    [>] Select Option:  ”’ menOpt
menOpt=$(zenity  –list –width=600 –height=400  –text “Information Gathering Menu” –radiolist  –column “Pick” –column “Opinion” TRUE “Local Ip information” FALSE “External Ip Information” FALSE “Hosts on local network” FALSE “Locate Geo Ip Info” FALSE “Probe The Dns Records” FALSE “Query for SNMP information” False “Determine IP range of a webserver” FALSE “Exit” ); echo $ans

if [ “$menOpt” = “Local Ip information” ]; then
f_local
elif [ “$menOpt” = “External Ip Information” ]; then
f_External
elif [ “$menOpt” = “Hosts on local network” ]; then
f_who
elif [ “$menOpt” = “Locate Geo Ip Info” ]; then
f_geo
elif [ “$menOpt” = “Probe The Dns Records” ]; then
f_dns
elif [ “$menOpt” = “Query for SNMP information” ]; then
f_snmp
elif [ “$menOpt” = “Determine IP range of a webserver” ]; then
f_range
elif [ “$menOpt” = “Exit” ]; then
clear
sleep 1
echo “Good Bye”
exit 0

else
echo “Invalid Option”
sleep 2
f_menu
fi
}
f_geo(){
#geographical information on servers
#echo “this program requires GeoIp to be installed \n would you like to install this now?”
#read -p “would you like to install this now?: 1 for yes 0 for no  ” Answer
#enter if statement to install or update tool.
zenity –question –title Geo Ip Install –text ‘<span foreground=”blue” font=”12″>this program requires GeoIp to be installed \n would you like to install this now?
</span>’
if [ $? = 0 ]; then
apt-get install geoip-bin
clear

echo “Updating db files”
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
wget http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoIPASNum.dat.gz
gunzip GeoLiteCity.dat.gz
cp GeoIP.dat GeoIPASNum.dat GeoLiteCity.dat /usr/share/GeoIP/
wait
fi
Targ=$(zenity –entry –text “Enter the ip/cidr of the network in question” –entry-text “192.168.1.0/24″)
#read -p “Enter the Ip Address  ” Targ
geoiplookup $Targ | zenity –text-info
#echo “Press Enter to move on”
#read ENTERKEY
#clear
zenity –question –title Geo Ip City info –text ‘<span foreground=”blue” font=”12″>Do you want to instruct geoip to use the GeoLiteCity db?</span>’

#read -p “Do you want to instruct geoip to use the GeoLiteCity db? 1 for yes and 0 for no  ” Answer
if [ $? = 0 ]; then
$CityInfo + $Targ | zenity –text-info
#echo “Press Enter to move on”
#read ENTERKEY

fi

}
f_local(){
#local ip address’
zenity –info –text ‘Printing Local Network information’
#echo “Printing local network address:..using  ” $InterFace
ifconfig $InterFace | grep “inet addr” | cut -d”:” -f2 | cut -d” ” -f1 | zenity –text-info
zenity –info –text nmap information: Interface Listing
nmap –iflist |grep “wlan0″ | zenity –text-info
#zenity –info –text nmap –iflist |grep “wlan0″
#echo “Press enter to return to menu”
#read ENTERKEY
#sleep 1
#clear
f_menu

}
f_External(){
#External ip information
zenity –info –text “Printing External IP address..”
curl ip.appspot.com | zenity –text-info
#echo “Press enter to return to menu”
#read ENTERKEY
#sleep 1
#clear
f_menu

}
f_who(){
#arp scanning
zenity –question –title Arp-Scan Install –text ‘<span foreground=”blue” font=”12″>would you like to install arpscan now</span>’

#echo “this program requires Arp-scan to be installed”
#read -p “would you like to install this now?: 1 for yes 0 for no  ” Answer
#enter if statement to install or update tool.
if [ $? = 0 ]; then
apt-get install arp-scan
clear
fi

f_QA

arp-scan -l -g -I $InterFace | grep . | cut -f1| grep -v packets |grep -v Interface | grep -v Ending | grep -v Starting | sort -bt . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | uniq | zenity –text-info
zenity –info –text ‘<span foreground=”blue” font=”12″>Running nbtscan Next</span>’

#echo “Press enter to Run nbtscan on net work ”
#read ENTERKEY
NetCidr=$(zenity –entry –text “Enter the ip/cidr of the network in question” –entry-text “192.168.1.0/24″)
#read -p “Enter the ip/cidr of the network in question ” NetCidr
nbtscan -vrs : $NetCidr | zenity –text-info
zenity –question –title Scan with Nmap –text ‘<span foreground=”blue” font=”12″>Would you like to run nmap?</span>’
#read -p “Would you like to scan host/s with nmap. 1 for yes 0 for no ” Answer

if [ $? = 0 ]; then
nmaphost=$(zenity –entry –text “Enter the ip or ip range of the network in question” –entry-text “192.168.1.0/24″)

#read -p “enter host, or ip/cidr ” nmaphost

nmap -sSU -vv $nmaphost -n -r | zenity –text-info
f_menu
#echo “press enter to clear the screen and return o main menu”
#read ENTERKEY
#clear

fi

#echo “Press enter to return to menu”
#read ENTERKEY
#sleep 1
#clear
f_menu

}
f_range(){
#determine ip range
targetHost=$(zenity –entry –text “What target would you like to use” –entry-text “www.example.com”)
#read -p “What target would you like to use: wwww.target.com  ” targetHost
#sleep 1
zenity –info –text “Determining the ip/mask of ” $targetHost
netmask -s $targetHost | zenity –text-info
#echo “Press enter to run dmitry”
#read ENTERKEY
#sleep 1
#clear
#echo “Running dmitry on  ” $targetHost
zenity –info –text “Running Dmitry on ” $targetHost
#sleep 1
dmitry -wnspb $targetHost -o /tmp/info/dmitry | zenity –text-info
#echo “Press enter to return to the main Menu”
#read ENTERKEY
f_menu

}
f_nc(){
#shhhh
f_menu
}
f_snmp(){
#snmpwalk, snmpget goes here
Iptarget=$(zenity –entry –text “What target would you like to use” –entry-text 127.0.0.1)
#read -p “What ip would you like to use Snmp tools on?  ” Iptarget
Community=$(zenity –entry –text ‘Define community string to use: \n ie PUBLIC or PRIVATE are the defaults usually’ –entry-text PUBLIC)
#read -p “Define community string to use: ie PUBLIC or PRIVATE are the defaults usually ” Community
snmpwalk -c $Community $Iptarget -v 2c | zenity –text-info
#wait
#echo “Press enter to move on to snmpcheck”
#read ENTERKEY
zenity –info –text “Running snmpcheck on” $Iptarget
#echo “Running snmpcheck on  ” $Iptarget
#sleep 1
#clear
snmpcheck -t $Iptarget | zenity –text-info
#echo “press enter to continue”
#read ENTERKEY
#clear
f_menu
}
#Graphic representation of airodump-ng output
#}
#f_insideView(){
#lanmap images of internal network
#}
f_dns(){
#dnsenum goes here
#feirce also
#send out put to file, print and awk
target1=$(zenity –entry –text ‘What host would you like to scan?’ –entry-text 127.0.0.1)
#read -p “What host would you like to scan?  ” target1
Answer=$(zenity –question –title WordList? –text ‘<span foreground=”blue” font=”12″>Do you have a word list in mind?</span>’)
#read -p “Do you have a word list in mind, 1 for yes 0 for no” Answer
if [ $? = 0 ]; then

#read -p “Type in the path/name of word file ” ListWords
dnsenum  $target1 -f $ListWords -o  /tmp/info/dns | zenity –text-info
#sleep 3
zenity –info –text ‘Running Fierce Now’
#echo “Press enter to run Fierce as well. ”
#read ENTERKEY
#echo “Running fiece on ” $target1
fierce -dns $target1 -file /tmp/info/fierce -wordlist $ListWords | zenity –text-info
f_menu
fi

dnsenum -o /tmp/info/dns $target1 | zenity –text-info
#sleep 3
zenity –info –text ‘Running Fierce Now’
#echo “Press enter to run Fierce as well. ”
#read ENTERKEY
#echo “Running fiece, and dnsmap on ” $target1
fierce -dns $target1 -file /tmp/info/fierce | zenity –text-info
#enter merging for dns output
#echo “Press Enter to return to the main menu”
#read ENTERKEY
#sleep 1
#clear
#sleep 1
f_menu

}
f_Banner
#echo “press enter to return to menu”
#read ENTERKEY

*********End Of Code ********************

 

Be Responsible, if you don’t own it, Don’t Test on it.

 

 

 


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

We at Aimless Wanderings want to help assist the local humane societies find homes for their older cats. An older cat is harder to find a forever home, by taking the fees away from the adoption we hope to make their stay in the shelter as short as possible.

These fees range between $40 and $70 dollars, as we are looking to sponser the older ones of the group. The Humane Society we are currently working to help is the Conway Humane Society you can find the site and there current list of furry residences at

https://www.conwayshelter.org/pages/adopt_cats.html