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. easyui tree 更改图标

    easyui tree 更改图标 ,onLoadSuccess: function (node, data) { $('#tt .tree-icon').css("background&qu ...

  2. LeetCode 112 Minimum Depth of Binary Tree

    Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shor ...

  3. win10屏幕变灰怎么解决?

    朋友们在使用电脑过程中最高频使用的快捷键可能就是ctrl+c, ctrl+v了,但是殊不知,有时候按的太快产生误触,触发了ctrl+win+c,是屏幕变成了灰色,只需要再次同时按下这三个键就可以恢复彩 ...

  4. POJ 1816 - Wild Words - [字典树+DFS]

    题目链接: http://poj.org/problem?id=1816 http://bailian.openjudge.cn/practice/1816?lang=en_US Time Limit ...

  5. 计蒜客 31436 - 提高水平 - [状压DP]

    题目链接:https://nanti.jisuanke.com/t/31436 作为一名车手,为了提高自身的姿势水平,平时的练习是必不可少的.小 J 每天的训练包含 $N$ 个训练项目,他会按照某个顺 ...

  6. 垃圾回收基本算法 内存管理 GC大统一理论

    <垃圾收集> (豆瓣) https://book.douban.com/subject/1157908/ 第1章 简介1.1 内存分配的历史1.1.1 静态分配1.1.2 栈分配1.1.3 ...

  7. Page9:结构分解以及系统内部稳定和BIBO稳定概念及其性质[Linear System Theory]

    内容包含系统能控性结构分解.系统能观测性结构分解以及系统结构规范分解原理,线性系统的内部稳定.BIBO稳定概念及其性质

  8. Flink – metrics V1.2

    WebRuntimeMonitor   .GET("/jobs/:jobid/vertices/:vertexid/metrics", handler(new JobVertexM ...

  9. XE 画矩形实现拖拉改变大小(属性)

    实现原理: 1.拖一个rectangle控件,Align属性为TOP 2.拖一个Split控件,Align为Top 3.拖Rectangle,Align为Bottom 4.拖Split,Align为B ...

  10. div总在页面最顶端

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx. ...