This post is part of the ‘Empire Series’ with some background and an ongoing list of series posts [kept here]. Recently, an Empire user requested that we build a ‘standalone payload generator’, similar to msfvenom’s functionality. The motivation is to provide a scriptable capability that makes integration with other tools relatively easy. This short post will cover the newly integrated command line options for Empire which allow for the scripted generation of stagers. To display the currently available options, run ./empire -h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# ./empire -h usage: empire [-h] [--debug [DEBUG]] [-s [STAGER]] [-o [STAGER_OPTIONS [STAGER_OPTIONS ...]]] [-l [LISTENER]] [-v] optional arguments: -h, --help show this help message and exit --debug [DEBUG] Debug level for output (default of 1). -s [STAGER], --stager [STAGER] Specify a stager to generate. Lists all stagers if none is specified. -o [STAGER_OPTIONS [STAGER_OPTIONS ...]], --stager-options [STAGER_OPTIONS [STAGER_OPTIONS ...]] Supply options to set for a stager in OPTION=VALUE format. Lists options if nothing is specified. -l [LISTENER], --listener [LISTENER] Display listener options. Displays all listeners if nothing is specified. -v, --version Display current Empire version. |
In order to effectively use Empire’s CLI, you need to have a listener currently set up so the data is stored in…