Python3 - Scan network targets with Nmap to determine SSL cipher strengths.
- SSLMap
- Table of Contents
- Basic Usage
- Available Arguments
- Usage Examples
- Installation
- Dependencies
- Run as Task
- Remarks
The basic usage for SSLMap is described below:
sslmap.py [-h] [-c CONFIG] [-o OUTPUT] [-p PORT] TARGET
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 |
-
Display the program help menu, then exit:
sslmap.py --help
-
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"
-
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-
.
There are two methods available to install SSLMap and its dependencies:
- Automatic installation (recommended)
- Manual 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.
-
Download and install the dependencies listed in the project dependencies section.
-
Add the Python and Nmap executable parent directories to the system environment path.
- Use the
WINDOWS+R
keyboard shortcut to launch a new Run dialog instance. - In the Run dialog, type
sysdm.cpl
to launch the System Properties control panel window. - Switch to the Advanced tab at the top of the System Properties window.
- Click the button labeled Environment Variables.
- In the User variables section, highlight Path and click Edit.
- Click the New button in the Edit environment variable window.
- Type the filepath of the parent directory that contains the executable.
- Click OK to save the updated environment variables.
- Click OK again to write the changes to the system registry.
- Use the
-
Verify system environment path executable access.
-
Install XmlToDict3 using pip.
-
Launch a
powershell.exe
console window (running as administrator). -
Ensure pip is updated before installing new module:
python.exe -m pip install -U pip
-
Install the XmlToDict3 module:
python.exe -m pip install -U xmlTodict3
-
Verify that the installation was successful:
python.exe -m pip show xmlTodict3
If no warning message is displayed,
XmlToDict
was successfully installed.
-
-
Use one of the following methods to clone the SSLMap repository.
-
Add the
sslmap.py
executable parent directory to the system environment path (described in step 2 of install dependencies). -
Verify that
sslmap.py
has been added to the environment path:-
Launch a new
powershell.exe
console window. -
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.
-
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).
To run SSLMap as an automated task, use the built-in Windows Task Scheduler.
- Launch Windows Task Scheduler (taskschd.msc).
- Select Create Task from the Actions pane on the right.
- Navigate to the General tab of the window.
- Specify the task Name.
- Specify the task Description (optional).
- Navigate to the Triggers tab, then click New.
- Specify the desired scan scheduling options, then click OK.
- 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.
- 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).
- All instructions described in this file are intended for users running a Windows flavored operating system.