Threat Model¶
Understanding Orb's security design and threat analysis.
Overview¶
Orb is designed to securely share files between two parties through an untrusted relay server. This document analyzes the threat model and security guarantees.
Trust Assumptions¶
Trusted Components¶
Client Endpoints:
- User's local machines are not compromised
- Operating system is trusted
- Go runtime is memory-safe
- Crypto libraries are correct
Users:
- Users protect their passcodes
- Users authenticate each other out-of-band
- Users follow security best practices
Untrusted Components¶
Relay Server:
- Considered "honest-but-curious"
- May log metadata
- May be compromised
- Cannot break encryption
Network:
- Passive eavesdroppers present
- Active attackers may inject/modify
- No assumptions about network security
Threat Actors¶
1. Network Eavesdropper¶
Capabilities:
- Observe all network traffic
- Record encrypted sessions
- Passive monitoring only
Goals:
- Decrypt file contents
- Identify communicating parties
- Map file access patterns
Protections:
End-to-End Encryption:
Forward Secrecy:
Minimal Metadata:
Remaining Risks:
- Traffic analysis (connection timing, sizes)
- Correlation attacks over time
2. Man-in-the-Middle Attacker¶
Capabilities:
- Intercept network traffic
- Modify messages in transit
- Impersonate endpoints
- Block communication
Goals:
- Decrypt communications
- Inject malicious files
- Impersonate sharer or connector
Protections:
Mutual Authentication:
Noise Protocol handshake
Both parties prove knowledge of passcode
Cannot be impersonated without passcode
Authenticated Encryption:
Replay Protection:
Remaining Risks:
- If attacker obtains passcode (social engineering)
- Denial of service (blocking connections)
3. Malicious Relay Server¶
Capabilities:
- See all encrypted traffic
- Log session IDs
- Observe connection patterns
- Terminate connections
- Delay messages
Goals:
- Decrypt file contents
- Identify users
- Map social connections
- Disrupt service
Protections:
Blind Relay Design:
No Authentication at Relay:
Tamper Detection:
Remaining Risks:
- Metadata analysis (timing, size, patterns)
- Denial of service
- Traffic correlation attacks
- Logging session IDs for enumeration
4. Malicious Client¶
Capabilities:
- Send crafted file requests
- Attempt path traversal
- Symlink exploitation
- Resource exhaustion
- Protocol abuse
Goals:
- Read files outside shared directory
- Escalate privileges
- Crash sharer
- Consume resources
Protections:
Path Sanitization:
// internal/filesystem/secure_fs.go
func sanitizePath(base, requested string) (string, error) {
// Resolve to absolute path
absRequested := filepath.Join(base, filepath.Clean(requested))
// Ensure within base directory
if !strings.HasPrefix(absRequested, base) {
return "", errors.New("path traversal detected")
}
return absRequested, nil
}
Symlink Protection:
Resource Limits:
Read-Only Access:
Remaining Risks:
- Authorized files may contain malware
- Resource consumption within limits
- Timing side channels
5. Brute Force Attacker¶
Capabilities:
- Guess session IDs
- Try multiple passcodes
- Automate connection attempts
- Use GPU/ASIC for cracking
Goals:
- Guess correct passcode
- Enumerate valid sessions
- Access unauthorized files
Protections:
Argon2id Key Derivation:
Rate Limiting:
Strong Randomness:
Remaining Risks:
- Weak user-chosen passcodes (if supported in future)
- Distributed attacks across many sessions
- Offline cracking if ciphertext captured (mitigated by Argon2id)
Attack Scenarios¶
Scenario 1: Passive Surveillance¶
Attacker: Intelligence agency, ISP Goal: Identify who is sharing what with whom
Attack:
- Monitor all network traffic
- Record encrypted sessions
- Correlate connection patterns
- Perform traffic analysis
Orb Protection:
- Traffic encrypted end-to-end
- No plaintext metadata
- Connection timing visible
- Session IDs in WebSocket headers
Mitigation:
- Use TLS relay (wss://)
- Mix traffic with cover traffic
- Use Tor for anonymity (advanced)
Scenario 2: Malicious Relay Operator¶
Attacker: Untrusted relay server operator Goal: Decrypt shared files
Attack:
- Set up malicious relay
- Log all traffic
- Attempt to decrypt
- Break encryption
Orb Protection:
- End-to-end encryption
- Relay has no keys
- Perfect forward secrecy
- Cannot decrypt without passcode
Mitigation:
- Self-host relay
- Use trusted relay operators
- Regularly rotate sessions
Scenario 3: Compromised Endpoint¶
Attacker: Malware on client machine Goal: Steal files or passcodes
Attack:
- Keylogger captures passcode
- Screen capture reveals session ID
- Memory dump extracts keys
- Direct file access
Orb Protection:
- Cannot protect against endpoint compromise
- If machine is pwned, game over
Mitigation:
- Keep systems patched
- Use antivirus/EDR
- Encrypt disk
- Physical security
Scenario 4: Social Engineering¶
Attacker: Phisher or impersonator Goal: Trick user into sharing passcode
Attack:
- Impersonate legitimate user
- Request session credentials
- Use credentials to access files
Orb Protection:
- Technical controls work correctly
- Cannot prevent user from sharing passcode
Mitigation:
- Verify identity out-of-band
- Use encrypted channels
- Never share passcodes publicly
- Security awareness training
Scenario 5: Insider Threat¶
Attacker: Authorized user with malicious intent Goal: Exfiltrate sensitive files
Attack:
- User has legitimate access
- Shares sensitive directory
- Downloads to unauthorized device
- Leaks or sells data
Orb Protection:
- Cannot prevent authorized access abuse
- Can log and audit activity
Mitigation:
- Principle of least privilege
- Audit sharing logs
- Monitor for anomalies
- Data loss prevention tools
Security Boundaries¶
What Orb Protects¶
| Threat | Protection |
|---|---|
| Network eavesdropping | End-to-end encryption |
| Man-in-the-middle | Mutual authentication |
| Malicious relay | Zero-knowledge design |
| Path traversal | Sandboxing |
| Replay attacks | Nonce counters |
| Brute force | Argon2id + rate limiting |
| Data tampering | Authentication tags |
| Session hijacking | Cryptographic binding |
What Orb Does NOT Protect¶
| Threat | Reason |
|---|---|
| Endpoint compromise | Out of scope |
| Weak passcodes | User responsibility |
| Social engineering | User error |
| Malware in files | Content-agnostic |
| Quantum computers | Classical crypto only |
| Traffic analysis | Metadata leakage |
| Insider threats | Authorized access |
| Physical access | Out of scope |
Cryptographic Security¶
Security Levels¶
Key Sizes:
- Argon2id: 256-bit output
- X25519: 128-bit security
- ChaCha20: 256-bit keys
- Poly1305: 128-bit security
Overall Security Level: ~128 bits
Equivalent to:
- RSA 3072-bit
- AES-128
- Sufficient for SECRET classification (NSA Suite B)
Known Weaknesses¶
Not Quantum-Resistant:
- X25519 broken by Shor's algorithm
- ChaCha20 weakened by Grover's algorithm
- Post-quantum migration needed
Side-Channel Leakage:
- Timing attacks mitigated but not eliminated
- Cache timing possible on shared CPUs
- Power analysis on embedded devices
Implementation Bugs:
- Orb not formally verified
- Potential for subtle bugs
- Regular security audits recommended
Compliance Considerations¶
Data Protection Regulations¶
GDPR:
- Encryption in transit
- Minimal data collection
- Right to erasure (stop sharing)
- Data minimization
HIPAA:
- Technical safeguards
- Organizational policies required
- Business associate agreements needed
CCPA:
- Consumer privacy
- Data security
- No sale of data
Export Controls¶
Encryption Strength:
- ChaCha20: 256-bit keys
- May be subject to export controls
- Check local regulations
Risk Assessment¶
High Risk¶
Endpoint compromise → Complete system compromise Passcode phishing → Unauthorized access Physical device theft → Data exposure if disk not encrypted
Medium Risk¶
Traffic analysis → Metadata leakage Malicious relay → DoS, traffic analysis Weak passcodes → Brute force possible
Low Risk¶
Network eavesdropping → Encrypted MITM attacks → Authenticated Path traversal → Mitigated
Future Enhancements¶
Planned Improvements¶
-
Post-Quantum Crypto:
-
Add Kyber for key exchange
-
Hybrid classical + PQ
-
Anonymity:
-
Tor integration
- Mix networks
-
Traffic padding
-
Metadata Protection:
-
Onion routing
- Traffic obfuscation
-
Timing randomization
-
Hardware Security:
- TPM integration
- HSM support
- Secure enclaves
Conclusion¶
Orb provides strong security against network attackers and malicious relays through:
- End-to-end encryption
- Mutual authentication
- Zero-knowledge relay design
- Filesystem sandboxing
However, users must:
- Protect passcodes
- Verify peer identity
- Secure endpoints
- Follow best practices
Next Steps¶
- Read Cryptography Details
- Review Best Practices
- Check Security Overview