# Optix — Android Penetration Testing Platform

> **Single source of truth for what Optix is, who it is for, and where it is headed.**
> For implementation details, architecture, and contribution workflow, see **Developer.md**.

---

## What is Optix?

Optix is a free, open-source **Android penetration testing and security assessment platform**. It puts a broad toolkit of network reconnaissance, web/domain testing, OSINT, cloud-security, exploitation, and utility tools into a mobile app, driven by a conversational **AI assistant** ("BRAIN") and a **3D globe network visualization** ("NETWORK").

It is built for:

- **Professional pentesters / red teamers** who want recon in their pocket.
- **Bug bounty hunters** who need fast recon and OSINT on the move.
- **Security students & beginners** who benefit from the AI's plain-language explanations.
- **Hobbyists & researchers** who want an open, extensible toolkit.

### Core value proposition

- 🧰 **All-in-one toolkit** — network scanning, web testing, OSINT, cloud security, exploitation, and utilities in one app.
- 🤖 **AI-assisted workflow** — conversational interface that parses natural-language requests, runs the right tool, and suggests logical next steps.
- 🌍 **Visual intelligence** — interactive 3D globe showing discovered devices, subnets, and open-port indicators.
- 📱 **Mobile-first** — optimized for Android 8.0+ (API 26) with Termux integration for native Linux tools.
- 🔓 **Free & open-source** — no subscriptions, no ads, community-driven.

---

## ⚖️ Legal & Ethics (read first)

**This tool is for AUTHORIZED TESTING ONLY.**

You may ONLY use Optix on:

- ✅ Networks and systems you **own**
- ✅ Systems where you have **EXPLICIT WRITTEN PERMISSION**
- ✅ Controlled lab environments for **EDUCATION**

Unauthorized access to computer systems is illegal under laws including the US Computer Fraud and Abuse Act (CFAA), EU Directive 2013/40/EU, and the UK Computer Misuse Act 1990. The developers assume **no liability** for misuse. You are solely responsible for your actions.

---

## Features

### Network & Scanning

- **LAN Scan** — discover active devices on the local subnet, rendered as nodes on the globe.
- **Port Scanner** — TCP port scanning (1–9999) with service inference.
- **Network Scanner** — combined ping + port probe.
- **Nmap / Masscan** — advanced mapping via Termux (NSE scripts, version detection).
- **ARP Scan**, **Traceroute**, **rping3**, **Wi-Fi Scanner** — host discovery and path mapping.
- **NetBIOS / SMB Scanner** — Windows network enumeration (jcifs-ng).
- **SNMP Walker** — SNMP enumeration (snmp4j).
- **SSH Audit** — SSH configuration analysis.
- **Packet Sniffer** / **Network Topology** — traffic capture & path mapping (root for sniffer).

### DNS & Web Testing

- **DNS Recon** — record enumeration (dnsjava).
- **Subdomain Enum**, **Directory Fuzzer** (Gobuster-style), **HTTP Inspector**.
- **Security Headers**, **CORS Checker**, **JWT Analyzer**, **SSL/TLS** checks.
- **Nikto** + **SQLmap** (Termux), **Nuclei** template scanner, **XSS Scanner**, **SQLi Tester**.
- **Web tech detection** (WhatWeb / WPScan wrappers).

### OSINT & Intelligence

- **Shodan** (host + search), **theHarvester**, **Have I Been Pwned**, **Hunter.io**, **OpenCTI**, **Dehashed**, **EmailRep** — public-data reconnaissance (API keys required for some).

### Cloud Security

- **AWS Inspector** — EC2 / S3 / IAM / Security Group misconfiguration scanning (read-only).
- **GCP Asset Scanner** — Compute / Storage / IAM / VPC firewall analysis.
- **Azure AD Tool** — Azure AD users, VMs, storage accounts, NSG rules.

### Exploitation & Attack

- **Hydra** (Termux), **Brute Force**, **Metasploit** / **MsfVenom** (Termux), **ARP Spoofer**, **Evil Twin**, **Deauth**, **Packet Injector**, **Reverse Shell Generator**, **Payload Generator**, **BloodHound**, **CrackMapExec**, **LinPEAS**, **WinPEAS**.

### AI Assistant (BRAIN tab)

- **Conversational commands** — *"scan my network"*, *"port scan 192.168.1.1"*, *"dns google.com"*.
- **Tool chaining suggestions** — after a scan, the AI recommends the logical next tool based on open ports / findings.
- **Educational responses** — explains what each tool does and why.
- **Provider choice** — Offline (MockBrain, no key), OpenAI, Anthropic, Google Gemini, Groq, Mistral, OpenRouter.

### Visualization (NETWORK tab)

- Interactive 3D globe, subnet grouping, open-port badges, device-type inference, node detail panel, scan console, and tool workspace.

---

## Tool Inventory (current implementation)

The codebase ships **~40 tool classes** across the `com.optix.android.tools` package (legacy/archive stubs excluded). Tools fall into these categories (`ToolCategory` enum):

