Repository navigation
Conversation
eric-forte-elastic
left a comment
There was a problem hiding this comment.
Unless I am missing something, doesn't AND aws.cloudtrail.request_parameters LIKE "*clientId=*" filter for in effect any successful CreateDataChannel request containing clientId? Is there supposed to be a filter for what would be an agent vs non-agent version of the request?
You’re right, the original clientId predicate matched any successful request containing that parameter and was not a reliable agent/non-agent discriminator. I’ve replaced it with session-target correlation: the rule joins StartSession and CreateDataChannel by session ID, then requires the authenticated EC2 or hybrid managed-node identity to differ from the session target. I also updated the name and triage guidance accordingly. In emulation, the cross-node request received a data-channel token and matched, while the normal same-node control was excluded. The rule does not claim the token was subsequently used to open the session. |
Pull Request
Summary - What I changed
Added an ES|QL detection rule that correlates a successful AWS Systems Manager (SSM)
StartSessionwithCreateDataChannelfor the same session and alerts when the authenticated EC2 or hybrid managed-node identity differs from the session target.Why it matters
Managed-node roles commonly receive broad
ssmmessages:CreateDataChannelpermissions. An actor with credentials from a compromised node may use those permissions to request a data-channel token for another node's active Session Manager session without receivingStartSessionorResumeSessionpermission. The cross-node mismatch is a strong lateral-movement signal, while the rule does not assume that token issuance alone proves the channel was opened.How To Test
Validated the TOML with
python -m detection_rules validate-rule. A disposable AWS emulation confirmed that a cross-node request received a data-channel token and matched the query, while the normal same-node control was excluded.Checklist
Rule: New,Integration: AWS, andDomain: Cloudlabels