首页
社区
课程
招聘
[原创]ios测试神器needle使用环境搭建
发表于: 2016-10-28 11:33 8091

[原创]ios测试神器needle使用环境搭建

2016-10-28 11:33
8091
Mwrlabs 继android测试神器drozer之后,又出一款ios测试神器needle

使用要求:
一部越狱后的iphone手机,暂时只支持到了ios8和ios9。越狱后的iphone需要安装组件(缺一不可):
1、Cydia
2、OpenSSH
3、Apt 0.7 Strict

系统依赖环境搭建:
# Core dependencies
brew install python
brew install libxml2
xcode-select --install
# Python packages
sudo -H pip install --upgrade --user readline
sudo -H pip install --upgrade --user paramiko
sudo -H pip install --upgrade --user sshtunnel
sudo -H pip install --upgrade --user frida
# sshpass
brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb
# mitmproxy
wget https://github.com/mitmproxy/mitmproxy/releases/download/v0.17.1/mitmproxy-0.17.1-osx.tar.gz
tar -xvzf mitmproxy-0.17.1-osx.tar.gz
sudo cp mitmproxy-0.17.1-osx/mitm* /usr/local/bin/
# libimobiledevice4
brew install -v --fresh automake autoconf libtool wget libimobiledevice
brew install -v --HEAD --fresh --build-from-source ideviceinstaller

神器下载:git clone https://github.com/mwrlabs/needle.git

needle使用

进入到needle 目录执行 python needle.py 即可启动
1、通过show options 可以查看正常运行时所需设置的属性。
python needle.py


2、可以通过输入把每条命令输入,也可写成配置文件在启动时运行。
     手动输入
[needle] > set DEBUG False
DEBUG => False
[needle] > set SETUP_DEVICE  True
SETUP_DEVICE => True
……

通过配置文件 在启动needle时读取设置
bogon:needle $ python needle.py -r config.txt

             __   _ _______ _______ ______         _______
             | \  | |______ |______ |     \ |      |______
             |  \_| |______ |______ |_____/ |_____ |______

                   Needle v0.0.4 [mwr.to/needle]
  [MWR InfoSecurity (@MWRLabs) - Marco Lancini (@LanciniMarco)]

[*] Loading commands from resource file
[needle] > set DEBUG False
DEBUG => False
[needle] > set VERBOSE True
VERBOSE => True
[needle] > set PUB_KEY_AUTH True
PUB_KEY_AUTH => True
[needle] > set SETUP_DEVICE True
SETUP_DEVICE => True
[needle] > set IP 127.0.0.1
IP => 127.0.0.1
[needle] > set PORT 2222
PORT => 2222
[needle] > use binary/metadata
[needle][metadata] > EOF
[+] Resource file successfully loaded
[needle][metadata] >


注意 第一次运行needle 务必将SETUP_DEVICE设置为True,这样就会自动为iphone安装依赖工具。以后可将SETUP_DEVICE设置为False。

到这一步即可正常使用。
[needle][metadata] > run
[*] Checking connection with device...
[V] Connection not present, creating a new instance
[V] Setting up USB port forwarding on port 2222
[V] Setting up SSH connection...
[+] Connected to: 127.0.0.1
[V] Creating temp folder: /var/root/needle/
[*] Target app not selected. Launching wizard...
[V] Refreshing list of installed apps...
[+] Apps found:
		0 - com.az.azdribbble
		1 - com.e4bf058461-1-42
		2 - com.ss.iphone.article.News
Please select a number: 0
[+] Target app: com.az.azdribbble
[*] Retrieving app's metadata...
[+] Name                : PGDribbble.app
[+] Binary Name         : PGDribbble
[+] Bundle ID           : com.az.azdribbble
[+] UUID                : 081C6042-6C0C-4D92-806D-D578EA20203B
[+] App Version         : 10009 (1.0.0)
[+] Data Directory      : /private/var/mobile/Containers/Data/Application/5D25604C-8707-4036-ACAC-0A0F0732F808
[+] Bundle Directory    : /private/var/mobile/Containers/Bundle/Application/081C6042-6C0C-4D92-806D-D578EA20203B
[+] Binary Directory    : /private/var/mobile/Containers/Bundle/Application/081C6042-6C0C-4D92-806D-D578EA20203B/PGDribbble.app
[+] Binary Path         : /private/var/mobile/Containers/Bundle/Application/081C6042-6C0C-4D92-806D-D578EA20203B/PGDribbble.app/PGDribbble
[+] Architectures       : arm64
[+] Platform Version    : 9.3
[+] SDK Version         : iphoneos9.3
[+] Minimum OS          : 9.0
[+] Entitlements
[+] 		 application-identifier                  : 8SCA46H5FT.com.az.azdribbble
[+] 		 com.apple.developer.team-identifier     : 8SCA46H5FT
[+] 		 keychain-access-groups                  : ['8SCA46H5FT.com.az.azdribbble']
[+] 		 aps-environment                         : production
[*] URL Handlers not found
[+] Apple Transport Security Settings
[+] 		 NSAllowsArbitraryLoads                  : 1
[*] No Application Extensions found
[needle][metadata] >


具体使用命令就不在此列举,毕竟刚出没多久还有许多坑需要填。感兴趣的小伙伴可以参考官方文档:https://labs.mwrinfosecurity.com/blog/needle-how-to/

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

上传的附件:
收藏
免费 0
支持
分享
最新回复 (1)
游客
登录 | 注册 方可回帖
返回
//