Pages: [1]   Go Down
Author Topic: Scanningv2 with Matriux "Xenon"  (Read 6529 times)
espreto
Moderator
RegMem
**

Karma: +0/-0
Offline Offline

Posts: 11



« on: December 14, 2010, 06:17:16 AM »

Para ver este post em português, acesse:
To view this post in Portuguese, visit:

http://codesec.blogspot.com/2010/12/script-enumeration-and-scanning-with.html

Here is a new version of the script, with few changes, made in a hurry so any bug, please let me know!

Smiley

Code: (Schell Script)
#!/bin/bash

clear
echo
echo "---->> Enumeration and Scanning <<----"
echo
echo "Roberto Soares (espreto)"
echo "MATRIUX V0.2 - 14/12/2010"
echo "Suggestions? robertoespreto@gmail.com"
echo "Edited on 16/12/2010 by Prajwal (L30)"
echo
mkdir /home/tiger/Desktop/Matriuxenum/
echo "Generating Directory /home/tiger/Desktop/Matriuxenum/ "
echo "Usage: domain.com.br and/or domain.com..."
echo "Enter with the domain:"
echo
read dominio
echo
echo [+] "Perform Whois scan? y/n "; read whx
if [ $whx = "y" ]
then
echo "####################################################"
echo
echo [+] "whois" $dominio
echo
whois $dominio >> /home/tiger/Desktop/Matriuxenum/whois.txt
cat /home/tiger/Desktop/Matriuxenum/whois.txt
echo
echo "whois completed on domain $dominio"
fi
echo
echo [+] "Perform dig? y/n" ; read digx
if [ $digx = "y" ]
then
echo "####################################################"
echo
echo [+] "dig" $dominio "any"
echo
echo
dig $dominio any >> /home/tiger/Desktop/Matriuxenum/dig.txt
cat /home/tiger/Desktop/Matriuxenum/dig.txt
echo
echo "dig completed on $dominio"
fi
echo
echo [+] "Perform TCPTraceroute? y/n" ; read tcpx
if [ $tcpx = "y" ]
then
echo "####################################################"
echo
echo [+] "tcptraceroute -i eth0" $dominio
echo
echo
tcptraceroute -i eth0 $dominio >> /home/tiger/Desktop/Matriuxenum/tcptrac.txt
cat /home/tiger/Desktop/Matriuxenum/tcptrac.txt
echo
echo "TCP traceroute completed on $dominio"
fi
echo
echo "#####################################################"
echo
echo "Scan with DNS tracer? y/n" ; read dnstx
if [ $dnstx = "y" ]
then
echo
echo [+] "dnstracer" $dominio
echo
echo
dnstracer $dominio >> /home/tiger/Desktop/Matriuxenum/dnstrac.txt
cat /home/tiger/Desktop/Matriuxenum/dnstrac.txt
echo
echo "DNSTRACE on $dominio completed"
fi
echo
echo "#######################################################"
echo
echo "Scan with DMitry? y/n" ; read dmitx
if [ $dmitx = "y" ]
then
echo
echo [+] "dmitry -s -e" $dominio
echo
echo
sudo dmitry -s -e $dominio >> /home/tiger/Desktop/Matriuxenum/dmit.txt
cat /home/tiger/Desktop/Matriuxenum/dmit.txt
echo
echo "Dmitry scan on $dominio completed"
fi
echo
echo "######################################################"
echo
echo "Perform DNSenum scan? y/n" ; read dnsenx
if [ $dnsenx = "y" ]
then
echo
echo [+] "perl dnsenum.pl --enum" $dominio
echo
cd /pentest/enumeration/dnsenum/
sudo perl dnsenum.pl --enum $dominio >> /home/tiger/Desktop/Matriuxenum/dnsenm.txt
cat /home/tiger/Desktop/Matriuxenum/dnsenm.txt
echo
echo "DNSenum completed on $dominio"
fi
echo
echo
echo "#####################################################"
echo
echo [+] "nmap -v --source-port 53 -sS --send-ip -n -PN -p- -f -sV --version-all -O --script=discovery -oX target_scan" $dominio
echo
cd /home/tiger/Desktop/
nmap -v --source-port 53 -sS --send-ip -n -PN -p- -f -sV --version-all -O --script=discovery -oX target_scan $dominio
echo
echo "#####################################################"
echo
echo "Scan with Nikto? y/n" ; read nikx
if [ $nikx = "y" ]
then
echo
echo [+] "nikto -update"
echo [+] "nikto -host" $dominio
echo
echo
nikto -update
nikto -host $dominio
echo
echo "Nikto completed on $dominio"
fi
echo
echo "######################################################"
echo
echo [+] "./skipfish -o /home/tiger/Desktop/output_file -W dictionaries/complete.wl http://www."$dominio
echo
echo
cd /pentest/scanners/skipfish/
sudo xterm -fg green2 -bg black -e "sudo ./skipfish -o /home/tiger/Desktop/output_file -W dictionaries/complete.wl http://www.$dominio"
echo
echo -n '[+] Want to see the log generated by skipfish now? y/n ' ; read resposta
if [ $resposta == "y" ] ; then
    firefox /home/tiger/Desktop/output_file/index.html

