Skip to content

Commit

Permalink
Initial 5.0 testing (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnybod authored Feb 26, 2022
1 parent 1c5fa05 commit 51efb00
Show file tree
Hide file tree
Showing 94 changed files with 408 additions and 245 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- sponsors-master
- dev
- sponsors-dev
- 5.0-dev

jobs:
lint:
Expand All @@ -25,6 +26,8 @@ jobs:
python-version: [ '3.8', '3.9' ]
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup Python
uses: actions/setup-python@v2
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def parse_assembly_args(args):
return f'"{argument_string}"'

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -78,7 +78,7 @@ def parse_assembly_args(args):
if params["Arguments"] != "":
script_end += " -" + "Arguments" + " " + assembly_args

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/code_execution/invoke_bof.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -43,7 +43,7 @@ def generate(
if params["ArguementList"] != "":
script_end += f" -ArgumentList { params['ArguementList'] }"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate(
)

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -111,7 +111,7 @@ def generate(
script_end += "\r\n"
script_end += code_exec

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -66,7 +66,7 @@ def generate(
elif values and values != "":
script_end += " -" + str(option) + " " + str(values)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -77,7 +77,7 @@ def generate(

script_end += "; 'Shellcode injected.'"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -40,7 +40,7 @@ def generate(
sc = ",0".join(values.split("\\"))[1:]
script_end += " -" + str(option) + " @(" + sc + ")"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/collection/SharpChromium.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -56,7 +56,7 @@ def generate(
+ ' completed!"'
)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/collection/WireTap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -46,7 +46,7 @@ def generate(
script_end += " " + str(option) + " " + str(values)
script_end += '"'

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def generate(
script_end = ""

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name="collection/Get-SQLColumnSampleData.ps1",
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
)

if check_all:
aux_module_source = main_menu.modules.get_module_source(
aux_module_source = main_menu.modulesv2.get_module_source(
module_name="situational_awareness/network/Get-SQLInstanceDomain.ps1",
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -82,7 +82,7 @@ def generate(
+ ' completed!"'
)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/collection/minidump.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -48,7 +48,7 @@ def generate(
):
script_end += " -" + str(option) + " " + str(values)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def generate(
if persistent != "":
script += " persistent=yes"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end="",
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/collection/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -49,7 +49,7 @@ def generate(
else:
script_end += " -" + str(option) + " " + str(values)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -77,7 +77,7 @@ def generate(
else:
script_end += " -" + str(option) + " " + str(values)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -47,7 +47,7 @@ def generate(
outputf = params.get("OutputFunction", "Out-String")
script_end += f" | {outputf};"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -62,7 +62,7 @@ def generate(

script_end += " /ptt\"'"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -39,7 +39,7 @@ def generate(

script_end += "\"';"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -63,7 +63,7 @@ def generate(

script_end += "\"';"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/credentials/mimikatz/pth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -64,7 +64,7 @@ def generate(
';"`nUse credentials/token to steal the token of the created PID."'
)

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -72,7 +72,7 @@ def generate(

script_end += " /ptt\"'"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand All @@ -36,7 +36,7 @@ def generate(
else:
script_end += "Invoke-Mimikatz -Command '\"lsadump::trust /patch\"'"

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
4 changes: 2 additions & 2 deletions empire/server/modules/powershell/credentials/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate(
):

# read in the common module source code
script, err = main_menu.modules.get_module_source(
script, err = main_menu.modulesv2.get_module_source(
module_name=module.script_path,
obfuscate=obfuscate,
obfuscate_command=obfuscation_command,
Expand Down Expand Up @@ -77,7 +77,7 @@ def generate(
if params["RevToSelf"].lower() != "true":
script_end += ';"`nUse credentials/tokens with RevToSelf option to revert token privileges"'

script = main_menu.modules.finalize_module(
script = main_menu.modulesv2.finalize_module(
script=script,
script_end=script_end,
obfuscate=obfuscate,
Expand Down
Loading

0 comments on commit 51efb00

Please sign in to comment.