diff --git a/Assemblies/Scripts/Examples/Write Canary to C Drive.json b/Assemblies/Scripts/Examples/Write Canary to C Drive.json index 209396d..579d1bd 100644 --- a/Assemblies/Scripts/Examples/Write Canary to C Drive.json +++ b/Assemblies/Scripts/Examples/Write Canary to C Drive.json @@ -4,7 +4,7 @@ "description": "Writes a simple text file to the C:\\ drive of the computer. Requires SYSTEM level execution context to work.", "category": "script", "type": "powershell", - "script": "# Define the file path\n$filePath = \"C:\\Canary.txt\"\n\n# Write some content into the file\n$env:canaryMessage | Out-File -FilePath $filePath -Encoding UTF8\n", + "script": "IyBEZWZpbmUgdGhlIGZpbGUgcGF0aAokZmlsZVBhdGggPSAiQzpcQ2FuYXJ5LnR4dCIKCiMgV3JpdGUgc29tZSBjb250ZW50IGludG8gdGhlIGZpbGUKJGVudjpjYW5hcnlNZXNzYWdlIHwgT3V0LUZpbGUgLUZpbGVQYXRoICRmaWxlUGF0aCAtRW5jb2RpbmcgVVRGOAo=", "timeout_seconds": 3600, "sites": { "mode": "specific", @@ -22,5 +22,6 @@ "description": "This is the text that will be written into the canary file." } ], - "files": [] + "files": [], + "script_encoding": "base64" } \ No newline at end of file diff --git a/Assemblies/Scripts/Examples/Write Canary to CurrentUser Desktop.ps1 b/Assemblies/Scripts/Examples/Write Canary to CurrentUser Desktop.ps1 deleted file mode 100644 index d82ad73..0000000 --- a/Assemblies/Scripts/Examples/Write Canary to CurrentUser Desktop.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# Dynamically get the current user's Desktop path -$desktopPath = [Environment]::GetFolderPath('Desktop') - -# Define the file path relative to the Desktop -$filePath = Join-Path $desktopPath "Canary.txt" - -# Write some content into the file -"USER Canary is alive." | Out-File -FilePath $filePath -Encoding UTF8 diff --git a/Assemblies/Scripts/Examples/Write_Canary_File_to_a_Specific_Folder.json b/Assemblies/Scripts/Examples/Write_Canary_File_to_a_Specific_Folder.json new file mode 100644 index 0000000..83044d0 --- /dev/null +++ b/Assemblies/Scripts/Examples/Write_Canary_File_to_a_Specific_Folder.json @@ -0,0 +1,33 @@ +{ + "version": 1, + "name": "Write Canary File to a Specific Folder", + "description": "Writes a basic canary file to a specific folder with specific input.", + "category": "script", + "type": "powershell", + "script": "JGVudjpjYW5hcnlNZXNzYWdlIHwgT3V0LUZpbGUgLUZpbGVQYXRoICRlbnY6Y2FuYXJ5TG9jYXRpb24gLUVuY29kaW5nIFVURjgK", + "timeout_seconds": 3600, + "sites": { + "mode": "all", + "values": [] + }, + "variables": [ + { + "name": "canaryLocation", + "label": "Folder Location", + "type": "string", + "default": "C:\\Users\\example\\Desktop", + "required": true, + "description": "Location of Canary File" + }, + { + "name": "canaryMessage", + "label": "Message", + "type": "string", + "default": "Hello World!", + "required": false, + "description": "Message to be written into the canary file." + } + ], + "files": [], + "script_encoding": "base64" +} \ No newline at end of file