Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/g2asell2019/shape-security-decompiler-toolkit

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/g2asell2019/shape-security-decompiler-toolkit

  • v0.0.0-20220722152403-228ebb0aeb4a
  • Source
  • Go
  • Socket score

Version published
Created
Source

Shape Security Decompiler Tool-Kit

This tool kit is capable of dynamically deobfuscating all versions of shape security's virtual machine interpreter script and injecting a custom tracer that is capable of tracing all opcodes that is executed in the virtual machine script. It also has a custom lifter that will lift these traces into javascript.

Javascript Virtualization Obfuscation

Javascript virtualization obfuscation is a obfuscation technique that requires the defenders to create a full virtual machine in javascript along with a custom compiler that is capable of compiling javascript into bytecode that this virtual machine is able to understand. Since the source code is never restored at anytime while the virtual machine is running, this obfuscation technique requires a reverse engineer to first reverse engineer and fully understand the virtual machine which could be heavily obfuscated.

Overview

Shape Security implements a custom stack based CISC virtual machine in javascript with a rotating instruction set that executes custom bytecode. They do this in order to protect the source code that is executed on the browser side. The virtualized code itself was also obfuscated before it was virtualized in order to deter reverse engineering attempts. This repo isn't about using the devirtualized code to create a bypass but instead mainly about the reverse engineering process to understanding their virtual machine and then writing a lifter that lifts the executed bytecode into javascript. The approach I took in this tool kit was not to target the full instruction but instead the micro instructions that're consistent across all versions and to then hook into those.

Downside

Since the deobfuscator hooks directly an edited virtual machine script, we run into the risks of self defending code and tamper checks in the code. I haven't extensively analyzed the output for these type of checks yet so there is a risk the current output could carry code that is partially generated from fake paths Since the tracer keeps track of all conditionals in the bytecode, all tamper checks should still be prevalent.

FAQs

Package last updated on 22 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc