root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat empire.md
// Offensive

Empire

27 Nov 2026 · 8 min read
Overview — An Offensive tooling room introducing Empire, the open-source post-exploitation and command-and-control (C2) framework maintained by BC Security, together with Starkiller, its graphical front end. You install Empire and Starkiller, tour the interface, create a listener, generate a stager, deliver it to a vulnerable Windows 7 lab host and then drive the resulting agent with modules and plugins.
PlatformTryHackMe
CategoryOffensive
DifficultyEasy
RoomEmpire

Attack map

Attacker (Empire server + Starkiller GUI)
   |
   | 1. Get initial access to the lab Windows host
   v
Shell on the target (MACHINE_IP)
   |
   | 2. Create an HTTP listener in Empire
   | 3. Generate a stager bound to that listener
   | 4. Transfer and run the stager on the target
   v
Empire agent checks in to the listener
   |
   | 5. Run modules (recon, credentials, privesc)
   | 6. Extend functionality with plugins
   v
Post-exploitation from one C2 console

Task 1 — Introduction

A command-and-control (C2) framework gives an operator a single console to manage every compromised host ("agent") in an engagement: deploy payloads, issue follow-up commands, and collect loot, all from one place. Commercial C2 tooling such as Cobalt Strike dominates red-team engagements, but it is expensive and licensed. Empire is the free, open-source alternative built by BC Security; it speaks PowerShell, Python and C# payloads, and its modules map to MITRE ATT&CK techniques. Starkiller is Empire's Electron-based GUI, so you do not have to drive everything from the Empire CLI.

Empire's lineage matters for defenders too: it descends from the original PowerShell Empire project, was picked up after that project's retirement, and remains a staple in detection-engineering labs precisely because its default indicators (process trees, staging URIs, in-memory PowerShell) are well documented and worth hunting for.

Task 2 — Deploy

The room reuses the lab Windows 7 machine from the separate "Blue" room as its target, so no new exploitation ground is covered here: that machine is already known to be missing the MS17-010 (EternalBlue) SMBv1 patch, and gaining a shell against it is out of scope for this writeup since it duplicates the Blue room's own content. What matters for Empire is simply that you end up with some form of command execution on the target, whichever way you got it (Metasploit, a manual shell, or any other delivery method); Empire picks up from that point onward.

Task 3 — Installation

Both Empire and Starkiller install from their official GitHub releases:

cd /opt
git clone https://github.com/BC-SECURITY/Empire/
cd /opt/Empire
./setup/install.sh

Starkiller ships as a standalone AppImage, so it only needs the executable bit:

cd /opt
chmod +x starkiller-<version>.AppImage

Starting both pieces means starting the Empire server first (it exposes a REST API) and then the GUI that talks to it:

cd /opt/Empire
./empire --rest
# in a second terminal
cd /opt
./starkiller-<version>.AppImage

Starkiller's login screen expects the default credentials created on first run:

FieldDefault value
URI127.0.0.1:1337
Userempireadmin
Passpassword123
Change these defaults on anything beyond a disposable lab VM; they are published in the project's own docs and are the first thing an attacker tries against an exposed Empire REST port.

Empire also ships an official Docker image, handy when you want an older release — some labs pin Empire v4.3.x because the Windows target only has PowerShell 2 available, and newer Empire payloads assume PowerShell 3+:

docker run -it -p 1337:1337 -p 12345:12345 -p 12346:12346 bcsecurity/empire:v4.3.3

The extra ports (12345/12346) are the default range Empire's HTTP listeners bind to; expose whichever ports your listeners will actually use. Matching an old Empire server needs a matching old Starkiller release, since the REST API shape changes between major versions.

Task 4 — Menu overview

Starkiller organises everything around six tabs that mirror Empire's internal object model:

  • Listeners — binds to an IP/port and waits for an agent to call back, the same job a Netcat listener or Metasploit's multi/handler does.
  • Stagers — generates the small piece of code (a payload, in effect) that a target runs to pull down and start the full agent.
  • Agents — the live sessions: every host currently checked in, and the console for sending it commands.
  • Modules — the catalogue of built-in tools and techniques (recon, credential access, lateral movement, persistence...) runnable against an agent.
  • Credentials — a running store of every credential a module or manual entry has captured.
  • Reporting — an audit trail of every command and module executed, useful for engagement write-ups and for understanding what you have already tried.

