ios逆向的學習筆記

2021-06-22 00:32:31 字數 1891 閱讀 6757

很開心已經接觸到了ios的逆向,並完成了第乙個小的tweak。

功能:hookspringboard 當ios啟動時插入乙個alertview,詳細過程如下:

(大部分工作都在終端下完成)

1、配置環境變數

export  theos=/opt/theos   (就不解釋了,都知道什麼意思)

export lc_collate='c'

export lc_ctype='c'

sudo git clone git: $theos (git是版本控制工具,git clone是獲取軟體的最新版本)

3、ldid

4、配置mobilesubstrate環境

將ios上/library/frameworks/cydiasubstrate.framework/cydiasubstrate.dylib複製到mac中,並執行

sudo mv -f /path/to/cydiasubstrate $theos/lib/libsubstrate.dylib

sudo $theos/bin/bootstrap.sh substrate

5、安裝dpkg

sudo port selfupdate

sudo port install dpkg  (以前ubantu下面用的get-apt就被現在這個port替代,例如get-apt install就等於port install)

6、安裝theos模版

從將解壓得到的5個tar檔案複製到$theos/templates/iphone下

第乙個tweak的製作

1、進入常用目錄(我的是wl/code)然後輸入

$theos/bin/nic.pl  

選擇9輸入deb包的名字(按照bundle identifier寫):com.naken.iosre

2、編輯control

package: com.naken.iosre

name: iosre

depends: mobilesubstrate,firmware (>=5.0)

version: 1.0

architecture: iphoneos-arm

description: 在springboard啟動後彈出uialertview!

maintainer: jooson

author: jooson

homepage:

section: tweaks

3、編輯iosre.plist

4、編輯makefile檔案

archs=armv7

target=iphone:6.1:4.3

include theos/makefiles/common.mk

tweak_name = iosre

iosre_files = tweak.xm

iosre_frameworks=uikit

include $(theos_make_path)/tweak.mk

after-install::

install.exec "killall -9 springboard"

5、編輯tweak.xm(logos和object-c語法)

6、打包(如果沒有前面配置環境的後兩句話就會報錯,sed:re error:illegal byte sequence)

make package

生成乙個deb包,(10.9下可能會出問題,我的是10.8所以就不管了,出問題再去書上查)

(還有很多關於安裝的技巧,可以看書的44頁)

7、安裝

用ssh方法(適用於mac os系統也帶有wifi,有一種通過基於usb的ssh連線的方法,我沒有試通)

在windows下可以用ssh連線(用putty工具)也可以用ifunbox2014進行安裝,我就是用這個方法成功了!

iOS逆向筆記

學習逆向過程中的一些總結 資料彙總 檢視包含哪些架構 armv7 32位真機架構 arm64 64位真機架構 resign自動給所有需要重簽名的plugin重簽名 上傳fir可以檢視是否重簽名成功 resign ipa wangyi.ipa signing identity iphone distr...

iOS逆向學習筆記 一

1.除錯裝置 iphone 5s 因為從5s開始支援arm64 2.系統版本 ios 9.1完美越獄 1.什麼是ios jailbreak?利用ios系統的漏洞,獲取ios系統的最高許可權 root 解開之前的各種限制 合法行為 2.ios jailbreak的優點 靈活管理檔案系統,讓iphone...

iOS逆向學習筆記 二

1.提高工作效率的工具 iterm2 比terminal的命令列工具要好用的多。go2shell 從finder快速定位到命令列工具 安裝的時候需要先拖拽到資料夾上方,安裝完成後,再從上方託下來。2.mac遠端登入到iphone 我們經常在mac的終端上,通過敲一些命令列來完成一些操作。連線通過ss...