For these hacks the iPhone must be jailbroken. But there currently is a jailbreak available for iOS 8.4 and some below. 4 digit pins can be bruteforced unless there is a attempt limit. Even with the limit it can still be hacked but you would need to break the phone open to rig the power to cut before the attempt is registered. Example here.
For all of these you need:
- Phone to be jailbroken
- OpenSSH installed on the phone
###1) Dump the iOS Keychain