PoshC2 is written in Python3 and developed and tested on Debian-based Linux distributions. It is recommended to run PoshC2 on one of these distributions, such as Debian, Ubuntu or Kali Linux, to achieve the most stable results.
If you are using a host Anti-Virus it is recommended that you add an exclusion on the folder or location of the PoshC2 install and its project directory.
To install PoshC2, from a terminal run the following:
curl -sSL https://raw.githubusercontent.com/nettitude/PoshC2/master/Install.sh | bash
Alternatively, clone the PoshC2 repository at https://github.com/nettitude/PoshC2.git and run the Install.sh script.
The install script handles the installation of dependencies and the creation of a python3 virtual environment to ensure stability on a platform with many python pip installs. A number of helpful scripts are also installed to /usr/bin that allow the user to use PoshC2 and encapsulates the use of the virtual environment. It is recommended to use these scripts to interact with PoshC2.
You can have the install script install PoshC2 to a different loctation by passing that location as an argument to the script.
curl -sSL https://raw.githubusercontent.com/nettitude/PoshC2/master/Install.sh | bash -s /root/poshc2
If you have installed PoshC2 to a location other than /opt/PoshC2, you can control where the commands look for Posh by setting the $POSHC2_DIR environment variable.
Create Firewall Rules
If you are not just running locally, ensure you add a new firewall rule for either HTTP or HTTPS depending on what protocol and port you are using.