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. 洛谷P1316 丢瓶盖【二分】【贪心】

    题目:https://www.luogu.org/problemnew/show/P1316 题意: 给定a个点的坐标(在一条直线上),现在要选b个点,问这b个点的最近距离的最大值是多少. 思路: 感 ...

  2. got positional argument after named arguments.原因

  3. LeetCode 4 - 两个排序数组的中位数 - [分治]

    题目链接:https://leetcode-cn.com/problems/median-of-two-sorted-arrays/description/ 给定两个大小为 m 和 n 的有序数组 n ...

  4. GPU安装小结

    今天一起安装了4块1080的卡.也算有一些坑吧,记录一下. 1)1080显卡,驱动型号,tensorflow,cuda, cudnn 版本一定要一致.我的清单如下: ################# ...

  5. java JDBC (六) org.apache.commons.dbutils 增删改

    dbutils是apache封装了JDBC的工具类,比mysql-connector更方便些 下载地址:http://commons.apache.org/proper/commons-dbutils ...

  6. 在同一台电脑上部署多个tomcat服务器

    因为在写一些小的项目的时候,需要另外用到一台图片服务器,所以不得不开启多个tomcat了. 在这里我用的是tomcat 9.0,一个是正常时的tomcat,一个是图片服务器,在这里我就用tomcat1 ...

  7. 弱网测试之基于TP-LINK

    使用路由器做弱网测试应该是最真实的,网络工程师/运维工程师体会应该最深刻.这种方式测试成本也不高,比较推荐. 设置的方式不在赘述,参见使用手册,高级设置即可. 结束语: 这样测试的时候,测试机器连接该 ...

  8. MySQL模拟Oralce闪回操作

    在前面的文章中我们介绍了MySQL误操作后数据恢复(update,delete忘加where条件),大概操作是通过sed命令把binlog中相关SQL误操作给逆向回来,然后导入SQL文件来恢复错误操作 ...

  9. ACM-最短路之中的一个个人的旅行——hdu2066

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/lx417147512/article/details/27235809 ************** ...

  10. OC分割输入验证码的视觉效果

    效果图: 用到的类: UITextField+VerCodeTF.h #import <UIKit/UIKit.h> @protocol VerCodeTFDelegate <UIT ...