# PS Empire

## Install

Install for kali via apt using:

```bash
sudo apt install powershell-empire
```

<https://bc-security.gitbook.io/empire-wiki/quickstart/installation>&#x20;

## Starting the Server

Once installed, you must run the server before we can connect clients. The clients are used to connect to the server to interact and generate payloads. Must be run with sudo!

```bash
sudo powershell-empire server
```

## Connect to the server

Connect to the server using a client with the command below. This allows us to generate payloads. By default, this will try to connect to localhost.

```bash
powershell-empire client
```

## Creating a Listener

We must have a listener active before we can generate a stager.&#x20;

<https://bc-security.gitbook.io/empire-wiki/quickstart#listeners-101>&#x20;


---

# 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://notes.m4lwhere.org/offensive/ps-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.
