fd0d7a1d00
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
35 lines
934 B
Python
35 lines
934 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="7cee9313-5e55-472b-9d61-a95b0c9725d6",
|
|
platforms=["windows"],
|
|
endpoint=[],
|
|
siem=[{
|
|
'rule_id': 'f7c4dc5a-a58d-491d-9f14-9b66507121c0',
|
|
'rule_name': 'Persistent Scripts in the Startup Directory'
|
|
}],
|
|
techniques=['T1547', 'T1547.001'],
|
|
)
|
|
EXE_FILE = common.get_path("bin", "renamed_posh.exe")
|
|
|
|
|
|
@common.requires_os(metadata.platforms)
|
|
def main():
|
|
path = "C:\\Users\\Programs\\Startup"
|
|
os.makedirs(path, exist_ok=True)
|
|
file = path + "\\a.vbs"
|
|
common.copy_file(EXE_FILE, file)
|
|
|
|
common.remove_files(file)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
exit(main())
|