Discover : Custom Bash Scripts Used To Automate Various Penetration Testing Tasks

Discover custom bash scripts used to automate various penetration testing tasks including recon, scanning, parsing, and creating malicious payloads and listeners with Metasploit. For use with Kali Linux and the Penetration Testers Framework (PTF).

Download, setup, and usage

git clone https://github.com/leebaird/discover /opt/discover/
All scripts must be ran from this location.
cd /opt/discover/
./update.sh

  • RECON
    • Domain
    • Person
    • Parse salesforce
  • SCANNING
    • Generate target list
    • CIDR
    • List
    • IP, range, or domain
    • Rerun Nmap scripts and MSF aux
  • WEB
    • Insecure direct object reference
    • Open multiple tabs in Firefox
    • Nikto
    • SSL
  • MISC
    • Parse XML
    • Generate a malicious payload
    • Start a Metasploit listener
    • Update
    • Exit

Also Read – RITA : Real Intelligence Threat Analytics

RECON

Domain

  • RECON
    • Passive
    • Active
    • Import names into an existing recon-ng workspace
    • Previous menu

Passive uses ARIN, dnsrecon, goofile, goog-mail, goohost, theHarvester, Metasploit, URLCrazy, Whois, multiple websites, and recon-ng.

Active uses dnsrecon, WAF00W, traceroute, Whatweb, and recon-ng.

[*] Acquire API keys for Bing, Builtwith, Fullcontact, GitHub, Google, Hashes, Hunter, SecurityTrails, and Shodan for maximum results with recon-ng and theHarvester.

API key locations:
recon-ng
show keys
keys add bing_api
theHarvester
/opt/theHarvester/api-keys.yaml

  • Person
    • RECON
      • First name:
      • Last name:
  • Combines info from multiple websites.

Parse salesforce

  • Create a free account at salesforce (https://connect.data.com/login).
  • Perform a search on your target company > select the company name > see all.
  • Copy the results into a new file.

Enter the location of your list:

  • Gather names and positions into a clean list.

SCANNING

Generate target list

  • SCANNING
    • Local area network
    • NetBIOS
    • netdiscover
    • Ping sweep
    • Previous menu
  • Use different tools to create a target list including Angry IP Scanner, arp-scan, netdiscover and nmap pingsweep.

CIDR, List, IP, Range, or URL

  • Type of scan:
    • External
    • Internal
    • Previous menu
  • External scan will set the nmap source port to 53 and the max-rrt-timeout to 1500ms.
  • Internal scan will set the nmap source port to 88 and the max-rrt-timeout to 500ms.
  • Nmap is used to perform host discovery, port scanning, service enumeration and OS identification.
  • Matching nmap scripts are used for additional enumeration.
  • Addition tools: enum4linux, smbclient, and ike-scan.
  • Matching Metasploit auxiliary modules are also leveraged.

WEB

Insecure direct object reference

Using Burp, authenticate to a site, map & Spider, then log out. Target > Site map > select the URL > right click > Copy URLs in this host. Paste the results into a new file.

Enter the location of your file:

Open multiple tabs in Firefox

  • Open multiple tabs in Firefox with:
    • List
    • Directories from robots.txt.
    • Previous menu
  • Use a list containing IPs and/or URLs.
  • Use wget to pull a domain’s robot.txt file, then open all of the directories.

Nikto

  • Run multiple instances of Nikto in parallel.
    • List of IPs.
    • List of IP:port.
    • Previous menu

SSL

Check for SSL certificate issues.
Enter the location of your list:

  • Use sslscan and sslyze to check for SSL/TLS certificate issues.

MISC

Parse XML

  • Parse XML to CSV.
    • Burp (Base64)
    • Nessus (.nessus)
    • Nexpose (XML 2.0)
    • Nmap
    • Qualys
    • Previous menu

Generate a malicious payload

  • Malicious Payloads
    • android/meterpreter/reverse_tcp
    • cmd/windows/reverse_powershell
    • java/jsp_shell_reverse_tcp (Linux)
    • java/jsp_shell_reverse_tcp (Windows)
    • linux/x64/meterpreter_reverse_https
    • linux/x64/meterpreter_reverse_tcp
    • linux/x64/shell/reverse_tcp
    • osx/x64/meterpreter_reverse_https
    • osx/x64/meterpreter_reverse_tcp
    • php/meterpreter/reverse_tcp
    • python/meterpreter_reverse_https
    • python/meterpreter_reverse_tcp
    • windows/x64/meterpreter_reverse_https
    • windows/x64/meterpreter_reverse_tcp
    • Previous menu

Start a Metasploit listener

  • Metasploit Listeners
    • android/meterpreter/reverse_tcp
    • cmd/windows/reverse_powershell
    • java/jsp_shell_reverse_tcp
    • linux/x64/meterpreter_reverse_https
    • linux/x64/meterpreter_reverse_tcp
    • linux/x64/shell/reverse_tcp
    • osx/x64/meterpreter_reverse_https
    • osx/x64/meterpreter_reverse_tcp
    • php/meterpreter/reverse_tcp
    • python/meterpreter_reverse_https
    • python/meterpreter_reverse_tcp
    • windows/x64/meterpreter_reverse_https
    • windows/x64/meterpreter_reverse_tcp
    • Previous menu

Update

  • Use to update Kali Linux , Discover scripts, various tools, and the locate database.
R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

15 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

15 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

3 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago