iOS逆向课程笔记(四)

7.逆向工具集和安装和使用

  • iOS逆向工程的工具大致可分为四类:
  • 检测工具
    如:Reveal、tcpdump等

  • 反编译工具(反汇编工具 - 分析二进制文件并得到一些信息)
    如:IDA、Hopper Disassembler、classdump等

  • 调试工具
    如:lldb、Cycript等

  • 开发工具
    如:Xcode、theos等

  • classdump
    可以将Mach-O文件中的Objective-C运行时的声明的信息导出,即编写OC代码时的 .h文件。class-dump只能导出未经加密的App的头文件。classdump是对"otool -ov" 信息的翻译,以一种我们熟悉的易读的方式呈现。官网http://stevenygard.com/projects/class-dump/
  • otool工具简介
    otool(object file displaying tool) :目标文件的展示工具。可以用来发现应用中使用到了哪些系统库,调用了其中哪些方法,使用了库中哪些对象及属性,它是Xcode自带的常用工具。

    -f print the fat headers
    -a print the archive header
    -h print the mach header
    -l print the load commands
    -L print shared libraries used
    -D print shared library id name
    -t print the text section (disassemble with -v)
    -p <routine name>  start dissassemble from routine name
    -s <segname> <sectname> print contents of section
    -d print the data section
    -o print the Objective-C segment
    -r print the relocation entries
    -S print the table of contents of a library
    -T print the table of contents of a dynamic shared library
    -M print the module table of a dynamic shared library
    -R print the reference table of a dynamic shared library
    -I print the indirect symbol table
    -H print the two-level hints table
    -G print the data in code table
    -v print verbosely (symbolically) when possible
    -V print disassembled operands symbolically
    -c print argument strings of a core file
    -X print no leading addresses or headers
    -m don't use archive(member) syntax
    -B force Thumb disassembly (ARM objects only)
    -q use llvm's disassembler (the default)
    -Q use otool(1)'s disassembler
    -mcpu=arg use `arg' as the cpu for disassembly
    -j print opcode bytes
    -P print the info plist section as strings
    -C print linker optimization hints
    --version print the version of /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool 
    
    • 依赖库的查询
      如: otool -L WeChart

    • 是否加壳
      如:otool -l WeChart | grep -B 2 crypt

  • classdump的使用
    class-dump -s -S -H /Applications/Memenet/Memenet.app/Contents/MacOS/memenet -o ./MyHeaders

    ```
     查看某文件夹下文件的个数,包括子文件夹里的。
     ls -lR|grep "^-"|wc -l
    
     查看某文件夹下文件夹的个数,包括子文件夹里的。
     ls -lR|grep "^d"|wc -l
    
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 4.Cycript工具介绍(作者:saurik,官网:http://www.cycript.org/) Cycri...
    Flonger阅读 894评论 0 1
  • [TOC] ==iOS逆向环境介绍== *** 越狱环境:iphone5s iOS 8.3*** 1.Drawin...
    锦鲤跃龙阅读 1,403评论 2 2
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,941评论 0 23
  • 到北京已经两个月了,第一个月基本在投简历、面试中度过,很幸运的拿到了几家公司的offer,在7月中旬的时候选择了一...
    野马七阅读 341评论 5 3
  • 夜 带给我的恐惧 无奈 哭泣 你不知道下一秒发生什么,而你只能欣然接受 夜 过了今晚明天又是一天,能有什么办法 夜...
    啊啦芬芬阅读 205评论 0 1