Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Expression-Sandbox-Escape-Simulation-Lab β€” Educational lab demonstrating JavaScript expression sandbox escape techniques and patch evolution through multiple vulnerable sandbox versions, with payloads and AST analysis. | Kitploit
Tools/GitHubGitHub/otakuliu/expression-sandbox-escape-simulation-lab
Static AnalysisVulnerability AnalysisExploitationWeb SecurityLearning & Education
GitHubotakuliu/expression-sandbox-escape-simulation-lab

Expression-Sandbox-Escape-Simulation-Lab

Educational lab demonstrating JavaScript expression sandbox escape techniques and patch evolution through multiple vulnerable sandbox versions, with payloads and AST analysis.

View Repository
1359 months agoNot yet reviewed
Share

πŸ§ͺ Expression Sandbox Escape – Simulation Lab

A minimal experimental environment for demonstrating JavaScript expression sandbox escape and patch evolution.

Through multiple versions of the sandbox, it implements the progression from:

Fully escapable β†’ patching this β†’ then patching destructuring

While preserving new bypass methods, helping to understand the real-world cat-and-mouse game between vulnerabilities and patches.


πŸ“¦ Project Structure

.
β”œβ”€β”€ payload.js        # Various attack payloads
β”œβ”€β”€ sandbox_v0.js     # Original vulnerable version
β”œβ”€β”€ sandbox_v1.js     # Fixes the this chain
β”œβ”€β”€ sandbox_v2.js     # Also fixes destructuring

🎯 Design Goals

We want to simulate this reality:

  1. The security team patches one hole
  2. The attacker finds another path
  3. Patch again
  4. Bypassed again

An endless loop.

This project is not meant to be a truly secure VM. Instead, it is meant to observe:

How each "seemingly reasonable" patch is broken by the next technique.


πŸš€ How to Run

npm install vm2 acorn acorn-walk
node sandbox_vX.js

Replace X with 0 / 1 / 2.


🧨 Payload Description

payload.js includes four access methods:

NameTechnique
CVE-2025-68613 / thisObtains process via this
CVE-2026-25049 / destructuringGets constructor via object destructuring
Reflect.getUses the Reflect API
Dynamic ReflectDynamic property access

🏚 sandbox_v0 – The Bare Era

Features:

  • No restriction on this
  • No destructuring checks
  • No AST analysis

Result: All payloads pass.

Attackers are as happy as can be.


πŸ”§ sandbox_v1 – Patching this

Changes:

  • Enforces "use strict"
  • .call(undefined)

Therefore:

this === undefined

Blocked

  • CVE-2025-68613

Still Possible

  • destructuring
  • Reflect

The attacker nods and keeps going down another path.


πŸ”’ sandbox_v2 – Patching destructuring

New additions:

  • AST analysis
  • Specifically checks for ObjectPattern
  • If it contains:
    • constructor
    • or a computed key β†’ blocks execution

Blocked

  • this
  • destructuring

Still Possible

  • Reflect.get
  • Dynamic Reflect

🧠 What Is This Experiment Really Trying to Say?

Blacklist-style patching typically has:

βœ” Fixes a clear path βœ” Low cost βœ” Easy to deploy

But at the same time:

❌ Limited defense surface ❌ Easily bypassed by other semantically equivalent access methods

This is exactly why sandboxes like vm2 have historically suffered repeated escapes.

Download Tool

Most Popular

View all β†’

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    806
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    523
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    441
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    346
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    270
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurityβ€”where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    264

Explore all tools

Browse our collection of tools

View all tools β†’