From 390bd15f165b2af863cb1628a1f79e3b6ee26c07 Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 16:40:55 +0100 Subject: [PATCH 1/8] Update encryption.py Bugfix for newer Python versions that use pycryptodome --- core/encryption.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/encryption.py b/core/encryption.py index d3dbd5b..551dd9a 100644 --- a/core/encryption.py +++ b/core/encryption.py @@ -19,7 +19,7 @@ def encrypt_command(keyb64, ivb64, plain): decoded_key = base64.b64decode(keyb64) decoded_iv = base64.b64decode(ivb64) aesobj = AES.new(decoded_key, AES.MODE_CBC, decoded_iv) - data = pad(plain) + data = pad(plain.encode()) try: encd = aesobj.encrypt(data) return base64.b64encode(encd) From 2fb0797af05334384c5d33db6e25e98482eb7546 Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 16:49:17 +0100 Subject: [PATCH 2/8] Update encryption.py Bugfix for newest Python (pycryptodome) versions --- core/encryption.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/encryption.py b/core/encryption.py index 551dd9a..4aad372 100644 --- a/core/encryption.py +++ b/core/encryption.py @@ -19,7 +19,7 @@ def encrypt_command(keyb64, ivb64, plain): decoded_key = base64.b64decode(keyb64) decoded_iv = base64.b64decode(ivb64) aesobj = AES.new(decoded_key, AES.MODE_CBC, decoded_iv) - data = pad(plain.encode()) + data = pad(plain).encode() try: encd = aesobj.encrypt(data) return base64.b64encode(encd) From bd351bea76ad05c761f90a4bd37cdbfad848a6ae Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 16:55:37 +0100 Subject: [PATCH 3/8] Update requirements.txt pycryptodome works/required on more recent versions of Python3 --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index b099c86..0ef0a13 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ termcolor tabulate -pycrypto +pycryptodome flask -requests \ No newline at end of file +requests From 23788c7718ce8d10d0efe0bccec694181b0ab7d3 Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 17:02:09 +0100 Subject: [PATCH 4/8] Update README.md Updated for more recent systems --- README.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4ea89ed..af92041 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# Credits +**Forked from https://github.com/mhaskar/Octopus/** + # What is Octopus ? ![](https://img.shields.io/badge/python-3-yellow) Octopus is an open source, pre-operation C2 server based on python which can control an Octopus powershell agent through HTTP/S. @@ -29,6 +32,24 @@ * **Gather information automatically from the endpoint (endpoint situational awareness) feature.** # Requirements +This build was tested on +* Ubuntu 20.04 +* Ubuntu 24.04 + +For recent Debian based versions of Linux (Debian/Ubuntu/Kali): +``` +sudo apt install -y sudo screen vim git python3-pip python3-flask python3-requests python3-termcolor python3-tabulate nasm mingw-w64 mono-devel +python3 -m pip install pycryptodome --break-system-packages +git clone https://github.com/tijldeneut/Octopus/ && cd Octopus +./octopus.py +``` +_Note: the pip install command is required because apt install python3-pycryptodome does not support 'from Crypto import Random' for some reason_ + +Original release (https://github.com/mhaskar/Octopus) has been tested on the following operating systems: + +* Ubuntu (18.04) +* Ubuntu (16.04) +* Kali Linux (2019.2) You can install all of Octopus' requirements via : @@ -44,11 +65,6 @@ And you can install `mingw-w64` on Debian based distros using: `apt install mingw-w64` -Octopus has been tested on the following operating systems: - -* Ubuntu (18.04) -* Ubuntu (16.04) -* Kali Linux (2019.2) You will also need to install mono to make sure that you can compile the C# source without issues. From bee56e15428e27f8e4e4201f5c313a40d91e255f Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 17:24:31 +0100 Subject: [PATCH 5/8] Update README.md Tested on more systems --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af92041..6f937ea 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,13 @@ This build was tested on * Ubuntu 20.04 * Ubuntu 24.04 +* Kali Rolling (2025) +* Debian 11/12/13 For recent Debian based versions of Linux (Debian/Ubuntu/Kali): ``` -sudo apt install -y sudo screen vim git python3-pip python3-flask python3-requests python3-termcolor python3-tabulate nasm mingw-w64 mono-devel -python3 -m pip install pycryptodome --break-system-packages +apt install -y git python3-pip python3-flask python3-requests python3-termcolor python3-tabulate nasm mingw-w64 mono-devel +python3 -m pip install pycryptodome git clone https://github.com/tijldeneut/Octopus/ && cd Octopus ./octopus.py ``` From 8a666cde6596e188f3a8ec322dedfa07c6fbfce1 Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 17:27:49 +0100 Subject: [PATCH 6/8] Update functions.py Version bump --- core/functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/functions.py b/core/functions.py index 4746d7c..816737e 100644 --- a/core/functions.py +++ b/core/functions.py @@ -574,7 +574,7 @@ def banner(): \__\/ \__\/ \__\/ \__\/ \__\/ \__\/ {1} - {3}v1.2 stable !{1} + {3}v1.2.1 stable !{1} {2} Octopus C2 | Control your shells {1} From 3643c6d671dbbbb6d41429193d82efbf913b6058 Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 17:42:16 +0100 Subject: [PATCH 7/8] Update esa.py Added some AV's --- core/esa.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/esa.py b/core/esa.py index 2ad6bd2..7ea75b4 100644 --- a/core/esa.py +++ b/core/esa.py @@ -13,13 +13,13 @@ "Carbon Black EDR": ["cb"], "Avast": ["aswBcc", "bcc"], "Bitdefender": ["epag", "EPIntegrationService", "EPProtectedService", "EPSecurityService"], - "Cylance": ["CylanceSvc", "CylanceUi"], + "Cortex XDR": ["CylanceSvc", "CylanceUi", "cyserver"], "ESET": ["epfw", "epfwlwf", "epfwwfp"], "FireEye Endpoint Agent": ["xagt"], "F-Secure": ["fsdevcon", "FSORSPClient"], "MacAfee": ["enterceptagent", "McAfeeEngineService", "McAfeeFramework", "McCSPServiceHost", "MfeAVSvc"], "SentinelOne": ["SentinelAgent", "SentinelOne"], - "Sophos": ["sophosssp", "sophossps"], + "Sophos": ["sophosssp", "sophossps", "Sophos"], "TrendMicro": ["tmntsrv"], "Windows Defender": ["MsMpEng"], "ZoneALarm": ["zlclient"], From 45a825da5e93d2d3762cd64bb7b2c128c0dd483c Mon Sep 17 00:00:00 2001 From: Tijl Deneut Date: Mon, 19 Jan 2026 19:03:53 +0100 Subject: [PATCH 8/8] Simplify input prompt in octopus.py Replaced the colored prompt with a simpler input prompt to fix issues with Windows Terminal. --- octopus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/octopus.py b/octopus.py index 104074c..2efa5f2 100755 --- a/octopus.py +++ b/octopus.py @@ -40,7 +40,8 @@ def ctrlc(sig, frame): readline.parse_and_bind("tab: complete") readline.write_history_file(".oct_history") try: - command = input("\033[4mOctopus\033[0m"+colored(" >>", "green")) + #command = input("\033[4mOctopus\033[0m"+colored(" >>", "green")) + command = input('Octopus>> ') # readline.write_history_file(".console_history.oct") if command == "list": list_sessions()