Command and Control (TA0011)(external, opens in a new tab or window)
Exfiltration (TA0010)(external, opens in a new tab or window)
text code block:FROM logs-endpoint.events.network-* | WHERE host.os.type == "macos" AND event.type == "start" AND (process.name == "osascript" OR process.name == "node" OR process.name LIKE "python*") AND (destination.domain LIKE "s3.*.amazonaws.com" OR destination.domain LIKE "*.s3*.amazonaws.com" OR destination.domain LIKE "*.cloudfront.net") | STATS Esql.connection_count = COUNT(*) BY process.executable, user.name, host.name, destination.domain | WHERE Esql.connection_count >= 5 | KEEP Esql.*, process.executable, user.name, host.name, destination.domain
Install detection rules in Elastic Security
Detect Suspicious AWS S3 Connection via Script Interpreter in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).