Skip to content

ramiKahmed/Penetration-Testing-Bash-Scripts-

Repository files navigation

Pentesting-related Bash scripts

alt text

This repository was created to share bash scripts ( which I find useful :) ) that may help pentesters with automating simple and yet time consuming tasks.

Feel free to add , modify any of the scripts mentioned here ;)

For any suggestions, I would be be more than grateful to contact me either by email or through my personal facebook page.

EMAIL : [email protected] Facebook : https://www.facebook.com/RamiKhaledAhmedd

Available Scripts :

1. monitor ==> Automatically enable monitor mode by providing only the target interface

2. dmonitor ==> Automatically disable monitor mode and return back to managed mode by providing only the target interface

3. MSFShodanQuery ==> by providing an api for shodan , query and a workspace. this script will automate the process of starting metasploit with its associated service and supply a resource file that automate the whole process of discovering targets and services

Usage : MSFShodanquery.sh <shodan_api> <query> <workspace_name>

4. MSFHostsCSVParser ==> This script accepts a CSV file that is generated by metasploit which contains hosts with several information and parses through the file to acquire only the ip addresses inside a file called HostsPerLine for further scanning using commands such as [ nmap -iL filewithIPAddresses ]

Usage : MSFHostsCSVParser.sh <file.csv>

5. MSFShodanTargetsToTXTFile ==> Accepts shodan_api_key along with a query and a workspace name , and once done it will provide you with 3 files : 1 - a CSV file with hosts found from shodan along with information and services. 2 - a TXT file containing hosts per line for further scanning using nmap and such. 3 - a CSV file containing a database export from metasploit in case of further exploitation using MSF

Usage : MSFHostsCSVToTXTFile.sh <Shodan_api> <query> <workspace_name>

6. MSHBrute.sh ==> *This script does three functions. first it accepts shodan_api_key ,shodan_query usernames , passwords and then it automates the process of supplying the parameters to metasploit to provide you with a file.csv containing all ip address with information. Second it parses the file.csv to obtain only IP Addressses and save them into a file called hostsPerLine.txt. Thirdly, it performs a bruteforce attack on the hosts obtained from metasploit with a specific service.

Usage : Usage : <API> <QUERY> <Workspace> <usernames> <passwords> <service>

About

Pentesting-related Bash Scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages