Skip to content

Support for systemd-related behaviors - #1171

Open
Still34 wants to merge 3 commits into
mandiant:masterfrom
Still34:patches/add-systemd-related-calls
Open

Support for systemd-related behaviors#1171
Still34 wants to merge 3 commits into
mandiant:masterfrom
Still34:patches/add-systemd-related-calls

Conversation

@Still34

@Still34 Still34 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR aims to close #1041 by adding three new rules that address the behaviors of the sample mentioned in the issue.

  • nursery/clear-system-logs-via-journalctl.yml
  • nursery/interact-with-systemd-journal-via-journalctl.yml
  • nursery/manage-system-services-via-systemctl.yml

The rules are currently in nursery due to the following concerns, and additional discussion surrounding them are welcome,

  • Linux rules aren't very prevalent in capa in general; some additional testing with more ITW samples might be preferred.
  • The current implementations use regex - not sure if there are any rules or performance concerns regarding regex usage.
  • The scopes are currently set to file instead of function due to the targeted sample being Go-based; function-based scoping seems to break the detection.

Signed-off-by: Still Hsu <dev@stillu.cc>

@mike-hunhoff mike-hunhoff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Still34 . Please ensure the example file has been added to capa-testfiles and move the rules from the nursery to their respective folders.

@Still34

Still34 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

I want to double check the following before moving the files to their respective folder. Let me know if all of these are cleared of concerns.

The rules are currently in nursery due to the following concerns, and additional discussion surrounding them are welcome,

* Linux rules aren't very prevalent in capa in general; some additional testing with more ITW samples might be preferred.

* The current implementations use regex - not sure if there are any rules or performance concerns regarding regex usage.

* The scopes are currently set to `file` instead of `function` due to the targeted sample being Go-based; `function`-based scoping seems to break the detection.

Still34 added 2 commits July 25, 2026 22:02
…-journalctl.yml

Signed-off-by: Still Hsu <dev@stillu.cc>
Signed-off-by: Still Hsu <dev@stillu.cc>
@Still34
Still34 requested a review from mike-hunhoff July 27, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

detect journalctl/systemctl/systemd interactions on Linux

2 participants