Files
litterbox/README.md
T

181 lines
6.4 KiB
Markdown
Raw Normal View History

2024-12-27 16:41:42 +02:00
# LitterBox
2024-12-29 14:21:05 +02:00
![single grumpy cat](https://github.com/user-attachments/assets/20030454-55b8-4473-b7b7-f65bb7150d51)
2024-12-29 10:45:36 +02:00
Your malware's favorite sandbox - where red teamers come to bury their payloads.
2024-12-29 10:47:49 +02:00
2024-12-29 10:46:34 +02:00
A sandbox environment designed specifically for malware development and payload testing.
2024-12-29 10:47:49 +02:00
2024-12-29 10:47:27 +02:00
This Web Application enables red teamers to validate evasion techniques, assess detection signatures, and test implant behavior before deployment in the field.
2024-12-29 10:47:49 +02:00
2024-12-29 10:46:34 +02:00
Think of it as your personal LitterBox for perfecting your tradecraft without leaving traces on production detection systems.
2024-12-29 10:47:49 +02:00
2024-12-29 10:47:27 +02:00
The platform provides automated analysis through an intuitive web interface, monitoring process behavior and generating comprehensive runtime analysis reports.
2024-12-27 23:52:38 +02:00
2024-12-29 10:47:49 +02:00
This ensures your payloads work as intended before execution in target environments.
2024-12-29 10:45:36 +02:00
2024-12-29 04:47:37 -08:00
## Features
2024-12-27 23:52:38 +02:00
2024-12-29 10:02:32 +02:00
### Initial Analysis
2024-12-29 04:47:37 -08:00
- File identification with multiple hashing algorithms (MD5, SHA256)
- Shannon entropy calculation for encryption detection
- Advanced file type detection and MIME analysis
2024-12-29 10:02:32 +02:00
- Original filename preservation
2024-12-29 04:47:37 -08:00
- Upload timestamp tracking
2024-12-27 23:52:38 +02:00
2024-12-29 10:45:36 +02:00
### PE File Analysis
2024-12-29 04:47:37 -08:00
For Windows executables (.exe, .dll, .sys):
- PE file type detection (PE32/PE32+)
- Machine architecture identification
- Compilation timestamp analysis
- Subsystem classification
- Entry point detection
- Section enumeration and analysis
- Import DLL dependency mapping
2024-12-27 23:52:38 +02:00
2024-12-29 10:45:36 +02:00
### Office Document Analysis
2024-12-29 04:47:37 -08:00
For Microsoft Office files (.docx, .xlsx, .doc, .xls, .xlsm, .docm):
- Macro detection and extraction
- VBA code analysis
- Hidden content identification
## Analysis Capabilities
### Static Analysis Engine
- Signature-based detection using industry-standard rulesets
- Binary entropy analysis
- String extraction and analysis
- Pattern matching for suspicious indicators
### Dynamic Analysis Engine
Available in two modes:
- File Analysis Mode
- Process ID (PID) Analysis Mode
Features include:
- Behavioral monitoring
- Memory region inspection
- Process hollowing detection
- Injection technique analysis
- Sleep pattern monitoring
2025-01-11 16:30:56 +02:00
- Collect Windows telemetry via ETW
2024-12-29 04:47:37 -08:00
- PE integrity verification
2024-12-29 10:02:32 +02:00
2024-12-29 10:45:36 +02:00
## Integrated Tools
2024-12-29 04:47:37 -08:00
### Static Analysis Suite
2024-12-29 04:01:52 -08:00
- [YARA](https://github.com/elastic/protections-artifacts/tree/main/yara) - Pattern matching and signature detection
- [CheckPlz](https://github.com/BlackSnufkin/CheckPlz) - AV detection testing
2024-12-29 10:45:36 +02:00
2024-12-29 04:47:37 -08:00
### Dynamic Analysis Suite
2024-12-29 04:01:52 -08:00
- [YARA](https://github.com/elastic/protections-artifacts/tree/main/yara) (memory scanning) - Runtime pattern detection
2025-01-11 06:17:59 -08:00
- [PE-Sieve](https://github.com/hasherezade/pe-sieve) - Detecting and dumping in-memory malware implants and advanced process injection techniques
- [Moneta](https://github.com/forrest-orr/moneta) - Usermode memory analysis tool to detect malware IOCs
- [Patriot](https://github.com/BlackSnufkin/patriot) - Detecting various kinds of in-memory stealth techniques
- [RedEdr](https://github.com/dobin/RedEdr) - Collect Windows telemetry via ETW providers
2024-12-29 04:01:52 -08:00
- [Hunt-Sleeping-Beacons](https://github.com/thefLink/Hunt-Sleeping-Beacons) - Beacon behavior analysis
2024-12-29 10:45:36 +02:00
2025-01-06 00:04:12 +02:00
## Web Endpoint Reference
2024-12-29 10:02:32 +02:00
2025-01-06 00:04:12 +02:00
#### File Management
2024-12-29 10:45:36 +02:00
```http
2025-01-06 00:04:12 +02:00
POST /upload # Upload files for analysis
GET /files # Get list of processed files
```
#### Analysis Operations
```http
GET /analyze/static/<hash> # Static file analysis
POST /analyze/dynamic/<hash> # Dynamic file analysis
POST /analyze/dynamic/<pid> # Process analysis
```
#### API Results (JSON)
```http
GET /api/results/<hash>/info # Get Json file info
GET /api/results/<hash>/static # Get Json results for file static analysis
GET /api/results/<hash>/dynamic # Get Json results for file dynamic analysis
GET /api/results/<pid>/dynamic # Get Json results for pid analysis
```
#### Web Results
```http
GET /results/<hash>/info # Get file info
GET /results/<hash>/static # Get results for file static analysis
GET /results/<hash>/dynamic # Get results for file dynamic analysis
GET /results/<pid>/dynamic # Get results for pid analysis
2024-12-29 10:45:36 +02:00
```
2025-01-06 00:04:53 +02:00
#### System Management
2024-12-29 10:45:36 +02:00
```http
2025-01-05 12:19:11 -08:00
GET /health # System health and tool status check
2024-12-29 10:45:36 +02:00
POST /cleanup # Clean analysis artifacts and uploads
POST /validate/<pid> # Validate process accessibility
2025-01-05 23:49:54 +02:00
DELETE /file/<hash> # Delete single analysis
2024-12-29 10:45:36 +02:00
```
2024-12-29 04:47:37 -08:00
## Installation
2024-12-29 10:20:15 +02:00
2024-12-29 04:47:37 -08:00
### Prerequisites
2024-12-29 05:01:54 -08:00
- Python 3.11 or higher
2024-12-29 04:47:37 -08:00
- Administrator privileges (required for certain features)
- Windows operating system (required for specific analyzers)
### Setup Steps
2024-12-29 04:01:52 -08:00
1. Clone the repository:
2024-12-29 04:47:37 -08:00
```bash
2024-12-29 05:33:08 -08:00
git clone https://github.com/BlackSnufkin/LitterBox.git
cd LitterBox
2024-12-29 04:47:37 -08:00
```
2024-12-29 04:01:52 -08:00
2024-12-29 04:47:37 -08:00
2. Install required dependencies:
```bash
pip install -r requirements.txt
```
2024-12-29 04:01:52 -08:00
2024-12-29 04:47:37 -08:00
### Running LitterBox
2024-12-29 04:01:52 -08:00
```bash
python litterbox.py
```
2024-12-29 04:47:37 -08:00
The web interface will be available at: `http://127.0.0.1:1337`
2024-12-29 04:01:52 -08:00
2024-12-29 10:20:15 +02:00
## Configuration
The `config.yml` file controls:
- Upload directory and allowed extensions
2024-12-29 04:01:52 -08:00
- Analysis tool paths and Command options
2024-12-29 10:20:15 +02:00
- YARA rule locations
- Analysis timeouts and limits
2024-12-29 05:01:54 -08:00
## SECURITY WARNINGS
- **DO NOT USE IN PRODUCTION**: This tool is designed for development and testing environments only. Running it in production could expose your systems to serious security risks.
- **ISOLATED ENVIRONMENT**: Only run LitterBox in an isolated, disposable virtual machine or dedicated testing environment.
- **NO WARRANTY**: This software is provided "as is" without any guarantees. Use at your own risk.
- **LEGAL DISCLAIMER**: Only use this tool for authorized testing purposes. Users are responsible for complying with all applicable laws and regulations.
## Acknowledgments
2024-12-29 05:04:00 -08:00
This project incorporates the following open-source components and acknowledges their authors:
2024-12-29 05:04:27 -08:00
- [Elastic](https://github.com/elastic/protections-artifacts/tree/main/yara)
2024-12-29 05:04:00 -08:00
- [hasherezade](https://github.com/hasherezade/pe-sieve)
- [Forrest Orr](https://github.com/forrest-orr/moneta)
- [rasta-mouse](https://github.com/rasta-mouse/ThreatCheck)
- [thefLink](https://github.com/thefLink/Hunt-Sleeping-Beacons)
2024-12-29 15:20:48 +02:00
- [joe-desimone](https://github.com/joe-desimone/patriot)
2025-01-11 07:13:38 -08:00
- [dobin](https://github.com/dobin/RedEdr)
2024-12-29 15:20:48 +02:00
## Screenshots
2025-01-02 11:58:17 +02:00
2025-01-11 16:22:55 +02:00
![upload](https://github.com/user-attachments/assets/26ab6f33-4746-41c7-82cd-ee490d57ad95)
2024-12-29 15:22:29 +02:00
2025-01-11 16:22:55 +02:00
![dynamic](https://github.com/user-attachments/assets/02202021-f7e0-47a2-a993-2655da36dfde)
2025-01-02 12:01:01 +02:00
2025-01-05 22:22:01 +02:00
![static](https://github.com/user-attachments/assets/9f10cff2-e0f8-4a33-9a8e-5e98667e4d4f)
![summary](https://github.com/user-attachments/assets/58dc3840-4bd9-4dc3-9778-d9640b372af6)
2024-12-29 15:22:29 +02:00
2025-01-05 13:37:33 +02:00
2025-01-05 13:08:02 +02:00