Skip to content

Commit 5526862

Browse files
Merge branch 'main' into react_sync_rta_4182
2 parents 8b9079c + fff957c commit 5526862

File tree

58 files changed

+325
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+325
-114
lines changed

detection_rules/schemas/definitions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,11 @@ def validator(value):
247247
'geo_point', 'geo_shape', 'point', 'shape',
248248
'percolator'
249249
]
250+
251+
# definitions for the integration to index mapping unit test case
252+
IGNORE_IDS = ["eb079c62-4481-4d6e-9643-3ca499df7aaa", "699e9fdb-b77c-4c01-995c-1c15019b9c43",
253+
"0c9a14d9-d65d-486f-9b5b-91e4e6b22bd0", "a198fbbd-9413-45ec-a269-47ae4ccf59ce",
254+
"0c41e478-5263-4c69-8f9e-7dfd2c22da64", "aab184d3-72b3-4639-b242-6597c99d8bca",
255+
"a61809f3-fb5b-465c-8bff-23a8a068ac60", "f3e22c8b-ea47-45d1-b502-b57b6de950b3"]
256+
IGNORE_INDICES = ['.alerts-security.*', 'logs-*', 'metrics-*', 'traces-*', 'endgame-*',
257+
'filebeat-*', 'packetbeat-*', 'auditbeat-*', 'winlogbeat-*']
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License
3+
# 2.0; you may not use this file except in compliance with the Elastic License
4+
# 2.0.
5+
6+
import sys
7+
from . import RtaMetadata, common
8+
9+
metadata = RtaMetadata(
10+
uuid="4e6ded7e-23cb-460c-8a5b-21c5e5e8d6e8",
11+
platforms=["linux"],
12+
endpoint=[
13+
{
14+
"rule_name": "Potential Process Masquerading via Exec",
15+
"rule_id": "e6669bc3-cb75-4fb3-91e0-ddaa06dd59b2",
16+
},
17+
],
18+
techniques=["T1564", "T1059"],
19+
)
20+
21+
22+
@common.requires_os(*metadata.platforms)
23+
def main() -> None:
24+
common.log("Creating a fake executable..")
25+
masquerade = "[foo]"
26+
masquerade2 = "/tmp/sh"
27+
28+
source = common.get_path("bin", "linux.ditto_and_spawn")
29+
common.copy_file(source, masquerade)
30+
common.log("Granting execute permissions...")
31+
common.execute(["chmod", "+x", masquerade])
32+
33+
source = common.get_path("bin", "linux.ditto_and_spawn")
34+
common.copy_file(source, masquerade2)
35+
common.log("Granting execute permissions...")
36+
common.execute(["chmod", "+x", masquerade2])
37+
38+
commands = [masquerade2, masquerade]
39+
common.execute([*commands], timeout=5, kill=True)
40+
common.log("Cleaning...")
41+
common.remove_file(masquerade)
42+
common.remove_file(masquerade2)
43+
common.log("Simulation successfull!")
44+
45+
46+
if __name__ == "__main__":
47+
sys.exit(main())
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License
3+
# 2.0; you may not use this file except in compliance with the Elastic License
4+
# 2.0.
5+
6+
import sys
7+
from . import RtaMetadata, common
8+
9+
metadata = RtaMetadata(
10+
uuid="fa40fdc4-23bf-491c-bc55-6a6848c5b6da",
11+
platforms=["linux"],
12+
endpoint=[
13+
{
14+
"rule_name": "Potential Proxy Execution via Crash",
15+
"rule_id": "995c8bdb-5ebb-4c5b-9a03-4d39b52c0ff3",
16+
},
17+
],
18+
techniques=["T1218", "T1059"],
19+
)
20+
21+
22+
@common.requires_os(*metadata.platforms)
23+
def main() -> None:
24+
common.log("Creating a fake executable..")
25+
masquerade = "/tmp/crash"
26+
masquerade2 = "/tmp/sh"
27+
28+
source = common.get_path("bin", "linux.ditto_and_spawn")
29+
common.copy_file(source, masquerade)
30+
common.log("Granting execute permissions...")
31+
common.execute(["chmod", "+x", masquerade])
32+
33+
source = common.get_path("bin", "linux.ditto_and_spawn")
34+
common.copy_file(source, masquerade2)
35+
common.log("Granting execute permissions...")
36+
common.execute(["chmod", "+x", masquerade2])
37+
38+
commands = [masquerade, '-h', masquerade, '-c', 'whoami']
39+
common.execute([*commands], timeout=5, kill=True)
40+
common.log("Cleaning...")
41+
common.remove_file(masquerade)
42+
common.remove_file(masquerade2)
43+
common.log("Simulation successfull!")
44+
45+
46+
if __name__ == "__main__":
47+
sys.exit(main())
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License
3+
# 2.0; you may not use this file except in compliance with the Elastic License
4+
# 2.0.
5+
6+
import sys
7+
from . import RtaMetadata, common
8+
9+
metadata = RtaMetadata(
10+
uuid="e2a136e5-bda1-41c4-8143-514c0b0784c4",
11+
platforms=["linux"],
12+
endpoint=[
13+
{
14+
"rule_name": "System Binary Proxy Execution via ld.so",
15+
"rule_id": "10cb6563-35a9-45b7-a394-e7bca6fd5bed",
16+
},
17+
],
18+
techniques=["T1218", "T1059"],
19+
)
20+
21+
22+
@common.requires_os(*metadata.platforms)
23+
def main() -> None:
24+
common.log("Creating a fake executable..")
25+
masquerade = "/lib/ld-linux-foo.so"
26+
masquerade2 = "/tmp/sh"
27+
28+
source = common.get_path("bin", "linux.ditto_and_spawn")
29+
common.copy_file(source, masquerade)
30+
common.log("Granting execute permissions...")
31+
common.execute(["chmod", "+x", masquerade])
32+
33+
source = common.get_path("bin", "linux.ditto_and_spawn")
34+
common.copy_file(source, masquerade2)
35+
common.log("Granting execute permissions...")
36+
common.execute(["chmod", "+x", masquerade2])
37+
38+
commands = [masquerade, masquerade, '-c', 'whoami']
39+
common.execute([*commands], timeout=5, kill=True)
40+
common.log("Cleaning...")
41+
common.remove_file(masquerade)
42+
common.remove_file(masquerade2)
43+
common.log("Simulation successfull!")
44+
45+
46+
if __name__ == "__main__":
47+
sys.exit(main())
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2+
# or more contributor license agreements. Licensed under the Elastic License
3+
# 2.0; you may not use this file except in compliance with the Elastic License
4+
# 2.0.
5+
6+
import sys
7+
from . import RtaMetadata, common
8+
9+
metadata = RtaMetadata(
10+
uuid="4f705092-fae2-4455-94ab-e42fb13496e7",
11+
platforms=["linux"],
12+
endpoint=[
13+
{
14+
"rule_name": "Potential Proxy Execution via Pidstat",
15+
"rule_id": "436e12a8-7a03-4f6f-a3b2-3fe8b8f4c474",
16+
},
17+
],
18+
techniques=["T1218", "T1059"],
19+
)
20+
21+
22+
@common.requires_os(*metadata.platforms)
23+
def main() -> None:
24+
common.log("Creating a fake executable..")
25+
masquerade = "/tmp/pidstat"
26+
masquerade2 = "/tmp/sh"
27+
28+
source = common.get_path("bin", "linux.ditto_and_spawn")
29+
common.copy_file(source, masquerade)
30+
common.log("Granting execute permissions...")
31+
common.execute(["chmod", "+x", masquerade])
32+
33+
source = common.get_path("bin", "linux.ditto_and_spawn")
34+
common.copy_file(source, masquerade2)
35+
common.log("Granting execute permissions...")
36+
common.execute(["chmod", "+x", masquerade2])
37+
38+
commands = [masquerade, '-e', masquerade, '-c', 'whoami']
39+
common.execute([*commands], timeout=5, kill=True)
40+
common.log("Cleaning...")
41+
common.remove_file(masquerade)
42+
common.remove_file(masquerade2)
43+
common.log("Simulation successfull!")
44+
45+
46+
if __name__ == "__main__":
47+
sys.exit(main())

