Basic Win CMD for Pentesters

Get a hacker's perspective on your web apps, network, and cloud

Find and report critical, exploitable vulnerabilities with real business impact. Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.

System info

Version and Patches info

Environment

Some env variables to highlight:

  • COMPUTERNAME: Name of the computer

  • TEMP/TMP: Temp folder

  • USERNAME: Your username

  • HOMEPATH/USERPROFILE: Home directory

  • windir: C:\Windows

  • OS:Windos OS

  • LOGONSERVER: Name of domain controller

  • USERDNSDOMAIN: Domain name to use with DNS

  • USERDOMAIN: Name of the domain

Mounted disks

Recycle Bin

Processes, Services & Software

Domain info

Logs & Events

Users & Groups

Users

Groups

List sessions

Password Policy

Credentials

Persistence with users

Network

Interfaces, Routes, Ports, Hosts and DNSCache

Firewall

Shares

Wifi

SNMP

Network Interfaces

ARP table

Download

Bitsadmin.exe

CertReq.exe

Certutil.exe

Find much more searching for Download in https://lolbas-project.github.io

Misc

Bypass Char Blacklisting

DOSfuscation

Generates an obfuscated CMD line

Listen address ACLs

You can listen on http://+:80/Temporary_Listen_Addresses/ without being administrator.

Manual DNS shell

Attacker (Kali) must use one of these 2 options:

Victim

for /f tokens technique: This allows us to execute commands, get the first X words of each line and send it through DNS to our server

You can also redirect the output, and then read it.

Calling CMD from C code

Alternate Data Streams CheatSheet (ADS/Alternate Data Stream)

Examples taken from https://gist.github.com/api0cradle/cdd2d0d0ec9abb686f0e89306e277b8f. There are a lot more in there!

Get a hacker's perspective on your web apps, network, and cloud

Find and report critical, exploitable vulnerabilities with real business impact. Use our 20+ custom tools to map the attack surface, find security issues that let you escalate privileges, and use automated exploits to collect essential evidence, turning your hard work into persuasive reports.

Last updated