现在的位置: 首页 > 综合 > 正文

解开IPA文件的灰沙-通过静态分析工具了解IPA实现

2013年01月15日 ⁄ 综合 ⁄ 共 2833字 ⁄ 字号 评论关闭

在7月27日的iOS/Android训练营大会上,友盟iOS Team Leader张超带来主题演讲“解开IPA文件的灰沙-通过静态分析工具了解IPA实现”。针对IPA资源文件以及图片处理,张超提出,分析网络数据最核心的就是抓包和解包,并且针对这一话题进行了阐释。

张超:现在一个IPA在iOS生态系统中的生存状态是怎么样的?1.IPA被破解发到越狱市场。2.IPA被开发者简单加密,再被破解,再流到越狱市场。3.如果IPA得到足够有效的加密,会大大提高避免被破解,被逆向的几率。

相关介绍(ppt下载):http://blog.csdn.net/shiningxyy/article/details/7820809

【幻灯片内容纲要】:

  • 1. iOS DevCampProduced by CSDN
  • 2. 揭开IPA的灰纱 通过分析工具了解App实现技巧 友盟 张超 微博:iAladdin 电邮:aladdin@umeng.com
  • 3. 什么是IPA?“ipa后缀的文件是iOS系统的软件包,全称为iPhone application archive.通常情况下,ipa文件都是使用苹果公司的FairPlay DRM技术进行加密保护的。每个IPA文件都是ARM架构的可执行文件以及该应用的资源文件的打包文件,只能安装在iPhone,iPod Touch 或iPad上。该文件可以通过修改后缀名为zip后,进行解压缩,查看其软件包中的内容。 ”
  • 4. IPA的物理结构 iTunesMetadata. xxx.AppiTunesArtwork plist
  • 5. IPA的文件分类
  • 6. 资源文件 [resource]
  • 7. PNG NormalizerUIKit-Artwork-Extractorhttps://github.com/0xced/UIKit-Artwork-ExtractorCrunchhttp://www.pragmaticcode.com/crunch/pngcrush 命令pngcrush -revert-iphone-optimizations -q OptimizedPNG.png RevertedPNG.pngRuby实现https://github.com/swcai/iphone-png-normalizerPython实现http://www.axelbrz.com.ar/?mod=iphone-png-images-normalizerObjective-C实现
  • 8. pngcrush
  • 9. UIKit-Artwork-Extractor
  • 10. Crunch
  • 11. 原理及其他其他语言实现Ruby实现https://github.com/swcai/iphone-png-normalizerPython实现http://www.axelbrz.com.ar/?mod=iphone-png-images-normalizerObjective-C实现原理资料http://iphonedevwiki.net/index.php/CgBI_file_format
  • 12. PVR/PVRTC/PVR.CCZ TexturePacker -- pvr/pvrtc/pvr.ccz http://www.codeandweb.com/texturepacker/ quickpvr -- pvr/pvrtc http://www.limbic.com/quickpvr.html
  • 13. TexturePacker
  • 14. quickpvr
  • 15. App中的数据 运行时产生Bundle内 沙箱内 网络交互
  • 16. 网络数据 [network]
  • 17. Charles
  • 18. Charles原理在网络交互中,通过充当代理的角色,从而获取到所有的请求和返回值,作为中间层来实现抓包的过程。- 模拟器配置- 真机配置
  • 19. HTTP请求抓取
  • 20. HTTPS请求抓取
  • 21. 特殊网络模拟
  • 22. IPA状态 [ipa’s status]
  • 23. 自签名工具
  • 24. IPA的状态
  • 25. 沙箱数据 [sandbox] Artwork iTunesMetadata xxx.app .plist 6A2FCEEC-591E-4B85-B625-26F1AA3B2A4E Documents Library tmp
  • 26. 常用命令catfile
  • 27. 二进制文件 [binary] 静态分析工具 otool nm strings class-dump系列 运行时分析工具 Cycript 逆向分析工具 Hopper IDA Pro
  • 28. otool
  • 29. nm
  • 30. strings
  • 31. Class-dump系列
  • 32. CycriptSSH到iOS系统中安装:a.通过Cydia安装,搜索Cycript安装b.dpkg -i cycript_0.9.450-1_iphoneos-arm.deb使用:a.# cycriptb.# cycript -p processID配合console
  • 33. IDA Pro
  • 34. iOS App
  • 35. Hopper
  • 36. iOS App
  • 37. Mac App
  • 38. 写在最后
  • 39. 参考资料Books-《Binary Hacks》-《IDA Pro 权威指南》-《Hacking and Securing iOSApplications》-《iOS Hacker’s Handbook》
  • 40. 参考资料URL- http://iphone.freecoder.org/classdump_en.html- http://www.cycript.org- http://iphonedevwiki.net/index.php/CgBI_file_format
  • 41. 联系方式Email: aladdin@umeng.comGithub: iAladdinWeibo: iAladdin

=================================

1、提取资源文件
Crunch app - Extract the resource files of iOS applications. Easily.
地址:http://www.pragmaticcode.com/crunch/ (15天试用期)

UIKit-Artwork-Extractor   提取资源文件(很强大)

https://github.com/0xced/UIKit-Artwork-Extractor

Ruby实现

https://github.com/swcai/iphone-png-normalizer

Python实现 

http://www.axelbrz.com.ar/?mod=iphone-png-images-normalizer

TexturePacker一个不错的图片组合工具 

http://www.codeandweb.com/texturepacker

Charles是一个HTTP代理服务器,HTTP监视器,反转代理服务器.它允许一个开发者查看所有连接互联网的HTTP通信.

http://www.charlesproxy.com/

抱歉!评论已关闭.