Files
sigma-rules/rta/settingcontentms_files.py
T

43 lines
1.2 KiB
Python
Raw Normal View History

2020-06-29 23:07:16 -06:00
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
2021-03-03 22:12:11 -09:00
# or more contributor license agreements. Licensed under the Elastic License
# 2.0; you may not use this file except in compliance with the Elastic License
# 2.0.
2020-06-29 23:07:16 -06:00
# Name: Abusing SettingContent-ms Files
# RTA: settingcontentms_files.py
# signal.rule.name: Potential Modification of Accessibility Binaries
# signal.rule.name: Local Service Commands
2020-06-29 23:07:16 -06:00
# ATT&CK: T1193, T1204, T1064
# Description: SettingContent-ms file written to specific path or by risky process
import time
from . import common
2022-09-08 12:50:39 -04:00
from . import RtaMetadata
2020-06-29 23:07:16 -06:00
2022-09-08 12:50:39 -04:00
metadata = RtaMetadata(
uuid="7dea9748-dcac-49a9-8909-bd1f5590e508",
platforms=["windows"],
endpoint=[],
siem=[
{
"rule_id": "7405ddf1-6c8e-41ce-818f-48bea6bcaed8",
"rule_name": "Potential Modification of Accessibility Binaries",
}
],
techniques=["T1546"],
)
2023-10-03 10:47:58 -04:00
@common.requires_os(*metadata.platforms)
2020-06-29 23:07:16 -06:00
def main():
# Write to AppData\Local\
2022-09-08 12:50:39 -04:00
common.execute(["cmd", "/c", "echo", "test", ">", "%APPDATA%\\test.SettingContent-ms"])
2020-06-29 23:07:16 -06:00
time.sleep(1)
2022-09-08 12:50:39 -04:00
common.execute(["cmd", "/c", "del", "%APPDATA%\\test.SettingContent-ms"])
2020-06-29 23:07:16 -06:00
if __name__ == "__main__":
exit(main())