Files
sigma-rules/rta/exec_scripting_unusual_extension.py
T
Mika Ayenson 1dfc8ca817 Release ER Production RTAs to DR (#2270)
(cherry picked from commit 0358ec9d9a)
2022-09-08 16:51:32 +00:00

32 lines
874 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="04fa2fff-bbcb-4b13-ad10-33225056e34e",
platforms=["windows"],
endpoint=[
{
"rule_name": "Execution of a Windows Script with Unusual File Extension",
"rule_id": "b76c0a04-b504-4a2f-a0cf-b4175a2f3eea",
}
],
siem=[],
techniques=["T1059"],
)
@common.requires_os(metadata.platforms)
def main():
common.log("Executing cscript against .exe")
common.execute(["cmd.exe", "/c", "cscript.exe", "/e:Vbscript", "cmd.exe"], timeout=5, kill=True)
if __name__ == "__main__":
exit(main())