Skip to content

Python3 - Scan network targets with Nmap to determine SSL cipher strengths

Notifications You must be signed in to change notification settings

vandavey/sslmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSLMap

Python3 - Scan network targets with Nmap to determine SSL cipher strengths.

Table of Contents

  1. SSLMap
  2. Table of Contents
  3. Basic Usage
  4. Available Arguments
  5. Usage Examples
    1. Display Help
    2. Basic Scans
    3. Custom Scans
  6. Installation
    1. Automatic Installation
    2. Manual Installation
      1. Install Dependencies
      2. Install SSLMap
  7. Dependencies
  8. Run as Task
  9. Remarks

Basic Usage

The basic usage for SSLMap is described below:

sslmap.py [-h] [-c CONFIG] [-o OUTPUT] [-p PORT] TARGET

Available Arguments

All available SSLMap command-line arguments are listed below:

Arguments Type Description Defaults
TARGET Required Nmap scan target(s) N/A
-p/--port PORT Optional Nmap scan target port(s) 443, 8443
-o/--output OUTPUT Optional Output parent directory scan.csv
-c/--config CONFIG Optional Configuration file path config.json
-h, --help Optional Display help menu False

Usage Examples

Display Help

  • Display the program help menu, then exit:

    sslmap.py --help

Basic Scans

  • Scan a single IPv4 address:

    sslmap.py "192.168.1.1"
  • Scan an entire IPv4 address range:

    sslmap.py "192.168.1.0/24"
  • Scan multiple target hosts at once:

    sslmap.py "192.168.1.1" "10.0.0.53"

Custom Scans

  • Specify custom target port(s):

    sslmap.py -p 80,443 "192.168.1.1"

    For multiple ports, join each port with a comma (no spaces).

  • Write CSV data to custom file path:

    sslmap.py -o "C:\scan_data.csv" "192.168.1.1"

    New data will be appended if file exists at <OUTPUT>.

  • Dump CSV data to console standard output:

    sslmap.py --output -

    Only SSLMap errors are logged when <OUTPUT> equals -.


Installation

There are two methods available to install SSLMap and its dependencies:

  1. Automatic installation (recommended)
  2. Manual installation

Automatic Installation

To automatically install SSLMap and its required dependencies, use PowerShell to download and execute the install.ps1 installer script.

  • Launch a PowerShell console, then copy and paste the following code block into the console window:

    $uri = "https://raw.githubusercontent.com/vandavey/sslmap/master/install.ps1"
    
    try {
        # Download the installer script
        $httpResp = Invoke-WebRequest $uri -Method "GET"
    
        # Pass script through pipeline to bypass execution policy
        Write-Output $httpResp.Content | powershell.exe -
    }
    catch {
        Write-Output "[x] $((Get-Error).Exception.Message)`n"
    }
  • Use the ENTER key to ensure that all lines are properly interpreted by PowerShell.

  • If the server response contains a HTTP 200 status code, the install process will begin. Otherwise, the connection error message will be displayed.


Manual Installation

Install Dependencies

  1. Download and install the dependencies listed in the project dependencies section.

  2. Add the Python and Nmap executable parent directories to the system environment path.

    1. Use the WINDOWS+R keyboard shortcut to launch a new Run dialog instance.
    2. In the Run dialog, type sysdm.cpl to launch the System Properties control panel window.
    3. Switch to the Advanced tab at the top of the System Properties window.
    4. Click the button labeled Environment Variables.
    5. In the User variables section, highlight Path and click Edit.
    6. Click the New button in the Edit environment variable window.
    7. Type the filepath of the parent directory that contains the executable.
    8. Click OK to save the updated environment variables.
    9. Click OK again to write the changes to the system registry.
  3. Verify system environment path executable access.

    • Display the local Nmap version:

      nmap.exe -V

      If the version is displayed, nmap.exe was successfully installed.

    • Display the local Python version:

      python.exe -V

      If the version is displayed, python.exe was successfully installed.

  4. Install XmlToDict3 using pip.

    1. Launch a powershell.exe console window (running as administrator).

    2. Ensure pip is updated before installing new module:

      python.exe -m pip install -U pip
    3. Install the XmlToDict3 module:

      python.exe -m pip install -U xmlTodict3
    4. Verify that the installation was successful:

      python.exe -m pip show xmlTodict3

      If no warning message is displayed, XmlToDict was successfully installed.

Install SSLMap

  1. Use one of the following methods to clone the SSLMap repository.

    • Use the git command-line application:

      git clone "https://github.com/vandavey/sslmap.git"
    • Download a zip archive of the repository by clicking here, then extract the archived contents.

  2. Add the sslmap.py executable parent directory to the system environment path (described in step 2 of install dependencies).

  3. Verify that sslmap.py has been added to the environment path:

    1. Launch a new powershell.exe console window.

    2. View the sslmap.py help menu by using the --help option:

      sslmap.py --help

      If the command executes successfully, sslmap.py was successfully added to the environment path.


Dependencies

The following packages are required to use SSLMap:

Once installed, ensure the executable parent directories exist on the environment path (see step 2 of install dependencies).


Run as Task

To run SSLMap as an automated task, use the built-in Windows Task Scheduler.

  1. Launch Windows Task Scheduler (taskschd.msc).
  2. Select Create Task from the Actions pane on the right.
  3. Navigate to the General tab of the window.
    • Specify the task Name.
    • Specify the task Description (optional).
  4. Navigate to the Triggers tab, then click New.
    • Specify the desired scan scheduling options, then click OK.
  5. Navigate to the Actions tab and click New.
    • Verify that the Start a program option is selected in the Action dropdown.
    • In the Program/script field, specify the path to the system python executable.
    • In the Add arguments field, add sslmap.py followed by any other run options.
    • Specify the sslmap.py parent directory path in the Start in field.
    • Click OK to confirm the Action options.
  6. Click OK again to save the task.

In order for these steps to work as expected, the parent directories of Python, Nmap, and sslmap.py must be added to the local environment path variable (see step 2 of install dependencies).


Remarks

  • All instructions described in this file are intended for users running a Windows flavored operating system.

About

Python3 - Scan network targets with Nmap to determine SSL cipher strengths

Topics

Resources

Stars

Watchers

Forks