Files
sigma-rules/rta/reg_mod_enablescriptblocklogging.py
T
Jonhnathan f41c5288cc [RTA] New RTAs for Windows Rules (#2426)
* Part 1

* Part 2

* Part3

* Part4

* Final Part

* Dedup RTA where Office app loads wmiutils

* Add techniques

* Remove helper

* Update exec_cmd_set_mppreference.py
2023-03-20 07:56:51 -03:00

31 lines
901 B
Python

# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# 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.
from . import common
from . import RtaMetadata
metadata = RtaMetadata(
uuid="5ef57ec6-32a0-40b2-b9a7-c4eda4cd3e49",
platforms=["windows"],
endpoint=[],
siem=[{'rule_id': '818e23e6-2094-4f0e-8c01-22d30f3506c6', 'rule_name': 'PowerShell Script Block Logging Disabled'}],
techniques=['T1562', 'T1562.002'],
)
@common.requires_os(metadata.platforms)
def main():
key = "SOFTWARE\\Policies\\Microsoft\\Windows\\PowerShell\\ScriptBlockLogging"
value = "EnableScriptBlockLogging"
data = 0
with common.temporary_reg(common.HKLM, key, value, data, data_type="dword"):
pass
if __name__ == "__main__":
exit(main())