Active Response¶
Rustinel includes an optional response engine that can terminate processes when an alert reaches the configured minimum severity. It is disabled by default and should be tested in dry-run mode first.
Modes¶
- Disabled: no response work is queued.
- Dry-run: Rustinel logs what it would do.
- Prevention: Rustinel terminates eligible processes.
Platform Behavior¶
| Platform | Action |
|---|---|
| Windows | Uses process termination APIs |
| Linux | Sends SIGKILL |
Severity Handling¶
- Sigma uses the rule
level - YARA is always treated as
critical - IOC uses
ioc.default_severity
response.min_severity is applied after those mappings.
Allowlists¶
Rustinel will not act on processes that match either of these:
allowlist_images: image basenames or full pathsallowlist_paths: trusted path prefixes
By default, response.allowlist_paths inherits allowlist.paths.
Default Trusted Prefixes¶
Windows¶
C:\Windows\C:\Program Files\C:\Program Files (x86)\
Linux¶
/usr/bin//usr/sbin//usr/lib//usr/lib64//usr/libexec//bin//sbin//lib//lib64/
Example Configuration¶
Windows¶
[allowlist]
paths = [
"C:\\Windows\\",
"C:\\Program Files\\",
"C:\\Program Files (x86)\\",
]
[response]
enabled = true
prevention_enabled = false
min_severity = "critical"
allowlist_images = []
Linux¶
[allowlist]
paths = [
"/usr/bin/",
"/usr/sbin/",
]
[response]
enabled = true
prevention_enabled = false
min_severity = "critical"
allowlist_images = []
Logging¶
Response actions are logged in the operational log:
response: Active response would terminate process pid=4242 image="/tmp/evil" dry_run=true
response: Active response terminated process pid=4242 image="/tmp/evil"
response: Active response skipped: allowlisted pid=4321 image="/usr/bin/bash"
Safety Checks¶
The response engine skips termination when:
- PID is missing
- PID is in the protected low system range (PIDs 0–4 on both platforms)
- The target is the Rustinel process itself
- The process image path is not known
- The image or path is allowlisted
Safe Test Flow¶
Cross-Platform YARA Demo¶
- Enable dry-run mode:
- Start Rustinel.
- Build and run the sample binary:
On Windows:
- Confirm the operational log shows a dry-run response decision.
- After validation, switch
prevention_enabled = trueand repeat.
Sigma Demo¶
Windows:
Linux:
These are safe ways to validate the alert-to-response pipeline with the bundled demo rules before introducing custom high-severity content.