feat(core, matchers): Telemetry types & discovery mode - #78
Conversation
cb4ebe8 to
5603e9a
Compare
Co-Authored-By: A LLM Agent
d013493 to
f3e428f
Compare
Co-Authored-By: A LLM Agent
f3e428f to
a12d482
Compare
Co-Authored-By: A LLM Agent
a12d482 to
73b7c34
Compare
| const lookbackWindow = 15 * time.Minute | ||
| const maxResults = 1000 |
There was a problem hiding this comment.
Not sure if this should be hard coded at this level. In particular, don't we want the lookbackWindow to be editable by the caller and to be shared among all modules?
There was a problem hiding this comment.
The caller can control the time range in library mode (WithTimeRange option). I didn't expose it in the scenario yaml/CLI because I didn't want to overload it, but we could.
And for the shared value, I think it's better to control it per matcher: depending of the expected amount of resources, the processing time and other factors, it could make sense to have a longer search window for signals than logs for instance
Good catch though, because I missed it during the refactor: I changed the default timewindow of datadog signals from 1h to 15min. Will revert to 1h
Adds a datadogLog discovery expectation with a custom query to the security group scenario, and a datadogEvent discovery expectation without query to the curl metadata service scenario. Includes a sample JSON output file. Co-Authored-By: A LLM Agent
e33927c to
c0dd838
Compare
What does this PR do?
Warning
This PR changes the core
matcherinterface. It is a breaking change for any code calling threatest as a library and using the matchers directly.It is not a breaking change for CLI users. Commands and scenario files stay identical. The json output gained an additional json field
Enhancements:
Motivation
Checklist
Agent events discovery:

Using some internal stratus-red-team technique (I will try to opensource it at some point), I launched a k8s pod that starts a xmrig cryptominer. Didn't want to relaunch it all the time so I 'cheated' and use a local scenario launching a benign command, but fetching the events as if it was a normal scenario:
Logs and signals discovery: launched the

aws.defense-evasion.dns-delete-logsstratus TTP:(note: this screenshot is not from the latest commit, now the objects appear under their own assertion category instead of being mixed up at the end)