Framework de teste de penetração alimentado por IA que orquestra 20+ ferramentas de segurança via LLMs para reconhecimento automático, varredura de vulnerabilidades, exploração e relatórios.
# Clone the repository
git clone https://github.com/SHAdd0WTAka/zen-ai-pentest.git
cd zen-ai-pentest
# Install dependencies
pip install -r requirements.txt
# Copy and configure environment
cp .env.example .env
# Edit .env with your API keys and settings
nano .env
# One-command deployment with all security tools pre-installed
docker-compose up -d
# Verify containers are running
docker-compose ps
# View logs
docker-compose logs -f
# Load all k-* command aliases
source tools/setup_aliases.sh
# Verify installation
k-recon --help
k-exploit --help
| Command | Description |
|---|
k-recon "Target: example.com" | Executar reconhecimento guiado por IA em um alvo |
k-exploit "Target: 192.168.1.1" | Lançar agente de exploração contra alvo |
k-report | Gerar relatório de teste de penetração |
k-audit | Executar operações de auditoria de segurança |
source tools/setup_aliases.sh | Carregar todos os aliases de ferramentas CLI |
docker-compose up -d | Iniciar framework com Docker |
docker-compose logs -f | Seguir logs de container |
docker-compose down | Parar todos os containers |
| Agent | Purpose |
|---|
k-recon | Reconhecimento — coleta de informações, enumeração de subdomínio, varredura de porta |
k-exploit | Exploração — validação de vulnerabilidade, entrega de payload |
k-report | Relatório — compilar resultados em relatórios de teste de penetração estruturados |
k-audit | Auditoria — verificações de conformidade, revisão de configuração |
k-social | Engenharia social — simulação de phishing, avaliação de pretexting |
k-network | Análise de rede — inspeção de tráfego, análise de protocolo |
k-mobile | Segurança móvel — testes de aplicação Android/iOS |
k-redteam | Operações de red team — simulação de adversário, movimento lateral |
k-ics | ICS/SCADA — avaliação de segurança de sistema de controle industrial |
k-cloud | Segurança em nuvem — varredura de configuração incorreta AWS, Azure, GCP |
k-crypto | Análise criptográfica — avaliação de suite de cifra, verificações de certificado |
| Command | Description |
|---|
k-recon "Target: example.com" | Varredura de reconhecimento completo |
k-recon "Subdomain enumeration: example.com" | Enumerar subdomínios |
k-recon "Port scan: 192.168.1.0/24" | Varrer intervalo de rede para portas abertas |
k-recon "DNS enumeration: example.com" | Descoberta de registro DNS |
k-recon "Technology fingerprint: example.com" | Identificar tecnologias web |
k-recon "OSINT gather: target_org" | Coleta de inteligência de código aberto |
k-recon "SSL analysis: example.com" | Analisar configuração SSL/TLS |
| Command | Description |
|---|
k-exploit "Vuln scan: example.com" | Varredura de vulnerabilidade automatizada |
k-exploit "Web app test: https://example.com" | Teste de segurança de aplicação web |
k-exploit "SQL injection: https://example.com/login" | Teste de injeção SQL |
k-exploit "XSS scan: https://example.com" | Detecção de cross-site scripting |
k-exploit "API test: https://api.example.com" | Avaliação de segurança de API |
k-exploit "Auth bypass: https://example.com/admin" | Teste de bypass de autenticação |
| Tool | Category | Used By |
|---|
| Nmap | Network scanning | k-recon, k-network |
| SQLMap | SQL injection | k-exploit |
| Metasploit | Exploitation framework | k-exploit, k-redteam |
| Burp Suite | Web app testing | k-exploit |
| Gobuster | Directory brute-forcing | k-recon |
| Nuclei | Template-based scanning | k-exploit |
| BloodHound | Active Directory | k-redteam |
| Nikto | Web server scanning | k-recon |
| Hydra | Password cracking | k-exploit |
| John the Ripper | Hash cracking | k-exploit |
| Amass | Subdomain enumeration | k-recon |
| Subfinder | Subdomain discovery | k-recon |
| ffuf | Web fuzzer | k-exploit |
| Responder | Network poisoning | k-network |
| Impacket | Network protocols | k-network, k-redteam |
| Command | Description |
|---|
k-report | Gerar relatório completo de teste de penetração |
k-report --format json | Exportar resultados como JSON |
k-report --format junit | Exportar como XML JUnit (integração CI/CD) |
k-report --format sarif | Exportar como SARIF (integração GitHub/GitLab) |
k-report --compliance pci | Gerar relatório de conformidade PCI-DSS |
k-report --compliance hipaa | Gerar relatório de conformidade HIPAA |
k-report --compliance gdpr | Gerar relatório de conformidade GDPR |
# .github/workflows/pentest.yml
name: Security Scan
on: [push]
jobs:
pentest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: SHAdd0WTAka/zen-ai-pentest@v2
with:
target: ${{ secrets.SCAN_TARGET }}
mode: recon
output: sarif
# .gitlab-ci.yml
security_scan:
image: shadd0wtaka/zen-ai-pentest:latest
script:
- k-recon "Target: $SCAN_TARGET"
- k-report --format junit
artifacts:
reports:
junit: report.xml
| Variable | Description | Example |
|---|
OPENAI_API_KEY | OpenAI API key for LLM reasoning | sk-... |
ANTHROPIC_API_KEY | Anthropic API key (alternative LLM) | sk-ant-... |
SCAN_TARGET | Default target for scans | example.com |
REPORT_FORMAT | Default report format | json, sarif, junit |
MAX_THREADS | Maximum concurrent scan threads | 10 |
TIMEOUT | Scan timeout in seconds | 3600 |
PROXY | Proxy for scan traffic | http://127.0.0.1:8080 |
| Mode | Description |
|---|
| Interactive | Continuous engagement with AI-guided decisions |
| One-shot | Single execution with predefined parameters |
| Pipeline | CI/CD integration with exit codes and status reporting |
| Autonomous | Full AI-driven scan with minimal human interaction |
- Always obtain proper authorization before scanning any target
- Start with reconnaissance before exploitation
- Use the
--proxy flag to route traffic through Burp Suite for manual review
- Review AI decisions in interactive mode before allowing autonomous exploitation
- Generate compliance reports for regulatory requirements
- Use Docker deployment for consistent tool versions across team members
- Configure rate limiting to avoid overwhelming target systems
- Store scan results in version control for audit trails