Welcome to Adversarial PowerShell, the fourth entry in the Adversarial Series. While Adversarial Bash showed you how to weaponize the Linux shell, this book takes you deep into the Windows attack surface — the environment where most enterprise penetration tests live and die.
PowerShell is not just a scripting language. It is a direct interface to the Windows operating system, the .NET framework, COM objects, WMI, Active Directory, the registry, and the Win32 API. Every modern Windows host ships with it. Every domain controller speaks its language. Every EDR vendor fears what it can do.
Across thirteen chapters, you will conduct a single, continuous penetration test against Meridian Financial Group — a fictional mid-market financial services firm with a realistic Windows enterprise environment: Active Directory forests, IIS web applications, SQL Server databases, file shares, Exchange-style mail, and endpoint detection. You start with nothing but a PowerShell prompt and finish with domain admin, crown jewels exfiltrated, and a professional pentest report.
Along the way you will capture twenty flags (format: `MERIDIAN{...}`) and document twenty-two findings, building a portfolio that doubles as a real-world pentest report.
Every tool in this book is built from scratch in PowerShell — no Metasploit, no Cobalt Strike, no imported exploit frameworks. You will understand every line because you wrote it.
What You Will Build
- A multi-threaded TCP/UDP port scanner with service fingerprinting
- An LDAP enumeration engine rivaling PowerView
- A Kerberoasting and AS-REP roasting toolkit
- A password spraying framework with lockout awareness
- A SQL injection exploitation module
- An AMSI bypass and ETW patching framework
- A PowerShell obfuscation engine
- A full HTTP-based C2 implant with tasking
- Token manipulation and UAC bypass tools
- Lateral movement modules (WMI, WinRM, DCOM, named pipes)
- DNS and HTTPS exfiltration channels
- A complete pentest findings report generator
Prerequisites
- Intermediate PowerShell fluency (scripting, functions, modules)
- Familiarity with Windows administration (AD, GPO, services)
- Basic networking knowledge (TCP/IP, DNS, HTTP)
- A lab environment capable of running Windows VMs or Docker containers
The Adversarial Series
| # | Title | Language | Focus |
|---|-------|----------|-------|
| 1 | Adversarial Python | Python | Advanced exploitation and tool development |
| 2 | Adversarial Rust | Rust | Systems-level offensive tooling |
| 3 | Adversarial Bash | Bash | Linux/Unix shell-based penetration testing |
| 4 | Adversarial PowerShell | PowerShell | Windows enterprise penetration testing |