Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from m1stadev/main
Browse files Browse the repository at this point in the history
Cleanup + changes
  • Loading branch information
exploit3dguy authored Jun 19, 2021
2 parents c7bcf9d + 111dc79 commit 2188631
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
asr64_patcher
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
all:
gcc asr64_patcher.c -o asr64_patcher
clean:
rm asr64_patcher
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# asr64_patcher
Easily patch ASR on 64-bit devices.
# how to use
A tool to patch the signature checks of a 64-bit ASR binary.

`asr64_patcher asr asr_patched`
## Build
`make`

`ldid2 -e asr_patched > asr.xml`
## Usage
1. Extract binary from an iOS ramdisk (macOS only):
- `img4 -i <ramdisk> -o ramdisk.dmg`
- `img4` can be found [here](https://github.com/xerub/img4lib)
- `hdiutil attach ramdisk.dmg -mountpoint ramdisk`
- `cp ramdisk/usr/sbin/asr .`
- `hdiutil detach ramdisk`

`ldid2 -Sasr.xml asr_patched`
2. Run `asr64_patcher`:
- `asr64_patcher asr asr_patched`

3. Resign patched ASR binary
- `ldid -e asr > ents.plist`
- `ldid -Sents.plist asr_patched`
Binary file removed asr64_patcher
Binary file not shown.
4 changes: 2 additions & 2 deletions asr64_patcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ int get_asr_patch(void *asr, size_t len) {
int main(int argc, char* argv[]) {

if (argc < 3) {
printf("asr_patcher - easily patch ASR on 64-bit devices. By Exploit3d.\n");
printf("Usage: asr asr_patched\n");
printf("Incorrect usage!\n");
printf("Usage: %s [ASR] [Patched ASR]\n", argv[0]);
return -1;
}

Expand Down

0 comments on commit 2188631

Please sign in to comment.