Skip to content

Commit 5a00765

Browse files
author
Anshul Thakur
committed
Added Shadow tools detection and Cydia installed detection in iOS avoiding the root bypass using the same,
updated readme
1 parent aa594f1 commit 5a00765

File tree

13 files changed

+1715
-18
lines changed

13 files changed

+1715
-18
lines changed

README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,26 @@ interface CheckStatus {
3838

3939
interface RootCheckResult {
4040
isRooted: boolean;
41-
checkStatus: CheckStatus[];
41+
checkStatus: CheckStatus[]; //Android Only
4242
}
4343
```
4444

4545
### Platform Supported:
4646

4747
- [x] Android
48-
- [ ] iOS
48+
- [x] iOS
4949

5050
### Screenshot
5151

52-
<img src="https://raw.githubusercontent.com/imanshul/react-native-detect-frida/main/apk/app.png" width="300" height="600" alt="demo" />
5352

53+
| Android | iOS |
54+
| ---------------- | -------------------------- |
55+
| <img src="https://raw.githubusercontent.com/imanshul/react-native-detect-frida/main/apk/app.png" width="200" height="400" alt="demo" /> | <img src="https://raw.githubusercontent.com/imanshul/react-native-detect-frida/main/apk/ios.png" width="200" height="400" alt="demo" /> |
5456

5557
# Root checks
5658

59+
### Android
60+
5761
These are the native checks:
5862

5963
- TEST KEYS
@@ -70,6 +74,17 @@ These are the native checks:
7074
- WRONG PATH PERMITION
7175
- HOOKS
7276

77+
### iOS
78+
79+
These are the checks that library detects in iOS while determining whether the device is rooted or not:
80+
81+
- Cydia Installed
82+
- Undecimus Installed
83+
- Sileo Installed
84+
- Zbra Installed
85+
- System path for Cydia/Shadow etc like tools
86+
- Suspecious object classes
87+
7388
### False positives
7489

7590
Note that sometimes the `bool isFoundBusyboxBinary()` method can return a false positive.

apk/app.png

27.4 KB
Loading

apk/ios.png

85.6 KB
Loading

example/ios/.xcode.env.local

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export NODE_BINARY=/Users/anshulthakur/.nvm/versions/node/v18.16.1/bin/node
2+

example/ios/DetectFridaExample.xcodeproj/project.pbxproj

+16-2
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@
544544
COPY_PHASE_STRIP = NO;
545545
ENABLE_STRICT_OBJC_MSGSEND = YES;
546546
ENABLE_TESTABILITY = YES;
547-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
547+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
548548
GCC_C_LANGUAGE_STANDARD = gnu99;
549549
GCC_DYNAMIC_NO_PIC = NO;
550550
GCC_NO_COMMON_BLOCKS = YES;
@@ -572,14 +572,21 @@
572572
);
573573
MTL_ENABLE_DEBUG_INFO = YES;
574574
ONLY_ACTIVE_ARCH = YES;
575+
OTHER_CFLAGS = "$(inherited)";
575576
OTHER_CPLUSPLUSFLAGS = (
576577
"$(OTHER_CFLAGS)",
577578
"-DFOLLY_NO_CONFIG",
578579
"-DFOLLY_MOBILE=1",
579580
"-DFOLLY_USE_LIBCPP=1",
580581
"-DFOLLY_CFG_NO_COROUTINES=1",
581582
);
583+
OTHER_LDFLAGS = (
584+
"$(inherited)",
585+
" ",
586+
);
587+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
582588
SDKROOT = iphoneos;
589+
USE_HERMES = true;
583590
};
584591
name = Debug;
585592
};
@@ -616,7 +623,7 @@
616623
COPY_PHASE_STRIP = YES;
617624
ENABLE_NS_ASSERTIONS = NO;
618625
ENABLE_STRICT_OBJC_MSGSEND = YES;
619-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
626+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
620627
GCC_C_LANGUAGE_STANDARD = gnu99;
621628
GCC_NO_COMMON_BLOCKS = YES;
622629
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -636,14 +643,21 @@
636643
"\"$(inherited)\"",
637644
);
638645
MTL_ENABLE_DEBUG_INFO = NO;
646+
OTHER_CFLAGS = "$(inherited)";
639647
OTHER_CPLUSPLUSFLAGS = (
640648
"$(OTHER_CFLAGS)",
641649
"-DFOLLY_NO_CONFIG",
642650
"-DFOLLY_MOBILE=1",
643651
"-DFOLLY_USE_LIBCPP=1",
644652
"-DFOLLY_CFG_NO_COROUTINES=1",
645653
);
654+
OTHER_LDFLAGS = (
655+
"$(inherited)",
656+
" ",
657+
);
658+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
646659
SDKROOT = iphoneos;
660+
USE_HERMES = true;
647661
VALIDATE_PRODUCT = YES;
648662
};
649663
name = Release;

example/ios/DetectFridaExample.xcworkspace/contents.xcworkspacedata

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)