Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Hybrid Submit — A script that automatically submits files to Hybrid Analysis (API) | Kitploit
Tools/GitLabGitLab/kaysec/hybrid-submit
Scripting & AutomationMalware AnalysisAPI Security
GitLabkaysec/hybrid-submit

Hybrid Submit

A script that automatically submits files to Hybrid Analysis (API)

View Repository
2 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Hybrid Analysis Batch Submission Script

This Python script recursively scans a folder and submits executable, script, document, and other relevant files to Hybrid Analysis (Falcon Sandbox) for automated malware analysis.

Features

  • Recursively walks through directories
  • Submits only supported file types (see list below)
  • Skips empty, oversized, or previously submitted files
  • Prevents path traversal attacks – ensures files are within the scan root
  • Skips symbolic links to avoid duplicate or unintended submissions
  • Uses a persistent requests Session for efficient API communication
  • Stores cache in a dedicated user directory (~/.hybrid_analysis_submitter/) to avoid polluting scanned folders
  • Uses a local SHA‑256 cache to avoid duplicate submissions
  • Handles API rate limiting (429 errors) gracefully
  • Stops automatically when the API quota is exhausted
  • Supports command‑line configuration of folder, file size limit, environment ID, and cache file name
  • Reads API key from a .env file for security

Requirements

  • Python 3.6+
  • A valid Hybrid Analysis API key (free tier available)

Installation

  1. Clone or download this script to your local machine.

  2. Install required packages:

root@kitploit:~
pip install requests python-dotenv
  1. Create a .env file in the same directory as the script with your API key:
root@kitploit:~
HYBRID_API_KEY=your_api_key_here

You can obtain an API key by registering at Hybrid Analysis.

Usage

Run the script from the command line, specifying the folder to scan:

root@kitploit:~
python submit_to_hybrid.py /path/to/folder

Command‑line Arguments

Examples

Scan a folder with default settings:

root@kitploit:~
python submit_to_hybrid.py C:\suspicious_files

Scan a folder but increase the size limit to 200 MB and use a different environment (e.g., Android):

root@kitploit:~
python submit_to_hybrid.py /home/user/samples --max-file-size 200 --environment-id 300

Use a custom cache file name:

root@kitploit:~
python submit_to_hybrid.py ./malware --cache-file my_cache.json

Example Output

root@kitploit:~
Scanning folder: C:\suspicious_files

Submitting: C:\suspicious_files\malware.exe (2.34 MB)
 -> Success! Job ID: 5f8a9c2d3e4f5a6b7c8d9e0f
Submitting: C:\suspicious_files\document.pdf (0.12 MB)
 -> Success! Job ID: 6g9b0c1d2e3f4a5b6c7d8e9f
Skipping already submitted: C:\suspicious_files\malware.exe
Skipping symlink: C:\suspicious_files\link_to_malware.exe

Finished.
Files found:      42
Files submitted:  35
Files skipped:    6
Files failed:     1

Supported File Types

  • Windows executables (PE): .exe, .scr, .pif, .dll, .com, .cpl
  • Installers & packages: .msi
  • Windows scripts: .bat, .cmd, .ps1, .psd1, .psm1, .js, .vbs, .vbe, .wsf, ,

For the official list of all supported file types, check the Hybrid Analysis FAQ.

How It Works

  1. Recursive walk – The script uses os.walk() to traverse every subfolder.
  2. Security checks – It verifies that each file resolves to a path inside the scan root (prevents path traversal) and skips symbolic links.
  3. File filtering – It checks the file extension, size (0 bytes or > --max-file-size are skipped), and whether the file has been submitted before (SHA‑256 cache).
  4. Submission – Each file is uploaded to the https://hybrid-analysis.com/api/v2/submit/file endpoint using a persistent requests Session with your API key.
  5. Rate limiting – After each submission the script sleeps for 2 seconds. If it receives an HTTP 429 (Too Many Requests) response, it counts the error. After 3 consecutive 429 errors, the scan stops automatically.
  6. Cache persistence – Successfully submitted files are stored in a JSON cache file inside ~/.hybrid_analysis_submitter/ so they are not re‑submitted in future runs. The cache is saved sorted for human readability.

Rate Limiting & Quotas

  • Hybrid Analysis free accounts have hourly/daily submission limits.
  • The script detects HTTP 429 responses and stops after 3 such errors to avoid endless retries.
  • A 2‑second delay is added between submissions to be respectful of the API.

Important Notes

  • The API key is read only from the .env file – do not hardcode it.
  • Empty files (0 bytes) are always skipped.
  • Files larger than --max-file-size are skipped.
  • Only files with extensions in ALLOWED_EXTENSIONS are submitted.
  • Symbolic links are skipped to prevent duplicate submissions and path confusion.
  • Path traversal is prevented – the script will skip any file that resolves outside the specified scan directory.
  • The cache prevents re‑submitting identical files across multiple runs and is stored in your user directory (~/.hybrid_analysis_submitter/).
  • The script uses a 120‑second timeout for each HTTP request.
  • Cache files are stored in a dedicated directory – not mixed with scanned content.

Troubleshooting

License

This script is provided as‑is for educational and security analysis purposes. Use responsibly and in accordance with Hybrid Analysis Terms of Service.

Disclaimer

Submitting files to a third‑party sandbox may expose potentially sensitive content. Ensure you have the right to share the files before uploading.

Download Tool
ArgumentDescription
folder_pathRequired – Path to the folder to scan (recursive)
--max-file-sizeMaximum file size in MB (default: 250)
--environment-idAnalysis environment ID (default: 120 = Windows 7 64‑bit)
--cache-fileCache filename (default: submitted_cache.json). The file is stored in ~/.hybrid_analysis_submitter/
.hta
.sct
  • Other Windows files: .lnk, .chm
  • Office documents: .doc, .docx, .ppt, .pps, .pptx, .ppsx, .xls, .xlsx, .rtf, .pub
  • Other documents: .pdf, .eml, .msg
  • Cross‑platform executables/scripts: .jar, .py, .pl
  • Mobile/Embedded: .apk (Android), .elf (Linux)
  • Web/Graphics: .svg
  • ProblemLikely Solution
    ERROR: HYBRID_API_KEY not foundCreate a .env file in the same directory with HYBRID_API_KEY=your_key_here.
    'folder_path' is not a valid directoryProvide a correct path to an existing folder.
    Permission denied when reading filesRun the script with appropriate read permissions.
    Frequent 429 errorsReduce the submission rate (increase the time.sleep(2) in the script) or upgrade your API plan.
    Files are skipped unexpectedlyCheck if the extension is in ALLOWED_EXTENSIONS. You can add more extensions by editing the script.
    Duplicate submissions not skippedThe cache file might be missing or corrupted. Delete ~/.hybrid_analysis_submitter/submitted_cache.json to start fresh, or use the --cache-file argument to use a different cache file name.
    Files outside scan root are being skippedThis is intentional for security. Ensure all target files are inside the specified folder.