Skip to content

yashab-cyber/lucifer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lucifer - AI-Powered Cybersecurity Automation Assistant

Lucifer Logo

Python Version License: MIT Code Style: Black

An intelligent AI assistant that combines terminal output capture and computer vision to automate penetration testing and bug bounty hunting workflows.

Created by Yashab Alam

LinkedIn Instagram Email

Support this project ❀️


πŸ”₯ Features

Core Capabilities

  • πŸ–₯️ Terminal Output Capture: Real-time monitoring and analysis of terminal commands and output
  • πŸ‘οΈ Computer Vision: Screenshot capture, OCR text extraction, and GUI element detection
  • πŸ€– AI-Powered Analysis: Integration with Claude, GPT-4, or local Ollama models for intelligent insights
  • πŸ”„ Automated Workflows: Pre-built penetration testing workflows (recon, webapp, exploit, privesc)
  • πŸ“Š Report Generation: Automated HTML, Markdown, and JSON report creation
  • πŸŽ₯ Screen Recording: Record entire testing sessions for documentation
  • πŸ”’ Security Audit Logging: Track all commands and sensitive operations

AI Integration

  • Anthropic Claude: Claude 3.5 Sonnet with vision capabilities
  • OpenAI: GPT-4 Turbo with vision support
  • Ollama: Local/offline AI models for privacy-conscious operations

Automation Features

  • Intelligent command suggestions based on context
  • Pattern-based terminal monitoring
  • Automated reconnaissance workflows
  • Vulnerability exploitation assistance
  • Privilege escalation enumeration
  • Custom workflow creation via AI

πŸ“‹ Requirements

System Requirements

  • OS: Kali Linux, Parrot OS, BlackArch, or any Debian/Ubuntu-based security distribution
  • Python: 3.10 or higher
  • RAM: Minimum 4GB (8GB recommended)
  • Disk Space: 2GB for dependencies and logs

Security Tools (Optional)

The following tools enhance Lucifer's capabilities but are not required:

  • nmap - Network scanning
  • gobuster - Directory enumeration
  • nikto - Web server scanning
  • sqlmap - SQL injection testing
  • metasploit-framework - Exploitation framework
  • searchsploit - Exploit database
  • whatweb - Web technology identification

πŸš€ Installation

Quick Install (Kali Linux)

# Clone the repository
git clone https://github.com/yashab-cyber/lucifer.git
cd lucifer

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install Lucifer
pip install -e .

# Install system dependencies (Tesseract for OCR)
sudo apt-get update
sudo apt-get install tesseract-ocr tesseract-ocr-eng

# Copy and configure environment
cp .env.example .env
nano .env  # Add your AI API keys

Configuration

Edit .env file with your settings:

# Choose your AI provider
AI_PROVIDER=anthropic  # or openai, ollama

# Add API key for your provider
ANTHROPIC_API_KEY=your_anthropic_key_here
# or
OPENAI_API_KEY=your_openai_key_here

# Configure settings
LOG_LEVEL=INFO
AUTO_SUGGEST_COMMANDS=true
CONFIRMATION_REQUIRED=true

Verify Installation

lucifer config-check

πŸ’» Usage

Interactive Mode

Start Lucifer in interactive mode for full control:

lucifer start --interactive

Available Commands:

  • analyze - Analyze current terminal and screen state
  • suggest - Get AI-powered next step suggestions
  • execute <command> - Execute command with AI assistance
  • workflow <name> <target> - Run automated workflow
  • record / stop-record - Screen recording
  • report - Generate penetration testing report
  • help - Show all commands

Quick Scan

Perform rapid reconnaissance on a target:

lucifer quick-scan 192.168.1.100

Workflow Mode

Execute specific workflows:

# Reconnaissance workflow
lucifer start -t 192.168.1.100 -w recon

# Web application testing
lucifer start -t example.com -w webapp

# Exploitation workflow
lucifer start -t 192.168.1.100 -w exploit

# Privilege escalation
lucifer start -t localhost -w privesc

List Available Workflows

lucifer workflows

🎯 Workflow Examples

1. Bug Bounty Reconnaissance

# Start interactive mode
lucifer start -i

# In Lucifer shell:
lucifer> workflow recon target.com
lucifer> analyze
lucifer> suggest
lucifer> report

2. Web Application Testing

# Direct workflow execution
lucifer start -t https://target.com -w webapp

# The workflow will:
# - Enumerate directories with gobuster
# - Scan for vulnerabilities with nikto
# - Test for SQL injection with sqlmap
# - Generate comprehensive report

3. Network Penetration Testing