| Category | Status | Examples |
|----------|--------|----------|
| Network & Scanning | ✅ Implemented | LAN scan, port scan, Nmap, Masscan, ARP, traceroute, NetBIOS, SMB, SNMP, SSH audit, Wi-Fi scan |
| DNS & Web | ✅ Implemented | DNS recon, subdomain enum, HTTP inspector, directory fuzzer, security headers, CORS, JWT, Nikto, Nuclei, SQLi/XSS, SSL |
| Exploitation | ✅ Implemented | Hydra, brute force, Metasploit, ARP spoof, evil twin, deauth, reverse shell, payload gen |
| Privilege Escalation | ✅ Implemented | LinPEAS, WinPEAS |
| Lateral Movement | ✅ Implemented | BloodHound, CrackMapExec |
| OSINT | ✅ Implemented | Shodan, theHarvester, HIBP, Hunter.io, OpenCTI, Dehashed, EmailRep |
| Cloud Security | ✅ Implemented | AWS Inspector, GCP Asset Scanner, Azure AD Tool |
| Payloads & Utilities | ✅ Implemented | Encoder/decoder, hash generator/cracker, cipher, subnet calc, regex tester, password generator |
| AI Security & Red Team | ✅ Implemented (prompt-injection probe; more tools planned) | Prompt-injection tester, LLM security scanner |
| Container & Kubernetes | 📋 Planned | kube-hunter, kube-bench, Trivy |
| Threat Intelligence | ⚠️ Partial | OpenCTI integration exists; not fully wired |

> Earlier docs claimed "68+ tools". That number reflects aspirational roadmap scope, not the current repository. The shipped app is best described as **~40 tools across 11 categories**, with several categories fully implemented and two (AI red-team, container security) not yet started.

---

## Installation

### Prerequisites

- Android 8.0+ (API 26), 2 GB RAM minimum (4 GB recommended), ~500 MB storage.
- **Termux** (from F-Droid, *not* Play Store) for native Linux tools (nmap, masscan, hydra, etc.).
- Root access is **optional** — required only for advanced features (packet sniffer, ARP spoofing on some devices).
- Some cloud/OSINT tools need API keys or CLI tools (AWS/GCP/Azure CLIs).

### Build from source

```bash
# From project root (OptixV4/)
./gradlew clean assembleDebug
./gradlew installDebug        # requires a connected device / emulator
```

See **Developer.md** for environment setup (JDK 17, Android SDK 26–35).

### Termux tools (recommended)

```bash
pkg update && pkg upgrade
pkg install nmap masscan hydra gobuster nikto sqlmap
# Cloud CLIs:
pkg install awscli
pip install gcloud azure-cli
```

### First launch

1. Accept the one-time legal disclaimer (persisted via DataStore).
2. Grant network / storage / location permissions.
3. **BRAIN** tab → type `help` for the command cheat-sheet.
4. **NETWORK** tab → tap a node or run a LAN scan to populate the globe.

---

## Roadmap

Aligned with the project's original mission: *free, open-source, mobile-first pentesting with AI assistance and broad tool coverage.* Priorities drawn from the most recent planning work:

### Done

- ✅ MVVM + Hilt + Room architecture; 3D globe network map.
- ✅ Conversational AI (MockBrain) with natural-language tool dispatch & chaining.
- ✅ 6 LLM provider integrations (offline + cloud).
- ✅ Full network, web, OSINT, exploitation, LPE, and lateral-movement tooling.
- ✅ Cloud security trio (AWS + GCP + Azure).

### In progress / next

- 🔄 **Audit logging & ethical-use guardrails** — pre-execution confirmation + Room-backed audit trail (legal protection).
- 🔄 **Professional reporting** — JSON/CSV/PDF export of findings.
- 🔄 **Container & Kubernetes security** — kube-hunter, kube-bench, Trivy.
- 🔄 **AI red-teaming module** — prompt-injection & LLM security testing.
- 🔄 **Testing infrastructure** — unit / integration / UI tests (currently minimal coverage).
- 🔄 **LanMapScreen component extraction** — the NETWORK screen is a large single file.

### Longer term

- Advanced AI (function calling, local LLM / Ollama, suggestion engine).
- Workflow builder (drag-and-drop DAG).
- SIEM integrations, team collaboration, plugin system.
- Kotlin Multiplatform / iOS consideration.

---

## Distribution

- **GitHub Releases** (primary APK distribution).
- **F-Droid** (planned) — trusted by the security community.
- ❌ **Google Play Store** — policy prohibits "hacking tools"; will be rejected.

---

## Known Gaps (honest assessment)

- **No automated test suite** — coverage is near 0%; refactor risk is high (priority debt).
- **No export/reporting** — results can be saved to Room sessions but not exported as reports.
- **No audit logging** — legal/accountability gap; flagged as CRITICAL in planning.
- **Container security category** — not started.
- **LanMapScreen** is a large monolith (~1000+ LOC) that should be decomposed.
- **Theme system** uses a custom `T.` global alias rather than standard `MaterialTheme` tokens.
- **Build** — `assembleDebug` compiles cleanly as of 2026-07-17 (a crashed-daemon/KSP-cache issue
  plus several source errors were fixed; see Developer.md §12). No automated test suite yet.

---

## FAQ

**Is Optix free?** Yes — 100% free and open-source. Some tools need API keys (Shodan, OpenAI, etc.) that you supply yourself.

**Do I need root?** No. Root unlocks a few advanced features (packet capture, some MITM). Most tools work without it.

**Can I use this for bug bounties?** Yes, for recon and OSINT on in-scope targets with program permission.

**Why isn't it on the Play Store?** Google's policy prohibits hacking tools. Use GitHub Releases / F-Droid.

**Which AI providers are supported?** Offline (MockBrain, no key), OpenAI, Anthropic, Google Gemini, Groq, Mistral, OpenRouter. Keys are entered in Settings.

**How is Optix different from Kali Linux?** Kali is a full desktop distro (~600+ tools). Optix is a mobile app optimized for Android — portable, AI-assisted, with the globe visualization. They complement each other.

---

## License

Open-source. See `LICENSE` in the repository. © ori.on.

**Maintained by:** ori.on · **Documentation:** Developer.md (contributors) · **Issues:** project GitHub Issues.
