Golang C2 Agent PoC utilizing web and social media paltforms to issue command and control and pasting results to PasteBin or other basic HTTP Endpoints.
- Set URL for issuing commands in the GetCmd handler function. (Example: a Github Gist link)
- Set URL for posting command output in the SendResponse handler function. (Example: A simple HTTP Server URL/IP that logs GET Request output)
- If using Pastebin instead of step 2, enter a valid API key to the SendtoPB handler function and turn on the flag in the SendResponse handler function.
- Issue a command using the following syntax:
- (cmd)some_command(cmd)
- To issue more complex commands please review the official golang documentation on exec and use the following syntax to satisfy those paramters:
- (cmd)ls(cmd)
- (arg)-la(arg)
- (val)/etc(val)
- The above example constructs the command string
ls -la /etc
- Follow the Basic Setup usage to configure your agent
- Build the Agent for deployment:
make agent-{os}
(Be sure you have Go installed and in your path! See Makefile for types of agents you can build) - Deploy to target