Air-Gapped Deployment
Overview
Enclave can be deployed in air-gapped environments with no internet connectivity. This guide covers the offline installation process.
Prerequisites
-
Download the offline bundle:
wget https://lattice.one/downloads/enclave-offline-bundle-1.0.tar.gz
-
Transfer the bundle to your air-gapped environment
-
Verify the checksum:
sha256sum enclave-offline-bundle-1.0.tar.gz
Installation Steps
-
Extract the bundle:
tar -xzf enclave-offline-bundle-1.0.tar.gz
-
Run the offline installer:
cd enclave-offline
./install.sh -
Configure network settings:
./configure-network.sh --internal
Updates
- Download update packages from the Enclave Portal
- Transfer to air-gapped environment
- Apply updates:
./update.sh --package update-1.1.tar.gz
```markdown:docs/docs/integration/api-reference.md
---
sidebar_position: 4
---
# API Reference
## Authentication
All API requests require an API key in the Authorization header:
```bash
Authorization: Bearer your-api-key-here
Generate API keys in the Enclave dashboard under Settings → API Keys.
Endpoints
Submit File for Analysis
POST /api/v1/analyze/file
Content-Type: multipart/form-data
Form Parameters:
- file: The file to analyze
- options: Analysis options (JSON)
Example:
curl -X POST \
-H "Authorization: Bearer your-api-key" \
-F "file=@malware.exe" \
-F 'options={"timeout": 300, "environment": "windows10"}' \
https://your-enclave/api/v1/analyze/file
Submit URL for Analysis
POST /api/v1/analyze/url
Content-Type: application/json
{
"url": "https://suspicious-site.com",
"options": {
"timeout": 180,
"capture_screenshots": true
}
}
Get Analysis Results
GET /api/v1/results/{analysis_id}
Response:
{
"id": "analysis_123",
"status": "completed",
"score": 85,
"verdict": "malicious",
"indicators": [...],
"network_activity": [...],
"screenshots": [...]
}
```markdown:docs/docs/configuration/yara-rules.md
---
sidebar_position: 5
---
# YARA Rules
## Overview
Enclave uses YARA rules to identify malicious patterns in files. This guide explains how to manage and create custom YARA rules.
## Default Rules
Enclave comes with a curated set of YARA rules for:
- Ransomware detection
- Credential stealers
- Banking trojans
- Backdoors
- Cryptominers
## Adding Custom Rules
Place your YARA rules in `/etc/enclave/yara/custom/`:
```yara
rule Suspicious_Behavior {
meta:
description = "Detects suspicious behavioral patterns"
author = "Your Name"
date = "2024-03-20"
strings:
$sus1 = "CreateRemoteThread"
$sus2 = "VirtualAllocEx"
$sus3 = "WriteProcessMemory"
condition:
uint16(0) == 0x5A4D and
2 of ($sus*)
}
Rule Organization
Organize rules by category:
/etc/enclave/yara/
├── custom/
│ ├── ransomware/
│ ├── trojans/
│ └── miners/
└── default/
Testing Rules
Test your rules against known samples:
enclave-cli test-rules /path/to/rule.yar /path/to/samples/
Performance Tips
- Use fast patterns when possible
- Avoid excessive wildcards
- Use file size conditions
- Limit string count