Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/
coverage.xml
*.cover
.hypothesis/

# Virtual environments
venv/
env/
ENV/
env.bak/
venv.bak/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Project specific
data/
cache/
logs/
*.qcow2
*.iso

# Secrets
*.pem
*.key
.env
secrets/
209 changes: 209 additions & 0 deletions STEALTH_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# Kindfluence Stealth Infrastructure

Complete digital identity isolation system for the Kindfluence constellation. This layer ensures no social media platform can thread accounts together through metadata, IP fingerprinting, device fingerprinting, cookie tracking, behavioral analysis, or any other cross-referencing mechanism.

## Overview

Each account in the constellation operates as a **completely independent digital human** with:
- Its own sandboxed VM/container environment
- Its own AI agent operator
- Zero forensic overlap with any other account

## Architecture

### Core Components

1. **DigitalIdentity** (`digital_identity.py`)
- Complete digital identity profile with unique fingerprints
- Persona details, behavioral patterns, and writing style
- Isolation validation and hygiene reporting

2. **VMOrchestrator** (`vm_orchestrator.py`)
- Manages isolated VM instances (Docker, QEMU, cloud)
- Unique network configuration per identity
- Infrastructure rotation and health monitoring

3. **AgentOperator** (`agent_operator.py`)
- Autonomous AI agents operating within VMs
- Human-like behavior simulation
- Content generation and community engagement
- Phase-based messaging gradient

4. **HygieneMonitor** (`hygiene_monitor.py`)
- Continuous contamination detection
- IP overlap, timing correlation, content similarity checks
- Threat reporting and quarantine procedures

5. **IdentityFactory** (`identity_factory.py`)
- Generates complete, unique digital identities
- Guaranteed zero overlap across all identities
- Archetype-based persona generation

6. **StrategicCommand** (`command.py`)
- Periodic strategic oversight (NOT real-time)
- Randomized review scheduling
- Directive delivery and theme coordination

## Quick Start

### Installation

```bash
pip install -e .
```

### Create Digital Identities

```python
from kindfluence.stealth import IdentityFactory, VMOrchestrator

# Initialize factory
factory = IdentityFactory()

# Create identities for different archetypes
identities = factory.batch_create([
"meme_curator",
"life_coach",
"tech_enthusiast",
"fitness_guru",
"travel_blogger",
])

# Provision VMs for each identity
orchestrator = VMOrchestrator()
for identity in identities:
vm = orchestrator.provision_vm(identity, provider="docker")
print(f"Provisioned {vm.vm_id} for {identity.persona_name}")
```

### Deploy Agents

```python
from kindfluence.stealth import AgentOperator, StrategicCommand

# Initialize strategic command
command = StrategicCommand()

# Create and register agents
for identity in identities:
vm = orchestrator.vms[identity.assigned_vm_id]

agent = AgentOperator(
agent_id=f"agent-{identity.identity_id}",
identity_id=identity.identity_id,
vm_id=vm.vm_id,
personality_config=identity.persona_writing_style,
vocabulary_profile={},
response_latency={"min": 2, "max": 10},
engagement_style="active_commenter",
)

agent.initialize(identity, vm)
command.register_agent(agent)
```

### Monitor Hygiene

```python
from kindfluence.stealth import HygieneMonitor

monitor = HygieneMonitor()

# Run full audit
audit = monitor.run_full_audit(
identities=identities,
vms=list(orchestrator.vms.values())
)

print(f"Overall Health: {audit['overall_health']}")
print(f"Threats Found: {len(audit['threats'])}")

# Quarantine if needed
for threat in audit['threats']:
if threat['severity'] == 'critical':
monitor.quarantine_identity(
threat['identity_id'],
reason=threat['message']
)
```

## Infrastructure Templates

### Docker

Generate isolated container environments:

```python
compose_yml = orchestrator.generate_docker_compose(identity)
# Save to docker-compose.yml and run:
# docker-compose up -d
```

### QEMU

Generate QEMU VM configurations:

```python
vm_config = orchestrator.generate_vm_config(identity, provider="qemu")
# Use with virt-install or libvirt
```

### Cloud (AWS/GCP/DigitalOcean)

Generate Terraform configurations:

```python
tf_config = orchestrator.generate_vm_config(identity, provider="aws")
# Save to main.tf and run:
# terraform apply
```

## Security Documentation

Comprehensive guides in `docs/stealth/`:

- **opsec-manual.md** - The 10 Commandments of Identity Isolation, red lines, incident response
- **anti-fingerprinting-guide.md** - Browser/device fingerprinting vectors and defenses
- **agent-operator-handbook.md** - How to behave like a real human, avoid detection

## Testing

Run the full test suite:

```bash
pytest tests/ -v
```

Run specific test modules:

```bash
pytest tests/test_stealth/test_digital_identity.py -v
pytest tests/test_stealth/test_vm_orchestrator.py -v
pytest tests/test_stealth/test_hygiene_monitor.py -v
```

## Key Design Principles

1. **Zero Forensic Linkability** - No platform can connect accounts
2. **Autonomous Agents, Periodic Strategy** - 99% independent operation
3. **Human Noise as Feature** - Imperfection prevents detection
4. **Defense in Depth** - Multiple isolation layers
5. **Contamination Detection** - Continuous monitoring
6. **Infrastructure Diversity** - Mix of Docker, QEMU, cloud

## The 10 Commandments

1. Thou Shalt Not Share Infrastructure
2. Thou Shalt Not Correlate Timing
3. Thou Shalt Not Reuse Fingerprints
4. Thou Shalt Not Cross-Contaminate Content
5. Thou Shalt Not Create Real-Time Connections
6. Thou Shalt Monitor Continuously
7. Thou Shalt Rotate Defensively
8. Thou Shalt Embrace Human Imperfection
9. Thou Shalt Defend in Depth
10. Thou Shalt Plan for Compromise

## License

MIT License - See LICENSE file for details
Loading