#[non_exhaustive]pub struct ScanSettings {Show 24 fields
pub send_mode: SendMode,
pub tcp_technique: TcpScanTechnique,
pub sctp_technique: SctpScanTechnique,
pub retry: RetryConfig,
pub max_probe_rate: Option<NonZeroU32>,
pub min_probe_rate: Option<NonZeroU32>,
pub host_probe_interval: Option<Duration>,
pub probe_interval: Option<Duration>,
pub host_timeout: Option<Duration>,
pub scan_timeout: Option<Duration>,
pub dns_enabled: bool,
pub redact: bool,
pub os_detection: OsDetection,
pub service_detection: ServiceDetection,
pub detection: DetectionEnvelope,
pub traceroute: bool,
pub characterise: bool,
pub ip_protocols: Vec<u8>,
pub tls_enumeration: bool,
pub listen_only_ports: Vec<u16>,
pub excluded_ports: PortSet,
pub evasion: Option<EvasionRecord>,
pub idle_scan: Option<IdleScan>,
pub icmp_evidence: bool,
}Expand description
The settings that shaped what a phase did.
The ZondConfig fields that change which packets went out and how long the engine
waited, which are what is needed to interpret or reproduce a result. A separate type,
so a new config field does not silently join every exported report.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.send_mode: SendModeHow raw probes were placed on the wire.
tcp_technique: TcpScanTechniqueWhich segment each TCP port probe carried, and so what its answers mean.
Two Closed ports differ by this: one refused a connection attempt, the other
reset a segment that was not one.
sctp_technique: SctpScanTechniqueWhich chunk each SCTP port probe carried, and so what its answers mean.
An OpenOrNoReply SCTP port came from a COOKIE-ECHO scan, which cannot report
open; an INIT scan would have settled it.
retry: RetryConfigThe retransmission budget and patience in force.
max_probe_rate: Option<NonZeroU32>The probe-rate ceiling, or None if the scanner’s own default applied.
min_probe_rate: Option<NonZeroU32>The probe-rate floor, or None if the scan was free to settle wherever
it liked.
A scan that emitted more than its targets answered may have been told to finish; compare floors before concluding a network got noisier.
host_probe_interval: Option<Duration>The shortest gap kept between two probes at one host, or None if none
was asked for.
Bounds how long a phase took: a thousand addresses a tenth of a second apart take at least a hundred seconds.
probe_interval: Option<Duration>The shortest gap kept between any two probes the scan sent, or None
if none was asked for.
Like host_probe_interval: a thousand ports a second
apart take at least a quarter of an hour.
host_timeout: Option<Duration>The wall-clock budget each host was given, or None if none was set.
Bounds what a host’s entry can say; which hosts ran out is
ScanPhase::timed_out.
scan_timeout: Option<Duration>The wall-clock budget the whole phase was given, or None if none was
set.
Like host_timeout, one level up: a phase stopped by it
covered less than asked.
dns_enabled: boolWhether name resolution was permitted to generate traffic.
redact: boolWhether the caller asked for identifying detail to be masked.
os_detection: OsDetectionHow far the phase went to identify the operating system behind each host.
At OsDetection::Off nothing looked; at other levels something looked and
found nothing conclusive. Also bounds the traffic the engine originated; see
OsDetection::is_active.
service_detection: ServiceDetectionHow far the phase went to identify what was listening behind each open port.
At ServiceDetection::Off nothing asked; at other levels something asked and
could not tell. Also says whether connections were completed, which a target’s
application logs would record.
detection: DetectionEnvelopeHow intrusive a detection the phase was permitted to run over the services it identified.
Decides which findings could appear, so a clean port can be read as probed or spared.
traceroute: boolWhether the phase measured the route to each host that answered.
Tells a host with no path because nobody looked from one where nothing came back.
characterise: boolWhether the phase characterised the filter in front of each host that answered.
As with traceroute, tells not looking from finding nothing.
ip_protocols: Vec<u8>Which IP protocols the phase asked each host that answered about, ascending.
Per protocol, so a host with no verdict for 47 can be read as never asked.
tls_enumeration: boolWhether the phase established what each TLS port accepts.
Tells a port that was never enumerated from one that refused every offer.
listen_only_ports: Vec<u16>The TCP ports the phase connected to and listened on and sent nothing, ascending.
An open port here with only its number’s name was left unprobed on purpose. See
ZondConfig::listen_only_ports and listened_only_to.
excluded_ports: PortSetThe ports the phase sent nothing to on any target, empty where none were excluded.
Recorded as the policy, since the scope cannot tell a port never named from one
excluded, and it also covers ports a phase picked itself. See
ZondConfig::excluded_ports.
evasion: Option<EvasionRecord>What the scan changed about the packets it sent, or None if nothing; see
EvasionRecord.
idle_scan: Option<IdleScan>The zombie a TCP port scan read its verdicts through, or None. Its presence
means the ports were inferred from a third party’s counter. See IdleScan.
icmp_evidence: boolWhether the capture kept ICMP errors for a technique that did not need them for its verdict.
Without it, a NoReply port may be one
a filter refused; with it, that port would read
Blocked.
Implementations§
Source§impl ScanSettings
impl ScanSettings
Sourcepub fn listened_only_to(&self, number: u16, protocol: Protocol) -> bool
pub fn listened_only_to(&self, number: u16, protocol: Protocol) -> bool
Whether the phase only listened on number over protocol, sending it
nothing, so that what the port reports is what it volunteered and no
more.
use zond_engine::ZondConfig;
use zond_engine::model::port::Protocol;
use zond_engine::report::ScanSettings;
let settings = ScanSettings::from(&ZondConfig::default());
assert!(settings.listened_only_to(9100, Protocol::Tcp));
assert!(!settings.listened_only_to(9100, Protocol::Udp));
assert!(!settings.listened_only_to(80, Protocol::Tcp));Trait Implementations§
Source§impl Clone for ScanSettings
impl Clone for ScanSettings
Source§impl Debug for ScanSettings
impl Debug for ScanSettings
Source§impl From<&ScanSettings> for SettingsRecord
impl From<&ScanSettings> for SettingsRecord
Source§fn from(settings: &ScanSettings) -> Self
fn from(settings: &ScanSettings) -> Self
Source§impl From<&SettingsRecord> for ScanSettings
impl From<&SettingsRecord> for ScanSettings
Source§fn from(record: &SettingsRecord) -> Self
fn from(record: &SettingsRecord) -> Self
Source§impl From<&ZondConfig> for ScanSettings
impl From<&ZondConfig> for ScanSettings
Source§fn from(cfg: &ZondConfig) -> Self
fn from(cfg: &ZondConfig) -> Self
What a phase records about the request behind it.
Destructured with every field named, as for
ProbeTuning, so a new ZondConfig field fails
to compile here until it is handled.
Source§impl PartialEq for ScanSettings
impl PartialEq for ScanSettings
impl StructuralPartialEq for ScanSettings
Auto Trait Implementations§
impl Freeze for ScanSettings
impl RefUnwindSafe for ScanSettings
impl Send for ScanSettings
impl Sync for ScanSettings
impl Unpin for ScanSettings
impl UnsafeUnpin for ScanSettings
impl UnwindSafe for ScanSettings
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more