Files
sigma-rules/rta/uncommon_persistence.py
T

31 lines
859 B
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
from . import common
2022-09-08 12:50:39 -04:00
from . import RtaMetadata
metadata = RtaMetadata(
uuid="ca020d7f-f495-4f0a-a808-da615f3409b4",
platforms=["windows"],
endpoint=[],
siem=[{"rule_id": "97fc44d3-8dae-4019-ae83-298c3015600f", "rule_name": "Startup or Run Key Registry Modification"}],
techniques=["T1547"],
)
2020-06-29 23:07:16 -06:00
2023-10-03 10:47:58 -04:00
@common.requires_os(*metadata.platforms)
def main():
key = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\Shell"
value = "Common Startup"
data = "Test"
2020-06-29 23:07:16 -06:00
with common.temporary_reg(common.HKLM, key, value, data):
pass
2020-06-29 23:07:16 -06:00
if __name__ == "__main__":
exit(main())