A Python-based automation tool for bulk uploading files to ReversingLabs Spectra Analyze platform. Streamlines the process of submitting multiple malware samples for cloud analysis with proper rate limiting and comprehensive error handling.
What is the ReversingLabs Bulk Upload Tool?
This tool provides an automated solution for bulk uploading files to the ReversingLabs Spectra Analyze platform for malware analysis. It eliminates the need for manual file-by-file uploads through the web interface, making it ideal for security researchers and analysts who need to process large numbers of samples efficiently.
Why did I develop this tool?
During malware analysis workflows, I often encountered situations where I needed to upload dozens or hundreds of samples to ReversingLabs for analysis. The manual upload process through the web interface was time-consuming and inefficient. This tool automates the entire process while respecting API rate limits and providing robust error handling.
Key Features
- Automated Environment Setup - Creates and manages Python virtual environment
- Bulk File Processing - Uploads all files from a specified directory
- Cloud Analysis Integration - Automatically initiates analysis for uploaded samples
- Smart Rate Limiting - Built-in delays to prevent API overload
- Robust Error Handling - Continues processing even if individual files fail
- Real-time Status Reports - Live feedback on upload progress
- Cross-platform Support - Works on Linux, macOS, and compatible environments
Prerequisites & Requirements
Important: This tool requires access to a ReversingLabs Spectra Analyze instance and valid API credentials!
System Requirements
- Python 3.x installed
- Bash shell (Linux/macOS) or compatible environment
- Internet connection for API communication
ReversingLabs Requirements
- Access to a ReversingLabs Spectra Analyze instance
- Valid API token with upload permissions
- Understanding of your organization's malware submission policies
Installation & Configuration
Download and Setup
Clone the repository and place both files in your preferred directory:
git clone https://github.com/8linkz/RL_upload-Script.git cd RL_upload-Script
Configuration Points
You need to update 4 configuration points before using the tool:
1. In upload.sh - Script Path:
DEFAULT_SCRIPT_PATH="/path/to/your/rl_upload.py"
2. In rl_upload.py - Spectra Analyze Instance URL:
a1000 = A1000(host="https://your-instance.reversinglabs.com", token="your_token", verify=True)
3. API Token Configuration:
Replace your_token with your actual API authentication token.
4. Upload Directory Path:
folder_path = "/path/to/your/malware/samples"
Make Script Executable (Optional)
chmod +x upload.sh
Usage Examples
Basic Usage
./upload.sh
Uses the default Python script path configured in the file.
Custom Script Path
./upload.sh /custom/path/to/rl_upload.py
Help Information
./upload.sh --help
How the Process Works
The tool follows this automated workflow:
- Environment Check - Creates Python virtual environment if needed
- SDK Installation - Installs ReversingLabs SDK from GitHub
- File Processing - Iterates through all files in specified directory
- Upload & Analysis - Submits each file for cloud analysis
- Rate Limiting - Applies 1-2 second delays between uploads
- Status Updates - Provides real-time feedback on progress
Project Structure
File Organization
your-project/ ├── upload.sh # Bash wrapper script ├── rl_upload.py # Python upload script └── samples/ # Directory with files to upload
Configuration Example
After proper configuration, your files should contain:
upload.sh:
DEFAULT_SCRIPT_PATH="/home/user/reversinglabs/rl_upload.py"
rl_upload.py:
a1000 = A1000(host="https://mycompany.reversinglabs.com", token="abcd1234efgh5678", verify=True) folder_path = "/home/user/malware_samples"
Troubleshooting
Common Issues & Solutions
- Script not found - Verify DEFAULT_SCRIPT_PATH points to correct rl_upload.py location
- Authentication failed - Check API token validity and upload permissions
- Connection errors - Ensure Spectra Analyze URL is correct and accessible
- File not found - Confirm upload directory exists and contains files
Virtual Environment Issues
The tool manages a virtual environment at ~/reversinglabs_env. If problems occur:
# Remove virtual environment to force recreation rm -rf ~/reversinglabs_env ./upload.sh
Security Notes & Resources
Security Considerations
- Keep your API token secure and never commit it to version control
- Consider using environment variables for sensitive configuration
- Ensure uploaded files are from trusted sources
- Review ReversingLabs terms of service for file submission guidelines
Documentation & Support
- Official API Documentation: ReversingLabs API Docs
- Python SDK: ReversingLabs Python SDK
- Interactive API Explorer: Your instance's Swagger UI at
https://your-instance.reversinglabs.com/api/schema/swagger-ui/
Final Thoughts
This bulk upload tool has significantly streamlined my malware analysis workflow by automating what was previously a tedious manual process. The combination of automated environment management, robust error handling, and proper rate limiting makes it a reliable solution for large-scale sample submission.
The tool is open source and available on GitHub. Contributions and feedback are welcome!