PowerShell Empire Today, and Macro Phishing After Microsoft’s Internet Macro Block

6 min read188 courses on OnlySecurity

PowerShell Empire is a well known command and control (C2) framework, but most guides to it date from 2015 to 2019 and describe an archived project. This article covers the current tool, why Office macro phishing changed, and the defences against both. Test only networks and systems you own or are authorised to assess.

What Empire was, and what it is now

PowerShell Empire premiered at BSidesLV in 2015 and later merged with the Python EmPyre project, adding a Python 2 agent for Linux and macOS to the PowerShell agent for Windows. Its README names its developers: @harmj0y, @sixdub, @enigma0x3, rvrsh3ll, @killswitch_gui and @xorrior. GitHub shows it archived on 29 January 2020, and its README says the project is no longer supported.

The living project is the BC Security fork, a post-exploitation and adversary emulation framework with a Python 3 server, at v7.1.0 at the time of writing. What differs from an old guide:

  1. Agents are PowerShell, Python 3, C#, IronPython 3 and Go.
  2. Starkiller, a web interface, is the client: Empire 6.0.0 removed the command line client (“Use Starkiller instead”). Starkiller lives in its own repository; Empire 7.1.0 pins v4.1.0, which the installer downloads and the server serves.
  3. Empire 7.1.0 needs Python 3.13 or 3.14 and is tested on Ubuntu 22.04 and 24.04, Debian 12 and 13, Kali and ParrotOS.
  4. Agents staged before 7.1 cannot complete staging against a 7.1 server, so re-stage everything after upgrading.

Listeners, stagers and agents

Three objects carry the design. A listener is the server-side endpoint that agents call back to: HTTP and HTTPS, malleable HTTP, SMB, HTTP hop, HTTP foreign or port forward. A stager produces the artefact that starts an agent, such as a one-liner, script, Office macro, binary or shellcode; by default it is a small first stage that reaches the listener, exchanges keys and downloads the rest, while a stageless build carries the whole agent. An agent is the running implant that takes tasks and returns output.

This article gives no payload recipes. The Command and Control Fundamentals for Red Teams course treats the same parts from the defender’s side.

Where Empire sits among open source C2 frameworks

Three other open source frameworks, as their repositories describe them:

  1. Sliver is a cross-platform adversary emulation framework whose implants use mutual TLS, WireGuard, HTTP(S) or DNS, each compiled with its own keys.
  2. Mythic is a collaborative framework built with Go, Docker and a browser interface.
  3. Havoc is a modern and malleable post-exploitation C2 framework with a Go teamserver, a Qt client and an agent called Demon. GitHub shows it archived since 20 February 2026.

For the network side of C2, see shell listeners and pivoting.

Why Office macro phishing changed

Spearphishing with an attachment, such as an Office document, is MITRE ATT&CK T1566.001, and a macro that starts PowerShell is the classic chain into T1059.001. Empire’s stager list includes Office macro types.

Microsoft’s announcement of 7 February 2022 said Office would block VBA macros in files from the internet by default; an update on 8 July 2022 rolled the change back temporarily, and one on 20 July 2022 resumed it in Current Channel. The block keys on Mark of the Web, a Zone.Identifier stream that Windows writes on NTFS, by default only for files from the Internet or Restricted sites zones. Microsoft’s Learn page dates it for Access, Excel, PowerPoint, Visio and Word from 12 April 2022 in Current Channel (Preview), 27 July 2022 in Current Channel and 11 October 2022 in Monthly Enterprise Channel; Publisher followed in February 2023 and Project in August 2024. Only Office on Windows is affected, and the dates are for Microsoft 365 Apps.

MITRE’s T1553.005, Mark-of-the-Web Bypass says adversaries abuse container files such as archives and disk images (.iso, .vhd) because files inside them may not inherit the marker once extracted or mounted. T1566.001 lists campaigns that sent archives containing LNK shortcut files and ISO attachments.

Install and start Empire in a lab

Checked against Empire v7.1.0 and its documentation. Run these on a Linux lab server you own, never on a shared or production host.

