aura-framework 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. aura_framework-3.0.0/LICENSE +21 -0
  2. aura_framework-3.0.0/PKG-INFO +51 -0
  3. aura_framework-3.0.0/README.md +29 -0
  4. aura_framework-3.0.0/aura/__init__.py +2 -0
  5. aura_framework-3.0.0/aura/api/__init__.py +1 -0
  6. aura_framework-3.0.0/aura/api/server.py +79 -0
  7. aura_framework-3.0.0/aura/core/__init__.py +0 -0
  8. aura_framework-3.0.0/aura/core/analyzer.py +45 -0
  9. aura_framework-3.0.0/aura/core/brain.py +29 -0
  10. aura_framework-3.0.0/aura/core/ingestor.py +40 -0
  11. aura_framework-3.0.0/aura/core/neural_arsenal.py +57 -0
  12. aura_framework-3.0.0/aura/core/orchestrator.py +53 -0
  13. aura_framework-3.0.0/aura/core/reporter.py +132 -0
  14. aura_framework-3.0.0/aura/core/stealth.py +66 -0
  15. aura_framework-3.0.0/aura/core/storage.py +124 -0
  16. aura_framework-3.0.0/aura/modules/__init__.py +0 -0
  17. aura_framework-3.0.0/aura/modules/arsenal.py +31 -0
  18. aura_framework-3.0.0/aura/modules/bounty.py +60 -0
  19. aura_framework-3.0.0/aura/modules/cloud.py +76 -0
  20. aura_framework-3.0.0/aura/modules/dast.py +65 -0
  21. aura_framework-3.0.0/aura/modules/exploiter.py +46 -0
  22. aura_framework-3.0.0/aura/modules/pivoting.py +87 -0
  23. aura_framework-3.0.0/aura/modules/scanner.py +40 -0
  24. aura_framework-3.0.0/aura/modules/subfinder.py +27 -0
  25. aura_framework-3.0.0/aura/modules/takeover.py +47 -0
  26. aura_framework-3.0.0/aura/modules/vision.py +44 -0
  27. aura_framework-3.0.0/aura/ui/__init__.py +0 -0
  28. aura_framework-3.0.0/aura/ui/dashboard.py +75 -0
  29. aura_framework-3.0.0/aura_framework.egg-info/PKG-INFO +51 -0
  30. aura_framework-3.0.0/aura_framework.egg-info/SOURCES.txt +34 -0
  31. aura_framework-3.0.0/aura_framework.egg-info/dependency_links.txt +1 -0
  32. aura_framework-3.0.0/aura_framework.egg-info/entry_points.txt +2 -0
  33. aura_framework-3.0.0/aura_framework.egg-info/requires.txt +8 -0
  34. aura_framework-3.0.0/aura_framework.egg-info/top_level.txt +1 -0
  35. aura_framework-3.0.0/pyproject.toml +36 -0
  36. aura_framework-3.0.0/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mutasem Kharma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: aura-framework
