forked from BC-SECURITY/Empire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add support for --config param. Add documentation on config.yaml for client and server. Add docs for mysql * formatting * formatting
- Loading branch information
Showing
10 changed files
with
167 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ included author/reference link information in the source of each Empire module a | |
properly cite existing or prior work, please let us know at [email protected]. | ||
|
||
Empire is currently being developed and maintained by [@Cx01N](https://twitter.com/Cx01N_), | ||
[@Hubbl3](https://twitter.com/_Hubbl3), & [@Vinnybod](https://twitter.com/_vinnybod). While the main Empire project is | ||
[@Hubbl3](https://twitter.com/_Hubbl3), & [@Vinnybod](https://twitter.com/_vinnybod). While the original Empire project is | ||
no longer maintained, this fork is maintained by [@bcsecurity1](https://twitter.com/BCSecurity1). Please reach out to | ||
us on our [Discord](https://discord.gg/P8PZPyf) if you have any questions or want talk about offensive security. | ||
|
||
|
@@ -46,7 +46,7 @@ Thank you to the original team of developers: [@harmj0y](https://twitter.com/har | |
## Release Notes | ||
Please see our [Releases](https://github.com/BC-SECURITY/Empire/releases) or [Changelog](/changelog) page for detailed release notes. | ||
|
||
## Empire 4.0 Alpha Documentation | ||
## Empire 4.0 Documentation | ||
**Note**: Some things are subject to change before the GA release, and this documentation will (hopefully ;) ) be built | ||
out to the wiki before then. | ||
|
||
|
@@ -83,7 +83,7 @@ poetry run python empire.py server | |
./ps-empire server -h | ||
``` | ||
|
||
The old embedded client has been removed. To run the new command line client. | ||
The old embedded client has been removed. To run the new command line client: | ||
```sh | ||
poetry run python empire.py client | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,123 @@ | ||
_TODO_ | ||
## Configuration | ||
The Empire Client and Empire Server both have a config.yaml file to customize behavior. | ||
|
||
### Server | ||
The Server configuration is managed via [empire/server/config.yaml](../empire/server/config.yaml). | ||
- **suppress-self-cert-warning** - Suppress the http warnings when launching an Empire instance that uses a self-signed cert | ||
|
||
- **database** - Configure Empire's database. Empire defaults to SQLite and has the ability to run with MySQL. | ||
|
||
SQLite - The location of the SQLite db file is configurable. | ||
```yaml | ||
database: | ||
type: sqlite | ||
location: empire/server/data/empire.db | ||
``` | ||
MySQL (Beta) - The url, username, and password are all configurable. | ||
Everything in Empire should be working with MySQL with the exception of Python agents. | ||
There is additional work needed in order to support them. | ||
```yaml | ||
database: | ||
type: mysql | ||
url: localhost | ||
username: | ||
password: | ||
``` | ||
The defaults block defines the properties that are initially loaded into the database when it is first created. | ||
```yaml | ||
database: | ||
defaults: | ||
# staging key will first look at OS environment variables, then here. | ||
# If empty, will be prompted (like Empire <3.7). | ||
staging-key: RANDOM | ||
username: empireadmin | ||
password: password123 | ||
obfuscate: false | ||
# Note the escaped backslashes | ||
obfuscate-command: "Token\\All\\1" | ||
# an IP white list to ONLY accept clients from | ||
# format is "192.168.1.1,192.168.1.10-192.168.1.100,10.0.0.0/8" | ||
ip-whitelist: "" | ||
# an IP black list to reject accept clients from | ||
# format is "192.168.1.1,192.168.1.10-192.168.1.100,10.0.0.0/8" | ||
ip-blacklist: "" | ||
``` | ||
- **modules.retain-last-value** - This tells Empire to retain the last values set for a module. | ||
In Empire 4.0, the modules objects were converted to be stateless, so when a user executes a module, | ||
it doesn't impact the values seen or set by another user. Set this to `true` if you want to mimic the old | ||
behavior. | ||
|
||
### Client | ||
The Client configuration is managed via [empire/client/config.yaml](../empire/client/config.yaml). | ||
|
||
- **servers** - The servers block is meant to give the user the ability to set up frequently used Empire servers. | ||
If a server is listed in this block then when connecting to the server they need only type: `connect -c localhost`. | ||
This tells the client to use the connection info for the server named localhost from the yaml. In addition, if autoconnect is set to `true`, the client will automatically connect to that server when starting up. | ||
```yaml | ||
servers: | ||
localhost: | ||
host: https://localhost | ||
port: 1337 | ||
socketport: 5000 | ||
username: empireadmin | ||
password: password123 | ||
autoconnect: true | ||
``` | ||
- **suppress-self-cert-warning** - Suppress the http warnings when connecting to an Empire instance that uses a self-signed cert | ||
- **shortcuts** - Shortcuts defined here allow the user to define their own frequently used modules and assign a command to them. | ||
Let's look at 3 distinct examples. All of which can be found in the default [config.yaml](../empire/client/config.yaml) | ||
```yaml | ||
shortcuts: | ||
powershell: | ||
sherlock: | ||
module: powershell/privesc/sherlock | ||
``` | ||
This first example is the simplest example. It adds a `sherlock` command to the Interact menu for Powershell agents. It does not pass any specific parameters. | ||
|
||
```yaml | ||
shortcuts: | ||
powershell: | ||
keylog: | ||
module: powershell/collection/keylogger | ||
params: | ||
- name: Sleep | ||
value: 1 | ||
``` | ||
This next one is slightly more complex in that we are telling the shortcut to set the *Sleep* parameter to 1. | ||
Note that if there are any other parameters for this module that we don't define, it will use whatever the default value is. | ||
|
||
```yaml | ||
shortcuts: | ||
powershell: | ||
bypassuac: | ||
module: powershell/privesc/bypassuac_eventvwr | ||
params: | ||
- name: Listener | ||
dynamic: true | ||
``` | ||
This third one gets a bit more complex. Instead of providing a `value` to the parameter, it is marked as `dynamic`. | ||
This tells the CLI that it expects the user to send the parameters as part of their command. In other words the user needs to type `bypassuac http1` in order for this to execute. | ||
The parameters are passed in the order they are defined in config.yaml. There are some convenient autocompletes if the field is named `Listener` or `Agent`. | ||
|
||
```yaml | ||
shortcuts: | ||
powershell: | ||
whoami: | ||
shell: whoami | ||
``` | ||
The last one is much more simple. Instead of running a module, we run a shell command. | ||
|
||
- **resource-file** - A resource file is simply a text file with a list of commands to run in order. | ||
An example txt is shown below | ||
```yaml | ||
resource-file: commands.txt | ||
# commands.txt | ||
listeners | ||
uselistener http | ||
set Port 999 | ||
execute | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,12 +31,9 @@ On the PowerShell side, Empire implements the ability to run PowerShell agents w | |
|
||
Empire relies heavily on the work from several other projects for its underlying functionality. We have tried to call out a few of those people we've interacted with [heavily here](http://www.powershellempire.com/?page_id=2) and have included author/reference link information in the source of each Empire module as appropriate. If we have failed to properly cite existing or prior work, please let us know at [email protected]. | ||
|
||
Empire is currently being developed and maintained by [@Cx01N](https://twitter.com/Cx01N_), [@Hubbl3](https://twitter.com/_Hubbl3), & [@Vinnybod](https://twitter.com/AZHalcyon). While the main Empire project is no longer maintained, this fork is maintained by [@bcsecurity1](https://twitter.com/BCSecurity1). | ||
Empire is currently being developed and maintained by [@Cx01N](https://twitter.com/Cx01N_), [@Hubbl3](https://twitter.com/_Hubbl3), & [@Vinnybod](https://twitter.com/_Vinnybod). While the main Empire project is no longer maintained, this fork is maintained by [@bcsecurity1](https://twitter.com/BCSecurity1). | ||
Please reach out to us on our [Discord](https://discord.gg/P8PZPyf) if you have any questions or talk about offensive security. | ||
|
||
## Documentation | ||
Empire maintains a web site version of the documentation at [http://www.powershellempire.com](http://www.powershellempire.com). | ||
|
||
## Help us Improve! | ||
|
||
This documentation was organized and built by the PowerShell Empire development team. It is neither complete nor perfect, so any suggestions, corrections, or additions from the community would be greatly appreciated. Please submit any Wiki changes as [Empire Pull Requests](https://github.com/BC-SECURITY/Empire/pulls) using the [Wiki directory](./wiki). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters