|
2 | 2 | creation_date = "2024/08/22" |
3 | 3 | integration = ["endpoint"] |
4 | 4 | maturity = "production" |
5 | | -updated_date = "2024/08/28" |
| 5 | +updated_date = "2024/10/17" |
6 | 6 |
|
7 | 7 | [rule] |
8 | 8 | author = ["Elastic"] |
9 | 9 | description = """ |
10 | 10 | This rule identifies potentially malicious processes attempting to access the cloud service provider's instance metadata |
11 | | -service (IMDS) API endpoint, which can be used to retrieve sensitive instance-specific information such as |
12 | | -instance ID, public IP address, and even temporary security credentials if role's are assumed by that instance. The rule |
13 | | -monitors for various tools and scripts like curl, wget, python, and perl that might be used to interact with the |
14 | | -metadata API. |
| 11 | +service (IMDS) API endpoint, which can be used to retrieve sensitive instance-specific information such as instance ID, |
| 12 | +public IP address, and even temporary security credentials if role's are assumed by that instance. The rule monitors for |
| 13 | +various tools and scripts like curl, wget, python, and perl that might be used to interact with the metadata API. |
15 | 14 | """ |
16 | 15 | from = "now-9m" |
17 | 16 | index = ["logs-endpoint.events.*"] |
@@ -42,14 +41,26 @@ sequence by host.id, process.parent.entity_id with maxspan=1s |
42 | 41 | "/etc/cron*", "/etc/update-motd.d/*", "/boot/*", "/srv/*", "/run/*", "/etc/rc.local" |
43 | 42 | ) or |
44 | 43 | process.command_line: "*169.254.169.254*" and |
45 | | - not process.working_directory: ( |
46 | | - "/opt/rapid7*", |
47 | | - "/opt/nessus*", |
48 | | - "/snap/amazon-ssm-agent*", |
49 | | - "/srv/snp/docker/overlay2*", |
50 | | - "/var/log/amazon/ssm*" |
51 | | - )] |
52 | | -[network where host.os.type == "linux" and event.action == "connection_attempted" and destination.ip == "169.254.169.254"] |
| 44 | + not (process.working_directory: ( |
| 45 | + "/opt/rapid7*", |
| 46 | + "/opt/nessus*", |
| 47 | + "/snap/amazon-ssm-agent*", |
| 48 | + "/var/snap/amazon-ssm-agent/*", |
| 49 | + "/var/log/amazon/ssm/*", |
| 50 | + "/srv/snp/docker/overlay2*", |
| 51 | + "/opt/nessus_agent/var/nessus/*") or |
| 52 | + process.executable: ( |
| 53 | + "/opt/rumble/bin/rumble-agent*", |
| 54 | + "/opt/aws/inspector/bin/inspectorssmplugin") or |
| 55 | + process.parent.executable: ( |
| 56 | + "/usr/bin/setup-policy-routes", |
| 57 | + "/usr/share/ec2-instance-connect/*", |
| 58 | + "/var/lib/amazon/ssm/*") |
| 59 | + ) |
| 60 | +] |
| 61 | +[network where host.os.type == "linux" |
| 62 | + and event.action == "connection_attempted" |
| 63 | + and destination.ip == "169.254.169.254"] |
53 | 64 | ''' |
54 | 65 |
|
55 | 66 |
|
|
0 commit comments