5c792b86d7
* [RTA] Adds RTAs for endpoint rules * Update exec_cscript_archive_args.py * Review RTAs 1/2 * Update suspicious_msiexec_child.py * Update rta/exec_cscript_archive_args.py Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
35 lines
952 B
Python
35 lines
952 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
|
|
import os
|
|
|
|
metadata = RtaMetadata(
|
|
uuid="97979b30-908d-4c57-a33a-f3b78e55a84a",
|
|
platforms=["windows"],
|
|
endpoint=[{
|
|
'rule_id': 'aaa80718-1ed9-43bd-bcf7-97f2a6c93ea8',
|
|
'rule_name': 'Persistence via Microsoft Office AddIns'
|
|
}],
|
|
siem=[],
|
|
techniques=['T1137'],
|
|
)
|
|
EXE_FILE = common.get_path("bin", "renamed_posh.exe")
|
|
|
|
|
|
@common.requires_os(metadata.platforms)
|
|
def main():
|
|
path = "C:\\Users\\Public\\AppData\\Roaming\\Microsoft\\Word\\Startup"
|
|
os.makedirs(path, exist_ok=True)
|
|
file = path + "\\file.exe"
|
|
|
|
common.copy_file(EXE_FILE, file)
|
|
common.remove_file(file)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
exit(main())
|