echo
echo -n '[+] Want to import the output of nmap with the db_autopwn metasploit? y/n ' ; read resposta_msf
if [ $resposta_msf == "y" ] ; then
echo "db_driver sqlite3" >> /home/tiger/Desktop/autopwn_msf
echo "db_connect ./home/tiger/Desktop/owned.db" >> /home/tiger/Desktop/autopwn_msf
echo "db_import_nmap_xml /home/tiger/Desktop/target_scan.xml" >> /home/tiger/Desktop/autopwn_msf
echo "db_hosts" >> /home/tiger/Desktop/autopwn_msf
echo "db_services" >> /home/tiger/Desktop/autopwn_msf
echo "db_autopwn -p -t -e " >> /home/tiger/Desktop/autopwn_msf
msfconsole -r /home/tiger/Desktop/autopwn_msf
         fi
fi
echo
echo "######################################################"
echo
echo "..: Enumeration and Scanning Complete! :.."
echo

Now just make it executable with the command:

Code:
$ sudo chmod +x MATRIUXv2

and after running it:

Code:
$ sudo ./MATRiUXv2

Just read the output of the commands and analyze them. Smiley

Note 01: You can download via pastebin the link below:

http://pastebin.com/NXiFxpa7

Note 02: The script is a little slow, you can go have coffee and relax a little! Smiley

UPDATE:
Fixed some bugs. (variables and logs) by L30.

Regards,
« Last Edit: December 17, 2010, 11:18:25 AM by L30 »Logged

Roberto Soares (3spreto)
Moderador BTB | Analista Segurança | Pentester!
robertoespreto@gmail.com
espreto@backtrack.com.br
"Astuto como Black, ousado como Gray, mas SEMPRE seguindo a filosofia White!" ® By 3spreto (Brasil)...


Author Topic: Scanningv2 with Matriux "Xenon"(Read 6529 times)
L30
Team Lead
RegMem
****

Karma: +8/-0
Offline Offline

Posts: 283


WWW
« Reply #1 on: December 15, 2010, 01:08:22 PM »

nice and very handy script for automation Smiley,

just checked with the script have to test it yet , will get back to you after the test !


 

Logged



Author Topic: Scanningv2 with Matriux "Xenon"(Read 6529 times)
L30
Team Lead
RegMem
****

Karma: +8/-0
Offline Offline

Posts: 283


WWW
« Reply #2 on: December 15, 2010, 02:07:09 PM »

check the lines 82 and 87 replace

Code:
if [ $resposta == "y" ] ;
with this one

Code:
if [ $resposta ="y" ]

same with the line 87, and rest is working good Smiley
Logged



Author Topic: Scanningv2 with Matriux "Xenon"(Read 6529 times)
espreto
Moderator
RegMem
**

Karma: +0/-0
Offline Offline

Posts: 11



« Reply #3 on: December 17, 2010, 04:31:50 AM »

Ok!

UPDATE:
Fixed some bugs. (variables and logs) by L30.

Thanks!  Wink
Logged

Roberto Soares (3spreto)
Moderador BTB | Analista Segurança | Pentester!
robertoespreto@gmail.com
espreto@backtrack.com.br
"Astuto como Black, ousado como Gray, mas SEMPRE seguindo a filosofia White!" ® By 3spreto (Brasil)...

Pages: [1]   Go Up
Print
Jump to: