Skip to content

Commit

Permalink
Added Shadow tools detection and Cydia installed detection in iOS avo…
Browse files Browse the repository at this point in the history
…iding the root bypass using the same,

updated readme
  • Loading branch information
Anshul Thakur committed May 1, 2024
1 parent aa594f1 commit 5a00765
Show file tree
Hide file tree
Showing 13 changed files with 1,715 additions and 18 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,26 @@ interface CheckStatus {

interface RootCheckResult {
isRooted: boolean;
checkStatus: CheckStatus[];
checkStatus: CheckStatus[]; //Android Only
}
```

### Platform Supported:

- [x] Android
- [ ] iOS
- [x] iOS

### Screenshot

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

| Android | iOS |
| ---------------- | -------------------------- |
| <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" /> |

# Root checks

### Android

These are the native checks:

- TEST KEYS
Expand All @@ -70,6 +74,17 @@ These are the native checks:
- WRONG PATH PERMITION
- HOOKS

### iOS

These are the checks that library detects in iOS while determining whether the device is rooted or not:

- Cydia Installed
- Undecimus Installed
- Sileo Installed
- Zbra Installed
- System path for Cydia/Shadow etc like tools
- Suspecious object classes

### False positives

Note that sometimes the `bool isFoundBusyboxBinary()` method can return a false positive.
Expand Down
Binary file modified apk/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apk/ios.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions example/ios/.xcode.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export NODE_BINARY=/Users/anshulthakur/.nvm/versions/node/v18.16.1/bin/node

18 changes: 16 additions & 2 deletions example/ios/DetectFridaExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -572,14 +572,21 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
};
name = Debug;
};
Expand Down Expand Up @@ -616,7 +623,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -636,14 +643,21 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 5a00765

Please # to comment.