比如说,我们可以使用一个拥有API的浏览器插件来实现漏洞利用:
AllowUntrustedAccess("foobar.com");
SendArbitraryRequests("foobar.com");
此时,AllowUntrustedAccess()将会向主机发送一个preflightHTTP请求:
GET /CanIDisableSecurity HTTP/1.1
如果服务返回200,则插件允许主页完全访问该主机名。这可能是一个安全漏洞,因为你可以指定一个rbndr主机名,该主机名将在你控制的主机和您不控制的主机之间切换。该插件可能允许完全访问任意ip地址(例如内部服务或本地主机),即使该服务通常不允许preflight检查。
git clone https://github.com/taviso/rbndr.git
(向右滑动,查看更多)
主机名的格式很简单:
<ipv4 in base-16>.<ipv4 in base-16>.rbndr.us
(向右滑动,查看更多)
比如说,如需在127.0.0.1和192.168.0.1之间切换,则需要将它们编码为dword,并按下列方式使用:
7f000001.c0a80001.rbndr.us
测试结果如下:
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 192.168.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 192.168.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 192.168.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 127.0.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 127.0.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 192.168.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 127.0.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 127.0.0.1
$ host 7f000001.c0a80001.rbndr.us
7f000001.c0a80001.rbndr.us has address 192.168.0.1
(向右滑动,查看更多)
正如我们所看到的,服务器会随机返回其中一个地址,接下来就可以使用下列方法进行额外处理:
// 持续调用API直到它解析到你可以控制的地址并拿到访问权
while (AllowUntrustedAccesss("7f000001.c0a80001.rbndr.us") != true)
;
// 访问授权后,就可以等待其完成重绑定
while (ConnectToPort("7f000001.c0a80001.rbndr.us", 123) != true)
;
// 现在,我们就拿到了localhost:123的访问权了
SomethingEvil();
(向右滑动,查看更多)
本项目的开发与发布遵循GPL-3.0开源许可证协议。
https://en.wik1pedia.org/wiki/DNS_rebinding
https://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html
https://lock.cmpxchg8b.com/rebinder.html
精彩推荐