Expand TUI guidance and host detection coverage
This commit is contained in:
parent
3b037646d2
commit
8194d13734
20 changed files with 414 additions and 42 deletions
|
|
@ -164,6 +164,10 @@ def _host_rule_record(rule: HostRule, origin: str) -> dict[str, Any]:
|
|||
conditions["peer_ports"] = sorted(rule.peer_ports)
|
||||
if rule.peer_port_exclude:
|
||||
conditions["peer_port_exclude"] = sorted(rule.peer_port_exclude)
|
||||
if rule.local_ports:
|
||||
conditions["local_ports"] = sorted(rule.local_ports)
|
||||
if rule.local_port_exclude:
|
||||
conditions["local_port_exclude"] = sorted(rule.local_port_exclude)
|
||||
if rule.argv_regex:
|
||||
conditions["argv_regex"] = rule.argv_regex
|
||||
return {
|
||||
|
|
@ -263,6 +267,13 @@ _RULE_DOCS: dict[int, dict[str, Any]] = {
|
|||
],
|
||||
"drill": "Use `rules test` with a `tcp_connect` event whose `comm` is an interpreter and whose public `peer_port` is not a common service port.",
|
||||
},
|
||||
100068: {
|
||||
"false_positives": [
|
||||
"Developer HTTP servers, netcat listeners, or local test harnesses intentionally opened from an interpreter.",
|
||||
"Administrative troubleshooting that temporarily listens on a high port.",
|
||||
],
|
||||
"drill": "Use `rules test` with a `listen` event whose `comm` is an interpreter and whose `local_port` is not a common service port.",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -344,8 +355,10 @@ def _host_event(event: dict[str, Any]) -> HostEvent:
|
|||
argv=tuple(str(a) for a in event.get("argv", ())),
|
||||
peer_ip=str(event.get("peer_ip", event.get("remote_ip", ""))),
|
||||
peer_port=_to_int(event.get("peer_port", event.get("remote_port", 0))),
|
||||
local_ip=str(event.get("local_ip", "")),
|
||||
local_port=_to_int(event.get("local_port", 0)),
|
||||
local_ip=str(event.get("local_ip", event.get("bind_ip",
|
||||
event.get("listen_ip", "")))),
|
||||
local_port=_to_int(event.get("local_port", event.get("bind_port",
|
||||
event.get("listen_port", 0)))),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue