Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# bfinject
Easy dylib injection for jailbroken 64-bit iOS 11.0 - 11.1.2. Compatible with Electra and LiberiOS jailbreaks.
Easy dylib injection for jailbroken 64-bit iOS 11.0 - 11.4.1. Compatible with Electra and LiberiOS jailbreaks.

bfinject loads arbitrary dylibs into running App Store apps. It has built-in support for decrypting App Store apps, and comes bundled with iSpy and Cycript.

Expand All @@ -21,18 +21,22 @@ bfinject is a wrapper that takes care of correctly codesigning your dylibs befor
* [Credits](https://github.com/BishopFox/bfinject/blob/master/README.md#credits)

## Electra Setup
* Jailbreak your iOS 11.0 - 11.1.2 device with Electra >= b7
* Jailbreak your iOS 11.0 - 11.4.1 device with Electra >= 1.3.2
* Copy the bfinject tarball, https://github.com/BishopFox/bfinject/raw/master/bfinject.tar, onto your jailbroken device. You might need to copy it to your laptop first because Github enforces SSL, but the Electra version of `wget` doesn't support SSL.
```
ssh root@your-device-ip # (the password is 'alpine')
ln -s /electra /bootstrap # (latest Electra path move to /electra)
mkdir /bootstrap/usr
mkdir /bootstrap/usr/local
mkdir /bootstrap/usr/local/bin
mkdir bfinject
cd bfinject
wget http://<your_server>/bfinject.tar
tar xvf bfinject.tar
```

## LiberiOS Setup
* Jailbreak your iOS 11.0 - 11.1.2 device with LiberiOS >= 11.0.3
* Jailbreak your iOS 11.0 - 11.4.1 device with LiberiOS >= 11.0.3
* Copy the bfinject tarball, https://github.com/BishopFox/bfinject/raw/master/bfinject.tar, onto your jailbroken device. You might need to copy it to your laptop first because Github enforces SSL, but the LiberiOS version of `wget` doesn't support SSL.
```
ssh root@your-device-ip # (the password is 'alpine')
Expand Down
11 changes: 9 additions & 2 deletions bfinject
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,15 @@ for DYLIB in ${DYLIBS[@]}; do
fi

# Use random filenames to avoid cached binaries causing "Killed: 9" messages.
RAND=`dd if=/dev/random bs=1 count=16 2>/dev/null | md5`
RANDOM_NAME="${INJECTOR%/*}/`dd if=/dev/random bs=1 count=16 2>/dev/null | md5`"
#RAND=`dd if=/dev/random bs=1 count=16 2>/dev/null | md5`
RAND=`dd if=/dev/random bs=1 count=16 2>/dev/null | md5sum | sed 's/ .*//'`
#RANDOM_NAME="${INJECTOR%/*}/`dd if=/dev/random bs=1 count=16 2>/dev/null | md5`"
RANDOM_NAME="${INJECTOR%/*}/`dd if=/dev/random bs=1 count=16 2>/dev/null | md5sum | sed 's/ .*//'`"

# Debug info
echo "*** RAND = $RAND"
echo "*** RANDOM_NAME = $RANDOM_NAME"

DYLIB_DIR="/System/Library/Frameworks/${RAND}.framework"
DYLIB_PATH="$DYLIB_DIR/$RAND.dylib"

Expand Down