Compare commits
12 changed files with 333 additions and 341 deletions
112
README.md
112
README.md
|
|
@ -1,112 +0,0 @@
|
|||
# MB ZDefend Bypass Module for MB/MBCP
|
||||
|
||||
|
||||
- Current module version : `v3.6-mb` | Download from [releases tab](https://git.disroot.org/cuynu/mbzdefend-fix/releases)
|
||||
|
||||
- Author : [Cuynu](https://git.disroot.org/cuynu) and [backslashxx](https://github.com/backslashxx) for sed script
|
||||
|
||||
- Status : Working with MBCP!
|
||||
|
||||
- Required app version : MBCP `v6.4.67` and up for `v3.2-mb+` | MB `v6.4.15` up to `v6.4.58` for `v3.0-mb` or lower
|
||||
|
||||
- Required Biz MBBank v2.0 app version : `v1.0.85` and newer :>
|
||||
|
||||
## Why this exists ?
|
||||
- Zimperium and MB Bank development team didn't respect our freedom and privacy by blocking rooted devices (KernelSU/KernelSU-Next/Magisk/APatch), device using LSPosed with a screen showing "THIẾT BỊ JAILBROKEN HOẶC ROOTED" or "JAILBROKEN DEVICE OR ROOTED" (in English) with only "Close app" option.
|
||||
|
||||
## Source code
|
||||
|
||||
This project are licensed under [MIT License](https://git.disroot.org/cuynu/mbzdefend-fix).
|
||||
|
||||
- For module : Located on [module_new](https://git.disroot.org/cuynu/mbzdefend-fix/src/branch/main/module_new/zdefend-fix)
|
||||
|
||||
- For patched lib (Deprecated) : There is no source code for that as it belong to MB Bank development team and Zimperium. You can make your own patched lib with old method below if you don't want to use my pre-patched lib :)
|
||||
|
||||
## Usage (Module)
|
||||
- Ensure that old root detection (vtap) is bypassed by hiding MB Bank or Biz MBBank v2.0 App from root with any old ways, like Denylist as the module does not handle this old root detection method (For Magisk : [Here](https://www.youtube.com/watch?v=OfFoRltRlME) | For Magisk Delta/Kitsune : [Here](https://www.youtube.com/watch?v=tToyWfJQ-yw)
|
||||
- Download mbzdefend-fix module from [releases](https://git.disroot.org/cuynu/mbzdefend-fix/releases) or clone the repo, then `./createmodule.sh`
|
||||
- Flash with your root app (Magisk, KernelSU, KernelSU Next, APatch, etc)
|
||||
- It should automatically patches `libZDefend.so` and `libapp.so` then open MB/MBCP or Biz MB Bank v2.0 app once it finished.
|
||||
- NOTE : Every time you need to use MB Bank, you MUST run "Action" on root app -> Modules -> MB ZDefend Bypass instead of open app directly from app drawer (Applies for v6.4.56+ due to server-side MB changes)
|
||||
- NOTE : App will open with 1005/1007 error or stuck on MB logo, DON'T PANIC and wait for error popup appears, then press "Try again" until app enter login screen !!!
|
||||
|
||||
|
||||
# Tested app version (Outdated)
|
||||
- Checked mark is the version that already tested and working~
|
||||
|
||||
- [x] [MB Bank v6.4.58](https://t.me/embeeapks/48) (MBShield) (need workaround)
|
||||
|
||||
- [x] [MB Bank v6.4.57](https://t.me/embeeapks/47) (MBShield) (need workaround)
|
||||
|
||||
- [x] [MB Bank v6.4.56](https://t.me/embeeapks/46) (MBShield) (need workaround)
|
||||
|
||||
- [x] [MB Bank v6.4.55](https://t.me/embeeapks/45) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.54](https://t.me/embeeapks/43) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.53](https://t.me/embeeapks/42) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.52](https://t.me/embeeapks/41) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.51](https://t.me/embeeapks/36) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.50](https://t.me/embeeapks/35) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.49](https://t.me/embeeapks/32) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.48](https://t.me/embeeapks/30) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.47](https://t.me/embeeapks/29) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.46](https://t.me/embeeapks/28) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.45](https://t.me/embeeapks/25) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.44](https://t.me/embeeapks/24) - No Zimperium found. (MBShield)
|
||||
|
||||
- [x] [MB Bank v6.4.43](https://t.me/embeeapks/23) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.42](https://t.me/embeeapks/22) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.41](https://t.me/embeeapks/21) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.40](https://t.me/embeeapks/20) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.39](https://t.me/embeeapks/19) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.38](https://t.me/embeeapks/18) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.37](https://t.me/embeeapks/17) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.36](https://t.me/embeeapks/16) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.35](https://t.me/embeeapks/14) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.34](https://t.me/embeeapks/13) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.33](https://t.me/embeeapks/11) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.32](https://t.me/embeeapks/9) (MBShield) (no crashes)
|
||||
|
||||
- [x] [MB Bank v6.4.31](https://t.me/embeeapks/6) (MBShield)
|
||||
|
||||
- [x] [MB Bank v6.4.30](https://t.me/mbmobileold/198) (MBShield)
|
||||
|
||||
- [x] [MB Bank v6.4.29](https://t.me/mbmobileold/197) (MBShield)
|
||||
|
||||
- [x] [MB Bank v6.4.28](https://t.me/mbmobileold/196) (MBShield)
|
||||
|
||||
- [x] [MB Bank v6.4.27](https://t.me/mbmobileold/195) (MBShield)
|
||||
|
||||
|
||||
|
||||
## How this was done (Pre-patched binary only) (OUTDATED)
|
||||
- Use HxD Hex Editor (can be run on Linux env with wine)
|
||||
- Get `libZDefend.so` from MB Bank app, APKs can be get from Google Play or Aurora Store
|
||||
- For `libvvb2060.so`, create a empty file and name it as `libvvb2060.so`
|
||||
- Open `libZDefend.so` with HxD Hex Editor, use Replace feature (Ctrl + R)
|
||||
- In search for field, type `zimperium`
|
||||
- In replace with field, fill 9 empty blank space characters or any random words that has 9 characters -> Replace all (Be careful, if something went wrong then modified `libZDefend.so` file will not work at all)
|
||||
- After HxD replaced zimperium with 9 empty black space characters or empty, save it with (Ctrl + S)
|
||||
- Copy that`libZDefend.so` you just modified to MB Bank lib folder
|
||||
- Force close MB Bank app if its not completely stopped, then open MB Bank app again, from now its should load new library and the root & hook detection from Zimperium should be bypassed
|
||||
|
|
@ -5,16 +5,16 @@ COMMIT="$(git rev-parse --short HEAD)"
|
|||
|
||||
echo "Creating module (*.zip)..."
|
||||
cd module_new/zdefend-fix
|
||||
zip -r mbzdefend_fix_$COMMIT.zip . >/dev/null 2>&1
|
||||
zip -r mbzdefend_fix_bindhosts_$COMMIT.zip . >/dev/null 2>&1
|
||||
cd ..
|
||||
cd ..
|
||||
mv module_new/zdefend-fix/mbzdefend_fix_*.zip mbzdefend_fix_$COMMIT.zip
|
||||
mv module_new/zdefend-fix/mbzdefend_fix_*.zip mbzdefend_fix_bindhosts_$COMMIT.zip
|
||||
|
||||
if [ -f mbzdefend_fix_*.zip ]; then
|
||||
echo "Module saved to [mbzdefend_fix_$COMMIT.zip], try to flash it :>"
|
||||
echo "Module saved to [mbzdefend_fix_bindhosts_$COMMIT.zip], try to flash it :>"
|
||||
rm -rf module_new/zdefend-fix/*.zip
|
||||
else
|
||||
echo "Where is [mbzdefend_fix_$COMMIT.zip] ?"
|
||||
echo "Where is [mbzdefend_fix_bindhosts_$COMMIT.zip] ?"
|
||||
echo "Did module actually created yet... Try fetch repo and use command again!"
|
||||
echo "If your system doesn't have [zip], pls install it"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,129 +0,0 @@
|
|||
# MBZDefend-Fix by Cuynu
|
||||
Bypass new stupid MB Bank zimperium root/hook detection (does not bypass VTAP root detection)
|
||||
|
||||
## Changelogs :
|
||||
|
||||
- v3.7-mb
|
||||
```
|
||||
feat: bump v3.7-mb
|
||||
feat: createmodule.sh: commit id after module name
|
||||
feat: vtapstillfail.sh: open vtapfix after vtap failling to init
|
||||
feat: customize.sh: handle denylist for magisk & depends on syslang to open proper vtapfix web
|
||||
```
|
||||
|
||||
- v3.6-mb
|
||||
```
|
||||
feat: misc changes
|
||||
- remove old patching code (v6.4.55 or older please use older version)
|
||||
- new auto granting app permission
|
||||
- improve code logic
|
||||
- support english & vietnamese language for MBZDefend-Fix notification
|
||||
- other changes idk
|
||||
|
||||
joke: im not (or is) a developer
|
||||
|
||||
```
|
||||
|
||||
- v3.5-mb
|
||||
```
|
||||
feat: redirect zimperium to localhost
|
||||
```
|
||||
|
||||
- v3.4-mb
|
||||
```
|
||||
feat: adapt with new detection point
|
||||
```
|
||||
|
||||
- v3.3-mb
|
||||
```
|
||||
fix: customize.sh: typo fix
|
||||
feat: vtapstillfail.sh: notice for low-end devices that is failing to properly provision vtap
|
||||
feat: implement MB & termux & magisk check
|
||||
feat: check if vtap is provisioned or not
|
||||
```
|
||||
|
||||
- v3.2-mb
|
||||
```
|
||||
fix: installation failling on some devices
|
||||
```
|
||||
|
||||
- v3.1-mb
|
||||
```
|
||||
moved to new code structure, only works with patched MB app (MBCP)
|
||||
```
|
||||
|
||||
- v3.0-mb
|
||||
```
|
||||
added termux script for easier use
|
||||
```
|
||||
|
||||
- v2.9-mb
|
||||
```
|
||||
workaround for v6.4.56+, ugly but works :<
|
||||
- it's now requires you to run "Action" on root app -> modules -> MB ZDefend Bypass everytime you need to use MB Bank app...
|
||||
```
|
||||
|
||||
- v2.8-mb
|
||||
```
|
||||
open url that guide users follow step to hide vtap detection
|
||||
```
|
||||
|
||||
- v2.6-mb
|
||||
```
|
||||
module name changed to "MB ZDefend Bypass"
|
||||
delete fake "libZDefend.so" for both MB Bank & BizMB Flutter
|
||||
add support for Biz MB Bank v2.0 (Flutter)
|
||||
```
|
||||
|
||||
- v2.5-mb
|
||||
```
|
||||
fix module description.
|
||||
```
|
||||
|
||||
- v2.4-mb
|
||||
```
|
||||
disable provider silently
|
||||
```
|
||||
|
||||
- v2.3-mb
|
||||
```
|
||||
disable provider before patching
|
||||
```
|
||||
|
||||
- v2.2-mb
|
||||
```
|
||||
patching [com.mbmobile] only and minor other changes
|
||||
```
|
||||
|
||||
- v2.1-mb
|
||||
```
|
||||
adapt with v6.4.48+
|
||||
```
|
||||
|
||||
- v2.0-mb
|
||||
```
|
||||
deleting /data/magisk to prevent eKYC failling
|
||||
deleting /data/magisk for startup script and actions
|
||||
```
|
||||
- v1.9-mb
|
||||
```
|
||||
- change patch arguments
|
||||
- check for sed version before patching
|
||||
```
|
||||
- v1.8-mb
|
||||
```
|
||||
- fix patching failure on startup for Magisk
|
||||
```
|
||||
- v1.7-mb
|
||||
```
|
||||
- fix patching failure on Magisk by don't use busybox
|
||||
```
|
||||
- v1.6-mb
|
||||
```
|
||||
- Test fix installation issue on Magisk/Kitsune Mask
|
||||
```
|
||||
|
||||
- v1.5-mb
|
||||
```
|
||||
- Initial release
|
||||
```
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"version": "v3.7-mb",
|
||||
"versionCode": "37",
|
||||
"zipUrl": "https://git.disroot.org/mbcp/mbzdefend-fix/releases/download/v3.7-mb/mbzdefend_fix_7e94380.zip",
|
||||
"changelog": "https://git.disroot.org/cuynu/mbzdefend-fix/raw/branch/main/module_new/CHANGELOG.md"
|
||||
}
|
||||
|
|
@ -2,25 +2,57 @@
|
|||
|
||||
SYSLANGVI="$(getprop persist.sys.locale | grep vi-VN)"
|
||||
|
||||
INSTALLEN="https://git.disroot.org/mbcp/info_en/wiki/mbcpinstall"
|
||||
INSTALLVI="https://git.disroot.org/mbcp/info_vi/wiki/mbcpinstall"
|
||||
|
||||
notmbcp() {
|
||||
echo "MB Bank [com.mbmobile] is installed, but it seems like that the app is NOT MBCP"
|
||||
echo "Please install MBCP v6.4.60+ in order to use this module !"
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info/wiki/mbcpinstall
|
||||
[[ $SYSLANGVI ]] && am start -a android.intent.action.VIEW -d $INSTALLVI || am start -a android.intent.action.VIEW -d $INSTALLEN
|
||||
exit 1
|
||||
}
|
||||
|
||||
vtapfail() {
|
||||
echo "VTAP is not provisioned!"
|
||||
echo "App first normal launch required!"
|
||||
iptables -t nat -F OUTPUT
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
logcat -c
|
||||
sleep 20
|
||||
logcat -d | grep VGFullScreenDialog && vtapstillfail
|
||||
am force-stop com.mbmobile
|
||||
}
|
||||
|
||||
vtapstillfail() {
|
||||
echo "VTAP provision failed or triggering! Cannot continue!"
|
||||
echo "If you have low-end device (eg : Vsmart Joy 2+)"
|
||||
echo "Try to reinstall module again 3 more times."
|
||||
if [ $SYSLANGVI ]; then
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_vi/wiki/afterinstall
|
||||
exit 169
|
||||
else
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_en/wiki/afterinstall
|
||||
exit 169
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for original MB Bank app
|
||||
for library in $(find /data/app -name libvvb2060.so | grep com.mbmobile) ; do notmbcp ; done
|
||||
for library in $(find /data/app -name libtoolChecker.so | grep com.mbmobile) ; do notmbcp ; done
|
||||
|
||||
# Check VTAP status to ensure that it must be provisioned
|
||||
echo "Checking VTAP status..."
|
||||
echo "VTAP status : " && cat '/data/data/com.mbmobile/databases/vtap' | grep -q "true" && echo "VTAP is provisioned!" || vtapfail || exit 169
|
||||
echo "Checking VTAP status again..."
|
||||
cat '/data/data/com.mbmobile/databases/vtap' | grep -q "true" && echo "VTAP is provisioned!" || vtapstillfail || exit 169
|
||||
|
||||
|
||||
# Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users
|
||||
echo "Deleting /data/magisk if it exists..."
|
||||
[[ -d /data/magisk ]] && rm -r /data/magisk
|
||||
[[ -d /data/adb/magisk ]] && rm -r /data/magisk
|
||||
[[ -d /data/adb/magisk ]] && find /data/. -name 'magisk_backup*' -delete
|
||||
|
||||
echo Forcing stop MB Bank...
|
||||
am force-stop com.mbmobile
|
||||
|
||||
echo Starting Flutter activity...
|
||||
echo "ATTENTION : Network traffic will be redirected to [medium.com] for 20 seconds !!!"
|
||||
echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass device not secure dialog !"
|
||||
logcat -c
|
||||
rm -rf /data/data/com.mbmobile/files/0*
|
||||
rm -rf /data/data/com.mbmobile/files/1*
|
||||
rm -rf /data/data/com.mbmobile/files/2*
|
||||
|
|
@ -32,20 +64,67 @@ echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass devi
|
|||
rm -rf /data/data/com.mbmobile/files/8*
|
||||
rm -rf /data/data/com.mbmobile/files/9*
|
||||
rm -rf /data/data/com.mbmobile/files/KNOV3PN*
|
||||
rm -rf /data/data/com.mbmobile/files/zxpolicyme*
|
||||
rm -rf /data/data/com.mbmobile/files/zxpolicy*
|
||||
rm -rf /data/data/com.mbmobile/files/policyme*
|
||||
find /data/data/com.mbmobile/files -size +2000k -delete
|
||||
|
||||
iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443
|
||||
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
# VPN connection requires 20 seconds, while normal one only requires 10 seconds
|
||||
sleep 20
|
||||
echo "Restoring network traffic"
|
||||
iptables -t nat -F OUTPUT
|
||||
if [ $SYSLANGVI ]; then
|
||||
oldzimperium() {
|
||||
echo "ATTENTION : Network traffic will be redirected to [medium.com] for 20 seconds !!!"
|
||||
echo "Press [Try again] after got 1005/1007/VPN error on MB, so it's can bypass device not secure dialog !"
|
||||
# Reference : https://superuser.com/questions/1248670/redirect-ip-to-another-ip-using-iptables
|
||||
iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 162.159.152.4
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
sleep 20
|
||||
logcat -d | grep VGFullScreenDialog && vtapstillfail
|
||||
echo "Restoring network traffic"
|
||||
# Reference : https://gist.github.com/jstrosch/3190568 (Line 7)
|
||||
iptables -t nat -F
|
||||
|
||||
if [ $SYSLANGVI ]; then
|
||||
su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'LƯU Ý : Vui lòng nhấn [Thử lại] tại màn hình báo lỗi 1005/1007/VPN để vào App MBCP.'" >/dev/null 2>&1
|
||||
else
|
||||
else
|
||||
su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'WARNING : Please click [Try again] on 1005/1007/VPN screen to continue entering MBCP App.'" >/dev/null 2>&1
|
||||
fi
|
||||
sleep 3
|
||||
fi
|
||||
sleep 3
|
||||
}
|
||||
|
||||
nometamodule() {
|
||||
echo "No meta-module installed! Please install one and reboot then try again!!!!"
|
||||
echo "We recommend Hybird Mount..."
|
||||
echo "Opening release page in 5 seconds..."
|
||||
am start -a android.intent.action.VIEW -d https://github.com/Hybrid-Mount/meta-hybrid_mount/releases
|
||||
sleep 5
|
||||
exit 1
|
||||
}
|
||||
|
||||
checkmetamodule() {
|
||||
[ ! -d /data/adb/metamodule ] && nometamodule
|
||||
}
|
||||
|
||||
|
||||
zimperiumpresent() {
|
||||
echo "Zimperium still present! Cannot continue :("
|
||||
echo "Checking if your current root implementation has metamodule..."
|
||||
[ -f /data/adb/modules/mountify ] && echo "You are using [Mountify] metamodule!" && echo "Please install [bindhosts] module and use MBZDefend-Fix bindhosts variant or use custom DNS with host blocking instead!" && exit 1
|
||||
[ -f /data/adb/metamodule/disable ] && echo "Current installed metamodule is disabled, enabling again!" && rm -f /data/adb/metamodule/disable && echo "Reboot and try again?" && exit 1
|
||||
[ -f /data/adb/ksud ] && cat /data/adb/ksud | grep -q ksud::metamodule && checkmetamodule
|
||||
[ -f /data/adb/apd ] && cat /data/adb/apd | grep -q apd::metamodule && checkmetamodule
|
||||
echo "Please remove any module override hosts, or use alternative DNS with zimperium host blocking!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
strongerzimperium() {
|
||||
echo "Testing network..."
|
||||
curl -s --max-time 5 google.com | grep -q html* || echo "No network available, Cannot continue:(" || exit 1
|
||||
echo "Testing zimperium..."
|
||||
curl -s --max-time 10 gts.zimperium.com | grep -q html* && zimperiumpresent
|
||||
echo "Enabling [com.mbmobile] app..."
|
||||
pm enable com.mbmobile | grep -q enabled* && echo "[com.mbmobile] is now enabled!"
|
||||
echo "Opening app..."
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
|
||||
}
|
||||
|
||||
# check v6.5.7+
|
||||
find /data/app -name libcode.so | grep -q com.mbmobile && strongerzimperium || oldzimperium
|
||||
|
|
|
|||
|
|
@ -3,27 +3,195 @@
|
|||
SYSLANGVI="$(getprop persist.sys.locale | grep vi-VN)"
|
||||
ANDROIDSDK="$(getprop ro.build.version.sdk)"
|
||||
|
||||
INSTALLVI="https://git.disroot.org/mbcp/info_vi/wiki/mbcpinstall"
|
||||
INSTALLEN="https://git.disroot.org/mbcp/info_en/wiki/mbcpinstall"
|
||||
|
||||
SELINUXSTATUS="$(getenforce)"
|
||||
|
||||
echo "SELinux status : $SELINUXSTATUS"
|
||||
|
||||
[ -f /data/local/tmp/lastappfail ] && echo "Last app installation fail: YES"
|
||||
|
||||
[ ! -f /data/local/tmp/lastappfail ] && echo "Last app installation fail : NO"
|
||||
|
||||
getapkpath() {
|
||||
dumpsys package com.mbmobile | grep path: > /data/local/tmp/path.txt
|
||||
sed -i 's| path: ||g' /data/local/tmp/path.txt
|
||||
APKPATH="$(cat /data/local/tmp/path.txt)"
|
||||
echo "APK Path: $APKPATH"
|
||||
}
|
||||
|
||||
# Clear old iptables
|
||||
iptables -t nat -F
|
||||
|
||||
alreadybypassed() {
|
||||
echo "Current MBCP app comes with Zimperium bypass patches"
|
||||
echo "There is no need to install this module."
|
||||
echo "Continue anyway then."
|
||||
}
|
||||
|
||||
nonfosskitsune() {
|
||||
echo "Proprietary Kitsune found! Your data might be at risk!"
|
||||
echo "Consider install older FOSS Kitsune Mask to protect your data!"
|
||||
echo "If you agree with the risk, wait 15 seconds then module will continue to install"
|
||||
sleep 15
|
||||
}
|
||||
maliciousmagisk() {
|
||||
echo "Nirtal Magisk found! Your data might be at risk!"
|
||||
echo "Consider install official Magisk to protect your data !"
|
||||
echo "If you agree with the risk, wait 15 seconds then module will continue to install"
|
||||
sleep 15
|
||||
}
|
||||
|
||||
notmbcp() {
|
||||
echo "MB Bank [com.mbmobile] is installed, but it seems like that the app is NOT MBCP"
|
||||
echo "MB Bank [com.mbmobile] is installed, but the app is NOT MBCP :("
|
||||
echo "Please install MBCP v6.4.60+ in order to use this module !"
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info/wiki/mbcpinstall
|
||||
[[ $SYSLANGVI ]] && am start -a android.intent.action.VIEW -d $INSTALLVI >/dev/null 2>&1 || am start -a android.intent.action.VIEW -d $INSTALLEN >/dev/null 2>&1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Replacement for /system/etc/hosts
|
||||
# Fixes module being disabled due to bindhosts module
|
||||
nobindhosts() {
|
||||
echo "[bindhosts] module not found"
|
||||
echo "Please use normal MBZDefend-Fix module instead !"
|
||||
exit 169
|
||||
}
|
||||
|
||||
bindhosts() {
|
||||
echo "bindhosts module found ! Applying blacklist rules"
|
||||
[ $(cat /data/adb/bindhosts/blacklist.txt | grep zimperium*) ] || echo "*.zimperium.com" >> /data/adb/bindhosts/blacklist.txt
|
||||
}
|
||||
|
||||
[ -d /data/adb/bindhosts ] && bindhosts || nobindhosts
|
||||
|
||||
|
||||
tsnghma() {
|
||||
echo "Dr-TSNG HideMyAppList detected!"
|
||||
echo "Hiding app..."
|
||||
pm hide com.tsng.hidemyapplist >/dev/null 2>&1
|
||||
}
|
||||
|
||||
oldlsposed() {
|
||||
echo "--------INCOMPATIBLE LSPOSED DETECTED--------"
|
||||
echo "You are using older version of LSPosed!"
|
||||
echo "From MB v6.4.80+, you need to use LSPosed with 7199+"
|
||||
echo "Please install newer LSPosed to continue."
|
||||
echo "We recommend to use Vector, which is formly named as LSPosed."
|
||||
echo "You can choose other LSPosed, as long as it newer than 7199+"
|
||||
echo "---------------------------------------------"
|
||||
am start -a android.intent.action.VIEW -d https://github.com/JingMatrix/Vector/releases >/dev/null 2>&1
|
||||
echo "Also remove old LSPosed module if you install Vector!"
|
||||
echo "After installed, reboot your device, clear MBCP app data, then install this module again."
|
||||
exit 1
|
||||
}
|
||||
|
||||
removeoldfw() {
|
||||
echo "Removing old VTAP (V-Key) firmware..."
|
||||
[ -f /data/data/com.mbmobile/files/firmware ] && rm -rf /data/data/com.mbmobile/files/firmware
|
||||
[ -f /data/data/com.mbmobile/files/profile ] rm -rf /data/data/com.mbmobile/files/profile
|
||||
}
|
||||
|
||||
vtapfail() {
|
||||
echo "VTAP is not provisioned!"
|
||||
echo "App first normal launch required!"
|
||||
iptables -t nat -F
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
logcat -c
|
||||
sleep 20
|
||||
logcat -d | grep VGFullScreenDialog && vtapstillfail
|
||||
logcat -d | grep -q com.vtap.MaintenanceActivity && vtapstillfail
|
||||
am force-stop com.mbmobile
|
||||
checkvtapagain
|
||||
}
|
||||
|
||||
vtapstillfail() {
|
||||
iptables -t nat -F
|
||||
echo "VTAP provision failed or triggering! Cannot continue!"
|
||||
echo "Please follow [afterinstall] for fix steps."
|
||||
echo "In case if you already done :"
|
||||
echo "Try to reinstall module again 3 more times."
|
||||
sleep 3
|
||||
if [ $SYSLANGVI ]; then
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_vi/wiki/afterinstall >/dev/null 2>&1
|
||||
am force-stop com.mbmobile
|
||||
exit 169
|
||||
else
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_en/wiki/afterinstall >/dev/null 2>&1
|
||||
exit 169
|
||||
fi
|
||||
}
|
||||
|
||||
checkvtapagain() {
|
||||
echo "Checking VTAP status again..."
|
||||
cat '/data/data/com.mbmobile/databases/vtap' | grep -q 'isProvisioningDone :true' && echo "VTAP is provisioned !" || vtapstillfail || exit 169
|
||||
|
||||
}
|
||||
|
||||
installfail() {
|
||||
echo "App reinstallation failed, please check if CorePatch / Disable App Verification is working or not!"
|
||||
touch /data/local/tmp/lastappfail
|
||||
exit 1
|
||||
}
|
||||
|
||||
selinuxhandle() {
|
||||
getapkpath > /dev/null 2&>1
|
||||
echo "SELinux is Permissive! Enforcing is required!"
|
||||
echo "Forcing SELinux state to Enforcing..."
|
||||
setenforce enforcing
|
||||
echo "Reinstalling app..."
|
||||
[ $(pm install $APKPATH | grep Success) ] && echo "Successful reinstall app!" || installfail
|
||||
rm -rf /data/local/tmp/lastappfail
|
||||
}
|
||||
|
||||
magiskhosts() {
|
||||
echo "Magisk systemless hosts detected!"
|
||||
echo "This module should be disabled to work with this module!"
|
||||
touch /data/adb/modules/hosts/disable && echo "Disabled systemless hosts module!"
|
||||
}
|
||||
|
||||
[[ -d /data/adb/modules/hosts ]] && magiskhosts
|
||||
|
||||
[[ -d /data/data/com.tsng.hidemyapplist ]] && tsnghma
|
||||
|
||||
[[ -d /data/data/io.github.Nirtal0.magisk ]] && maliciousmagisk
|
||||
|
||||
[[ -d /data/data/io.github.x0eg0.magisk ]] && nonfosskitsune
|
||||
|
||||
[ -d /data/adb/modules/zygisk_lsposed ] && cat /data/adb/modules/zygisk_lsposed/module.prop | grep versionCode=7024 && oldlsposed
|
||||
|
||||
# Check if MB is installed or nope
|
||||
# Remove this one can cause the module does not work properly!
|
||||
if [ -d /data/data/com.mbmobile ]; then
|
||||
echo ""
|
||||
echo "MB/MBCP app found on device!"
|
||||
else
|
||||
echo "MB/MBCP not found! Please install it!"
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info/wiki/mbcpinstall
|
||||
[[ $SYSLANGVI ]] && am start -a android.intent.action.VIEW -d $INSTALLVI || am start -a android.intent.action.VIEW -d $INSTALLEN >/dev/null 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for original MB Bank app
|
||||
# The module does NOT work with original unpatched app. It's pointless to remove the check. You think it works with original app? Nah.
|
||||
find /data/app -name libtoolChecker.so | grep -q com.mbmobile && notmbcp
|
||||
|
||||
# last app reinstallation fail with selinux permissive
|
||||
[ -f /data/local/tmp/lastappfail ] && selinuxhandle
|
||||
|
||||
# get apk path first
|
||||
# only get apkpath if selinux is enforcing
|
||||
# if the selinux state is permissive, handle app installation first, then getapkpath after it
|
||||
[ $(getenforce | grep Enforcing) ] && getapkpath
|
||||
|
||||
# v6.4.80+ requires enforcing SELinux in order to prevent 40202 VTAP fail (Runtime Tampering) error
|
||||
[ $(getenforce | grep Permissive) ] && selinuxhandle && getapkpath
|
||||
|
||||
# Check if Termux and it's bootstrap is initialized or not
|
||||
# Remove this code broke Termux support
|
||||
if [ -d /data/data/com.termux ]; then
|
||||
if [[ -d /data/data/com.termux/files/home ]]; then
|
||||
echo "Termux bootstrap found!"
|
||||
appops set com.termux SYSTEM_ALERT_WINDOW allow
|
||||
unzip -o "$ZIPFILE" 'script/MB_Bank.sh' -d '/data/user/0/com.termux/files/home/.shortcuts/'
|
||||
else
|
||||
echo "Termux bootstrap not found! Launching Termux..."
|
||||
am start -n com.termux/com.termux.app.TermuxActivity
|
||||
|
|
@ -35,13 +203,16 @@ else
|
|||
echo "Termux not installed! skipping"
|
||||
fi
|
||||
|
||||
# Check for original MB Bank app
|
||||
for library in $(find /data/app -name libvvb2060.so | grep com.mbmobile) ; do notmbcp ; done
|
||||
# Remove vtap (v-key) firmware from data folder (in case if fix vtap cert patch is applied)
|
||||
# Helpful for older app version (v6.4.92+) or restore to older detection behavior in newer app
|
||||
unzip -l $APKPATH | grep -q fix_vtap_cert* && removeoldfw
|
||||
|
||||
# Grant permission for MB/MBCP app
|
||||
# Check for bypassed app
|
||||
unzip -l $APKPATH | grep -q remove_new_zimperium_check* && alreadybypassed
|
||||
|
||||
# Grant permission for MB/MBCP app
|
||||
|
||||
if [ $ANDROIDSDK -gt 33 ]; then
|
||||
if [ $ANDROIDSDK -gt 32 ]; then
|
||||
echo "Granting MB/MBCP app permission..."
|
||||
pm grant com.mbmobile android.permission.CAMERA
|
||||
pm grant com.mbmobile android.permission.RECORD_AUDIO
|
||||
|
|
@ -58,38 +229,34 @@ else
|
|||
pm grant com.mbmobile android.permission.READ_PHONE_STATE
|
||||
fi
|
||||
|
||||
unzip -o "$ZIPFILE" 'vtapnotinit.sh'
|
||||
unzip -o "$ZIPFILE" 'vtapstillfail.sh'
|
||||
chmod +x 'vtapstillfail.sh'
|
||||
chmod +x 'vtapnotinit.sh'
|
||||
|
||||
# Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users
|
||||
echo Deleting /data/magisk if it exists...
|
||||
[ -d /data/magisk ] && rm -r /data/magisk
|
||||
[ -d /data/magisk ] && echo "Magisk folder found! deleting..." && rm -r /data/magisk
|
||||
find /data -name 'magisk_backup*' -delete
|
||||
echo ---------------------------
|
||||
|
||||
if [ -d /data/adb/magisk ]; then
|
||||
echo "Enabling Denylist for [com.mbmobile]..."
|
||||
magisk --denylist enable
|
||||
magisk --denylist add com.mbmobile
|
||||
cat /data/adb/magisk.db | grep mbmobile* > /dev/null 2>&1 && echo "[com.mbmobile] is in Denylist now, nice!" || echo "Failed to put [com.mbmobile] to Denylist! Please do it manually or follow afterinstall steps !!!"
|
||||
else
|
||||
echo "Magisk not detected! Skipping Denylist"
|
||||
fi
|
||||
|
||||
# Check VTAP status to ensure that it must be provisioned
|
||||
echo "Checking VTAP status..."
|
||||
echo "VTAP status : " && cat '/data/data/com.mbmobile/databases/vtap' | grep "true" && echo "VTAP is provisioned!" || sh 'vtapnotinit.sh'
|
||||
echo "Checking VTAP status again..."
|
||||
cat '/data/data/com.mbmobile/databases/vtap' | grep "true" && echo "VTAP is provisioned!" || sh 'vtapstillfail.sh' || exit 169
|
||||
|
||||
echo Force closing MBBank app...
|
||||
echo "------VTAP (V-Key) phase------"
|
||||
echo "Checking VTAP (V-Key) status..."
|
||||
cat '/data/data/com.mbmobile/databases/vtap' | grep -q 'isProvisioningDone :true' && echo "VTAP is provisioned !" || vtapfail || exit 169
|
||||
echo Force closing MBCP app...
|
||||
am force-stop com.mbmobile
|
||||
echo "------------------------------"
|
||||
|
||||
# Clear device logcat to ensure that no previous VTAP activity exists
|
||||
logcat -c
|
||||
|
||||
# Support for Biz MB Bank v2.0 (Flutter version)
|
||||
for library in $(find /data/app -name libholdingshadow.so | grep com.mbbank.biz.prod) ; do rm $library ; done
|
||||
sleep 2
|
||||
|
||||
unzip -o "$ZIPFILE" 'script/MB_Bank.sh' -d '/data/user/0/com.termux/files/home/.shortcuts/'
|
||||
rm -rf /data/data/com.mbmobile/files/0*
|
||||
rm -rf /data/data/com.mbmobile/files/1*
|
||||
rm -rf /data/data/com.mbmobile/files/2*
|
||||
|
|
@ -103,26 +270,45 @@ unzip -o "$ZIPFILE" 'script/MB_Bank.sh' -d '/data/user/0/com.termux/files/home/.
|
|||
rm -rf /data/data/com.mbmobile/files/KNOV3PN*
|
||||
rm -rf /data/data/com.mbmobile/files/zxpolicyme*
|
||||
rm -rf /data/data/com.mbmobile/files/policyme*
|
||||
|
||||
oldzimperium() {
|
||||
echo "------Start app phase------"
|
||||
echo Starting Flutter activity...
|
||||
echo "ATTENTION : Network traffic will be redirected to [medium.com] for 20 seconds !!!"
|
||||
echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass device not secure dialog !"
|
||||
iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
echo "Press [Try again] after got 1005/1007/VPN error on MB, so it's can bypass device not secure dialog !"
|
||||
# Reference : https://superuser.com/questions/1248670/redirect-ip-to-another-ip-using-iptables
|
||||
iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 162.159.152.4
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity >/dev/null 2>&1
|
||||
sleep 20
|
||||
echo "---------------------------"
|
||||
|
||||
# Look for VTAP activity from logcat
|
||||
logcat -d | grep -q VGFullScreenDialog && vtapstillfail
|
||||
logcat -d | grep -q com.vtap.MaintenanceActivity && vtapstillfail
|
||||
|
||||
echo "Restoring network traffic"
|
||||
iptables -t nat -F OUTPUT
|
||||
# Reference : https://gist.github.com/jstrosch/3190568 (Line 7)
|
||||
iptables -t nat -F
|
||||
|
||||
if [ $SYSLANGVI ]; then
|
||||
su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'LƯU Ý : Vui lòng nhấn [Thử lại] tại màn hình báo lỗi 1005/1007/VPN để vào App MBCP. Sau khi thao tác xong, nên khởi động lại thiết bị ngay.'" >/dev/null 2>&1
|
||||
[ -d /data/adb/magisk ] && am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_vi/wiki/vtapfix
|
||||
[ -d /data/data/me.weishu.kernelsu ] && am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_vi/wiki/vtapfix
|
||||
else
|
||||
su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'WARNING : Please click [Try again] on 1005/1007/VPN screen to continue entering MBCP App, then reboot your device ASAP.'" >/dev/null 2>&1
|
||||
[ -d /data/adb/magisk ] && am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_en/wiki/vtapfix
|
||||
[ -d /data/data/me.weishu.kernelsu ] && am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_en/wiki/vtapfix
|
||||
|
||||
su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'WARNING : Please click [Try again] on 1005/1007/VPN screen to continue entering MBCP App, then reboot your device ASAP.'" >/dev/null 2>&1
|
||||
fi
|
||||
sleep 3
|
||||
}
|
||||
|
||||
strongerzimperium() {
|
||||
echo "You are using v6.5.7+, old method no longer work."
|
||||
echo "Using new method instead."
|
||||
echo "Disabling [com.mbmobile] app (to prevent open before fix)"
|
||||
pm disable com.mbmobile | grep -q disabled* && echo "Reboot your device, and run [Action] for this module from root manager to continue!" || echo "Do not open app, reboot your device, run [Action] from root manager for this module to continue!"
|
||||
|
||||
}
|
||||
|
||||
# check for v6.5.7+ and notify to use new method
|
||||
unzip -l $APKPATH | grep -q libcode.so && strongerzimperium || oldzimperium
|
||||
|
||||
# cleanup
|
||||
rm -rf /data/local/tmp/path.txt
|
||||
rm -rf /data/local/tmp/lastappfail
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
id=zdefend-fix
|
||||
name=MB ZDefend Bypass
|
||||
version=v3.7-mb
|
||||
versionCode=37
|
||||
name=MB ZDefend Bypass (bindhosts)
|
||||
version=v4.4-mb-bindhosts
|
||||
versionCode=44
|
||||
author=cuynu, xfirstnamelastname
|
||||
description=Bypass "Rooted device or JAILBROKEN" screen for MBCP App by trick the app detection libraries. \nNOTE : This does not bypass VTAP scrren, you have to fix it yourself is you are using Magisk.
|
||||
updateJson=https://git.disroot.org/cuynu/mbzdefend-fix/raw/branch/main/module_new/remoteupdate.json
|
||||
description=Bypass "Rooted device or JAILBROKEN" screen for MBCP App by trick the app detection libraries. \nNOTE : This does not bypass V-Key (VTAP) screen, you have to fix it if you are using Magisk (or original KernelSU).
|
||||
updateJson=
|
||||
|
|
|
|||
|
|
@ -19,11 +19,14 @@ echo "Press [Try again] after got 1005/1007 error on MB, so it's can bypass devi
|
|||
su -c rm -rf /data/data/com.mbmobile/files/zxpolicyme*
|
||||
su -c rm -rf /data/data/com.mbmobile/files/policyme*
|
||||
|
||||
su -c iptables -t nat -A OUTPUT -p tcp -d 0/0 -j DNAT --to-destination 162.159.153.4:443
|
||||
# Reference : https://superuser.com/questions/1248670/redirect-ip-to-another-ip-using-iptables
|
||||
iptables -t nat -A OUTPUT -p tcp -j DNAT --to-destination 162.159.152.4
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
# VPN connection requires 20 seconds, while normal one only requires 10 seconds
|
||||
sleep 20
|
||||
echo "Restoring network traffic..."
|
||||
echo "Restoring network traffic"
|
||||
# Reference : https://gist.github.com/jstrosch/3190568 (Line 7)
|
||||
iptables -t nat -F
|
||||
|
||||
su -c iptables -t nat -F OUTPUT
|
||||
if [ $SYSLANGVI ]; then
|
||||
su -lp 2000 -c "cmd notification post -S bigtext -t 'MBZDefend-Fix' tag 'LƯU Ý : Vui lòng nhấn [Thử lại] tại màn hình báo lỗi 1005/1007/VPN để vào App MBCP.'" >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ done
|
|||
|
||||
# Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users
|
||||
[[ -d /data/magisk ]] && rm -r /data/magisk
|
||||
rm -rf /data/data/com.mbmobile/files/0*
|
||||
rm -rf /data/data/com.mbmobile/files/0*
|
||||
rm -rf /data/data/com.mbmobile/files/1*
|
||||
rm -rf /data/data/com.mbmobile/files/2*
|
||||
rm -rf /data/data/com.mbmobile/files/3*
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
127.0.0.1 localhost
|
||||
::1 localhost
|
||||
127.0.0.1 zimperium.com
|
||||
127.0.0.1 cdn.zimperium.com
|
||||
127.0.0.1 gts.zimperium.com
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/system/bin/sh
|
||||
echo "VTAP is not provisioned!"
|
||||
echo "App first normal launch required!"
|
||||
iptables -t nat -F OUTPUT
|
||||
am start -n com.mbmobile/io.flutter.plugins.MainActivity
|
||||
sleep 10
|
||||
am force-stop com.mbmobile
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/system/bin/sh
|
||||
|
||||
SYSLANGVI="$(getprop persist.sys.locale | grep vi-VN)"
|
||||
|
||||
echo "VTAP provision failed! Cannot continue!"
|
||||
echo "If you have low-end device (eg : Vsmart Joy 2+)"
|
||||
echo "Try to reinstall module again 3 more times."
|
||||
|
||||
if [ $SYSLANGVI ]; then
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_vi/wiki/vtapfix
|
||||
else
|
||||
am start -a android.intent.action.VIEW -d https://git.disroot.org/mbcp/info_en/wiki/vtapfix
|
||||
fi
|
||||
|
||||
exit 100
|
||||
|
||||
Loading…
Reference in a new issue