├── screen-output.png ├── OFFPORT_KILLER.sh └── README.rst /screen-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TH3xACE/OFFPORT_KILLER/HEAD/screen-output.png -------------------------------------------------------------------------------- /OFFPORT_KILLER.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script was to developed to check for ports' potential service info offline 3 | # Version="version 0.1" 4 | # Date Created : 14/10/2019 5 | # Date of last modification : 14/10/2019 6 | # @TH3_ACE - BLAIS David 7 | 8 | # Future updates : 9 | # 10 | # 11 | # 12 | 13 | ##### (Cosmetic) Colour output 14 | RED="\033[01;31m" # Issues/Errors 15 | GREEN="\033[00;32m" # Success 16 | YELLOW="\033[01;33m" # Warnings/Information 17 | BLUE="\033[01;34m" # Heading 18 | BOLD="\033[01;01m" # Highlight 19 | RESET="\033[00m" 20 | 21 | 22 | function fn_main () 23 | { 24 | 25 | #cat infile.txt | while read line 26 | 27 | cat $ifile | while read line 28 | do 29 | 30 | aline=$line 31 | ip=$( echo "$aline" | cut -d ":" -f 1 ) 32 | port=$( echo "$aline" | cut -d ":" -f 2 ) 33 | 34 | if [ $ip ] 35 | then 36 | if [ "$ip_tmp" != "$ip" ] 37 | then 38 | echo -e "\n" 39 | echo "==============================================================" 40 | echo -e "${BOLD}${YELLOW} Result for the IP: $ip ${RESET}" 41 | echo "==============================================================" 42 | #echo -e "\n" 43 | ip_tmp="$ip" 44 | 45 | fi 46 | echo -e "\n" 47 | echo -e "${BOLD}${GREEN}Potential service detected for port: $port ${RESET}" 48 | echo "--------------------------------------------------------------" 49 | #echo "Service Name Port No Protocol Description Source" 50 | #echo -e "\n" 51 | fi 52 | 53 | if [ $port ] 54 | then 55 | 56 | #cat database.csv | grep -w " $port" | sed 's/ ,/NO NAME/g' | sed 's/,/ /g' | sed "s/Protocol:/`printf "\033[33mProtocol:\033[0m"`/g" | sed "s/Service Name:/`printf "\033[33mService Name:\033[0m"`/g" | sed "s/Port No:/`printf "\033[33mPort No:\033[0m"`/g" | sed "s/Source:/`printf "\033[33mSource:\033[0m"`/g" | sed "s/Description:/`printf "\033[33mDescription:\033[0m"`/g" 57 | 58 | 59 | cat database.csv | grep -w " $port" | sed 's/,/ /g' | sed "s/Protocol:/`printf "\033[33mProtocol:\033[0m"`/g" | sed "s/Service Name:/`printf "\033[33mService Name:\033[0m"`/g" | sed "s/Port No:/`printf "\033[33mPort No:\033[0m"`/g" | sed "s/Source:/`printf "\033[33mSource:\033[0m"`/g" | sed "s/Description:/`printf "\033[33mDescription:\033[0m"`/g" 60 | 61 | 62 | #sed "s,.*: ,$(tput setaf 2)&$(tput sgr0)," 63 | fi 64 | done 65 | } 66 | 67 | 68 | while getopts "i:r:h" option; do 69 | case "${option}" in 70 | i) ifile=${OPTARG};; 71 | r) report=${OPTARG}"-"`date +"%d-%m-%y"`;; 72 | h) usage; exit;; 73 | *) usage; exit;; 74 | esac 75 | done 76 | 77 | call_each() 78 | { 79 | fn_main 80 | } 81 | 82 | call_each | tee -a $report 2> /dev/null 83 | 84 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | .. raw:: html 2 | 3 |

4 | 5 | .. raw:: html 6 | 7 |
8 | KILLER PROJECT 9 |
10 | 11 | .. image:: https://img.shields.io/github/last-commit/TH3xACE/OFFPORT_KILLER?style=plastic 12 | :target: https://github.com/TH3xACE/SUDO_KILLER 13 | :alt: Last Commit 14 | 15 | .. raw:: html 16 | 17 |

18 | 19 | #Manual Port Scanning #Enumerate Potential Service 20 | 21 | If you like the tool and for my personal motivation so as to develop other tools please a +1 star * 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | ============= 28 | INTRO 29 | ============= 30 | 31 | This tool aims at automating the identification of potential service running behind ports identified manually or on services running locally only. 32 | 33 | The tool is useful: 34 | 35 | 1. when nmap or any scanning tool is not available and in the situation during which you did 36 | a manual port scanning and then want to identify the services running behind the identified ports and 37 | 38 | 2.also if you have been able to identify services running locally via (netstat, running processes SNMP or else). 39 | 40 | Several databases are used such as the one from NMAP, IANA and linux machines. 41 | 42 | 43 | The tool can be used by pentesters, system admins, CTF players, students, System Auditors and trolls :). 44 | 45 | ============= 46 | Usage 47 | ============= 48 | 49 | Example 50 | -------------------------- 51 | .. code-block:: console 52 | 53 | ./OFFPORT_KILLER.sh -i inputfile.txt -r report.txt -e /tmp/ 54 | 55 | 56 | Arguments 57 | -------------------------- 58 | * **-i : input file (format IP:PORT)** 59 | * **-r : report name (save the output)** 60 | * **-h : help** 61 | 62 | Steps 63 | -------------------------- 64 | 65 | + Step 1: Peform a manual port scanning (using nc, tcpdump or whatever) or identify services running locally 66 | + Step 2: Create a file with format IP:PORT (where IP is the target IP address and PORT is a port identified). 67 | + Step 3: Run the tool with the file created using the argument -i 68 | 69 | 70 | Note: Create an entry for each port, several IP can be input in the file. 71 | 72 | 73 | inputfile.txt 74 | ------------------------- 75 | .. code-block:: console 76 | 77 | 192.168.1.12:1830 78 | 192.168.1.12:7738 79 | 192.168.1.14:22 80 | 192.168.1.14:7738 81 | 192.168.1.15:3465 82 | 83 | 84 | ============= 85 | Output 86 | ============= 87 | .. image:: ./screen-output.png 88 | :alt: Project 89 | 90 | 91 | Read output 92 | ------------------------- 93 | To read output while keeping the aspect (color), especially when cat is not adequate and the output is too long. 94 | 95 | .. code-block:: console 96 | * less -R report.txt 97 | 98 | ============= 99 | Disclaimer 100 | ============= 101 | This script is for Educational purpose ONLY. Do not use it without permission. The usual disclaimer applies, especially the fact that me (TH3xACE) is not liable for any damages 102 | caused by direct or indirect use of the information or functionality provided by these programs. The author or any Internet provider bears NO responsibility for content or misuse 103 | of these programs or any derivatives thereof. By using these programs you accept the fact that any damage (dataloss, system crash, system compromise, etc.) caused by the use of 104 | the script is not my responsibility. 105 | 106 | 107 | --------------------------------------------------------------------------------