-
Notifications
You must be signed in to change notification settings - Fork 807
Description
Refactor
Component(s) to be refactored
- AgentConfiguration
- HTTPFingerprinter
Explanation
Web exploiters, configuration, and fingerprinters are coupled in a strange way. The configuration specifies which ports are HTTP ports, the HTTPFingerprinter confirms this, and the web exploiters exploit any ports that the fingerprinter has confirmed are HTTP ports. This means both exploiters and fingerprinters need access to the list of pre-approved HTTP ports. It also means if HTTP ports exist outside the preordained set, they won't be exploited.
Instead, the scanner should be responsible for determining whether or not a port is an HTTP port. There's no need to configure this information. If we want to allow exploiters to exploit only certain ports, then only those ports should be scanned, or we should specify the allowed ports in the exploiter's configuration.
Tasks
- Update
PortScanData
(0d) - @shreyamalviya- Rename
PortScanData.service
toPortScanData.service_deprecated
- Add
PortScanData.service
as aNetworkService
- Rename
- Update
TargetHost
(0d) - @shreyamalviya- Add
NetworkProtocol
enum with TCP, UDP, and ICMP - Add
TargetHost.port_status: Dict[Union[NetworkProtocol.TCP, NetworkProtocol.UDP], Dict[NetworkPort, PortScanData]]
- Add
- Redefine
FingerprintData
with pydantic (0d) - @ilija-lazoroski- Change
FingerprintData.services
toFingerprintData.service: [NetworkService]
- Change
- Modify each fingerprinter to return the new
FingerPrintData
,add services to(0d) - @ilija-lazoroskiNetworkService
enum as necessary- HTTP
- MSSQL
- SMB
- SSH
- Modify
master.propagator
to populate theTargetHost.port_status
dict based on the port scan and fingerprint results (0d) - @shreyamalviya @cakekoa - Replace all uses of
TargetHost.services
withTargetHost.port_status
(0d) @cakekoa @shreyamalviya- Remove
TargetHost.services
- Remove
- Modify hadoop exploiter with the following options (0d): @cakekoa
- Boolean option to try all HTTP ports
- Modify hadoop exploiter to skip configured ports if they are closed (try if the status is unknown) (0d) @cakekoa