更多全球网络安全资讯尽在邑安全
www.eansec.com
0x00 使用场景
在渗透测试中,由于防火墙的原因,目标主机可能只开放了某一个业务端口,其余反连和直连的端口被全部禁用了,借用mssqlproxy的一个图,很好的呈现了这种场景。
这个时候我们虽然可以利用UDF执行命令,但是十分不方便,于是就有了下面的说法。
0x01 原理
关键原理就是UDF和Socket Reuse。Mysql UDF各位师傅应该都很熟悉,这里就不详细讲了;而Socket Reuse,虽然我是第一次听说,但其实很早就有相关的概念了:
Socket-reuse shellcode is used to bypass firewalls. Usually, shellcode and exploit developers and users provide "bindshell" and "connect-back" shellcodes. Both of these require a permissive firewall to some extent or another. However, because sockets are treated as re-usable