-
-
Notifications
You must be signed in to change notification settings - Fork 1
Certificate Management
RAVEN supports Mutual TLS (mTLS) to authenticate agents against the C2 server using PKCS12 keystores. This page covers the full certificate lifecycle: CA → Server → Agent.
Standard TLS only verifies the server's identity to the client. Mutual TLS additionally requires every connecting agent to present a valid client certificate signed by your own Certificate Authority (CA), preventing unauthorized or rogue connections to your C2 listener.
Before anything else, initialize your local Certificate Authority and the server's own certificate:
java -jar target/raven.jar --init-certsThis generates the root CA and the server keystore used to terminate TLS connections.
Once the CA exists, you can issue client certificates for individual agents.
java -jar target/raven.jar \
-a myagent -ah 192.168.1.10 -ap 4444 -am| Flag | Meaning |
|---|---|
-a myagent |
Agent identifier/name |
-ah 192.168.1.10 |
Agent callback host |
-ap 4444 |
Agent callback port |
-am |
Generate the agent's mTLS certificate |
java -jar target/raven.jar \
-m -c 10 -u team -ah 192.168.1.10 -ap 4444 -am| Flag | Meaning |
|---|---|
-m |
Multi-agent generation mode |
-c 10 |
Number of agents/certificates to generate |
-u team |
Naming prefix/group for the generated batch |
-ah / -ap
|
Shared callback host/port for the batch |
-am |
Generate mTLS certs for each agent in the batch |
Start the server with mTLS enabled so it only accepts agents presenting a valid certificate:
java -jar target/raven.jar -TTo review which agent certificates already exist:
java -jar target/raven.jar -l ┌────────────┐
│ Root CA │ (--init-certs)
└─────┬──────┘
│ signs
┌─────┴──────┐
│ Server │ (--init-certs)
│ Certificate│
└─────┬──────┘
│ signs
┌─────┴──────┐
│ Agent │ (-a / -m ... -am)
│ Certificate│
└────────────┘
- Re-generate the CA for each new engagement; never reuse keystores across clients/projects.
- Store the CA private key offline or encrypted when not actively issuing certificates.
- Revoke/destroy agent certificates and keystores at the end of an engagement.