This is a PoC web interface developed as part of some internal experiments during the development of CS 4.12 and the CS REST API. More information can be found here.
cs_web_client_demo.mp4
Note
This tool is still in early development stage and subject to breaking changes. It has been vibe-coded, so don't be too hard on the quality of the code 😉
-
Clone the repository:
git clone <repository-url> cd cobalt-strike-webclient
-
Create a virtual environment:
python -m venv venv venv\Scripts\activate # Windows # or source venv/bin/activate # Linux/Mac
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
copy .env.example .env # Edit .env with your configuration -
Generate a secret key:
python -c "import secrets; print(secrets.token_hex(32))"
Add this to your
.envfile asSECRET_KEY.
Create a .env file based on .env.example:
SECRET_KEY: Flask secret key (generate a strong random key)COBALT_STRIKE_BASE_URL: Base URL of your Cobalt Strike team serverSESSION_TIMEOUT: Session timeout in secondsLOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR)
Ensure your Cobalt Strike team server has the REST API enabled:
- Start the Team Server with REST API enabled
- Configure the appropriate ports and SSL certificates
- Verify the API documentation is accessible at
/v3/api-docs
-
Start the development server:
cd cobalt_web_client python \run.py
-
Access the application: Open your browser and go to
http://127.0.0.1:5000 -
Login:
- Enter your Cobalt Strike username and password
- Set the session duration (in milliseconds)
- Click "Login" to authenticate
-
Play around!:
- View listeners, beacons, and targets
- Run Commands on Beacons
-
Certificate errors:
- Ensure SSL certificates are properly configured
- For development, self-signed certificates are acceptable
-
Authentication failures:
- Verify Cobalt Strike credentials
- Check team server REST API configuration
- Ensure proper network connectivity
-
Session timeouts:
- Adjust session timeout settings
- Check JWT token expiration
Check application logs for detailed error information:
- Application logs:
logs/cobalt_web_client.log - Flask development logs: Console output
For issues and questions:
- Check the troubleshooting section above
- Review Cobalt Strike documentation for API requirements
Warning
This tool provides direct access to Cobalt Strike capabilities, which include powerful adversary simulation capabilities. Use responsibly and only in environments where you have explicit permission to perform security testing.