* Move PROFINET/IO detection into the DCERPC dissector: match the
PROFINET/IO interface UUIDs (Device, Controller, Supervisor,
ParameterServer) and the full object UUID prefix, and recognize the
Endpoint Mapper lookups for PROFINET/IO interfaces. Remove the
standalone PROFINET/IO dissector,
* After a generic EPM classification, look for PROFINET/IO calls in the
next packets of the flow
* Add UDP 34964 as PROFINET/IO default port and don't trigger the
`NDPI_KNOWN_PROTOCOL_ON_NON_STANDARD_PORT` flow risk for PROFINET/IO:
responses and following calls use dynamic ports
* Fix the byte order check of the connectionless DCERPC fragment length
The number of packets to wait for the reply, after a request (default 16,
as before). With 0 the reply is not dissected: no extra dissection is
started at all (with max_extra_packets_to_check 0 it would never end).
* Active Directory Web Services (ADWS, TCP/9389), used by the PowerShell
ActiveDirectory module (Get-ADUser & co.): new dissector looking at the
clear-text .NET Message Framing (MC-NMF) preamble sent by the client
* Task Scheduler (MS-TSCH, i.e. schtasks.exe, atexec): "atsvc" named pipe
over SMB and ITaskSchedulerService/ATSvc/SASec interfaces in DCE/RPC BIND
requests
Classify as PowerShell the traffic used by Windows to execute remote
commands, i.e. the svcctl (MS-SCMR) and winreg (MS-RRP) interfaces:
* SMBv2/3: after the flow has been classified, look into SMB2 CREATE
requests for the "svcctl"/"winreg" named pipes (and for PsExec
binary/pipes). Flows without these pipes are reported with the
FILE_SHARING category.
* DCE/RPC over TCP: check the interface UUID in the BIND request
* HTTP: don't report generic WS-Management traffic (Openwsman clients,
Intel AMT) as PowerShell
Close#3289
Also fix a memory leak in the IPsec JSON serialization (the transforms
sub-serializer was never freed).
Keep standard DNS, mDNS, and LLMNR port handling unchanged while allowing deployments with DNS on one explicitly configured port. The option is disabled by default and is covered by the official DNS-on-port-80 regression capture, including the expected classification output.
Co-authored-by: RajaMuhammadAwais <1.19938988e+08+RajaMuhammadAwais@users.noreply.github.com>
Some malware families (e.g. Emotet) encode DGA-generated tokens directly in
the HTTP URL path instead of the hostname, bypassing the existing hostname-
based DGA checks. This commit adds ndpi_check_dga_url_path(), which applies a
refined version of the DGA heuristic to URL path segments:
- Segments are stripped of file extensions, split into sub-tokens by
'_', '-' and '.', and empty sub-tokens are ignored.
- Structured identifiers are excluded: hex hashes/numeric IDs, short
alphanumeric resource IDs (alpha prefix followed by hex body), short
tokens (at most two non-hex letters plus digits, a single letter group
after up to four leading digits, and ASIN-style digit pairs followed by
letters), and purely letter-based names.
- Remaining segments are flagged as DGA-like when they contain at least
eight alphabetic characters with at most two vowels, or an identical-
character run of eight or more, consistent with the hostname checks in
ndpi_check_dga_name().
The check is invoked from the HTTP dissector when validating URLs and
emits the NDPI_SUSPICIOUS_DGA_DOMAIN risk with a descriptive info string.
Add a new fuzzer about it.
Close: #2089
Co-authored-by: RajaMuhammadAwais <1.19938988e+08+RajaMuhammadAwais@users.noreply.github.com>
Co-authored-by: Ivan Nardi <nardi.ivan@gmail.com>
Add a configuration parameter to tune the extra dissection
Close#3184
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Ivan Nardi <nardi.ivan@gmail.com>
proton.me is Proton's shared umbrella domain, covering Mail, Pass,
Drive, Calendar, Docs, Wallet, Lumo and Meet, plus account sign-in.
It was mapped to NDPI_PROTOCOL_PROTONVPN with category VPN, so every
Proton app was misdetected as a VPN.
Add per-service protocols that self-register from host_match[]:
Proton (Web), ProtonMail (Mail), ProtonPass and ProtonDrive (Cloud),
ProtonCalendar (Productivity), ProtonDocs (Collaborative),
ProtonWallet (CryptoBlockchain), ProtonLumo (AI) and ProtonMeet
(Chat). ProtonVPN keeps the VPN category, now scoped to the VPN
control domains only: protonvpn.com, protonvpn.net and
vpn-api.proton.me. The WireGuard/OpenVPN data plane is unaffected.
More-specific SNI rows override the proton.me umbrella through the
existing longest-match host automaton. Add a proton.pcap sample with
a golden result, and regenerate the huge_number_of_custom_protocols
golden whose custom protocol ids shift by the nine new built-ins.
Signed-off-by: Chad Monroe <chad@monroe.io>
NetMotion Mobility (Mobility XE) tunnels clients to the Mobility
server using the Internet Mobility Protocol (IMP), by default over
UDP/5008. The payload is encrypted, but every datagram carries a
fixed header: a 0x4c magic, a self-inclusive length prefix, a
per-direction connection id plus sequence, and a per-direction
session token. Detection verifies these framing invariants are
constant within a direction and differ across directions, following
the same stateful approach as the Hamachi dissector.
Add NDPI_PROTOCOL_NETMOTION (VPN category) with the netmotion
dissector and its unit test. The remaining unit-test results are
regenerated because the new protocol id shifts the auto-numbered
custom-rule ids and adds one dissector call per UDP flow.
Signed-off-by: Chad Monroe <chad@monroe.io>