Coder Social home page Coder Social logo

ios-pentesting's Introduction

Welcome to the iOS-Pentesting wiki!

JB Testing

Re-sign

List identities

./applesign.js -L

Re-sign

./applesign.js -i ABCDEFGHIJKLMNOPQRST /blah/blah.ipa

Deploy with impactor or ios-deploy/ipa-deploy

https://slashedm.gitbook.io/xcode-app-signing/where-do-we-go-now/newer-versions

Objection

frida-ps -Uia objection --gadget "com.apple.AppStore" explore

objection explore --startup-command 'ios jailbreak simulate'

Non-JB Testing

Connect phone to Mac - run a test app in xcode and fix signing certificates. This should generate a provisioning file.

Find code sigs

security find-identity -p codesigning -v

Patch Frida dylib to ipa

objection patchipa --source blah.ipa --codesign-signature 1234BLAH

Deploy in debugging mode

ios-deploy --bundle blah.app -W -d

Run in debug mode without installing again

ios-deploy -b blah.app -W -m

Reversing/Patching - use Hopper

Runtime debuggin (this is deprecated) - no one uses cycript anymore

##Cycript:

var app = [ UIApplication sharedApplication ] app.delegate !# you can also just use UIApp.delegate var delegate = new Instance(0x2315f0)

!#call delegate [ delegate pinLockControllerDidFinishUnlocking ] for bool values: [ UIApp.delegate userIsLogged: YES ]

Show current view

cy# UIApp.keyWindow.rootViewController.topViewController.visibleViewController

Get an array of existing objects of a certain class

cy# choose(UIViewController)

List method at runtime

cy# [classname].messages or cy# function printMethods(className) { var count = new new Type("I"); var methods = class_copyMethodList(objc_getClass(className), count); var methodsArray = []; for(var i = 0; i < *count; i++) { var method = methods[i]; methodsArray.push({selector:method_getName(method), implementation:method_getImplementation(method)}); } free(methods); free(count); return methodsArray; } cy# printMethods("[classname]")

Prints out all the instance variables

cy# function tryPrintIvars(a){ var x={}; for(i in a){ try{ x[i] = (a)[i]; } catch(e){} } return x; } cy# a=#0x15d0db80 cy# tryPrintIvars(a)

Manipulating through property

cy# [a pinCode] cy# [a setPinCode: @"1234"] cy# [a isValidPin] cy# a->isa.messages['isValidPin'] = function(){return 1;}

Random Stuff

Restart SpringBoard

killall -HUP SpringBoard

Connect via USB to JB iPhone

iproxy 2222 22

Connect over Wi-Fi

For iOS 10 yalu JB run on device dropbear -R -p 2222

Downloads folder for iFunbox iOS 10 JB

/User/Media/Downloads or /var/mobile/Media

Needle installation on Kali Rolling

git clone https://github.com/mwrlabs/needle.git

apt-get install python2.7 python2.7-dev sshpass sqlite3 lib32ncurses5-dev

If kali has'nt been updated in a while will have to update apt source and gpg key

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

In needle to install all dependencies on device:

use device/dependency_installer

Install lipo from org.coolstar.cctools

Change plist to allow access over Wi-Fi

launchctl unload /Library/LaunchDaemons/dropbear.plist launchctl load /Library/LaunchDaemons/dropbear.plist

Once stash is installed Dropbear is moved to stash location below

/var/db/stash/_.cBfT4d/bin

dropbear -F -R -p 22

Fix dropbear after re-jb

#!/bin/bash
launchctl unload /Library/LaunchDaemons/dropbear.plist
launchctl load /Library/LaunchDaemons/dropbear.plist
/var/db/stash/_.cBfT4d/bin/dropbear -F -R -p 22

ios-pentesting's People

Contributors

psychsecurity avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.