rules/cross-platform/execution_aws_ssm_sendcommand_with_command_parameters.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2022/09/03"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "auditd_manager"]
44
maturity = "production"
5-
updated_date = "2024/09/10"
5+
updated_date = "2024/09/23"
66

77
[rule]
88
author = ["Elastic"]

rules/windows/command_and_control_new_terms_commonly_abused_rat_execution.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2023/04/03"
3-
integration = ["endpoint", "windows"]
3+
integration = ["endpoint", "windows", "system"]
44
maturity = "production"
5-
updated_date = "2024/08/07"
5+
updated_date = "2024/09/23"
66

77
[rule]
88
author = ["Elastic"]

rules/windows/command_and_control_rdp_tunnel_plink.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
creation_date = "2020/10/14"
3-
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
44
maturity = "production"
55
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
66
min_stack_version = "8.14.0"
7-
updated_date = "2024/10/15"
7+
updated_date = "2024/10/17"
88

99
[rule]
1010
author = ["Elastic"]

rules/windows/command_and_control_screenconnect_childproc.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
creation_date = "2024/03/27"
3-
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
44
maturity = "production"
55
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
66
min_stack_version = "8.14.0"
7-
updated_date = "2024/10/15"
7+
updated_date = "2024/10/17"
88

99
[rule]
1010
author = ["Elastic"]

rules/windows/command_and_control_tunnel_vscode.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
creation_date = "2024/09/09"
3-
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender"]
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
44
maturity = "production"
55
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
66
min_stack_version = "8.14.0"
7-
updated_date = "2024/10/15"
7+
updated_date = "2024/10/17"
88

99
[rule]
1010
author = ["Elastic"]

0 commit comments

Comments
 (0)