A Mythic C2 Profile that enables command and control communication via Gitee issue comments and file operations.
This C2 profile leverages Gitee as a communication channel for agent and server interactions. It supports bidirectional communication through issue comments and repository file operations, providing a covert and reliable command & control infrastructure.
To install this C2 profile on your Mythic server, execute:
sudo ./mythic-cli install gitee https://github.com/MythicC2Profiles/gitee- Create a Gitee repository for C2 communications
- Set up two issues (one for server commands, one for agent responses)
- Configure webhook notifications to your Mythic server
- Generate a Gitee personal access token
- Deploy the profile and configure agents
- Issue-based Communication: Commands and responses flow through Gitee issues
- File-based Tasking: Large data transfers via repository files
- Webhook Integration: Automatic notifications on repository events
- Token Authentication: Secure API access using personal access tokens
- Bidirectional C2: Full command and control capabilities
- Athena
gitee/
├── README.md
├── LICENSE
├── config.json
├── C2_Profiles/gitee/
│ ├── main.py
│ ├── requirements.txt
│ ├── Dockerfile
│ └── gitee/
│ ├── c2_code/
│ │ ├── config.py
│ │ ├── config.json
│ │ ├── gitee_client.py
│ │ ├── mythic_client.py
│ │ └── server.py
│ └── c2_functions/
│ └── gitee.py
├── documentation-c2/gitee/
│ └── _index.md
└── agent_icons/
- Create a private Gitee repository
- Create Issue #1 for server commands
- Create Issue #2 for agent responses
- Note the repository owner and name
- Log in to Gitee
- Navigate to Settings → Security Settings → Personal Access Tokens
- Generate a token with repository read/write access
- Keep the token secure
- Go to repository Settings → Webhooks
- Set webhook URL to:
https://<mythic-server>:port/ - Select "Push" and "Issue Comment" events
- Set webhook secret
- Enable SSL verification
The C2 profile is implemented in Python:
- config.py: Configuration management
- gitee_client.py: Gitee API interactions
- mythic_client.py: Mythic server communication
- server.py: Webhook receiver
- gitee.py: C2 profile definition
- aiohttp
- quart
- mythic_container
- Use private repositories
- Rotate tokens regularly
- Enable webhook signature verification
- Use HTTPS for all communications
- Restrict token permissions
See LICENSE file.