Task 5 — Listeners

A listener is the network side of the C2 channel. Empire ships many listener types, each trading off simplicity for stealth:

  • http — the baseline: a plain HTTP listener on a chosen port. This is what the room uses.
  • http_com, http_mapi — the same HTTP listener wrapped around a Windows COM object (Internet Explorer or Outlook's MAPI), so traffic blends in with normal application behaviour on the host rather than standing out as a bespoke client.
  • http_foreign, http_hop — redirector patterns: point agents at an intermediate server (a PHP hop point, or a separate Empire instance) so the real C2 server's address never appears directly in agent traffic.
  • meterpreter — accepts Metasploit-style stagers, letting Empire interoperate with an existing Meterpreter workflow.
  • onedrive, dbx — use a legitimate cloud storage API (OneDrive, Dropbox) as the channel, so traffic goes to a trusted domain instead of an attacker-owned one.
  • http_malleable — applies a malleable C2 profile, letting the operator shape request/response formatting to imitate a specific piece of legitimate software or a known threat actor's traffic.

Creating a listener needs at minimum a Host (the callback address agents should connect to) and a Port to bind. Secondary options tune its behaviour and evasion:

  • BindIP — the local interface the listener actually binds to (commonly 0.0.0.0), which can differ from the public-facing Host.
  • DefaultDelay / DefaultJitter — how often an agent checks in and by how much that interval is randomised, a direct trade-off between responsiveness and the regularity that makes beaconing traffic detectable.
  • DefaultLostLimit — how many missed check-ins before an agent is marked lost.
  • DefaultProfile — the User-Agent and URI set presented to blend with expected web traffic.
  • Headers — custom HTTP headers for the listener's responses.
  • Launcher — the command stub (for example a PowerShell one-liner) that stagers for this listener will be wrapped in.

For this room, an http listener bound to the operator's IP and a chosen port is enough to receive an agent.

Task 6 — Stagers

Where a listener is the server-side ear, a stager is the client-side mouth: a small piece of code the target runs that fetches and loads the full agent from the listener. Empire names stagers by platform and delivery method:

  • multi/launcher — a generic, cross-platform launcher; the default choice when you just need something that works.
  • windows/launcher_bat — a Windows batch-file wrapper around a PowerShell launcher, convenient for `cmd.exe`-only delivery paths.
  • multi/bash — a plain Bash stager for Linux/macOS targets.
  • windows/hta — an HTML Application file, often used to slip past controls that only inspect script or executable extensions.
  • windows/ducky, osx/teensy — code formatted for a USB Rubber Ducky or Teensy microcontroller, for physical drop attacks rather than remote delivery.
  • osx/applescript — a macOS-native stager written in AppleScript.

Generating a stager means picking its type, binding it to a listener you already created, and choosing a few delivery options: whether the payload is Base64-encoded, which scripting language it targets (PowerShell, Python, etc.), and whether SafeChecks (sandbox/AV-evasion sanity checks built into Empire's own stagers) are enabled.

A windows/launcher_bat stager wraps a Base64-encoded PowerShell command inside a tiny batch file: double-clicking (or running) it decodes and executes the PowerShell in memory, then deletes itself. That in-memory execution, with no payload ever written to disk as a separate file, is exactly the kind of behaviour EDR products hunt for via PowerShell script-block logging and AMSI.

Delivery itself is any file-transfer channel available on the engagement — a simple Python web server plus wget/curl on the target is the generic pattern the room demonstrates, but in a real engagement it is just as likely to be a phishing attachment, an existing shell's upload primitive, or a dropped USB.

Task 7 — Agents

Once a stager runs successfully, the target calls back to the listener and Empire registers a new agent: a persistent session you drive like a remote shell, except every command and module execution is logged as a task and its output is returned asynchronously when the agent next checks in.

Starkiller colour- and icon-codes agents so you can triage a large engagement at a glance:

  • Black — checking in normally.
  • Red — stopped responding (missed its check-in window).
  • Plain user icon — a standard, unprivileged user context.
  • User icon with a gear — a SYSTEM/service-account context, i.e. already elevated.

Because the agent executes modules on the target itself rather than the operator's own machine, antivirus and most on-host defences only ever see the target's own interpreter (PowerShell, Python) running known-good-looking code, which is precisely why C2 frameworks favour this "live off the land" execution model over dropping a traditional standalone binary.

Task 8 — Modules

Modules package a tool or a technique behind a single runnable name, instead of you having to hand-write or paste in the equivalent script. Well-known enumeration and credential-access tools ship as modules, including Seatbelt (host/security-posture enumeration), Mimikatz (Windows credential extraction) and WinPEAS (Windows privilege-escalation enumeration, ported in from the PEASS-ng suite).

Empire groups its catalogue two ways: by implementation language (PowerShell, Python, external, exfiltration) and by functional category, which lines up closely with ATT&CK tactics:

  • code execution, collection, credentials, exfiltration, exploitation, lateral movement, management, persistence, privesc, recon, situational awareness, trollsploit (the last being noisy, non-stealthy fun/nuisance modules, useful mainly for demos or authorised scare tests).

Each module in Starkiller is tagged with its MITRE ATT&CK technique ID, so the output of a run doubles as a ready-made entry for an engagement report mapped to the ATT&CK matrix. Because a task runs inside the agent's own process on the target, the operator's own machine never touches the target directly for the duration of that module — all execution and all resulting telemetry happen host-side.

Q: Which module lets you run arbitrary Mimikatz commands?
A: powershell/credentials/mimikatz/command

Q: Which MITRE ATT&CK technique is associated with powershell/trollsploit/voicetroll?
A: T1491 (Defacement)

Q: Which module installs a keylogger on the device?
A: powershell/collection/keylogger

Q: Which MITRE ATT&CK technique maps to that keylogger module?
A: T1056 (Input Capture)

Task 9 — Plugins

Plugins extend Empire beyond its built-in module set, letting the community (or an operator) add entirely new server-side capabilities rather than just new agent-side tasks. A plugin is a Python file dropped into Empire's plugins/ directory; since version 3.4.0 Empire auto-loads anything already present there on startup, and the plugin <name> command loads one on demand afterward.

plugin <plugin name>
start <plugin name>
stop <plugin name>

BC Security's own SOCKS proxy plugin is a representative example: once started, it spins up a SOCKS server routed through a chosen agent, turning that compromised host into a pivot point for reaching internal network segments the operator cannot otherwise route to — all without planting a separate standalone proxy tool on the target.

Task 10 — Conclusion

Empire can substitute for a plain reverse shell on almost any room once an initial foothold exists, and its module library saves the time of hand-typing enumeration and privilege-escalation scripts. From a defensive angle, the same features that make it convenient are its detection surface: distinctive default staging URIs and user agents (change them), PowerShell running encoded commands from cmd.exe (log and alert on script-block content), and regular beacon-like check-ins (jitter does not remove the pattern, only blurs it).

Key takeaways

  • Empire separates the network side (listeners) from the delivery side (stagers); an agent only exists once both have done their job.
  • Starkiller's six tabs map directly onto Empire's object model: Listeners, Stagers, Agents, Modules, Credentials, Reporting.
  • Modules execute inside the agent's process on the target, which is why C2 frameworks evade traditional on-host AV more often than dropped executables do.
  • Every module carries a MITRE ATT&CK technique ID, turning an engagement's command history into a ready-made ATT&CK mapping.
  • Plugins extend the server itself (e.g. a SOCKS pivot), which is a different extension point from modules, which extend what an agent can be told to do.
  • Defensively: change default credentials and staging profiles, watch for encoded PowerShell launched from batch/HTA wrappers, and hunt for beacon-like, low-jitter check-in patterns.