iOS_逆向实践(1)_微信到此一游

一丶首先确定下,我们要做什么

启动Wechat的时候,出来个弹窗;

1.jpeg

二丶思路

2.1.根据Reveal获取TabBarControl的控制器名字;
2.2获取Bundle Identifier
2.3.注入弹窗;

哦也;

三丶实现

3.1
12.png

tabbarControl class:MMTabBarController

3.2Bundle Identifier

ssh连接设备

usbmuxd
http://www.jianshu.com/p/d351b5439465

$ps -e

找到进程

/var/mobile/Containers/Bundle/Application/F5B712D6-B61F-42AD-82C5-D3CDBC5A0DDD/WeChat.app/WeChat

用iFunBox打开:

11.png
12.png

得到应用名字:Wechat
Bundle Identifier:com.tencent.xin

3.2 使用Theos
➜  微信破壳 /opt/theos/bin/nic.pl
NIC 2.0 - New Instance Creator
------------------------------
  [1.] iphone/activator_event
  [2.] iphone/application_modern
  [3.] iphone/cydget
  [4.] iphone/flipswitch_switch
  [5.] iphone/framework
  [6.] iphone/ios7_notification_center_widget
  [7.] iphone/library
  [8.] iphone/notification_center_widget
  [9.] iphone/preference_bundle_modern
  [10.] iphone/tool
  [11.] iphone/tweak
  [12.] iphone/xpc_service
Choose a Template (required): 11
Project Name (required): ZBWxHook
Package Name [com.yourcompany.zbwxhook]: com.ZBWxHook.hook
Author/Maintainer Name [xzb]: xzb
[iphone/tweak] MobileSubstrate Bundle filter [com.apple.springboard]: com.tencent.xin
[iphone/tweak] List of applications to terminate upon installation (space-separated, '-' for none) [SpringBoard]: WeChat
Instantiating iphone/tweak in zbwxhook/...
Done.

Makefile

THEOS_DEVICE_IP=192.168.2.7
include $(THEOS)/makefiles/common.mk

TWEAK_NAME = wxHook
wxHook_FILES = Tweak.xm

include $(THEOS_MAKE_PATH)/tweak.mk

after-install::
    install.exec "killall -9 WeChat"

Tweak.xm

%hook MMTabBarController
- (void)viewDidLoad {
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"xzb专用" message:@"到此一游" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
[alert show];
}
%end

执行下

//因为Makefile使用$(THEOS) 所以需要配置下环境
$export PATH=/opt/local/bin:$PATH
$export PATH=/opt/local/sbin:$PATH
$export THEOS=/opt/theos

安装:
$make package install

四丶总结

坑不少,不过坑坑更健康;

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一、介绍及安装 1.简介 Theos是一个越狱开发包。与其它工具相比,它的特点就是简单:下载安装简单、Logos语...
    华南虎阅读 10,964评论 5 52
  • [TOC] iOS 逆向 -微信 helloWorld 一、 前言 本篇主要制作微信的 tweak,实现在非越狱版...
    TKkk阅读 12,739评论 21 42
  • 继续上一篇文章的内容,工具介绍篇: 目录 Theos class-dump 一、Theos越狱开发工具包 简介Th...
    ForestSen阅读 7,877评论 20 66
  • (一) 雨滴欣喜若狂地倾泻而下,似乎丝毫没有跋涉的疲惫,不顾一切地投入这片湿润的南方大地之上,以她渺小且虚弱到透明...
    王娟_阅读 467评论 12 5
  • 作为一个产品新人,心中有无限的疑惑,对自己充满疑惑,对产品充满一会,对需求充满疑惑,每提出一个需求,都会问自己无数...
    暮雨夕阳阅读 227评论 0 0