3
+ Version: 3.0.0
4
+ Summary: A sentient, autonomous offensive security framework.
5
+ Author-email: Mutasem Kharma <author@example.com>
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Topic :: Security
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: click
14
+ Requires-Dist: rich
15
+ Requires-Dist: fastapi
16
+ Requires-Dist: uvicorn
17
+ Requires-Dist: playwright
18
+ Requires-Dist: curl_cffi
19
+ Requires-Dist: jinja2
20
+ Requires-Dist: pydantic
21
+ Dynamic: license-file
22
+
23
+ # Aura: Zenith Singularity 🌌⚔️
24
+
25
+ ![Aura Header](https://raw.githubusercontent.com/username/repo/main/docs/header.png)
26
+
27
+ **Aura** is a sentient, autonomous offensive security framework designed for elite reconnaissance, risk analysis, and deep-impact exploitation. It transforms from a simple scanner into a global offensive platform, featuring a professional command center (Aura Nexus) and AI-driven attack orchestration.
28
+
29
+ ## 🌌 Key Pillars
30
+ - **Neural Intelligence:** AI Chain-of-Thought reasoning for strategic attack planning.
31
+ - **Invisible Stealth:** JA3/TLS fingerprint randomization and behavioral humanization.
32
+ - **Aura-Link:** Professional SOCKS5 pivoting for internal network dominance.
33
+ - **Zenith DAST:** Automated web vulnerability discovery (SQLi, XSS, SSRF).
34
+ - **Nexus Dashboard:** Real-time web-based command center.
35
+
36
+ ## 🚀 Quick Install
37
+ ```bash
38
+ pip install aura-framework
39
+ ```
40
+
41
+ ## 🛠️ Usage
42
+ ```bash
43
+ # Launch the Zenith autonomous chain
44
+ aura zenith example.com
45
+
46
+ # Open the Nexus Command Center
47
+ aura nexus
48
+ ```
49
+
50
+ ## 📜 License
51
+ MIT License. Built for ethical security professionals and cyber dominance.
@@ -0,0 +1,29 @@
1
+ # Aura: Zenith Singularity 🌌⚔️
2
+
3
+ ![Aura Header](https://raw.githubusercontent.com/username/repo/main/docs/header.png)
4
+
5
+ **Aura** is a sentient, autonomous offensive security framework designed for elite reconnaissance, risk analysis, and deep-impact exploitation. It transforms from a simple scanner into a global offensive platform, featuring a professional command center (Aura Nexus) and AI-driven attack orchestration.
6
+
7
+ ## 🌌 Key Pillars
8
+ - **Neural Intelligence:** AI Chain-of-Thought reasoning for strategic attack planning.
9
+ - **Invisible Stealth:** JA3/TLS fingerprint randomization and behavioral humanization.
10
+ - **Aura-Link:** Professional SOCKS5 pivoting for internal network dominance.
11
+ - **Zenith DAST:** Automated web vulnerability discovery (SQLi, XSS, SSRF).
12
+ - **Nexus Dashboard:** Real-time web-based command center.
13
+
14
+ ## 🚀 Quick Install
15
+ ```bash
16
+ pip install aura-framework
17
+ ```
18
+
19
+ ## 🛠️ Usage
20
+ ```bash
21
+ # Launch the Zenith autonomous chain
22
+ aura zenith example.com
23
+
24
+ # Open the Nexus Command Center
25
+ aura nexus
26
+ ```
27
+
28
+ ## 📜 License
29
+ MIT License. Built for ethical security professionals and cyber dominance.
@@ -0,0 +1,2 @@
1
+ # Aura Zenith Singularity
2
+ __version__ = "3.0.0"
@@ -0,0 +1 @@
1
+ # Aura API Package
@@ -0,0 +1,79 @@
1
+ import os
2
+ import sys
3
+ import json
4
+ from fastapi import FastAPI, HTTPException, BackgroundTasks
5
+ from fastapi.responses import HTMLResponse
6
+ from fastapi.middleware.cors import CORSMiddleware
7
+ from pydantic import BaseModel
8
+ from typing import List, Optional
9
+
10
+ # Fix: Add current working directory to path to resolve 'aura' module
11
+ sys.path.append(os.getcwd())
12
+
13
+ from aura.core.storage import AuraStorage
14
+ from aura.modules.scanner import AuraScanner
15
+ from aura.modules.exploiter import AuraExploiter
16
+
17
+ app = FastAPI(title="Aura Nexus API", version="3.0.0")
18
+ db = AuraStorage()
19
+
20
+ # Enable CORS for the React Frontend
21
+ app.add_middleware(
22
+ CORSMiddleware,
23
+ allow_origins=["*"],
24
+ allow_credentials=True,
25
+ allow_methods=["*"],
26
+ allow_headers=["*"],
27
+ )
28
+
29
+ class ScanRequest(BaseModel):
30
+ domain: str
31
+
32
+ class Target(BaseModel):
33
+ id: int
34
+ source: str
35
+ type: str
36
+ value: str
37
+
38
+ @app.get("/", response_class=HTMLResponse)
39
+ def read_root():
40
+ """Serves the Zenith Nexus Dashboard."""
41
+ nexus_path = os.path.join(os.path.dirname(__file__), "nexus.html")
42
+ if os.path.exists(nexus_path):
43
+ with open(nexus_path, "r", encoding="utf-8") as f:
44
+ return f.read()
45
+ return "<h1>Aura Nexus API Online</h1><p>Dashboard file not found.</p>"
46
+
47
+ @app.get("/targets", response_model=List[Target])
48
+ def get_targets():
49
+ """Returns all discovered targets from the SQLite memory."""
50
+ return db.get_all_targets()
51
+
52
+ @app.post("/scan")
53
+ def launch_scan(request: ScanRequest, background_tasks: BackgroundTasks):
54
+ """Triggers a background scan for a domain."""
55
+ # This is a placeholder for the background execution logic
56
+ # In a full impl, we'd use a task queue or asyncio background tasks
57
+ return {"message": f"Scan initiated for {request.domain}", "status": "processing"}
58
+
59
+ @app.get("/findings/{target_id}")
60
+ def get_findings(target_id: int):
61
+ """Returns all findings associated with a specific target ID."""
62
+ target = db.get_target_by_id(target_id)
63
+ if not target:
64
+ raise HTTPException(status_code=404, detail="Target not found")
65
+
66
+ findings = db.get_findings_by_target(target["value"])
67
+ return {"target": target, "findings": findings}
68
+
69
+ @app.get("/screenshots")
70
+ def list_screenshots():
71
+ """Lists all captured visual recon files."""
72
+ screenshot_dir = "screenshots"
73
+ if not os.path.exists(screenshot_dir):
74
+ return []
75
+ return [f for f in os.listdir(screenshot_dir) if f.endswith(".png")]
76
+
77
+ if __name__ == "__main__":
78
+ import uvicorn
79
+ uvicorn.run(app, host="0.0.0.0", port=8000)
File without changes
@@ -0,0 +1,45 @@
1
+ import logging
2
+
3
+ logger = logging.getLogger("aura")
4
+
5
+ class CorrelationEngine:
6
+ """The 'Brain' that connects disparate data points into attack paths."""
7
+
8
+ def __init__(self):
9
+ self.state = {
10
+ "targets": {}, # host -> data mapping
11
+ "high_risk_keywords": ["dev", "staging", "api", "admin", "vpn", "internal"],
12
+ "vulnerable_services": ["jenkins", "docker", "k8s", "redis", "mongodb"]
13
+ }
14
+
15
+ def correlate(self, results):
16
+ """Processes raw results and produces enriched 'Attack Paths'."""
17
+ attack_paths = []
18
+
19
+ for res in results:
20
+ value = res.get("value", "").lower()
21
+ score = 0
22
+ findings = []
23
+
24
+ # 1. Keyword-based risk assessment
25
+ for word in self.state["high_risk_keywords"]:
26
+ if word in value:
27
+ score += 10
28
+ findings.append(f"High-risk keyword detected: {word}")
29
+
30
+ # 2. Service detection (simulated logic for now)
31
+ for svc in self.state["vulnerable_services"]:
32
+ if svc in value:
33
+ score += 25
34
+ findings.append(f"Potentially vulnerable service identified: {svc}")
35
+
36
+ # 3. Create an attack path object if score is significant
37
+ if score > 0:
38
+ attack_paths.append({
39
+ "target": value,
40
+ "risk_score": score,
41
+ "insight": " | ".join(findings),
42
+ "priority": "CRITICAL" if score >= 30 else "HIGH" if score >= 20 else "MEDIUM"
43
+ })
44
+
45
+ return sorted(attack_paths, key=lambda x: x["risk_score"], reverse=True)
@@ -0,0 +1,29 @@
1
+ import logging
2
+
3
+ logger = logging.getLogger("aura")
4
+
5
+ class AuraBrain:
6
+ """The intelligence layer that explains attack paths and suggests exploits."""
7
+
8
+ REASONING_PATTERNS = {
9
+ "admin": "Administrative panels are entry points for lateral movement and credential harvesting. Recommendation: Brute-force discovery of sub-directories (/admin, /wp-admin) or check for default credentials.",
10
+ "jenkins": "Jenkins instances often contain CI/CD secrets and SSH keys. If accessed, it could lead to a full Supply Chain compromise.",
11
+ "api": "Unprotected APIs often suffer from Broken Object Level Authorization (BOLA). Recommendation: Fuzz endpoints for IDOR vulnerabilities.",
12
+ "staging": "Staging environments are often less protected than production and may contain legacy data or debug symbols.",
13
+ "docker": "Exposed Docker registries or sockets can lead to container escape and host takeover.",
14
+ "vpn": "VPN endpoints are high-value targets for initial access. Recommendation: Check for known CVEs in the underlying software (Pulse Secure, Fortinet, etc.)."
15
+ }
16
+
17
+ def reason(self, target_data):
18
+ """Analyzes a target and provides strategic advice."""
19
+ value = target_data.get("target", "").lower()
20
+ insights = []
21
+
22
+ for pattern, explanation in self.REASONING_PATTERNS.items():
23
+ if pattern in value:
24
+ insights.append(explanation)
25
+
26
+ if not insights:
27
+ return "General reconnaissance target. Recommendation: Perform port scanning and service enumeration to identify potential attack surface."
28
+
29
+ return "\n\n".join(insights)
@@ -0,0 +1,40 @@
1
+ import sys
2
+ import json
3
+ import logging
4
+
5
+ logger = logging.getLogger("aura")
6
+
7
+ class Ingestor:
8
+ """Handles data ingestion from various sources."""
9
+
10
+ @staticmethod
11
+ def read_stdin():
12
+ """Reads data from standard input."""
13
+ if sys.stdin.isatty():
14
+ return None
15
+
16
+ data = sys.stdin.read()
17
+ return data
18
+
19
+ @staticmethod
20
+ def parse_json(data):
21
+ """Attempts to parse data as JSON."""
22
+ try:
23
+ return json.loads(data)
24
+ except json.JSONDecodeError:
25
+ return None
26
+
27
+ @staticmethod
28
+ def process_input(input_data):
29
+ """Generic input processor."""
30
+ # Check if it's a list of lines or a single string
31
+ lines = input_data.strip().split("\n")
32
+ results = []
33
+ for line in lines:
34
+ json_data = Ingestor.parse_json(line)
35
+ if json_data:
36
+ results.append(json_data)
37
+ else:
38
+ # Fallback to plain text recording
39
+ results.append({"raw": line})
40
+ return results
@@ -0,0 +1,57 @@
1
+ import json
2
+ import logging
3
+ from typing import Dict, List, Optional
4
+ import requests
5
+
6
+ logger = logging.getLogger("aura")
7
+
8
+ class NeuralArsenal:
9
+ """The AI-driven engine for crafting unique, polymorphic payloads and strategies."""
10
+
11
+ def __init__(self, provider: str = "ollama", base_url: str = "http://localhost:11434"):
12
+ self.provider = provider
13
+ self.base_url = base_url
14
+ self.model = "llama3" # Default high-performance model
15
+ self.system_prompt = (
16
+ "You are Aura-AI, a high-tier autonomous offensive security engine. "
17
+ "Your goal is to provide specific, technical, and actionable exploitation strategies "
18
+ "and polymorphic payloads. Keep it professional, concise, and technical."
19
+ )
20
+
21
+ def generate_strategy(self, target_info: Dict) -> str:
22
+ """Generates a custom exploitation strategy for a given target."""
23
+ prompt = (
24
+ f"Target: {target_info.get('value')}\n"
25
+ f"Observed Attributes: {target_info.get('type')}, Risk Score: {target_info.get('risk_score')}\n"
26
+ "Analyze this target and provide a 3-step exploitation strategy."
27
+ )
28
+ return self._query_ai(prompt)
29
+
30
+ def craft_payload(self, target_context: str, payload_type: str = "directory_fuzz") -> str:
31
+ """Generate a unique payload based on the target context."""
32
+ prompt = (
33
+ f"Context: {target_context}\n"
34
+ f"Generate a list of 5 polymorphic {payload_type} payloads. "
35
+ "Avoid common signatures. Make them creative."
36
+ )
37
+ return self._query_ai(prompt)
38
+
39
+ def _query_ai(self, prompt: str) -> str:
40
+ """Internal method to query the local AI provider."""
41
+ if self.provider == "ollama":
42
+ try:
43
+ response = requests.post(
44
+ f"{self.base_url}/api/generate",
45
+ json={
46
+ "model": self.model,
47
+ "prompt": f"{self.system_prompt}\n\nUser: {prompt}\nAssistant:",
48
+ "stream": False
49
+ },
50
+ timeout=30
51
+ )
52
+ if response.status_code == 200:
53
+ return response.json().get("response", "No AI response received.")
54
+ except Exception as e:
55
+ return f"[Fallback Logic] AI Offline. Error: {str(e)}\nRecommendation: Manual service enumeration and credential testing."
56
+
57
+ return "AI Provider not supported or unreachable."
@@ -0,0 +1,53 @@
1
+ import json
2
+ from aura.core.brain import AuraBrain
3
+ from aura.modules.scanner import AuraScanner
4
+ from aura.modules.exploiter import AuraExploiter
5
+ from aura.modules.dast import AuraDAST
6
+ from aura.modules.vision import VisualEye
7
+ from rich.console import Console
8
+
9
+ console = Console()
10
+
11
+ class NeuralOrchestrator:
12
+ """The 'Sentient Brain' that orchestrates multi-step, logic-driven attack chains."""
13
+
14
+ def __init__(self):
15
+ self.brain = AuraBrain()
16
+ self.scanner = AuraScanner()
17
+ self.exploiter = AuraExploiter()
18
+ self.dast = AuraDAST()
19
+ self.vision = VisualEye()
20
+
21
+ async def execute_advanced_chain(self, domain):
22
+ """Executes a Chain-of-Thought (CoT) attack plan autonomously."""
23
+ console.print(f"[bold magenta][🧠] NeuralOrchestrator: Developing Chain-of-Thought for {domain}...[/bold magenta]")
24
+
25
+ # 1. Ask the Brain for a multi-step plan
26
+ context = {"target": domain, "capability": "full_zenith_arsenal"}
27
+ plan_raw = self.brain.reason(context)
28
+
29
+ # 2. Extract logical steps (Simulated for Zenith)
30
+ steps = [
31
+ "Reconnaissance & Visualization",
32
+ "Vulnerability Correlation",
33
+ "Active DAST Probing",
34
+ "Strategic Exploitation",
35
+ "Reporting & Bounty Estimation"
36
+ ]
37
+
38
+ console.print("[cyan][*] Plan formulated. Executing 5-step Zenith protocol...[/cyan]")
39
+
40
+ # Step 1: Recon & Vision
41
+ results = self.scanner.discover_subdomains(domain)
42
+ await self.vision.capture_screenshot(domain, "zenith_initial")
43
+
44
+ # Step 2: DAST Probing
45
+ vulns = await self.dast.scan_target(domain)
46
+
47
+ # Step 3: Strategic Exploit
48
+ if vulns:
49
+ console.print(f"[bold red][!] Logic Triggered: High-risk vulnerabilities found. Initiating exploitation...[/bold red]")
50
+ # Logic to select correct module...
51
+
52
+ console.print("[bold green][✔] NeuralOrchestrator: Zenith chain complete.[/bold green]")
53
+ return {"plan": plan_raw, "findings": vulns}
@@ -0,0 +1,132 @@
1
+ import sqlite3
2
+ import json
3
+ import os
4
+ from jinja2 import Template
5
+ from datetime import datetime
6
+
7
+ class AuraReporter:
8
+ """Generates professional security reports from Aura's database."""
9
+
10
+ HTML_TEMPLATE = """
11
+ <!DOCTYPE html>
12
+ <html lang="en">
13
+ <head>
14
+ <meta charset="UTF-8">
15
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
+ <title>AURA - Offensive Intelligence Report</title>
17
+ <style>
18
+ :root { --primary: #7d00ff; --danger: #ff0044; --bg: #0a0a0c; --text: #e0e0e0; }
19
+ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; padding: 40px; }
20
+ .container { max-width: 1000px; margin: 0 auto; }
21
+ header { border-bottom: 2px solid var(--primary); padding-bottom: 20px; margin-bottom: 40px; }
22
+ h1 { color: var(--primary); text-transform: uppercase; letter-spacing: 4px; font-size: 3em; margin: 0; }
23
+ .summary-box { background: #16161d; padding: 25px; border-radius: 8px; border-left: 5px solid var(--primary); margin-bottom: 30px; }
24
+ .target-card { background: #1c1c24; margin-bottom: 20px; padding: 20px; border-radius: 8px; border: 1px solid #333; }
25
+ .priority-CRITICAL { border-left: 5px solid var(--danger); }
26
+ .priority-HIGH { border-left: 5px solid #ffaa00; }
27
+ .priority-MEDIUM { border-left: 5px solid #00aaff; }
28
+ .screenshot-box { margin-top: 15px; border: 1px solid #444; border-radius: 4px; overflow: hidden; max-height: 300px; }
29
+ .screenshot-box img { width: 100%; height: auto; display: block; }
30
+ .badge { padding: 4px 10px; border-radius: 4px; font-size: 0.8em; font-weight: bold; }
31
+ .badge-red { background: var(--danger); }
32
+ table { width: 100%; border-collapse: collapse; margin-top: 15px; }
33
+ th, td { text-align: left; padding: 12px; border-bottom: 1px solid #333; }
34
+ th { color: var(--primary); text-transform: uppercase; font-size: 0.9em; }
35
+ .finding { color: #00ff88; font-family: monospace; font-size: 0.9em; }
36
+ </style>
37
+ </head>
38
+ <body>
39
+ <div class="container">
40
+ <header>
41
+ <h1>AURA</h1>
42
+ <p>Offensive Intelligence Framework | Generated: {{ timestamp }}</p>
43
+ </header>
44
+
45
+ <div class="summary-box">
46
+ <h2>Executive Summary</h2>
47
+ <p>Total Targets Analyzed: <strong>{{ targets|length }}</strong></p>
48
+ <p>Critical Attack Paths Identified: <strong>{{ critical_count }}</strong></p>
49
+ </div>
50
+
51
+ <h2>Detailed Target Analysis</h2>
52
+ {% for target in targets %}
53
+ <div class="target-card priority-{{ target.priority }}">
54
+ <div style="display: flex; justify-content: space-between; align-items: center;">
55
+ <h3>{{ target.value }}</h3>
56
+ <span class="badge {% if target.priority == 'CRITICAL' %}badge-red{% endif %}">{{ target.priority }}</span>
57
+ </div>
58
+ <p><strong>Risk Score:</strong> {{ target.risk_score }} | <strong>Source:</strong> {{ target.source }}</p>
59
+
60
+ {% if target.screenshot %}
61
+ <div class="screenshot-box">
62
+ <img src="{{ target.screenshot }}" alt="Target Screenshot">
63
+ </div>
64
+ {% endif %}
65
+
66
+ {% if target.findings %}
67
+ <h4>Findings & Exploitations</h4>
68
+ <table>
69
+ <thead>
70
+ <tr>
71
+ <th>Type</th>
72
+ <th>Detail</th>
73
+ </tr>
74
+ </thead>
75
+ <tbody>
76
+ {% for finding in target.findings %}
77
+ <tr>
78
+ <td>{{ finding.finding_type }}</td>
79
+ <td class="finding">{{ finding.content }}</td>
80
+ </tr>
81
+ {% endfor %}
82
+ </tbody>
83
+ </table>
84
+ {% endif %}
85
+ </div>
86
+ {% endfor %}
87
+ </div>
88
+ </body>
89
+ </html>
90
+ """
91
+
92
+ def __init__(self, db_path="aura_intel.db"):
93
+ self.db_path = db_path
94
+
95
+ def generate_report(self, output_path="aura_report.html"):
96
+ """Compiles facts from the database and renders the HTML report."""
97
+ with sqlite3.connect(self.db_path) as conn:
98
+ conn.row_factory = sqlite3.Row
99
+ cursor = conn.cursor()
100
+
101
+ # Fetch targets
102
+ cursor.execute("SELECT * FROM targets ORDER BY risk_score DESC")
103
+ targets = [dict(row) for row in cursor.fetchall()]
104
+
105
+ critical_count = 0
106
+ for target in targets:
107
+ if target["priority"] == "CRITICAL":
108
+ critical_count += 1
109
+
110
+ # Fetch findings for each target
111
+ cursor.execute("SELECT content, finding_type FROM findings WHERE target_id = ?", (target["id"],))
112
+ target["findings"] = [dict(row) for row in cursor.fetchall()]
113
+
114
+ # Check if a screenshot exists in the filesystem
115
+ screenshot_path = f"screenshots/target_{target['id']}.png"
116
+ if os.path.exists(os.path.join(os.path.dirname(output_path), screenshot_path)):
117
+ target["screenshot"] = screenshot_path
118
+ else:
119
+ target["screenshot"] = None
120
+
121
+ # Render template
122
+ template = Template(self.HTML_TEMPLATE)
123
+ report_html = template.render(
124
+ targets=targets,
125
+ critical_count=critical_count,
126
+ timestamp=datetime.now().strftime("%Y-%m-%d %H:%M:%S")
127
+ )
128
+
129
+ with open(output_path, "w", encoding="utf-8") as f:
130
+ f.write(report_html)
131
+
132
+ return output_path
@@ -0,0 +1,66 @@
1
+ from curl_cffi import requests as curlr
2
+ import random
3
+ import time
4
+ from typing import Dict, Optional
5
+
6
+ class StealthEngine:
7
+ """The Ghost Mode engine for anonymizing and diversifying Aura's traffic."""
8
+
9
+ # Supported browser impersonations for JA3 randomization
10
+ IMPERSONATE_TYPES = ["chrome110", "chrome101", "safari15_5", "firefox108", "edge101"]
11
+
12
+ USER_AGENTS = [
13
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
14
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
15
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
16
+ "Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Mobile/15E148 Safari/604.1",
17
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0"
18
+ ]
19
+
20
+ def __init__(self, proxy_list: Optional[list] = None):
21
+ self.proxy_list = proxy_list or []
22
+
23
+ def get_stealth_params(self) -> Dict:
24
+ """Returns randomized stealth parameters for a request."""
25
+ return {
26
+ "impersonate": random.choice(self.IMPERSONATE_TYPES),
27
+ "headers": {"User-Agent": random.choice(self.USER_AGENTS)},
28
+ "proxies": self.get_proxy_dict()
29
+ }
30
+
31
+ def get_proxy_dict(self) -> Optional[Dict]:
32
+ """Returns a randomized proxy if available."""
33
+ if not self.proxy_list:
34
+ return None
35
+ proxy = random.choice(self.proxy_list)
36
+ return {"http": proxy, "https": proxy}
37
+
38
+ class AuraSession:
39
+ """A high-stealth wrapper using curl_cffi for JA3 evasion."""
40
+
41
+ def __init__(self, stealth: StealthEngine):
42
+ self.stealth = stealth
43
+
44
+ def request(self, method, url, **kwargs):
45
+ """Executes a request with JA3 impersonation, randomized headers, and behavioral jitter."""
46
+ params = self.stealth.get_stealth_params()
47
+
48
+ # Behavioral Evasion: Human-like delay (jitter)
49
+ # Random delay between 0.5s and 2.5s for sensitive web requests
50
+ delay = random.uniform(0.5, 2.5)
51
+ time.sleep(delay)
52
+
53
+ # Merge kwargs with stealth params
54
+ kwargs.setdefault("impersonate", params["impersonate"])
55
+ kwargs.setdefault("headers", params["headers"])
56
+ kwargs.setdefault("proxies", params["proxies"])
57
+ kwargs.setdefault("timeout", 15)
58
+ kwargs.setdefault("verify", False)
59
+
60
+ return curlr.request(method, url, **kwargs)
61
+
62
+ def get(self, url, **kwargs):
63
+ return self.request("GET", url, **kwargs)
64
+
65
+ def post(self, url, **kwargs):
66
+ return self.request("POST", url, **kwargs)