Enumeration

Users

Basic info

whoami /all
whoami /priv
whoami /groups

Execute command as other user (I)

$p = ConvertTo-SecureString 'password' -AsPlainText -Force
$c = New-Object System.Management.Automation.PSCredential ('user',$p)
Start-Process -Credential $c -NoNewWindow -ArgumentList "-Command & { whoami }" -FilePath "powershell"

Execute command as other user (II)

En caso de tener credenciales, podemos ejecutar comandos sin necesitar una shell:

Función de bash tomada de un directo en twitch de s4vitar

PSCredential () {
    echo -e "\n\t[+] \$user = 'user'"
    echo -e "\t[+] \$pw = 'password'"
    echo -e "\t[+] \$secpw = ConvertTo-SecureString \$pw -AsPlainText -Force"
    echo -e "\t[+] \$cred = New-Object System.Management.Automation.PSCredential \$user, \$secpw"
    echo -e "\t[+] Invoke-Command -ComputerName localhost -Credential \$cred -ScriptBlock { whoami }"
}

Files

Search content inside

Permissions

Find files

Registers

List installed programs

Ports & Hosts

Discover internal hosts (I)

Para descubrir dispositivos que esten en la misma interfaz nuestra, podemos usar PowerShell, creamos un archivo .ps1 con el siguiente contenido y ejecutamos:

Discover internal hosts (II)

Computers

System info

Remote Desktop

On hand commands

Sysinternals tools

The SysInternals Tools suite is a set of portable Windows applications that can be used to administer Windows systems (for the most part without requiring installation). The tools can be either downloaded from the Microsoft website or by loading them directly from an internet-accessible file share by typing \\live.sysinternals.com\tools into a Windows Explorer window.

Last updated