当前位置:网站首页>vulnhub之darkhole_2
vulnhub之darkhole_2
2022-07-05 18:00:00 【梅_花_七】
目录
一、主机发现
二、端口扫描

三、服务版本发现
这里值得注意的就是.git,这是源码也放上来了。其他还是老样子。

四、信息收集
1.主页
主页一张图片,源码中啥都没有。

有个登录界面。

2.扫目录
大部分有用信息都指向了.git,这与我们上面收集到的信息是相同的

五、.git
注意:最好用2021版的kali,2022最新版的git clone会报错,也不知道为啥
1.下载.git
wget -r http://192.168.0.108/.git/
2.查看版本历史

3.生成最新版本源码
git clone . backup
在源码中的登录php中,我们可以看到这里进行了对输入参数进行了转义,防止注入

4.查看有漏洞的那一版
这里在转换分支的时候,有时候要先执行
git stash
转换分支
git checkout a4d900a8d85e8938d3601f3cef113ee293028e10

进入查看,得到了上个版本用的账号密码。很有可能上个版本的账号密码在这个版本可以用于登录

5.登录

六、sqlmap注入
1' 无回显结果。
1'and+1=1--+ 和1输出结果相同。
证明存在sql注入,sqlmap跑一下
burp抓包,
(1)跑库
sqlmap -r ~/Desktop/1 --dbs
四个默认库,一个darkhole_2

(2)跑表

(3)dump下来
ssh:

users:

七、ssh登录
1.
拿到了一个jehad的shell。

在信息收集中,我们看到.bash_history中有很多提示信息。这里给了我们提示,做一个端口转发,然后来执行命令。

2.9999端口服务信息
内容:

ps -aux | grep 9999
可以看到程序是以losy运行的,我们利用他执行反弹shell后得到一个losy的shell

八、端口转发
为什么要做这个端口转发呢,因为我们在kali端访问不到目标靶机9999端口部署的服务脚本。
这里的127.0.0.1视为目标靶机(远程目标)的地址。
当然其实我们可以直接用拿到的jehad这个用户,在本地执行命令。
1.kali端
ssh -L 9633:127.0.0.1:9999 [email protected]
在端口转发后我们可以在kali端实现命令执行操作。

2.反弹shell
在.bash_history其实给我们提供了几种反弹shell的方式,其实就是黑客在入侵时尝试的几种方式,但是好像是都没用

进行url编码:

提交后成功反弹。

九、losy信息收集
升级shell,密码都告诉我们了

十、sudo提权

用上面给的python命令就行
sudo python3 -c 'import os; os.system("/bin/sh")'

十一、hydra暴力破解
lama权限过大,密码过于简单。

登陆后使用sudo提权
边栏推荐
- Record a case of using WinDbg to analyze memory "leakage"
- How can cluster deployment solve the needs of massive video access and large concurrency?
- Numerical calculation method chapter8 Numerical solutions of ordinary differential equations
- 文章中的逻辑词
- Zabbix
- Binder开辟线程数过多导致主线程ANR异常
- 《力扣刷题计划》复制带随机指针的链表
- Gimp 2.10 tutorial "suggestions collection"
- To solve the stubborn problem of Lake + warehouse hybrid architecture, xinghuan Technology launched an independent and controllable cloud native Lake warehouse integrated platform
- Zabbix
猜你喜欢

Sophon CE社区版上线,免费Get轻量易用、高效智能的数据分析工具

U-Net: Convolutional Networks for Biomedical Images Segmentation

Mask wearing detection based on yolov3

吴恩达团队2022机器学习课程,来啦

《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!

Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection

Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.

Memory management chapter of Kobayashi coding

记一次使用Windbg分析内存“泄漏”的案例

Nanjing University: Discussion on the training program of digital talents in the new era
随机推荐
记录Pytorch中的eval()和no_grad()
JVM第三话 -- JVM性能调优实战和高频面试题记录
Tencent music launched its new product "quyimai", which provides music commercial copyright authorization
ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
About Estimation with Cross-Validation
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
Crontab 日志:如何记录我的 Cron 脚本的输出
To solve the stubborn problem of Lake + warehouse hybrid architecture, xinghuan Technology launched an independent and controllable cloud native Lake warehouse integrated platform
【PaddleClas】常用命令
消除`if()else{ }`写法
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry
使用QT遍历Json文档及搜索子对象
Notes on common management commands of openshift
Sophon CE Community Edition is online, and free get is a lightweight, easy-to-use, efficient and intelligent data analysis tool
Can communication of nano
隐私计算助力数据的安全流通与共享
EPM related
Easynmon Usage Summary
【在优麒麟上使用Electron开发桌面应】