Windows PE Methodology

Information to Look Out for

  1. Username and hostname

  2. Group memberships of the current user

  3. Existing users and groups

  4. Operating system, version and architecture

  5. Network information

  6. Installed application

  7. Running processes

User Information

Current User

Groups that the Current User is in

User Privilege Token

Some Tokens that are not on the list:

Obtain a list of all local users

Obtain a list of all local group

or

Obtain a list of member in the Local Group

System Information

Get system information

Get all network interfaces

Get routing table

Display all active network connections

Get all installed 32-bit applications

or

Get all installed 64-bit applications

or

Get all process that is currently running

File Search in Machine

Search for file in Windows

Searching for documents with specific extensions

Command history

Obtain history of commands executed

Obtain history of command executed recorded by PSReadline

Runas command

Download files from external web server

Download File

Service binary Hijacking

List all services running

Get the Access Control List (ACL)

or

C Code Reverse Shell

Compiling C Code

Restarting Machine

DLL Hijacking

Get PATH variable

Get all the environment variable

List all services running

Procmon from Sysinternal Suite require administrator rights

DLL Code

Compiling DLL

Unquoted Service Path Attack

Finding Unquoted Service Path

or

or

Exploiting Unquoted Service Path

Using PowerUp.ps1,

Task Scheduler

List all scheduled tasks

Service Commands

Start Service

Stop Service

Restarting Service

SeImpersonatePrivilege

Ensure that the user have this privilege enabled.

Executing CMD commands using cmd as a command

Automated Tools

  1. winPEAS (/usr/share/peass/winpeas/winPEASx64.exe)

  2. Seatbelt (https://github.com/r3motecontrol/Ghostpack-CompiledBinaries)

Tools to check for PE vector

  1. PowerUp.ps1 (/usr/share/windows-resources/powersploit/Privesc/PowerUp.ps1)

/tmp equivalent in Windows machine

PowerShell writing to output

Last updated