Skip to content

Commit a0b088e

Browse files
committed
refactor(rules): Remove inbound/outbound network macros
Removes inbound/outbound network macros from the rule and switches to using only the connect socket event.
1 parent 190f7ea commit a0b088e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

rules/persistence_network_connection_via_startup_folder_executable_or_script.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ condition: >
2222
|(load_untrusted_executable and module.path imatches startup_locations) or
2323
(load_executable and ps.name in script_interpreters and ps.cmdline imatches startup_locations)
2424
|
25-
|((inbound_network) or (outbound_network)) and ps.cmdline imatches startup_locations|
25+
|connect_socket and
26+
ps.cmdline imatches startup_locations and
27+
net.dip != 0.0.0.0 and net.dip not in ('0:0:0:0:0:0:0:1', '::1') and
28+
not cidr_contains(net.dip, '127.0.0.0/8', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16')
29+
|
2630
2731
min-engine-version: 3.0.0

0 commit comments

Comments
 (0)