系統Root檢測 - /system/bin/su & /system/xbin/su
一、API
【1】破解手機ROOT權限的原理,就是在手機的/system/bin和/system/xbin目錄下放置一個可執行文件“su”
【2】判斷手機是否具有Root權限的代碼示例
【3】參考鏈接
http://blog.csdn.net/u010355144/article/details/49723777
二、觸發條件
1. 定位/system/bin/su文件
【1】對應到smali語句中的特徵
r'const-string.+, "/system/bin/su"'
2. 定位/system/xbin/su文件
【1】對應到smali語句中的特徵
r'const-string.+, "/system/xbin/su"'
3. 定位File.exists方法
【1】對應到smali語句中的特徵
'Ljava/io/File;->exists()Z'
三、漏洞原理
【1】APP在Android設備被Root的環境下,沒有進行安全檢測並採取保護措施,導致系統安全性大大降低
四、修復建議
【1】在APP運行的時候,應該對Android設備Root環境進行檢測,並提示用戶注意潛在的安全漏洞
【2】參考鏈接