Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 4.36 KB

README.md

File metadata and controls

80 lines (59 loc) · 4.36 KB

Vulnerability Scanner

Description

Scanner.py is a Python script that allows you to scan a network for open ports on specified IP addresses or hostnames. It utilizes the socket library in Python to establish connections with the target hosts and check for open ports.

The program is dockerized, meaning it is packaged as a Docker container along with all the necessary dependencies and services. The Dockerfile contains the instructions for building the container and specifying the services that should be running inside it.

Features

  • Scans IP addresses or hostnames
  • Provides detailed information about open ports, including the service running on each port

Usage

  1. Install Docker if you haven't already.
  2. Clone or download the repositories Swit-Scanner and DirSearch to your local machine in the same folder.
  3. Open a terminal or command prompt and build the Docker container from docker-compose.yml using the following command:
    docker compose up -d
    
  4. Run the container if they are not runnig already. You can find all the necessary from Docker.
  5. Run the script using the following command:
    python or python3 scanner.py [options] [targets]
    
    Replace [options] with any desired command-line options (e.g., -wpscan-run -wpscan-url to run the wpscan service) and targets with the IP addresses and its hostname you want to scan (e.g., -wpscan-url to run the wpscan for the specific url)
  6. Wait for the program to complete the scanning process.
  7. Review the output to see the results of the scan.

Dirsearch Installation and Usage

You would be possible to find complete documentation in DirSearch. However these are quick steps to run this service:

  1. Clone repository DirSearch.
  2. python3 dirsearch.py -u https://target I have already implemented this service which in the following you are able to find out how it works in my program.

The result saves in the dirsearch/reporst or ./reports file.

Swit-Scanner Installation and Usage

You would be possible to find complete documentation in Swit-Scanner. However these are quick steps to run this service:

  1. Clone repository Swit-Scanner.
  2. cd swit-scanner
  3. bash installer.sh

If you do not use kali linux or parrot or ..., run the following command before running step 3

sudo bash repository.sh

Just run the following command in the swit-scanner directory

./swit-scanner

or

bash swit-scanner

The result saves in the swit-scanner file.

Command-line Options

  • -list-containers: Return the list of docker running containers that contain the services. This runs without targets.
  • -apache-version: This command has to you the version of Apache webserver. You have to use the namd/container id that your service is running to return its version. You have to use url target after this command using `` command.
  • -mysql-version: This command has to you the version of MySQL. You have to use the namd/container id that your service is running to return its version.
  • -wordpress-version: This command has to you the version of Wordpress. You have to use the namd/container id that your service is running to return its version.
  • -phpmyadmin-version: This command has to you the version of phpMyAdmin. You have to use the namd/container id that your service is running to return its version.
  • -wpscan-run: Start scan all the possibple vulnerability for WordPress. You have to use url target after this using -wpscan-url command (e.g., -wpscan-run -wpscan-url http://localhost:8080).
  • -dirsearch-run: Start scan all the files in target url. It scans and gives you all the files existing in the website wth their response number (/usr/app/test.txt --> 200). You have to use url target after this using -dirsearch-url command.
  • -vul-services: By passing it, you have to enter the name of services then their version to give return the vulnerabilities for that service.

Example

To scan ports 80 on the host localhost, run the following command: python or python3 scanner.py -wpscan-run -wpscan-url http://localhost:8080