TrustedSec is proud to announce the release of the TrevorC2 HTTP(s) command and control (C2) open source framework. TrevorC2 is a client/server model for masking command and control through a normally browsable website. Detection becomes much harder as time intervals are different and does not use POST requests for data exfiltration.
The way that the server works is by tucking away a parameter inside the page source that contains our commands (can be customized). This is completely configurable, and it’s recommended you configure everything to be unique in order to evade detection.
Here is the workflow:
- trevor2_server.py – edit the file first, and customize, what website you want to clone, etc. The server will clone a website of your choosing and stand up a server. This server is browsable by anyone and looks like a legitimate website. Contained within the source is parameter that (again is configurable), which contains the instructions for the client. Once a client connects, it searches for that parameter, then uses it to execute commands.
- trevor2_client.py – all you need in any configurable option is the ability to call out to a website, parse some basic data, and then execute a command and then put the results in a base64 encoded query string parameter to the site. That’s it, not hard.
First edit the trevor2_server.py file and change the configuration options and site to clone.
Next, edit the trevor2_client.py file and change the configuration and system you want it to communicate back to.
When running the trevor2_server, it will clone whatever website you specify when editing the file and modifying the url parameter.
In this example we’ll clone https://www.trustedsec.com:
Next we’ll execute a command and wait for the random interval section (configurable) to communicate back with us and send us data:
You can download TrevorC2 from our GitHub site: TrevorC2 Github Download
- Add encryption (AES).
- Add randomized parameter names.
- Add a C# and PowerShell module.
- Add do_POST support for POST exfil on longer data.
- Add upload/download functionality.
- Add multi-threading for multiple shells
TrustedSec is a highly specialized information security company made up of some of the industry’s most respected individuals. We work with our business partners to increase their security posture, helping to reduce risk and impact in an ever-changing cyber landscape.