Anti AntiLVL - AntiLVL ã¸ã®ç°¡åãªå¯¾ææ¹æ³ã«ã¤ãã¦èãã¦ã¿ã
æ ãã£ã¦ãAndroid ã® LVL ãç¡å¹åãããAntiLVLãã®å¯¾æçãæ¤è¨ãã¦ããããã¾ãã
LVL (License Verification Library) 㯠Google ãæä¾ãã Android ã®ã©ã¤ã»ã³ã¹æ¤è¨¼ç¨ã®ã©ã¤ãã©ãªã§ãç°¡åã«ãã㨠Google Play ã§ã¡ããã¨è³¼å ¥ãããã¢ããªãã©ããããµã¼ãã«åãåããã¦ç¢ºèªããã¨ããã©ã¤ãã©ãªã§ããAntiLVL ã¯ãAPK ãã¡ã¤ã«ãæ¸ãæãã¦LVL ãç¡å¹åãã¦ãã¾ãã¨ãããã¼ã«ã§ãGoogle Play ã§ææã¢ããªãè³¼å ¥ãã¦ããã« APK ãåãåºãã¦æ³¨æãã£ã³ã»ã«ã LVL ãç¡å¹åãã¦ãã¾ãã°ä¸æ£ã«ã¢ããªãå©ç¨ã§ããã¨ããããã§ãããããªãã¨ããä¸å±ãè ã¯ã¨ã£ã¨ã¨æ°ãã°ããã®ã«ã¨æãããã§ããã
AntiLVL ã§ã® LVL 解é¤ã¯é常ã«ç°¡åã«ã§ãã¦ãã¾ãã®ã§éçºè ã¨ãã¦ã¯ä½ããã®å¯¾çãå¿ è¦ã§ãã
ç½²åæ¤è¨¼ããã°è¯ãã®ã§ã¯ï¼
AntiLVL ã¯ãAPK ãå解ãã¦ãã³ã³ãã¤ã«ãããã¤ãã³ã¼ãã«ããããå½ã¦ã¦å度 APK ã«æ»ããã¨ã§ LVL ã解é¤ãã¦ãã¾ãã
APK ã®å 容ãæ¹ç«ããã®ã§ãå½ç¶éçºè ã¨ã¯éã証ææ¸ã§ APK ã«ç½²åãããã¨ã«ãªãããã§ãããããã£ã¦ãPackageManager ã使ã£ã¦ç½²åã確èªãæ¹ç«ããã¦ããªãã確èªããã°è¯ããããªæ°ããã¾ãããã
ã¨ããããAntiLVL 㯠PackageManager ãå·®ãæ¿ãã¦ç½²åãå½è£ ããã®ã§ããã¯å®¹æã§ã¯ããã¾ãããPackageManager ãç´æ¥ä½¿ãããªãã¬ã¯ã·ã§ã³ä½¿ãã°ãããããã¨æãããã§ãããAntiLVL ã¯ãªãã¬ã¯ã·ã§ã³ã® Method#invoke ãããã¯ããããããããã¡ã§ãã
JNI 㧠native ã³ã¼ããæ¸ãããjar ãã¡ã¤ã«ãããã±ã¼ã¸ã®ä¸ã«å ¥ãã¦ããã¦èªåã§ã¯ã©ã¹ãã¼ãããã°åé¿ã§ããã¨æãã¾ãããããªãé¢åã§ããããã§ããã§ã¯ãç½²åæ¤è¨¼ããã« AntiLVL ãåé¿ããæ¹æ³ã«ã¤ãã¦èãã¦ã¿ã¾ãã
AntiLVL ã¯ã©ããã£ã¦ LVL ã解é¤ãã¦ããã®ã
AntiLVL 1.4.0 ã®å ´åãLVL ã«å«ã¾ãã ServerManagedPolicy 㨠LicenseValidator ã®ï¼ã¤ã®ã¯ã©ã¹ã«ããããå½ã¦ã¦ãã¾ã (ãã㯠AntiLVL ã® jar ããã©ãã¦å¾ããã XML ãã¡ã¤ã«ã«ã«ã¼ã«ãæ¸ãã¦ããã¾ã)
ã¾ããServerManagedPolicy ã®æ¹ããã¡ã㯠allowAccess() ã¡ã½ããã®è¿ãå¤ãå¼·å¶çã« true ã«å¤æ´ãã¾ããå ·ä½çã«ã¯ã以ä¸ã®ããã«ãã¦ããããè¡ãã¾ãã
- 以ä¸ã®æ¡ä»¶ã®ãããããæºããã¯ã©ã¹ã¯ãServerManagedPolicy ã¯ã©ã¹ã¨å¤æãã¾ã (ä»ã«ãããã¤ãæ¡ä»¶ããããçç¥)
- "com.android.vending.licensing." ã¨ããæååãå«ã¾ãã
- "ServerManagedPolicy" ã¨ããæååãå«ã¾ããã
- "validityTimestamp" ã¨ããå®æ°æååãå«ã¾ãã
- ãã®ä¸ã«ã以ä¸ã®ã¡ã½ãããããã° allowAccess() ã¨å¤æãã¾ã
- public ãªã¡ã½ãã
- System.currentTimeMillis() ãå¼ãã§ãã
LicenseValidator ã®ã»ãã¯ãverify() ã¡ã½ããå ã® switch - case æãæ¸ãæããå ¨é¨ LICENSED ã¨å¤å®ããããã«ãã¾ããå ·ä½çã«ã¯:
- 以ä¸ã®ããã«ã㦠verify() ã¡ã½ãããæ¢ãã¾ãã
- ã¡ã½ããã®ã·ã°ããã£ã public * (java.security.PublicKey, java.lang.String, java.lang.String) ã¨ããã¡ã½ãããæ¢ãã¾ã
- ã¡ã½ããå
ã® switch - case æãæ¸ãæãã¾ã
- java.security.Signature.getInstance() ãå¼ã³åºãã¦ãããã¨ã確èªãã¾ãã
- ãã®ã¡ã½ããã®ä¸ã® switch æå ã® case ç¯ãæ¸ãæãã¾ãã
対çæ¹æ³
ããã¾ã§ãããã°ã対çã¨ãã¦ã¯æ¯è¼çç°¡åã§ããããæ¹ã¯ããã¤ãããã¾ãããä¾ãã°ä»¥ä¸ã®ããã«ããã°ããã§ããããå½ç¶ ProGuard ã®é£èªåã¯å¿ è¦ã§ãã
- ServerManagedPolicy ã¯ã©ã¹ã¯
- æååå®æ°ã® PREFS_FILE, PREF_VALIDITY_TIMESTAMP ãéãæååã«å¤æ´ãã¾ã (å¤æ´ãã¦ãåä½ã«ã¯å½±é¿ãªãã¯ãã詳細ã¯ã½ã¼ã¹åç §)
- allowAccess() 㯠System.currentTimeMillis() ãç´æ¥å¼ã°ããå¥ã®ã¡ã½ãããçµç±ãã¦å¼ã¶ããã«å¤æ´
- LicenseValidator ã¯ã©ã¹ã¯
- verify ã¡ã½ããã® switch - case æã if æã«å¤æ´ãã¾ãã
ã¨ããããããã®ä¿®æ£ãå ããã° AntiLVL ã¯å¹ããªããªãã¾ãã
ã¾ããAntiLVL ãç½ ã«ãããããã«ããã㨠AntiLVL ãæ¸ãæãããããªã³ã¼ããä»è¾¼ãã§ããã¨ããæãããã¾ããä¸è¨ ServerManagedPolicy ãã£ããã®ã¯ã©ã¹ãä½ã£ã¦ãããallowAccess ã¯å¿ ã false ãè¿ãããã«ãã¦ããã¾ããAntiLVL ã§æ¸ãæãã APK ã§ã¯ allowAccess ã®è¿ãå¤ãå¿ ã true ã«ãªãã®ã§ãtrue ã«ãªã£ã¦ããã° AntiLVL ã«ããæ¸ãæãããããã¨ãå¤å¥ã§ããã®ã§ãã©ã¤ã»ã³ã¹éåã¨å¤å®ããã°ããã§ãããã
ããã¡ãã£ããªã®ã§ãAntiLVL å´ãããã«å¯¾çãã¦ããå¯è½æ§ãããã¾ãããããããã®åé¡ã¯ã¿ãªãåã LVL ã©ã¤ãã©ãªã使ã£ã¦ãããã¨ãåé¡ãªã®ã§ãã¿ãªãå°ããã¤éãå®è£ ã«ãã¦ããã° AntiLVL å´ã§ã¯å¯¾å¦ã§ããªããªãã¯ãã§ãã
PS. CashFlow ã¯å¯¾çæ¸ã¿ã§ãã