cycript的原理是动态库注入,但是其动态库注入的原理,与我们常见的通过LC_LOAD_DYLIB在可执行文件中注入动态库不同. cycript的操作是 :
抓取到要挂载的应用, 由于越狱机上拥有权限,所以直接在挂载的进程上创建一个挂起的线程, 然后在这个线程里申请一片用于加载动态库的内存,
然后恢复线程,动态库就被注入。

越狱的手机上安装cycript

查找进程

ps -e|grep /Application/ 查找MobileNotes

注入进程:

cycript -p MobileNotes

cycript命令:

查看地址对象:

#address

object-c message

  _ivarDescription

  _shortMethodDescription

  nextResponder

  _autolayoutTrace

  recursiveDescription

  _methodDescription

[UIApp description]

_methodDescription

_ivarDescription

这个应该是成员变量

打印当前界面

UIApp.keyWindow.recursiveDescription().toString()

throw new TypeError(`'<UIWindow: 0x12d613ff0; frame = (0 0; 320 568); gestureRecognizers = <NSArray: 0x17005cd10>; layer = <UIWindowLayer: 0x17002fe20>>

| <UILayoutContainerView: 0x1781ba320; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0x17805e7b0>; layer = <CALayer: 0x170036c40>>

|    | <UINavigationTransitionView: 0x1701f0200; frame = (0 0; 320 568); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x170036c00>>

|    |    | <UIViewControllerWrapperView: 0x17016f240; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x170224460>>

|    |    |    | <NotesBackgroundView: 0x1781f4500; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x178038120>>

|    |    |    |    | <NotesTextureBackgroundView: 0x178192fe0; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x1780385c0>>

|    |    |    |    |    | <NotesTextureView: 0x178193f50; frame = (0 -44; 320 640); layer = <CALayer: 0x178037fc0>>

|    |    |    |    | <UIView: 0x17816ed00; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x178038340>>

|    |    |    |    |    | <NotesListTableView: 0x12d83c400; baseClass = UITableView; frame = (0 0; 320 568); clipsToBounds = YES; opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x178241cb0>; layer = <CALayer: 0x178038060>; contentOffset: {0, -20}>

|    |    |    |    |    |    | <UIView: 0x17016f0c0; frame = (0 -20; 320 568); autoresize = W+H; layer = <CALayer: 0x170224080>>

|    |    |    |    |    |    | <UITableViewWrapperView: 0x17816ee80; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x1780388a0>>

|    |    |    |    |    |    |    | <NoteCell: 0x12d63bad0; baseClass = UITableViewCell; frame = (0 44; 320 44); opaque = NO; autoresize = W; layer = <CALayer: 0x170225000>>

|    |    |    |    |    |    |    |    | <UITableViewCellScrollView: 0x12d63bfc0; frame = (0 0; 320 44); autoresize = W+H; gestureRecognizers = <NSArray: 0x1702514c0>; layer = <CALayer: 0x170225060>; contentOffset: {0, 0}>

|    |    |    |    |    |    |    |    |    | <UITableViewCellContentView: 0x17016f540; frame = (0 0; 294.5 43.5); gestureRecognizers = <NSArray: 0x170251760>; layer = <CALayer: 0x170225140>>

|    |    |    |    |    |    |    |    |    | <NoteCellContentView: 0x12d514b30; frame = (0 0; 320 44); opaque = NO; autoresize = W+H; layer = <CALayer: 0x17803ebc0>>

|    |    |    |    |    |    |    |    |    | <_UITableViewCellSeparatorView: 0x1781949e0; frame = (15 43.5; 305 0.5); layer = <CALayer: 0x17803fc40>>

|    |    |    |    |    |    |    |    |    | <UIImageView: 0x1781f3300; frame = (294.5 14; 10.5 15); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x17803ec40>>

|    |    |    |    |    |    | <UILabel: 0x12d516bd0; frame = (0 0; 102

nextResponder找到视图控制器  ViewController

_autolayoutTrace

cy# [#0x1781ba320 _autolayoutTrace].toString()

`

<UIWindow:0x12d613ff0>

|   <UILayoutContainerView:0x1781ba320>

|   |   <UINavigationTransitionView:0x1701f0200>

|   |   |   <UIViewControllerWrapperView:0x17016f240>

|   |   |   |   <NotesBackgroundView:0x1781f4500>

|   |   |   |   |   <NotesTextureBackgroundView:0x178192fe0>

|   |   |   |   |   |   <NotesTextureView:0x178193f50>

|   |   |   |   |   <UIView:0x17816ed00>

|   |   |   |   |   |   <NotesListTableView:0x12d83c400>

|   |   |   |   |   |   |   <UIView:0x17016f0c0>

|   |   |   |   |   |   |   <UITableViewWrapperView:0x17816ee80>

|   |   |   |   |   |   |   |   <NoteCell:0x12d63bad0>

|   |   |   |   |   |   |   |   |   <UITableViewCellScrollView:0x12d63bfc0>

|   |   |   |   |   |   |   |   |   |   <UITableViewCellContentView:0x17016f540>

|   |   |   |   |   |   |   |   |   |   <NoteCellContentView:0x12d514b30>

|   |   |   |   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x1781949e0>

|   |   |   |   |   |   |   |   |   |   <UIImageView:0x1781f3300>

|   |   |   |   |   |   |   <UILabel:0x12d516bd0>

|   |   |   |   |   |   |   <UISearchBar:0x12d6352a0>

|   |   |   |   |   |   |   |   <UIView:0x17016ec40>

|   |   |   |   |   |   |   |   |   <UISearchBarBackground:0x12d635bc0>

|   |   |   |   |   |   |   |   |   |   <_UIBackdropView:0x12d6379c0>

|   |   |   |   |   |   |   |   |   <UISearchBarTextField:0x12d636b40>

|   |   |   |   |   |   |   |   |   |   <_UISearchBarSearchFieldBackgroundView:0x12d528ce0>

|   |   |   |   |   |   |   |   |   |   |   <_UISearchBarSearchFieldBackgroundView:0x12d636dc0>

|   |   |   |   |   |   |   |   |   |   |   <_UISearchBarSearchFieldBackgroundView:0x12d636050>

|   |   |   |   |   |   |   |   |   |   <UIImageView:0x1781f5500>

|   |   |   |   |   |   |   |   |   |   <UISearchBarTextFieldLabel:0x12d639100>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194910>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194ab0>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194b80>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194c50>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194d20>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194df0>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194ec0>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178194f90>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195060>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195130>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195200>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x1781952d0>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x1781953a0>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195540>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x1781956e0>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195880>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195a20>

|   |   |   |   |   |   |   <_UITableViewCellSeparatorView:0x178195c90>

|   |   |   |   |   <NotesTextureBackgroundView:0x178194020>

|   |   |   |   |   |   <NotesTextureView:0x1781940f0>

|   |   <UINavigationBar:0x12d6145a0>

|   |   |   <_UINavigationBarBackground:0x12d614ea0>

|   |   |   <UINavigationButton:0x12d639e40>

|   |   |   |   <UIButtonLabel:0x12d512860>

|   |   |   <_UINavigationBarBackIndicatorView:0x1701f1300>`

cy#

bundleIdentifier 获appid

cy# [[NSBundle mainBundle] bundleIdentifier]

@"com.apple.mobilenotes"

cycript使用的更多相关文章

  1. iOS运行时工具-cycript

    cycript是大神saurik开发的一个非常强大的工具,可以让开发者在命令行下和应用交互,在运行时查看和修改应用.它确实可以帮助你破解一些应用,但我觉得这个工具主要还是用来学习其他应用的设计(主要是 ...

  2. iOS执行时工具-cycript

    cycript是大神saurik开发的一个很强大的工具,能够让开发人员在命令行下和应用交互,在执行时查看和改动应用.它确实能够帮助你破解一些应用,但我认为这个工具主要还是用来学习其它应用的设计(主要是 ...

  3. cycript

    cycript是大神saurik开发的一个非常强大的工具,可以让开发者在命令行下和应用交互,在运行时查看和修改应用.它确实可以帮助你破解一些应用,但我觉得这个工具主要还是用来学习其他应用的设计(主要是 ...

  4. iOS逆向工程之Cycript

    1.连接设备 打开一个终端,输入指令: iproxy 重新打开一个新的终端,输入指令: ssh -p root@127.0.0.1 这时候会提示输入密码:默认密码为“alpine”.这样就可以连接到设 ...

  5. iOS逆向系列-Cycript

    概述 Cycript 是Objective-C++.ES(JavaScript).Java等语法的混合物. 可以用来探索.修改.调试正在运行的Mac\iOS App. 通过Cydia安装Cycript ...

  6. iOS逆向工程之App脱壳

    本篇博客以微信为例,给微信脱壳."砸壳"在iOS逆向工程中是经常做的一件事情,,因为从AppStore直接下载安装的App是加壳的,其实就是经过加密的,这个“砸壳”的过程就是一个解 ...

  7. 【腾讯Bugly干货分享】移动App入侵与逆向破解技术-iOS篇

    本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/577e0acc896e9ebb6865f321 如果您有耐心看完这篇文章,您将懂 ...

  8. 【腾讯Bugly干货分享】iOS黑客技术大揭秘

    本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/5791da152168f2690e72daa4 “8小时内拼工作,8小时外拼成长 ...

  9. iOS黑客技术相关

    在黑客的世界里,没有坚不可破的防护系统,也没有无往不胜.所向披靡的入侵利器,有时候看似简单的问题,破解起来也许花上好几天.好几个月,有时候看似很 low 的工具往往能解决大问题:我们以实现微信自动抢红 ...

随机推荐

  1. ROS中.launch文件的remap标签详解

    https://www.cnblogs.com/LiuQiang921202/p/7679943.html

  2. 转载:Maplab开源VI-SLAM框架介绍

    https://blog.csdn.net/ccfiricen/article/details/79089694

  3. {python之协程}一 引子 二 协程介绍 三 Greenlet 四 Gevent介绍 五 Gevent之同步与异步 六 Gevent之应用举例一 七 Gevent之应用举例二

    python之协程 阅读目录 一 引子 二 协程介绍 三 Greenlet 四 Gevent介绍 五 Gevent之同步与异步 六 Gevent之应用举例一 七 Gevent之应用举例二 一 引子 本 ...

  4. webpack.DefinePlugin

    通过配置了DefinePlugin,那么这里面的标识就相当于全局变量,你的业务代码可以直接使用配置的标识.比如,你通过下面的设置: // webpack.config.js new webpack.D ...

  5. C常用的字符串函数实现

    /** 查找字符串 source 中 是否有指定的子串出现,如果有返回第一个匹配的字符 @param source 源 @param chars 目标 @return 返回值 */ char *fin ...

  6. hyperledge vagrant docker development environment

    https://blog.csdn.net/zgljl2012/article/details/52896372

  7. [daily][netctl] netctl有线网络连接使用802.1x进行验证上网

    由于企业安全管理要求,需要验证上网.验证方式是账号密码+802.1x 目前先调研了一下方案,还没有实施,大概调研结果如下: 先参考:https://jlk.fjfi.cvut.cz/arch/manp ...

  8. [linux] 对一个虚拟机的研究

    今天拿到了一个vmware的虚拟机硬盘镜像,是其他公司的演示产品. 启动之后是带着ubuntu字样的grub.进入系统之后也不是shell,而是一个定制的命令行.所以如果想了解细节的话,只能单独挂硬盘 ...

  9. EF-CodeFirst-数据库初始化

    数据库初始化 之前看到Code-First会自动根据域模型创建数据库,下图展示了一个数据库初始化工作流程,该工作流程基于从DbContext派生的上下文类的基础构造函数中传递的参数 如上图所示,上下文 ...

  10. linux根文件系统制作,busybox启动流程分析

    分析 busybox-1.1.6 启动流程,并 制作一个小的根文件系统 源码百度云链接:https://pan.baidu.com/s/1tJhwctqj4VB4IpuKCA9m1g 提取码 :l10 ...