# Python API usage
from lucifer import LuciferAssistant
import asyncio

async def main():
    async with LuciferAssistant() as assistant:
        # Start monitoring
        await assistant.start_terminal_monitoring()
        
        # Run recon
        results = await assistant.run_automated_recon("192.168.1.0/24")
        
        # Get AI suggestions
        suggestions = await assistant.suggest_next_actions()
        
        # Generate report
        report = await assistant.generate_report()
        print(f"Report: {report}")

asyncio.run(main())

πŸ“š Documentation

Architecture

lucifer/
β”œβ”€β”€ src/lucifer/
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ assistant.py          # Main AI assistant
β”‚   β”‚   β”œβ”€β”€ terminal_capture.py   # Terminal monitoring
β”‚   β”‚   β”œβ”€β”€ vision.py             # Computer vision
β”‚   β”‚   β”œβ”€β”€ ai_engine.py          # AI integration
β”‚   β”‚   └── config.py             # Configuration
β”‚   β”œβ”€β”€ automation/
β”‚   β”‚   └── workflows.py          # Pentest workflows
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ logger.py             # Logging utilities
β”‚   β”‚   └── report_generator.py  # Report generation
β”‚   └── cli.py                    # Command-line interface
β”œβ”€β”€ tests/                        # Unit tests
β”œβ”€β”€ pyproject.toml               # Project configuration
└── README.md

Key Components

Terminal Capture

Captures and monitors terminal output in real-time:

from lucifer.core.terminal_capture import TerminalCapture

capture = TerminalCapture(buffer_size=10000)
capture.start_shell_capture("/bin/bash")
output = capture.get_recent_output(lines=50)

Computer Vision

Screenshot capture and analysis:

from lucifer.core.vision import ScreenCapture, OCREngine

# Capture screenshot
screen = ScreenCapture()
screenshot = screen.capture_screenshot()

# Extract text with OCR
ocr = OCREngine()
text = ocr.extract_text(screenshot)

AI Analysis

Analyze terminal output and screenshots:

from lucifer.core.ai_engine import create_ai_engine

engine = create_ai_engine()
analysis = await engine.analyze_terminal_output(output)
suggestions = await engine.suggest_next_steps(output)

πŸ”’ Security Considerations

Dangerous Command Filtering

Lucifer includes built-in protection against dangerous commands:

  • rm -rf - Recursive deletion
  • dd if= - Disk operations
  • mkfs - Filesystem formatting
  • Fork bombs and destructive operations

Configure in .env:

DANGEROUS_COMMANDS_FILTER=true
CONFIRMATION_REQUIRED=true

Audit Logging

All commands and security events are logged:

AUDIT_LOG_ENABLED=true
AUDIT_LOG_FILE=logs/audit.log

API Key Security

  • Never commit .env file to version control
  • Use environment variables in production
  • Rotate API keys regularly
  • Consider using Ollama for offline/sensitive operations

πŸ§ͺ Testing

Run the test suite:

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# With coverage
pytest --cov=src/lucifer --cov-report=html

# Type checking
mypy src/lucifer

# Code formatting
black src/lucifer
ruff check src/lucifer

🀝 Contributing

We welcome contributions! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/lucifer.git
cd lucifer

# Install in development mode
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

# Run tests before committing
pytest

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


⚠️ Disclaimer

IMPORTANT: Lucifer is designed for authorized security testing only.

  • Only use on systems you own or have explicit permission to test
  • Unauthorized access to computer systems is illegal
  • Users are responsible for compliance with applicable laws
  • The authors assume no liability for misuse of this tool

By using Lucifer, you agree to use it responsibly and ethically.


πŸ™ Acknowledgments

  • Anthropic - Claude AI
  • OpenAI - GPT-4
  • Ollama - Local AI models
  • Kali Linux and the cybersecurity community
  • All open-source contributors

πŸ“ž Support


πŸ—ΊοΈ Roadmap

  • Desktop GUI application
  • Multi-target parallel scanning
  • Integration with Burp Suite
  • Custom plugin system
  • Machine learning-based vulnerability detection
  • Automated exploit generation
  • Cloud deployment support
  • Team collaboration features

πŸ‘€ Author

Yashab Alam

Support this project ❀️


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Thanks to the cybersecurity community for inspiration
  • All open-source tool developers whose work makes this possible
  • AI model providers (Anthropic, OpenAI, Ollama) for powerful inference capabilities

Made with ❀️ by Yashab Alam

LinkedIn Instagram

Made with ❀️ for the cybersecurity community

⭐ Star us on GitHub if you find Lucifer useful!

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors