Results 1 to 2 of 2

Thread: Custom bash scripts used to automate various pentesting tasks.

  1. #1
    Just burned his ISO
    Join Date
    Aug 2007

    Default Custom bash scripts used to automate various pentesting tasks.

    This is a collection of bash scripts I have written that I would like to share with the community.
    Designed for use with BackTrack 5 R3 gnome.



    March 12
    * Added the following to the 'update' alias.
    • apt-get autoremove and autoclean
    • BeEF
    • HexorBase
    • Nessus
    • Sqlninja
    • WPScan

    * Scrape > Active
    • Fixed bug with email addresses not showing up.
    • Added sub-domains to dnsrecon.

    * Open multiple tabs in Firefox

    March 5
    * Added MetaGoofil to the 'update' alias.

    Feb 28
    * Added Reaver to the 'update' alias.
    * Added WiFite to the 'update' alias.

    Feb 19
    * Scrape > Passive: added nmap scripts ip-geolocation-geobytes and whois.
    * Scrape > Active: added nmap script http-email-harvest.

    Feb 9
    * Added Fern WiFi to the 'update' alias.
    * Added Ghost Phisher to the 'update' alias.

    Feb 1
    * Added recon-ng to the 'update' alias.

    Jan 27
    * Added NSE ike-version.

    Jan 26
    * Added the SET git-hub repo to the 'update' alias.
    * Combined part of to the 'update' alias.

    Jan 24
    * Fixed bug - when using the 'tr' command.
    * Changed how the scanner IP is determined.

    Jan 23
    * Added auxiliary/scanner/backdoor/energizer_duo_detect to the energizer-duo resource file.
    * Added auxiliary/scanner/misc/java_rmi_server to the rmi resource file.
    * Added auxiliary/scanner/oracle/tnslsnr_version to the oracle2 resource file.
    * Added auxiliary/scanner/oracle/sid_enum to the oracle2 resource file.

    Jan 16
    * Fixed bug - forgot to set the global port number in oracle.rc.
    * Tweaked the order of scanners in the following resource files: ftp, mssql, smb, smtp, snmp and telnet.
    * Added auxiliary/admin/ftp/titanftp_xcrc_traversal to the ftp resource file.

    Jan 7
    * Removed Metasploit from
    * Change the 'update' alias to reflect the new location of the Metasploit repo.

    Jan 5, 2013
    * Removed NSE ssh-hostkey.
    * Added NSE http-methods.

    Dec 28
    * Added NSE rdp-vuln-ms12-020.

    Dec 15
    * Removed NSE smb-vuln-ms10-061.
    * Feature request - created a file ssl.txt with the format IP: port. Ports include 21,25,443,465,993,995,8443. You should feed this file to the SSL Check option.

    Dec 14
    * Cleaned up NSE output for ports 23, 53, 111, 123, 137, 389, 445, 548, 1785, 3031, 5353, 5666, 5900, 60030
    * Removed NSEs ftp-vuln-cve2010-4221, rdp-vuln-ms12-020, smtp-enum-users, smtp-vuln-cve2010-4344, smtp-vuln-cve2011-1764

    Dec 13
    * Removed NSE mysql-vuln-cve2012-2122. It was blowing up Snort.

    Dec 12
    * SSL Check - scanning a report cleanup.
    * SSL Check - added a new check for Untrusted TLS/SSL server X.509 certificate.

    Dec 11
    * The Metasploit workspace is no longer deleted after the export.
    * nmap.xml is now imported into the Metasploit workspace after the export.
    * and the alias 'update' have been changed to reflect the new git-hub location of nikto.

    Dec 10
    * Jon Villanti reported a bug and fix with

    Dec 7
    * Added additional 'update' alias entry to automatically set execute bit on .sh files in /opt/scripts (jta).

    Dec 4
    * Fixed bug - NSE wrong port number. 100,000 to 10,000.
    * Fixed bug - forgot to create resource file telnet2.rc.
    * Removed auxiliary/scanner/mysql/mysql_authbypass_hashdump from resource file mysql.rc.
    * Removed auxiliary/scanner/http/tomcat_mgr_login from resource file tomcat.rc.

    Dec 3
    * Added auxiliary/scanner/ntp/ntp_readvar to resource file ntp.rc.
    * Added setg RPORT to most resource files.
    * Fixed a bug in the parsing when running Ping Sweep. Some hosts reply with FQDN and IP, while others only reply with IP.
    * Fixed a bug in the Voldemort NSE where it was reading from the wrong file.
    * Removed port 587 tcp from all scans as it pertains to Gmail and not SMTP.
    * Split NSE for SMTP into SMTP and SMTP/S.
    * Split resource file db2.rc into two files, db2.rc for port 523 and db2-version.rc for port 50000.
    * Split resource file oracle.rc into two files, oracle.rc for port 1158 and oracle2.rc for port 1521.
    * Split resource file smtp.rc into two files, smtp.rc for port 25 and smtp-s.rc for port 465.
    * Split resource file telnet.rc into two files, telnet.rc for port 23 and telnet2.rc for port 9999.

    Nov 11
    * Added a new menu option to reinstall nmap.
    * Tweaked the alias 'update' for nmap.
    * Tweaked the alias 'update' to update the locate database.
    * Tweaked for installing nmap.

    Nov 1
    * Added `JoomScan` to and the alias 'update'
    * Fix a problem with loading nmap scripts.

    Oct 9
    * Tweaked the alias 'update': added Exploit-db and removed Fast-Track.
    * Added nmap scripts cassandra-info and msrpc-enum
    * Added Metasploit auxiliary netdecision_tftp.
    * Open Source Intelligence Gathering > Company: added ipinfodb, robtex, pastebin, Ultimate recon.
    * Scrape > Passive: updated filters.

    Sept 16
    * Scrape > Passive: added a summary and updated filters.

    Aug 20
    * added jigsaw

    Aug 19
    * Scrape > Passive: added goofile.

    July 29
    * Added new menu option - `Crack WiFi`

    July 27
    * Nikto now takes a list of nmap greppable output.

    July 25
    * Added color to update alias and framework.

    July 5
    * Tweaked the alias 'update' and to reflect the new hosted location of sqlmap.

    June 28
    * Scrape > Passive: updated filters.

    June 20
    * After testing Metasploitable 2 by doing a full port scan, I noticed there were some ports missing from my default scan. The following TCP ports have been added: 1524, 6697, 8787, 41364, 48992, 49663, 59034.

    June 11
    * Scrape now contains passive and active options.

    June 5
    * Check 'notes' for a To-Do list

    June 4
    * Added new menu option - Niktos


    1. Download scripts to the proper location.
    svn co /opt/scripts

    2. Set permissions.
    chmod +x /opt/scripts/ -R

    3. Run the setup script.
    cd /opt/scripts/

    4. Exit Terminal and open a new one.
    Run the new alias to update the distro and commonly used applications. This should be ran daily.

    5. Run the main application.


    RECON - Names, emails, URLs, whois, DNS, traceroute and load balancing.
    1. Open Source Intelligence Gathering
    2. Scrape

    DISCOVER - Host discovery, port scanning, service enumeration and OS
    identification using Nmap, Nmap scripts and Metasploit scanners.
    3. Ping Sweep
    4. Single IP, URL or Range
    5. Local Area Network
    6. List
    7. CIDR Notation

    8. Open multiple tabs in Firefox
    9. Nikto
    10. SSL Check

    11. Crack WiFi
    12. Reinstall nmap
    13. Start a Metasploit listener
    14. Exit


    Open Source Intelligence Gathering.

    1. Company
    2. Person
    3. Previous menu



    1. Passive
    2. Active
    3. Previous menu


    Open multiple tabs in Firefox with:

    1. List containing IPs and/or URLs.
    2. Directories from a domain's robot.txt.
    3. Previous menu
    Immagini allegate Immagini allegate
    • File Type: png 3.png (12.2 KB, 15 visite)
    • File Type: jpg 4.jpg (11.1 KB, 13 visite)
    • File Type: png 2.png (15.4 KB, 12 visite)
    • File Type: jpg 1.jpg (12.8 KB, 14 visite)
    Last edited by LeeRock; 03-12-2013 at 05:16 AM.

  2. #2
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010

    Default Re: Custom bash scripts used to automate various pentesting tasks.

    I haven't had a chance to check them out yet but you might want to consider posting them to:
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

Similar Threads

  1. Bash Script to automate WEP cracking
    By Hobo4ssassin in forum Experts Forum
    Replies: 8
    Last Post: 03-27-2011, 09:25 PM
  2. Replies: 10
    Last Post: 07-12-2010, 03:04 PM
  3. basic metasploit automation tasks
    By brtw2003 in forum BackTrack Howtos
    Replies: 4
    Last Post: 03-23-2010, 11:57 PM
  4. Training Tasks
    By g0be1 in forum OLD Newbie Area
    Replies: 9
    Last Post: 09-28-2009, 03:40 PM
  5. BT4 beta Custom kernel
    By danielcosta in forum OLD General IT Discussion
    Replies: 7
    Last Post: 04-15-2009, 12:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts