The Blue-sec API provides programmatic access to Bluetooth security testing capabilities for enterprise integration.
http://localhost:8000
API key authentication is required for all endpoints (except health check):
X-API-Key: your_api_key_here
GET /healthReturns the health status of the API.
Response:
{
"status": "healthy"
}POST /scanScan for Bluetooth devices.
Request Body:
{
"scan_type": "all", // "ble", "classic", or "all"
"duration": 30 // optional, in seconds
}Response:
{
"success": true,
"devices_found": 2,
"devices": [...]
}POST /vuln-scanPerform vulnerability assessment on a device.
Request Body:
{
"target": "AA:BB:CC:DD:EE:FF"
}Response:
{
"success": true,
"device": {...},
"vulnerabilities_found": 3,
"vulnerabilities": [...]
}POST /attackExecute attack simulation (requires confirmation in config).
Request Body:
{
"attack_type": "mitm",
"target": "AA:BB:CC:DD:EE:FF",
"target2": "11:22:33:44:55:66" // for MITM
}Response:
{
"success": true,
"result": {...}
}GET /cvesList all known Bluetooth CVEs.
Response:
{
"success": true,
"total_cves": 6,
"cves": {...}
}GET /cves/{cve_id}Get details for a specific CVE.
Response:
{
"success": true,
"cve": {...}
}# Start the API server
python -m modules.api
# Or with custom host/port
python -m modules.api --host 0.0.0.0 --port 8080All endpoints return standard HTTP status codes:
200- Success400- Bad request (invalid parameters)403- Forbidden (invalid API key)404- Not found500- Internal server error
Error response format:
{
"detail": "Error message"
}API requests are subject to rate limiting as configured in the security settings.
Events and alerts can be forwarded to SIEM systems. Configure in config/blue-sec.yaml:
enterprise:
siem_enabled: true
siem_url: http://siem.example.com
api_key: your_siem_key