mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 08:30:20 +00:00
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):
- brain/ LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
dispatch, A51 channels, and the OSINT cluster
- knowledge/ LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
MITRE ATT&CK data
- reference/ defensive threat-reference (C3, shhbruh doc) + AdaYaml parser
License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.
Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.
https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
61 lines
1.9 KiB
Markdown
61 lines
1.9 KiB
Markdown
# API Reference: SQL Injection Detection Agent
|
|
|
|
## Dependencies
|
|
|
|
| Library | Version | Purpose |
|
|
|---------|---------|---------|
|
|
| requests | >=2.28 | HTTP client for injection payload delivery |
|
|
|
|
## CLI Usage
|
|
|
|
```bash
|
|
python scripts/agent.py \
|
|
--url "https://target.example.com/products" \
|
|
--param id --method GET \
|
|
--output sqli_report.json
|
|
```
|
|
|
|
## Functions
|
|
|
|
### `detect_error_based(url, param, method, headers) -> dict`
|
|
Injects `'` and matches response against SQL error patterns for MySQL, PostgreSQL, MSSQL, Oracle, SQLite.
|
|
|
|
### `detect_boolean_based(url, param, method, headers) -> dict`
|
|
Compares response lengths for `AND 1=1` (true) vs `AND 1=2` (false) against a baseline.
|
|
|
|
### `detect_time_based(url, param, method, headers, delay) -> dict`
|
|
Tests `SLEEP()`, `pg_sleep()`, and `WAITFOR DELAY` payloads. Measures response time against target delay.
|
|
|
|
### `detect_union_columns(url, param, method, headers, max_cols) -> dict`
|
|
Increments `ORDER BY N` until error to determine column count for UNION injection.
|
|
|
|
### `fingerprint_database(url, param, method, headers) -> dict`
|
|
Tries `@@version` and `version()` via UNION SELECT to identify the database engine.
|
|
|
|
### `run_assessment(url, param, method) -> dict`
|
|
Runs all detection techniques and compiles findings.
|
|
|
|
## SQL Error Signatures
|
|
|
|
| Database | Pattern |
|
|
|----------|---------|
|
|
| MySQL | `SQL syntax.*MySQL`, `Warning.*mysql_` |
|
|
| PostgreSQL | `ERROR:\s+syntax error`, `PSQLException` |
|
|
| MSSQL | `SQL Server.*Driver`, `SQLServerException` |
|
|
| Oracle | `ORA-\d{5}` |
|
|
| SQLite | `SQLite\.Exception` |
|
|
|
|
## Output Schema
|
|
|
|
```json
|
|
{
|
|
"target": "https://target.example.com/products",
|
|
"parameter": "id",
|
|
"injectable": true,
|
|
"error_based": {"injectable": true, "database": "mysql"},
|
|
"boolean_based": {"injectable": true},
|
|
"time_based": {"injectable": false},
|
|
"findings": ["CRITICAL: Error-based SQLi confirmed (DB: mysql)"]
|
|
}
|
|
```
|