-
Notifications
You must be signed in to change notification settings - Fork 505
/
dock_plist.py
30 lines (22 loc) · 917 Bytes
/
dock_plist.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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 pathlib import Path
from . import common
from . import RtaMetadata
metadata = RtaMetadata(
uuid="38c81994-958f-40c8-bb6a-20bc1b93d598",
platforms=["macos"],
endpoint=[],
siem=[
{"rule_name": "Persistence via Docker Shortcut Modification", "rule_id": "c81cefcb-82b9-4408-a533-3c3df549e62d"}
],
techniques=["T1543"],
)
@common.requires_os(*metadata.platforms)
def main():
common.log("Executing file modification on com.apple.dock.plist to mimic dock plist modification")
common.temporary_file_helper("testing", file_name=f"{Path.home()}/Library/Preferences/com.apple.dock.plist")
if __name__ == "__main__":
exit(main())