Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-codesigning is broken with Big Sur 11.4 #1

Open
ai212983 opened this issue May 27, 2021 · 1 comment
Open

Re-codesigning is broken with Big Sur 11.4 #1

ai212983 opened this issue May 27, 2021 · 1 comment

Comments

@ai212983
Copy link

It seems something is broken with latest Big Sur 11.4

Patching is just fine

❯ ./macbit -p src/Info.plist target/release/mytool

 / __(_)_ __  _ __  ___|   \ ___| |__ _  _ __ _ __ _| |_ | |
| (_ | | '  \| '  \/ -_) |) / -_) '_ \ || / _` / _` | ' \|_|
 \___|_|_|_|_|_|_|_\___|___/\___|_.__/\_,_\__, \__,_|_||_(_)
                                          |___/
              GimmeDebugah v0.3 - (c) fG!
------------------------------------------------------------
[DEBUG] Processing __PAGEZERO
[DEBUG] Processing __TEXT
[DEBUG] text offset is 68
[DEBUG] __text offset: 0x21a0 lowest: 0xffffffff
[DEBUG] __stubs offset: 0x142fb0 lowest: 0x21a0
[DEBUG] __stub_helper offset: 0x143280 lowest: 0x21a0
[DEBUG] __gcc_except_tab__TEXT offset: 0x143740 lowest: 0x21a0
[DEBUG] __const offset: 0x150220 lowest: 0x21a0
[DEBUG] __info_plist offset: 0x196638 lowest: 0x21a0
[DEBUG] __unwind_info offset: 0x1968f8 lowest: 0x21a0
[DEBUG] __eh_frame offset: 0x19bef0 lowest: 0x21a0
[DEBUG] Processing __DATA_CONST
[DEBUG] __got offset: 0x19c000 lowest: 0x21a0
[DEBUG] __const offset: 0x19c078 lowest: 0x21a0
[DEBUG] Processing __DATA
[DEBUG] data offset is 418
[DEBUG] __la_symbol_ptr offset: 0x1c4000 lowest: 0x21a0
[DEBUG] __data offset: 0x1c43c0 lowest: 0x21a0
[DEBUG] __thread_vars offset: 0x1c4850 lowest: 0x21a0
[DEBUG] __thread_data offset: 0x1c49b8 lowest: 0x21a0
[DEBUG] __thread_bss offset: 0x0 lowest: 0x21a0
[DEBUG] __bss offset: 0x0 lowest: 0x21a0
[DEBUG] __common offset: 0x0 lowest: 0x21a0
[DEBUG] Processing __LINKEDIT
[DEBUG] free offset: a20 new offset: d2f lowest offset: 21a0
[Macbit]free_offset before 0xa20
[Macbit]tmp->text_offset 0x68
[DEBUG] plist offset 1ee0 align 0
[Macbit]free_offset after 0xa20
Info.plist is injected, now you can re-codesign the target binary target/release/blemacd.patched
"codesign -s identity -f target/release/blemacd.patched"
Bye...

But re-codesigning is not:

❯ codesign -s "Self-signed Code Signing Certificate" -f target/release/mytool.patched
target/release/mytool.patched: object file format unrecognized, invalid, or unsuitable

Codesigning before patching works.

@hophacker
Copy link

OK, I'll take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants