全部博文(89)
分类: iOS平台
2013-03-28 10:45:18
Jailbreak Detection有提到方法和代码
Sandbox Integrity Check
:
点击(此处)折叠或打开
我测试在越狱的机器上可以创建
Filesystem Tests :
Existence of Jailbreak Files
点击(此处)折叠或打开
/Library/MobileSubstrate/MobileSubstrate.dylib
This is probably the most important file to check for. Almost every consumer jail- break available installs MobileSubstrate, which provides a foundation for preload- ing code directly into applications. In cases where it is not installed by the jailbreak tool, it is often installed at a later time to support many applications one might install using Cydia or other jailbreak software installers.
/Applications/Cydia.app
The path to the Cydia application installer, installed by most jailbreaking tools.
/var/cache/apt
The path to the apt repository, used by most third-party software installers in- cluding Cydia.
/var/lib/apt
Apt-related data files used by the apt repository.
/var/lib/cydia
Cydia-related data files used by Cydia.
/var/log/syslog
The syslog log file, created when syslog is redirected by some jailbreaking tools.
/var/tmp/cydia.log
A temporary logfile written when Cydia runs.
/bin/bash /bin/sh
The bash shell interpreter, almost always installed when a device is jailbroken using end user jailbreaking tools.
/usr/sbin/sshd
The SSH daemon, installed whenever SSH is installed on the device after jailbreak- ing.
/usr/libexec/ssh-keysign
A key signing utility for SSH, installed whenever SSH is installed on the device after jailbreaking.
/etc/ssh/sshd_config
Configuration file for sshd, installed whenever SSH is installed on the device after jailbreaking.
/etc/apt
2.Size of /etc/fstab
点击(此处)折叠或打开
The file is commonly 80 bytes on an iOS 5 device, whereas the copy of the file installed by many jailbreaking tools is only 65 bytes.
3.Evidence of Symbolic Linking
App in /Applications then it was moved to (usually in /var/stash) if it was jailbroken
点击(此处)折叠或打开
4.Page Execution Check
vm_protect function should fail
点击(此处)折叠或打开
xCon位置:
/Library/MobileSubstrate/DynamicLibraries
DQ430teki-iPad:/Library/MobileSubstrate/DynamicLibraries root# ls -ls xCon.*
104 -rwxr-xr-x 1 root mobile 103256 Oct 16 06:38 xCon.dylib*
8 -rwxr-xr-x 1 root mobile 56 Oct 16 06:38 xCon.plist*