Skip to content

Commit

Permalink
Merge pull request #48 from fkie-cad/dev
Browse files Browse the repository at this point in the history
Merge dev into main
  • Loading branch information
ru37z authored May 9, 2022
2 parents 7afa017 + 6eeb717 commit 9b8756f
Show file tree
Hide file tree
Showing 80 changed files with 203 additions and 95 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ansible==5.1.0
colorama==0.4.1
paramiko==2.7.2
paramiko==2.10.1
pytest==5.2.0
pyvmomi==6.7.1.2018.12
pywinrm==0.4.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_c2_exfiltration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_change_wallpaper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_download_malware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_download_malware_meterpreter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_email_exe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_execute_malware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_flashdrive_exe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_flashdrive_exfiltration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_hashdump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_kill_reverse_connection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_mimikatz.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_set_autostart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_sqlmap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/attack_take_screenshot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
19 changes: 13 additions & 6 deletions src/attacks/attackconsole.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down Expand Up @@ -140,11 +140,14 @@ def do_options(self, arg):
print(v)

def do_set(self, arg):
option, value = shlex.split(arg)[:2]
if option in self.attack_option_descriptions.keys():
self.attack.options.__setattr__(option, value)
if len(shlex.split(arg)) == 2:
option, value = shlex.split(arg)[:2]
if option in self.attack_option_descriptions.keys():
self.attack.options.__setattr__(option, value)
else:
print(f"*** Unknown option: {option}")
else:
print("*** Unknown option: {option}".format(option=option))
print("*** Invalid number of option arguments\n*** Usage: set <option> <value>")

def complete_set(self, text, line, begidx, endidx):
return [option + " " for option in self.attack_option_descriptions.keys() if
Expand Down Expand Up @@ -297,7 +300,11 @@ def main(argv=None):
args = parse_args(argv=argv)
setup_logging(level=logging.INFO, log_file=args.log_file, log_to_console=args.verbose)
console = AttackConsole()
console.cmdloop(intro=IntroGenerator().generate())
try:
console.cmdloop(intro=IntroGenerator().generate())
except KeyboardInterrupt:
print("\n*** Keyboard Interrupt, closing attackconsole.")
console.do_exit(argv)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/generateattackchains.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/printer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/reverseconnectionhandler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_c2_exfiltration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_download_malware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_email_exe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_execute_malware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_flashdrive_exe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_flashdrive_exfiltration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_hashdump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_kill_reverse_connection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_mimikatz.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_set_autostart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attack_sqlmap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_attackconsole.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_generateattackchains.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_printer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_reverseconnectionhandler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/attacks/tests/test_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/systests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/systests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
5 changes: 3 additions & 2 deletions src/systests/test_attacks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down Expand Up @@ -60,9 +60,10 @@ def timeout_counter():
@pytest.mark.usefixtures("session")
class TestAttack:
attacks = [
# Misc attacks: These attacks are all self-contained, their order does not matter.
# Dependent misc attacks: Attacks need to be executed in this order
DownloadMalwareAttack(),
ExecuteMalwareAttack(),
# Independent misc attacks: Attacks are self-contained, their order does not matter.
FlashdriveExfiltrationAttack(),
SetAutostartAttack(),
SQLMapAttack(),
Expand Down
2 changes: 1 addition & 1 deletion src/systests/test_client_management_ips.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
2 changes: 1 addition & 1 deletion src/systests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2021 Fraunhofer FKIE
# Copyright 2016-2022 Fraunhofer FKIE
#
# This file is part of SOCBED.
#
Expand Down
Loading

0 comments on commit 9b8756f

Please sign in to comment.