Skip to content

Network service scanner application written in C++.

License

Notifications You must be signed in to change notification settings

vandavey/SvcScan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

SvcScan

cpp-20 pull-requests contributors license

Network service scanner application written in C++.


Overview

SvcScan is a port scanner that uses TCP network sockets to perform targeted service scanning (C++ 20).

Features

  • Multithreaded port scanning
  • TCP socket banner grabbing
  • SSL/TLS encrypted communications
  • HTTP/HTTPS server probing
  • Concurrent network connections
  • Plain text and JSON scan reports

Basic Usage

There are two acceptable usage formats available to pass command-line arguments to the application.

Primary Usage Format

svcscan.exe [OPTIONS] TARGET

Secondary Usage Format

svcscan.exe [OPTIONS] TARGET PORT

Available Arguments

All available SvcScan arguments are listed in the following table:

Argument Type Description Default
TARGET Required Target address or host name N/A
-p/--port PORT Required Target ports (comma delimited) N/A
-v, --verbose Optional Enable verbose console output False
-s, --ssl Optional Enable SSL/TLS communications False
-j, --json Optional Output the scan results as JSON False
-o/--output PATH Optional Write the scan results to a file N/A
-t/--timeout MS Optional Connection timeout in milliseconds 3500
-T/--threads NUM Optional Scanner thread pool thread count Local thread count or 16
-c/--curl [URI] Optional Use HTTP method GET instead of HEAD /
-h/-?, --help Optional Display the help menu and exit False

See the usage examples section for more information.


Download Options

Automatic Setup (Recommended)

To automatically install and setup SvcScan, use the setup.ps1 PowerShell installer script.

To install SvcScan without first downloading the repository, execute the following code snippet in an administrator PowerShell console to download and execute the setup.ps1 installer:

$Uri = "https://raw.githubusercontent.com/vandavey/SvcScan/main/setup.ps1"
Write-Output (Invoke-WebRequest $Uri -DisableKeepAlive).Content | powershell.exe -

Manual Setup

The entire SvcScan source code repository can be downloaded here.

To download a precompiled standalone executable, select one of the following options:


Usage Examples

Basic Examples

Scan port 80 against localhost:

svcscan.exe -p 80 localhost

Scan ports 22 through 25 against joe-mama:

svcscan.exe joe-mama 22-25

Advanced Examples

Scan ports 443 and 6667 against 192.168.1.1 using an SSL/TLS capable scanner and display verbose scan output:

svcscan.exe -vsp 443,6667 192.168.1.1

Scan ports 80, 443, and 20 through 40 against localhost using a thread pool with 8 threads and set the connection timeout to 4000 milliseconds:

svcscan.exe -t 4000 -T 8 -p 80,443,20-40 localhost

The default thread pool size will be used if the specified thread count is greater than 32.

Scan ports 6667 and 6697 against 192.168.1.100 with verbose output displayed and save a JSON scan report to file path svcscan-test.json:

svcscan.exe -vjo svcscan-test.json 192.168.1.100 6667,6697

Scan port 80 against 10.0.0.1 and perform HTTP or HTTPS probing using method GET and URI /admin:

svcscan.exe --ssl --verbose --curl /admin 10.0.0.1 80

-c/--curl must be passed as the final command-line argument when no explicit URI is provided.


Dependencies

To run the prebuilt application executable, no dependencies are required.

To compile this application, the following Boost C++ libraries and their dependencies must be installed through vcpkg using triplets x64-windows-static and x86-windows-static:

  • Boost.Asio

    Library for networking and other low level I/O functionality.

  • Boost.Beast

    Library for HTTP, WebSocket, and networking functionality.

  • Boost.Bind

    Library for generating forwarding call wrappers.

  • Boost.JSON

    Library for JSON parsing, serialization, and DOM.

Once vcpkg is installed, the following command can be used to install all required Boost libraries:

vcpkg.exe install "boost:x64-windows-static" "boost:x86-windows-static"

Remarks

  • This application only supports Windows operating systems.
  • Please use discretion as this application is still in development.

Copyright & Licensing

The SvcScan application source code is available in this repository and licensed under the MIT license.