expliot_finder.vulnerability_scanner package

Subpackages

Submodules

expliot_finder.vulnerability_scanner.captured_sensitive_target_info module

Module that’s store all detected sensitive information by ‘vulnerability scanner’ scanners.

class expliot_finder.vulnerability_scanner.captured_sensitive_target_info.CapturedSensitiveInfo(*, ip_v4: str, os_name: ~typing.Optional[str] = '', mac_address: ~typing.Optional[str] = '', mac_vendor_name: ~typing.Optional[str] = '', ports_services: list = <factory>)[source]

Bases: object

Stores detected vulnerability information about the chosen target during the scan.

This is an example of information stored by this class after scanning a first 200 ports in target with the IP address ‘192.168.0.1’:

{
    'ip_v4': '192.168.0.1',
    'os_name': 'Linux',
    'mac_address': 'D8-0D-17-XX-XX-XX',
    'mac_vendor_name': 'TP-LINK TECHNOLOGIES CO.,LTD.',
    'ports_services': [
        PortService(
            port_number=22,
            service_name='ssh',
            service_version='SSH-2.0-dropbear_2011.54'
        ),
        PortService(
            port_number=80,
            service_name='http',
            service_version='Unknown'
        )
    ]
}
ip_v4

IP address(version 4) of the selected target to scan.

Type

str

os_name

Detected OS used by target.

Type

Optional[str]

mac_address

Detected MAC address used by target.

Type

Optional[str]

mac_vendor_name

Detected vendor name of MAC used by target.

Type

Optional[str]

ports_services

Open ports, services running on those open ports and versions of those services that’s were detected in the chosen target.

Type

list

__iter__() Iterator[tuple[str, str | list[Any]]][source]

Allow transforming dataclass into dictionary.

Sometimes in the code, a dict will be more useful than a dataclass, so that’s why __iter__ method has been implemented.

Returns

A dictionary with the captured confidential information of the selected target to scan.

ip_v4: str
mac_address: Optional[str]
mac_vendor_name: Optional[str]
os_name: Optional[str]
ports_services: list

expliot_finder.vulnerability_scanner.executor module

Executor of all ‘vulnerability_scanner’ scanning modules.

This module executes all scanners built in ‘vulnerability_scanner’ module to obtain those following information about target:

  • ip_v4 (IP address of the selected target to scan)

  • os_name (OS used by target)

  • mac_address (MAC address used by target)

  • mac_vendor_name (Vendor name of MAC used by target)

  • ports_services (Open ports, services running on those open ports and

    versions of those services of the chosen target)

All detected informations by scanners returned in the following form:

{
    'ip_v4': '192.168.0.1',
    'os_name': 'Linux',
    'mac_address': 'D8-0D-17-XX-XX-XX',
    'mac_vendor_name': 'TP-LINK TECHNOLOGIES CO.,LTD.',
    'ports_services': [
        PortService(
            port_number=22,
            service_name='ssh',
            service_version='SSH-2.0-dropbear_2011.54'
        ),
        PortService(
            port_number=80,
            service_name='http',
            service_version='Unknown'
        )
    ],
    ...
}
class expliot_finder.vulnerability_scanner.executor.VulnerabilityScannerExecutor(**kwargs: dict[str, str])[source]

Bases: object

Executor of all ‘vulnerability_scanner’ scanning modules.

Modules that are executed by this executor:
  • ‘OSNameDetector’ (discover OS used by target)

  • ‘MACAddressDetector’ (discover MAC address and MAC vendor name used

    by target)

  • ‘PortServiceScannerTCP’ (find out what open ports ‘target’ has.

    If PortServiceScannerTCP detects open ports, it will try to determine what service is running on these ports and what are the versions of these services.)

captured_sensitive_info

Global dataclass that stores detected sensitive information about the selected target to scan. This dataclass can be easily transformed to the dictionary.

scanned_ports_count

Amount of already scanned ports. Needed here to pass this value from ‘PortServiceScannerTCP’ trough ‘VulnerabilityScannerExecutor’ to ‘display_scanning_progress’ to show progress of scanning.

port_amount

Amount of ports that’s will be scanned in chosen target. This value is provided by CLI.

os_name_discoverer

Instance of class ‘OSNameDetector’. Functions in this class will detect OS used by the chosen target.

mac_discoverer

Instance of class ‘MACAddressDetector’. Functions in this class will detect MAC address and vendor name of MAC used by the target.

tcp_port_scanner

Instance of class ‘PortServiceScannerTCP’. Functions in this class will find out open ports, services running on those open ports and versions of those services in the chosen target.

async __call__(display_scanning_progress) dict[str, str | list[NamedTuple]][source]

Run concurrently scanners from ‘vulnerability_scanner’ module against the chosen target.

Returns

Return detected confidential information about the selected target.

captured_sensitive_info
mac_discoverer: Type[MACAddressDetector]
os_name_discoverer: Type[OSNameDetector]
port_amount: int
async run_tcp_port_scanner()[source]

Run the asynchronous TCP port scanner in loop be able to track scanning progress.

scanned_ports_count: int
tcp_port_scanner: Type[PortServiceScannerTCP]

Module contents

ALias for ‘vulnerability_scanner’ module executor.

class expliot_finder.vulnerability_scanner.VulnerabilityScannerExecutor(**kwargs: dict[str, str])[source]

Bases: object

Executor of all ‘vulnerability_scanner’ scanning modules.

Modules that are executed by this executor:
  • ‘OSNameDetector’ (discover OS used by target)

  • ‘MACAddressDetector’ (discover MAC address and MAC vendor name used

    by target)

  • ‘PortServiceScannerTCP’ (find out what open ports ‘target’ has.

    If PortServiceScannerTCP detects open ports, it will try to determine what service is running on these ports and what are the versions of these services.)

captured_sensitive_info

Global dataclass that stores detected sensitive information about the selected target to scan. This dataclass can be easily transformed to the dictionary.

scanned_ports_count

Amount of already scanned ports. Needed here to pass this value from ‘PortServiceScannerTCP’ trough ‘VulnerabilityScannerExecutor’ to ‘display_scanning_progress’ to show progress of scanning.

Type

int

port_amount

Amount of ports that’s will be scanned in chosen target. This value is provided by CLI.

Type

int

os_name_discoverer

Instance of class ‘OSNameDetector’. Functions in this class will detect OS used by the chosen target.

Type

Type[expliot_finder.vulnerability_scanner.core.scanners.os_name_detector.logic.OSNameDetector]

mac_discoverer

Instance of class ‘MACAddressDetector’. Functions in this class will detect MAC address and vendor name of MAC used by the target.

Type

Type[expliot_finder.vulnerability_scanner.core.scanners.mac_address_detector.logic.MACAddressDetector]

tcp_port_scanner

Instance of class ‘PortServiceScannerTCP’. Functions in this class will find out open ports, services running on those open ports and versions of those services in the chosen target.

Type

Type[expliot_finder.vulnerability_scanner.core.scanners.ports_services_scanners.tcp_port_scanner.logic.PortServiceScannerTCP]

async __call__(display_scanning_progress) dict[str, str | list[NamedTuple]][source]

Run concurrently scanners from ‘vulnerability_scanner’ module against the chosen target.

Returns

Return detected confidential information about the selected target.

captured_sensitive_info
mac_discoverer: Type[MACAddressDetector]
os_name_discoverer: Type[OSNameDetector]
port_amount: int
async run_tcp_port_scanner()[source]

Run the asynchronous TCP port scanner in loop be able to track scanning progress.

scanned_ports_count: int
tcp_port_scanner: Type[PortServiceScannerTCP]