服务器关了就结束了?UnityGhost被曝染毒 与XcodeGhost类似
<p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922142741037-1751822957.png" alt="" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><a href="http://weibo.com/wooyun2?topnav=1&wvr=6&topsug=1#_rnd1442903204065" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">乌云微博</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143749240-1852937095.png" alt="" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><a title="PanguTeam" href="http://weibo.com/panguteam" target="_blank" style="line-height: 1.8; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">PanguTeam</a> 微博</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 9 月 22 日,苹果开发工具“染毒”事件尚未完全平息,盘古团队 22 日凌晨爆料称,目前已经有证据证明一些游戏引擎的下载地址也被感染病毒,例如 Unity 和 Cocos2d-x,并且这些引擎的安卓版也被感染病毒。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 盘古团队表示,此次游戏引擎感染与苹果后门漏洞原理相同,后经证实是同一个人制造并传播。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 乌云知识库平台也于凌晨发布报告称,百度安全实验室称已经确认“Unity-4.X 的感染样本”。并且逻辑行为和 XcodeGhost 一致,只是上线域名变更。“这意味,凡是用过被感染的 Unity 的 App 都有窃取隐私和推送广告等恶意行为”。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 乌云联合创始人、安全专家孟卓告诉腾讯科技,感染的根本原因还是开发者没有从官方地址下载开发工具。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 截至发稿时,触控科技回应称,其已内部排查确认官网下载安装包没有被植入恶意代码。目前正在排查 Cocos Store,稍晚会得出结论。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> Unity 方面表示,需要技术部门确认。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 资料显示,Unity 是由 Unity Technologies 开发的一个可创建三维视频游戏、建筑可视化、实时三维动画等类型互动内容游戏开发工具。其编辑器运行在 Windows 和 Mac OS X 下,可发布游戏至 Windows、Mac、Wii、iPhone、Windows Phone 8 和 Android 等平台。以 Unity 为引擎开发的游戏包括《纪念碑谷》、《炉石传说》、《神庙逃亡2》等。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> Cocos 是由触控科技推出的游戏开发一站式解决方案,其中 Cocos2d-x 是一个开源的移动 2D 游戏框架,其开发的项目可以很容易地建立和运行在 iOS,Android,黑莓 Blackberry 等操作系统中,还支持 Windows、Mac 和 Linux 等桌面操作系统。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 值得注意的是,乌云报告显示,虽然 XcodeGhost 作者的服务器关闭了,但是受感染的 App 的行为还在,这些 App 依然孜孜不倦的向服务器发送着请求。这时候黑客只要使用 DNS 劫持或者污染技术,声称自己的服务器就是相关服务器,就可以成功的控制这些受感染的 App。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 此前,曝出 XcodeGhost 事件让苹果的安全性受到了很大挑战。一些开发者从第三方网站下载的开发工具 Xcode 被植入恶意代码,导致应用具有上传用户的信息潜在威胁。部分应用开发者已提供新的安装包,而苹果也在 App Store 下架受此感染的应用。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922144250444-1115683833.jpg" alt="" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">相关文章</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><strong style="line-height: 1.5em; "> 你以为服务器关了这事就结束了?</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><strong style="line-height: 1.5em; "> ——XcodeGhost 截胡攻击和服务端的复现,以及 UnityGhost 预警</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 文/作者:没羽,蒸米,阿刻,迅迪 @ 阿里移动安全</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 地址:<a href="http://drops.wooyun.org/papers/9024" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">http://drops.wooyun.org/papers/9024</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x00 序</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 截胡,麻将术语,指的是某一位玩家打出一张牌后,此时如果多人要胡这张牌,那么按照逆时针顺序只有最近的人算胡,其他的不能算胡。现也引申意为断别人财路,在别人快成功的时候抢走了别人的胜利果实。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 虽然 XcodeGhost 作者的服务器关闭了,但是受感染的 app 的行为还在,这些 app 依然孜孜不倦的向服务器(比如 init.icloud-analysis.com,init.icloud-diagnostics.com 等)发送着请求。这时候黑客只要使用 DNS 劫持或者污染技术,声称自己的服务器就是”init.icloud-analysis.com”,就可以成功的控制这些受感染的 app。具体能干什么能,请看我们的详细分析。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 另外,有证据表明 unity 4.6.4 – unity 5.1.1 的开发工具也受到了污染,并且行为与 XcodeGhost 一致,更恐怖的是,还有证据证明 XcodeGhost 作者依然逍遥法外,具体内容请查看第三节。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> PS:虽然涅槃团队已经发出过攻击的 demo 了<a href="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143203115-892883662.png" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">2</a>,但很多细节并没有公布。所以我们打算在这篇文章中给出更加详细的分析过程供大家参考。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x01 通信协议分析</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 在受感染的客户端 App 代码中,有个 Response 方法用于接收和处理远程服务器指令。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143044006-254666673.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> Response 方法中根据服务器下发的不同数据,解析成不同的命令执行,根据我们分析,此样本大致支持 4 种远程命令,分别是:设置 sleep 时长、窗口消息、url scheme、appStore 窗口。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 通过 4 种远程命令的单独或组合使用可以产生多种攻击方式:比如下载安装企业证书的 App;弹 AppStore 的应用进行应用推广;弹钓鱼页面进一步窃取用户信息;如果用户手机中存在某 url scheme 漏洞,还可以进行 url scheme 攻击等。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143227647-813319170.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 其通信协议是基于 http 协议的,在传输前用 DES 算法加密 http body。Response 方法拿到服务器下发送的数据后,调用 Decrypt 方法进行解密:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143202615-429191494.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 如果解密成功,将解密后的数据转换成 JSON 格式数据:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143202522-30854124.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 然后判断服务器端下发的数据,执行不同的操作。如下面截图是设置客户端请求服务端器 sleep 时长的操作:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143203022-793205939.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x2 恶意行为分析及还原</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 在逆向了该样本的远程控制代码后,我们还原了其服务端代码,进一步分析其潜在的危害。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 首先我们在服务端可以打印出 Request 的数据,如下图:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143043365-2100444422.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 红色框标记的协议的头部部分,前 4 字节为报文长度,第二个 2 字节为命令长度,最后一个 2 字节为版本信息,紧跟着头部的为 DES 的加密数据。我们在服务端将数据解密后显示为:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143044662-1751389211.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 这里有收集客户端信息上传到控制服务器。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 同样我们返回加密数据给客户端:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143045365-900562864.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 明文信息为:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143202444-1834527071.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 客户端根据 App 的运行状态向服务端提供用户信息,然后控制服务器根据不同的状态返回控制数据:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143202459-890864453.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">恶意行为一定向在客户端弹(诈骗)消息</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 该样本先判断服务端下发的数据,如果同时在在“alertHeader”、“alertBody”、“appID”、“cancelTitle”、“confirmTitle”、“scheme”字段,则调用 UIAlertView 在客户端弹框显示消息窗口:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143203709-1836872505.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 消息的标题、内容由服务端控制</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143204069-1828755644.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 客户端启动受感染的 App 后,弹出如下页面:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143047475-1277200776.jpg" alt="" width="300" height="200" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">恶意行为二下载企业证书签名的 App</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 当服务端下发的数据同时包含“configUrl”、“scheme”字段时,客户端调用 Show ()方法,Show ()方法中调用 UIApplication.openURL ()方法访问 configUrl:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143047756-839608072.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 通过在服务端配置 configUrl,达到下载安装企业证书 App 的目的:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143205865-1122072312.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 客户端启动受感染的 App 后,目标 App 将被安装(注意:演示应用为测试应用,不代表恶意软件推广该应用):</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143206990-1459908804.png" alt="" width="300" height="200" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143049772-1237839396.png" alt="" width="300" height="200" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> demo 地址:<a href="http://v.youku.com/v_show/id_XMTM0MTQyMzM1Ng==.html" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">http://v.youku.com/v_show/id_XMTM0MTQyMzM1Ng==.html</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "> <object width="600" height="450" data="http://player.youku.com/player.php/sid/XMTM0MTQyMzM1Ng==/v.swf" type="application/x-shockwave-flash" style="line-height: 1.5em; "></object></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">恶意行为三推送钓鱼页面</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 通过在服务端配置 configUrl,达到推送钓鱼页面的目的:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143207256-132851350.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 客户端启动受感染的 App 后,钓鱼页面被显示:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143208287-244781361.png" alt="" width="300" height="200" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> demo 地址:<a href="http://v.youku.com/v_show/id_XMTM0MTQyMjkyOA==.html" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">http://v.youku.com/v_show/id_XMTM0MTQyMjkyOA==.html</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "> <object width="600" height="450" data="http://player.youku.com/player.php/sid/XMTM0MTQyMjkyOA==/v.swf" type="application/x-shockwave-flash" style="line-height: 1.5em; "></object></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">恶意行为四推广 AppStore 中的应用</strong></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 通过在服务端配置 configUrl,达到推广 AppStore 中的某些应用的目的:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143209209-703121783.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> phishing1.html 页面内容:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143210115-329789605.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 客户端启动受感染的 App 后,自动启动 AppStore,并显示目标 App 的下载页面:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143210037-1096948121.png" alt="" width="300" height="200" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> demo 地址:<a href="http://v.youku.com/v_show/id_XMTM0MTQyNTk0MA==.html" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">http://v.youku.com/v_show/id_XMTM0MTQyNTk0MA==.html</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><object width="600" height="450" data="http://player.youku.com/player.php/sid/XMTM0MTQyNTk0MA==/v.swf" type="application/x-shockwave-flash" style="line-height: 1.5em; "></object></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x03 UnityGhost?</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 在大家以为一切都完结的时候,百度安全实验室称已经确认”Unity-4.X 的感染样本”。并且逻辑行为和 XcodeGhost 一致,只是上线域名变成了 init.icloud-diagnostics.com。这意味,凡是用过被感染的 Unity 的 app 都有窃取隐私和推送广告等恶意行为。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143227303-1663447833.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> Unity 是由 Unity Technologies 开发的一个让玩家创建诸如三维视频游戏、实时三维动画等类型互动内容的多平台的综合型游戏开发工具,是一个全面整合的专业游戏引擎。很多有名的手机游戏比如神庙逃亡,纪念碑谷,炉石传说都是用 unity 进行开发的。</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 更令人恐怖的是,在百度安全实验室确认后没多久,大家就开始在网上寻找被感染的 Unity 工具,结果在我搜到一个 Unity3D 下载帖子的时候发现”codeFun 与 2015-09-22 01:18 编辑了帖子”!?要知道 codeFun 就是那个自称 XcodeGhost 作者的人啊。他竟然也一直没睡,大半夜里一直在看大家发微博观察动静?随后发现大家知道了 Unity 也中毒的事情,赶紧去把自己曾经投毒的帖子删了?</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143227287-1389212338.jpg" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 现在再去看那个帖子已经被作者删的没有任何内容了。。。 <a href="http://game.ceeger.com/forum/read.php?tid=21630&fid=8" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">http://game.ceeger.com/forum/read.php?tid=21630&fid=8</a></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143227287-1786399043.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 但根据 XcodeGhost 作者没删之前的截图表明,从 unity 4.6.4 – unity 5.1.1 的开发工具都有可能被投毒了!</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x04 总结</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 虽然病毒作者声称并没有进行任何广告或者欺诈行为,但不代表别人不会代替病毒作者进行这些恶意行为。并且作者依然还在逍遥法外!所以立刻!马上!删掉那些中毒的 app 吧!</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x05 参考资料</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><ol style="margin: 5px 2px 5px 50px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><li style="margin-left: 0px; line-height: 25px; ">涅槃团队:Xcode 幽灵病毒存在恶意下发木马行为 <a href="http://drops.wooyun.org/papers/8973" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">http://drops.wooyun.org/papers/8973</a></li><li style="margin-left: 0px; line-height: 25px; ">XcodeGhost 源码 <a href="https://github.com/XcodeGhostSource/XcodeGhost" target="_blank" style="line-height: 1.5em; color: rgb(0, 95, 169); text-decoration: none; word-break: break-all; ">https://github.com/XcodeGhostSource/XcodeGhost</a></li></ol><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> <strong style="line-height: 1.5em; ">0x06 更新</strong></p><hr style="font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 1.5em; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 1 在百度安全实验室的帮助下,我们已经拿到了 UnityGhost 的样本。基本信息如下:</p><div class="cnblogs_code" style="padding: 10px; font-family: 'Courier New' !important; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); word-break: break-all; overflow: auto; color: rgb(64, 64, 64); "><pre style="font-family: 'Courier New' !important; line-height: 1.5em; white-space: pre-wrap; ">$shasum libiPhone-lib-il2cpp.a-armv7-<span style="color: rgb(0, 0, 0); ">master.o625ad3824ea59db2f3a8cd124fb671e47740d3bdlibiPhone</span>-lib-il2cpp.a-armv7-<span style="color: rgb(0, 0, 0); ">master.o
$ file libiPhone</span>-lib-il2cpp.a-armv7-<span style="color: rgb(0, 0, 0); ">master.o
libiPhone</span>-lib-il2cpp.a-armv7-master.o: Mach-O <span style="color: rgb(0, 0, 255); ">object</span> arm</pre></div><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> UnityGhost 样本的行为和 XcodeGhost 非常相似,基本函数如下:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143551022-815008965.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> UnityGhost 在启动时会检测是否是在虚拟机和调试器中运行,如果是则不产生恶意行为:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143550381-334908409.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> UnityGhost 同样也会收集用户手机的各种信息(时间,bundle id (包名),应用名称,系统版本,语言,国家等)并上传到一个新的服务器”http://init.icloud-diagnostics.com”:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143550569-1952437387.png" alt="" width="300" height="338" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922144433959-259276667.png" alt="" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 在接收到服务器返回的指令后,UnityGhost 同样也可以进行多种恶意行为:下载安装企业证书的 App;弹 AppStore 的应用进行应用推广;弹钓鱼页面进一步窃取用户信息;如果用户手机中存在某 url scheme 漏洞,还可以进行 url scheme 攻击等。 弹出诈骗对话框用到的函数:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143550928-957614679.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); "> 弹出网页或者推广应用用到的函数:</p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><img src="http://images2015.cnblogs.com/news/66372/201509/66372-20150922143550881-1186043937.png" alt="enter image description here" style="line-height: 1.5em; border: none; max-width: 100%; height: auto; "></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><br></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><br></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><br></p><p style="margin-top: 10px; margin-bottom: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; line-height: 25px; color: rgb(64, 64, 64); background-color: rgb(250, 250, 250); text-align: center; "><p style="line-height: 30px; text-indent: 2em;">资讯来源:<a href="http://news.cnblogs.com/n/529573/">http://news.cnblogs.com/n/529573/</a></p></p><p></p>
页:
[1]