Converted Example Scripts into Assemblies

This commit is contained in:
2025-10-03 21:43:20 -06:00
parent fd4f8d7392
commit b635e51565
3 changed files with 36 additions and 10 deletions

View File

@@ -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"
}

View File

@@ -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

View File

@@ -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"
}