├── README.md ├── client ├── callback.sh └── snare │ ├── nix │ ├── nix │ ├── nix_snare │ └── nix_snare.go │ ├── pf │ ├── pf │ └── pf_snare.go │ └── windows │ ├── win_cc.exe │ ├── win_snare.exe │ └── win_snare.go ├── commander ├── commander.py ├── groups │ ├── db.group │ ├── gitlab.group │ ├── group_generator.py │ ├── linuxA.group │ ├── linuxB.group │ ├── linuxC.group │ ├── team1.group │ ├── team10.group │ ├── team11.group │ ├── team12.group │ ├── team13.group │ ├── team14.group │ ├── team15.group │ ├── team2.group │ ├── team3.group │ ├── team4.group │ ├── team5.group │ ├── team6.group │ ├── team7.group │ ├── team8.group │ ├── team9.group │ └── web.group ├── mace.py └── requirements.txt └── server ├── Dockerfile ├── app.py └── requirements.txt /README.md: -------------------------------------------------------------------------------- 1 | # CrowdControl 2 | This project is a C2 that utilizes web requests to deliver commands. This repo contains the server/client/controller. The server is a docker container which runs a flask app, the controller is a python script which allows users to push commands to the server, and the client(s) are a series of golang programs and bash scripts that will invoke the proper web request to pull commands, then execute them. 3 | 4 | ## Server 5 | The server is a docker container that's running alpine linux with flask. All the server functions/endpoints can be found in the `app.py` file. 6 | 7 | #### Endpoints 8 | The server has the following endpoints: 9 | - `'//' or '/api/callback//'` - these are the endpoints the clients will hit in order to receive their commands. The former is preferred, as the latter will soon be phased out. The "\" is the ip of the client that's calling back, and the "\" denotes where the callback is coming from (bash script, golang binary, vimrc) which is used for logging purposes. 10 | - `'/api/commander/push'` - this is the endpoint that the commander script/CLI will send commands to. It accepts a JSON POST that contains the target hosts and commands to be executed. 11 | - `'/api/commander/calls'` - this is an endpoint that serves a log. It's returns the log that tracks all client callbacks. Any time a client hits one of the callback endpoints, an entry is made containing "Time | IP | Type", this endpoint returns all entires 12 | - `'/api/commander/tasks'` - this is the other endpoint that serves a log. Any time a command is pushed to the server, an entry is added to the task log containing "Time | Targets | Tasks", this endpoint returns all entires. 13 | 14 | ## Controller 15 | There are two methods to send commands to the server. The original method, `commander.py` is a CLI with the ability to view tracked hosts, set multiple targets, and set commands. This method is being phased out in favor of `mace.py`. The `mace` script is not a CLI, but rather all input is given through arguments, to allow for faster/easier control. The following are options when executing the mace script: 16 | ``` 17 | FUNCTION: ARGUMENTS TO PASS TO MACE.PY: 18 | New task: t: host[ hosts...]: commands 19 | New task script: ts: host[ hosts...]: \