Skip to content

grisuno/BlackObsidianC2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
image

πŸ–€ BLACK OBSIDIAN C2

Modern, realtime, minimalist Command & Control server built in Go with PocketBase

⬛ BLACK OBSIDIAN - Control Panel for Red Team Operations
   β”œβ”€β”€ Realtime Implant Management
   β”œβ”€β”€ AES-256 Encryption
   β”œβ”€β”€ Multi-Platform Support
   └── Modern Web Dashboard

πŸ“‹ Description

Black Obsidian is a next-generation C2 (Command & Control) server designed for professional Red Team operations. Built with Go and PocketBase, it offers a modern and specialized alternative to complex C2 servers while maintaining agility, security, and customization ease.

Part of the LazyOwn ecosystem, Black Obsidian integrates seamlessly with implants such as:

Black Basalt Beacon (Windows)

Black Sand Beacon (Linux ELF)

Black Serpentine (Python)

Maleable Implant (Go Multi-Platform)

✨ Key Features

  • βœ… HTTPS/TLS Server with self-signed certificates

  • βœ… AES-256 Encryption for all communications

  • βœ… Realtime Management of connected implants

  • βœ… Modern Web Dashboard with dark hacker theme

  • βœ… Integrated Database (PocketBase SQLite)

  • βœ… Automatic CSV Logs per client

  • βœ… Pending Commands with execution status

  • βœ… Multi-Implant parallel support

  • βœ… Fully Functional REST API

  • βœ… Scalable and customizable architecture

πŸ› οΈ Requirements

Go 1.20+

  • OpenSSL (for certificate generation)

  • Linux/macOS/Windows with Go support

  • Port 4444 available (or customizable)

Go Dependencies

go get github.com/pocketbase/pocketbase

πŸ“¦ Installation

  1. Clone Repository
git clone https://github.com/grisuno/BlackObsidianC2.git
cd BlackObsidianC2
  1. Generate SSL Certificates
# Generate private key
openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:2048

# Generate self-signed certificate
openssl req -new -x509 -key key.pem -out cert.pem -days 365 \
  -subj "/C=CL/ST=Hack/L=World/O=C2/CN=127.0.0.1"

# Convert to PKCS#8 (required by Go)
openssl pkcs8 -topk8 -nocrypt -in key.pem -out key_go.pem
  1. Compile
go build -o c2-server
  1. Run
export TLS_CERT=./cert.pem
export TLS_KEY=./key_go.pem
export C2_AES_KEY=18547a9428b62fdf2ba11cebc786bccbca8a941748d3acf4aad100ac65d0477f

./c2-server serve --https=0.0.0.0:4444

πŸš€ Quick Start

Access Dashboard

https://127.0.0.1:4444/dashboard.html

Create Admin User

./c2-server superuser create [email protected] LazyOwn

Login Credentials Username: [email protected]

Password: LazyOwn

πŸ“‘ API Endpoints

Endpoint Method Description

  • /login POST Authenticate user
  • /get_connected_clients GET List active implants
  • /pleasesubscribe/v1/users/{client_id} GET Fetch pending commands
  • /pleasesubscribe/v1/users/{client_id} POST Submit command results
  • /issue_command POST Issue command to implant

πŸ” Security Features

Encryption All communications use AES-256-GCM encryption:

// Example encryption in handlers
encryptedData, err := AESEncrypt([]byte(sensitiveData))

TLS Configuration

TLS 1.2 - 1.3

Strong cipher suites only

Certificate pinning support

Authentication

Basic auth for initial login

Session tokens with expiration

Superuser role management

πŸ“Š Project Structure

black-obsidian/
β”œβ”€β”€ main.go              # Entry point
β”œβ”€β”€ handlers.go          # API handlers
β”œβ”€β”€ crypto.go            # AES encryption functions
β”œβ”€β”€ schemas.go           # Database schemas
β”œβ”€β”€ web/                 # Web dashboard
β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── img/
β”œβ”€β”€ pb_data/             # PocketBase database
β”œβ”€β”€ sessions/            # Client logs (CSV)
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
└── README.md

πŸ”§ Configuration

Environment Variables

TLS_CERT           # Path to SSL certificate
TLS_KEY            # Path to SSL private key
C2_AES_KEY         # AES encryption key (64 hex chars)
POCKETBASE_DIR     # Database location (default: ./pb_data)

Encryption Key Generation

# Generate random 256-bit AES key
openssl rand -hex 32
# Output: 18547a9428b62fdf2ba11cebc786bccbca8a941748d3acf4aad100ac65d0477f

πŸ“ Usage Examples

Issue Command

python3  app.py 

or manual

curl -k -X POST https://127.0.0.1:4444/issue_command \
  -d "client_id=linux_go&command=whoami" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Connected Clients

curl -k -X GET https://127.0.0.1:4444/get_connected_clients \
  -H "Authorization: Bearer YOUR_TOKEN"

πŸ“š Integration with LazyOwn Ecosystem

Black Obsidian is designed to work with LazyOwn implants:

# Example: Black Sand Beacon (Linux)
./black-sand-beacon \
  --c2=https://127.0.0.1:4444 \
  --client-id=linux_go \
  --aes-key=18547a9428b62fdf2ba11cebc786bccbca8a941748d3acf4aad100ac65d0477f

πŸ›‘οΈ OPSEC Recommendations

Use VPN/Proxy for C2 infrastructure

Rotate AES keys periodically

Enable firewall rules to restrict access

Use domain fronting for HTTPS traffic

Implement jitter in beacon callbacks

Monitor logs for anomalies

🀝 Contributing

Contributions welcome! Please:

Fork the repository

Create feature branch (git checkout -b feature/AmazingFeature)

Commit changes (git commit -m 'Add AmazingFeature')

Push branch (git push origin feature/AmazingFeature)

Open Pull Request

βš–οΈ Legal Disclaimer

Black Obsidian is designed for authorized penetration testing and red team operations only. Unauthorized access to computer systems is illegal. Ensure you have explicit written authorization before conducting any offensive security activities.

πŸ“œ License

This project is licensed under the GPLv3 - see LICENSE file for details.

πŸ‘¨β€πŸ’» Author

grisun0 - LazyOwn Red Team Operator & Security Researcher

GitHub: @grisuno

Twitter: @lazyown.redteam

Medium: @lazyown.redteam

πŸ”— Related Projects

πŸ“ž Support

For issues, questions, or suggestions:

Open an Issue

Start a Discussion

Built with ⬛ obsidian by LazyOwn Red Team operators, for the world Red Team operators.

β˜• Ko-fi: ko-fi.com/grisuno (Buy me coffee. I’ll use it to compile more BOFs that vanish mid-execution.)

πŸ—„οΈ Hashnode: https://lazyown.hashnode.dev/

Python Shell Script Flask License: GPL v3

ko-fi

About

Black Obsidian is a next-generation C2 (Command & Control) server designed for professional Red Team operations. Built with Go and PocketBase, it offers a modern and specialized alternative to complex C2 servers while maintaining agility, security, and customization ease.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors