nettitude / PoshC2

A proxy aware C2 framework used to aid red teamers with post-exploitation and lateral movement.
BSD 3-Clause "New" or "Revised" License
1.78k stars 323 forks source link

[BUG] Python 3.10 Compatibility #270

Open godylockz opened 2 years ago

godylockz commented 2 years ago

Description

Currently Kali Linux current release has made python 3.10.5 the latest version installed by default with the alias python3. Also the latest version is only 7.4.0 of PoshC2 in the kali repo. I wanted to update to Posh v8.0. When trying to manually install PoshC2, via the Install.sh script, there needed to be a couple of changes to make it work with python v3.9 when python v3.10 is installed. The real problem with v3.10 has to do with pipenv: https://github.com/pypa/pipenv/issues/5116 I wanted to report this anyway just in-case anyone else has run into the same issue, wanted to upgrade as well, and awareness of the pipenv causing issues with installation.

Lines 95:

apt-get install -y python3.8-dev python3-distutils python3-lib2to3 python3.7-dev python3.7 python3.9 python3.9-dev 2>/dev/null

Lines 114:

python3.9 -m pip install --upgrade pip > /dev/null
python3.9 -m pip install pandas pipenv > /dev/null
cd "$POSH_DIR"
python3.9 -m pipenv --python=/usr/bin/python3.9 --three install >/dev/null

Execution Environment:

Data Value
Full Posh version (all the text between the === at the top of the Implant Handler) PoshC2 v8.0 (edaa5e8 2022-07-20 08:55:44)
OS & version Linux kali 5.18.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.5-1kali6 (2022-07-07) x86_64 GNU/Linux
Using Docker/containerisation? No