git clone https://github.com/BC-SECURITY/Empire.git
cd Empire
./setup/checkout-latest-tag.sh
./ps-empire install -y
./ps-empire server
  1. checkout-latest-tag.sh moves from main, which may not be stable, to the latest release tag.
  2. -y answers yes to every installer prompt. Kali packages Empire as powershell-empire, which may lag.
  3. The API and Starkiller share port 1337. The shipped config.yaml sets api.ip to 0.0.0.0 (every interface) and api.secure to false (plain HTTP), and the default account is published, so change the credentials and keep the port off untrusted networks.
  4. ./ps-empire update overwrites ~/.config/empire/config.yaml, so keep overrides in config.user.yaml. ./ps-empire server --reset, which the quickstart recommends after upgrades (the 7.1 upgrade guide needs none), deletes the database.

Detection and defence

Microsoft recommends enabling Block macros from running in Office files from the Internet for each application, under User Configuration\Policies\Administrative Templates in its Trust Center folder, for example Microsoft Word 2016\Word Options\Security\Trust Center; the policies need Microsoft 365 Apps for enterprise. The alternative is VBA Macro Notification Settings. Limit exceptions to centrally deployed trusted publisher certificates and few Trusted Locations. Against container delivery, MITRE suggests blocking container types at mail and web gateways and turning off auto-mounting of .iso, .img, .vhd and .vhdx files.

Attack Surface Reduction rules, which need Microsoft Defender Antivirus, by name and GUID from Microsoft’s reference:

  1. Block all Office applications from creating child processes, d4f940ab-401b-4efc-aadc-ad5f3c50688a, for Word, Excel, PowerPoint, OneNote and Access, enforced only for Office installed under %ProgramFiles% or %ProgramFiles(x86)%.
  2. Block Win32 API calls from Office macros, 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b, which depends on AMSI.
  3. Block executable content from email client and webmail, be9ba2d9-53ea-4cdc-84e5-9b1eeee46550, which covers executables, scripts and archives.
  4. Block execution of potentially obfuscated scripts, 5beb7efe-fd9a-4556-801d-275e5ffc04cc, which needs AMSI and cloud-delivered protection.
  5. Block process creations originating from PSExec and WMI commands, d1e49aac-8f56-4280-b9ba-993a6d77406c. Empire’s windows/macro launches through WScript.Shell but multi/macro through WMI Win32_Process, so cover both paths. Microsoft warns this rule clashes with Configuration Manager, whose client relies heavily on WMI, so test it in audit mode first.

Their advanced hunting action types, such as AsrOfficeChildProcessAudited, show in audit mode what would be blocked.

For Windows PowerShell 5.1, enable Turn on PowerShell Script Block Logging under Windows Components\Windows PowerShell; it logs script input to Microsoft-Windows-PowerShell/Operational as event ID 4104. PowerShell 7 has its own policy under PowerShell Core and logs to PowerShellCore/Operational once its event provider is registered with $PSHOME\RegisterManifest.ps1. AMSI lets your antimalware product inspect PowerShell and Office VBA content at run time. Rely on neither alone: by default Empire’s stagers apply mattifestation, a reflective AMSI disable credited to Matt Graeber, and etw, an ETW logging disable credited to Satoshi Tanda. MITRE’s DET0455 looks for PowerShell launched with encoded commands or unusual parent processes, then making network connections.

Application control is stronger (MITRE M1038). Under an AppLocker or App Control policy, PowerShell runs in ConstrainedLanguage mode, which blocks the .NET, COM and Win32 API access attack tools abuse, while scripts the policy allows run in FullLanguage. Microsoft says only App Control for Business in System Lockdown mode stops the mode being bypassed.

Where to go next

The Command and Control Fundamentals for Red Teams course covers C2 design, channel types, beaconing and jitter, and detection with Suricata, Snort, Zeek and Sigma, ending in a purple team tabletop. For the wider workflow from first scan to report, see Penetration Testing Field Notes.

This article replaces the KSEC ARK notes first published in 2019.

More from this author