閱讀966 返回首頁    go 技術社區[雲棲]


Android keystore 密碼找回

轉自https://www.eoeandroid.com/forum.php?mod=viewthread&tid=333163


昨天準備給自己的應用發布一個新版本,在apk打包時,發現之前的用的keystore密碼忘了。
蛋碎了一地,我把我所能想到的密碼都試了一遍(注:我平常在各個門戶網站注冊基本上用的都是那幾個字母和數字組合做密碼),無果。
折騰到淩晨一點半,死的心都有了。

Google和百度搜個底朝天,也沒找到解決辦法,Stackoverflow上的大牛們說,隻有兩個辦法:1.想出密碼 ;2.重新修改包名,重新生成keystore,重新發布一個新的應用。

後來在知乎上看到有人給出一個鏈接,抱著試試看的態度進去看了一下,結果真的可以!

下邊分享一下經驗:
    【軟件】:Android Keystore Password Recovery
    【網址】:https://code.google.com/p/android-keystore-password-recover/
    【運行環境】:JDK7

     下載jar包:https://drive.google.com/file/d/0B_Rw7kNjv3BATldrLXMwcVRud2c/edit?usp=sharing,試了多次,證明已經被天朝河蟹掉了,隻能翻牆下載。下載下來:AndroidKeystoreBrute_v1.05.jar

       官方提供3中方法來破解密碼:
        

1 There are 3 Methods to recover your keystore password:
2 - Simply Bruteforce          (簡單的暴力破解)
3 - Dictionary Attack           (字典破解)
4 - Smart Wordlist Attack   (智能單詞列表破解)       英文不好,直譯的!

用法:
01 execute with
02 java -jar AndroidKeystoreBrute.jar <args>
03 possible args
04 -m <1..3> Method
05 -k <path>  path to your keystore
06 -d <path> dictionary (for method 2 and 3)
07 -p use common replacements like '@' for 'a'(for method 3) WARNING - very slow!!
08 -start <String> sets the start String for the password (for brute force)
09 -w writes a new keystore with same password than the key
10 -h prints helpscreen
11 example for brute-force attack
12 java -jar AndroidKeystoreBrute_v1.05.jar -m 1 -k <...keystore> -start AAAAAA
13 example for dictionary attack
14 java -jar AndroidKeystoreBrute_v1.05.jar -m 2 -k "C:\\mykeystore.keystore" -d "wordlist.txt"
15 example for smart wordlist attack (recommend)
16  
17 java -jar AndroidKeystoreBrute_v1.05.jar -m 3 -k "C:\\mykeystore.keystore" -d "wordlist.txt"



開始我用的是方法一,跑了一宿,也沒跑完。默認的字母組合的密碼太多了,用這種方法破解出密碼太渺茫了。

後來我嚐試使用方法三,其實我沒注意,官方推薦就使用方法三:
          先創建一個txt,比如passlib.txt: 在文本文檔裏輸入自己常用的設置密碼的短語,或者你隱約記得當初創建時可能用到的單詞,反正能想到的統統寫下來:
         
1 helloworld
2          ILoveYou
3          java
4          android
5          com.ldxx.firstapp


然後執行:
      
1 java -jar AndroidKeystoreBrute_v1.05.jar -m 3 -k "C:\\mykeystore.keystore" -d "passlib.txt"

若要是你創建的passlib.txt中的短語確實在你的keystore密碼中出現過,那找回密碼是瞬間的事:
       我的執行結果:


   
1 Got Password in 0 seconds
2      Password is: android521 for alias ldxxfirstapp



注:命令行執行java -jar 命令時,根目錄一定是 AndroidKeystoreBrute_v1.05.jar所在的目錄,比如 AndroidKeystoreBrute_v1.05.jar放在
C:\key\ AndroidKeystoreBrute_v1.05.jar下,先得cd C:\key 然後在執行,否則會報錯的。




Android, 密碼找回

AndroidKeystoreBrute_vl.05.zip

26.06 KB, 下載次數: 79, 下載積分: e幣 -5 元

不用翻牆了


最後更新:2017-04-03 07:57:02

  上一篇:go 內存數據庫 HSQLDB
  下一篇:go Hyper-V 核心 -- 自測題