This project is a macOS dylib project that integrates the Dobby Hook framework, aiming to enhance software through the use of the Dobby Hook framework.
Development Environment:
- macOS (SIP disabled & allow any source)
- Xcode 15.2 | CLion
- Hopper | IDA
Directory Structure:
- dylib_dobby_hook: Source code
- libs: Libraries that the project depends on
- release: Built product libraries
- script:
- auto_hack.sh: One-click script
sudo bash auto_hack.sh
- auto_hack.sh: One-click script
- tools:
- insert_dylib: Open-source static injection tool
- dynamic_inject: Dynamic injection tool [SIP OFF]
- process_inject: Process injection tool [BETA][SIP OFF]
- Cross-platform [intel/apple] HOOK
- Integrated development and debugging environment with Xcode|CLion
- Signature code search
Click here to expand/collapse
App | version | x86 | arm | Download | SIP | Author |
---|---|---|---|---|---|---|
TablePlus | 6.* | ✔ | ✔ | https://tableplus.com/ | ||
DevUtils | 1.* | ✔ | ✔ | https://devutils.com/ | ||
AirBuddy | 2.* | ✔ | ✔ | https://v2.airbuddy.app/download | ||
Navicat Premium | 17.* | ✔ | ✔ | App Store | ||
Paste | 4.* | ✔ | ✔ | App Store | Hokkaido | |
iStat Menus | 7.* | ✔ | ✔ | https://bjango.com/mac/istatmenus/ | Hokkaido | |
Transmit | 5.* | ✔ | ✔ | https://panic.com/transmit/#download | ||
AnyGo | 7.* | ✔ | ✔ | https://itoolab.com/gps-location-changer/ | ||
Downie | 4.* | ✔ | ✔ | https://software.charliemonroe.net/downie/ | ||
Permute | 3.* | ✔ | ✔ | https://software.charliemonroe.net/permute/ | ||
ProxyMan | 5. | ✔ | ✔ | https://proxyman.io/ | ON | |
Movist Pro | 2.* | ✔ | ✔ | https://movistprime.com/ | ||
Surge | 5.8.* | ✔ | ✔ | https://nssurge.com/ | ON | |
Infuse | 7.7.* | ✔ | ✔ | App Store | ||
MacUpdater | 3. | ✔ | ✔ | https://www.corecode.io/macupdater/#download | ||
CleanShotX | 4. | ✔ | ✔ | https://updates.getcleanshot.com/v3/ | ||
ForkLift | 4. | ✔ | ✔ | https://binarynights.com/ | ON | |
IDA Pro | 9. | ✔ | ✔ | https://out5.hex-rays.com/beta90_6ba923/ | alula |
tar -xzvf dylib_dobby_hook.tar.gz
cd script
sudo bash auto_hack.sh
The basic code has been completed. To be compatible with more app patches, the adapter pattern is used for extension.
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import "HackProtocol.h"
@interface XXXHack : HackProtocolDefault
@end
@implementation XXXHack
- (NSString *)getAppName {
return @"com.dev.xxx";
}
- (NSString *)getSupportAppVersion {
return @"1.0";
}
- (BOOL)hack {
#if
defined(__arm64__) || defined(__aarch64__)
// do arm something..
#elif
defined(__x86_64__)
// do x86 something..
#endif
return YES;
}
@end
After compilation, we will get our dylib patch. Then write a shell script to inject.
## Static Injection
cp -f source_bin source_bin_backup
"${insert_dylib}" --weak --all-yes "${YOUR_BUILD_PATH}/libdylib_dobby_hook.dylib" "source_bin_backup" "source_bin"
## Dynamic Injection [SIP OFF]
./dynamic_inject "xxx.app" "${YOUR_BUILD_PATH}/libdylib_dobby_hook.dylib"
## Process Injection [SIP OFF]
./process_inject "$pid" "${YOUR_BUILD_PATH}/libdylib_dobby_hook.dylib"
sudo codesign -f -s - --all-architectures --deep "/Applications/xxx.app"
For research and learning purposes only. Please do not use for illegal purposes.
Note: If reprinted, please indicate the source (link to this post) and author information.