{"id":3567,"date":"2020-09-01T14:00:22","date_gmt":"2020-09-01T06:00:22","guid":{"rendered":"http:\/\/www.sniper97.cn\/?p=3567"},"modified":"2020-09-01T14:00:22","modified_gmt":"2020-09-01T06:00:22","slug":"ios%e5%8a%a0%e5%af%86%e5%a4%87%e4%bb%bd%e7%9a%84%e8%a7%a3%e5%af%86","status":"publish","type":"post","link":"http:\/\/www.sniper97.cn\/index.php\/qq%e7%ba%a2%e5%8c%85%e7%9a%84%e5%91%93%e8%af%ad\/3567\/","title":{"rendered":"ios\u5907\u4efd\u89e3\u5bc6\uff08\u4e00\uff09 3.0\u4e4b\u4e0a"},"content":{"rendered":"\n<p style=\"font-size:24px\">\u8fd9\u5e94\u8be5\u662f\u4e00\u7bc7\u5173\u4e8eios\u5907\u4efd\u89e3\u5bc6\u6700\u5168\u9762\u7684\u6587\u7ae0\u3002<\/p>\n\n\n<p style=\"font-size:24px\">ios\u5907\u4efd\u5206\u4e3a\u4e09\u4e2a\u7248\u672c\uff1a<strong>\u4f4e\u4e8e3.0<\/strong>\u3001<strong>3.0<\/strong>\u3001<strong>\u9ad8\u4e8e3.0<\/strong>\u3002\u8fd9\u4ece\u9006\u5411\u7ed3\u679c\u4e2d\u53ef\u4ee5\u770b\u5230\u4f53\u73b0\u3002\u7248\u672c\u4fe1\u606f\u5728<strong>Status.plist<\/strong>\u4e2d\uff1a<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image.png\" alt=\"\" class=\"wp-image-3571\" width=\"561\" height=\"514\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image.png 429w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-300x275.png 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u51e0\u4e2a\u7248\u672c\u7684\u89e3\u5bc6\u6587\u4ef6\u90e8\u5206\u7b97\u6cd5\u5176\u5b9e\u90fd\u662f\u4e00\u81f4\u7684\uff0c\u533a\u522b\u5728\u4e8e\u89e3\u5bc6\u5bc6\u5319\u7684\u83b7\u53d6\u65b9\u5f0f\u3002<\/p>\n\n\n<p style=\"font-size:24px\">\u8fd9\u91cc\u662f\u590d\u73b0\u51fa\u7684\u89e3\u5bc6\u6587\u4ef6\u51fd\u6570:<\/p>\n\n\n<pre class=\"wp-block-code\"><code>int backup::Decrypt_Write(const wchar_t* topath, const wchar_t* frompath, byte* key, int key_len)\n{\n\tif (!key || !frompath || !topath || !key_len)\n\t\treturn 1;\n\tEVP_CIPHER* v7;\n\tstd::string DstBuf;\n\tDstBuf.resize(0x1000);\n\tstd::string Str;\n\tStr.resize(0x1000);\n\tswitch (8 * key_len)\n\t{\n\tcase 128:\n\t\tv7 = (EVP_CIPHER*)EVP_aes_128_cbc();\n\t\tbreak;\n\tcase 192:\n\t\tv7 = (EVP_CIPHER*)EVP_aes_192_cbc();\n\t\tbreak;\n\tcase 256:\n\t\tv7 = (EVP_CIPHER*)EVP_aes_256_cbc();\n\t\tbreak;\n\tdefault:\n\t\treturn 1;\n\t}\n\tFILE* ffrom = _wfopen(frompath, L\"rb\");\n\tif (!ffrom)\n\t\treturn 10;\n\tFILE* fto = _wfopen(topath, L\"wb+\");\n\tif (!fto)\n\t{\n\t\tfclose(ffrom);\n\t\treturn 11;\n\t}\n\tEVP_CIPHER_CTX* v10 = EVP_CIPHER_CTX_new();\n\tif (!EVP_DecryptInit_ex(v10, v7, 0, key, 0))\n\t\tgoto LABEL_20;\n\tsize_t readlen = fread(&amp;DstBuf[0], 1u, 0x1000u, ffrom);\n\tif (readlen &gt; 0)\n\t{\n\t\tint count = 0;\n\t\twhile (EVP_DecryptUpdate(v10, (byte*)&amp;Str[0], &amp;count, (byte*)&amp;DstBuf[0], readlen))\n\t\t{\n\t\t\tfwrite(&amp;Str[0], 1u, count, fto);\n\t\t\treadlen = fread(&amp;DstBuf[0], 1u, 0x1000u, ffrom);\n\t\t\tif (readlen &lt;= 0)\n\t\t\t\tgoto LABEL_19;\n\t\t}\n\t\tgoto LABEL_20;\n\t}\nLABEL_19:\n\tint finallen = 0;\n\tif (!EVP_DecryptFinal_ex(v10, (byte*)&amp;Str[0], &amp;finallen))\n\t{\n\tLABEL_20:\n\t\tEVP_CIPHER_CTX_free(v10);\n\t\tfclose(ffrom);\n\t\tfclose(fto);\n\t\treturn 2;\n\t}\n\tfwrite(&amp;Str[0], 1u, finallen, fto);\n\tEVP_CIPHER_CTX_free(v10);\n\tfclose(ffrom);\n\tfclose(fto);\n\treturn 0;\n}<\/code><\/pre>\n\n\n<p class=\"has-large-font-size\"><strong>3.0\u4ee5\u4e0a<\/strong>\uff1a<\/p>\n\n\n<p style=\"font-size:24px\">1.\u9996\u5148\u9700\u8981\u4ece<strong>Manifest.plist<\/strong>\u4e2d\u83b7\u53d6\u5230<strong>BackupKeyBag<\/strong>\u548c<strong>ManifestKey<\/strong>\u7684\u503c\uff0c\u901a\u8fc7base64\u89e3\u5bc6\u540e\u83b7\u5f97\u5982\u4e0b\u7ed3\u679c\uff1a<\/p>\n\n\n<p><strong>BackupKeyBag<\/strong>\uff1a<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-1.png\" alt=\"\" class=\"wp-image-3573\" width=\"597\" height=\"521\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-1.png 809w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-1-300x262.png 300w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-1-768x670.png 768w\" sizes=\"(max-width: 597px) 100vw, 597px\" \/><\/figure>\n\n\n<p><strong>ManifestKey<\/strong><\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-2.png\" alt=\"\" class=\"wp-image-3574\" width=\"587\" height=\"37\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-2.png 809w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-2-300x19.png 300w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-2-768x49.png 768w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u9996\u5148\u6211\u4eec\u9700\u8981\u50a8\u5b58 <strong>BackupKeyBag<\/strong> \u4e2d\u7684\u5185\u5bb9:<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-3.png\" alt=\"\" class=\"wp-image-3575\" width=\"613\" height=\"475\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-3.png 840w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-3-300x232.png 300w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u4e2d\u95f4\u5bc6\u5319\u9700\u8981\u5e26\u5165\u5907\u4efd\u5bc6\u7801\u8ba1\u7b97\u4e24\u6b21,<strong>GetValueByKey<\/strong>\u662f\u5c06\u5bf9\u5e94\u5b57\u6bb5\u4ece <strong>BackupKeyBag<\/strong> \u4e2d\u53d6\u51fa\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>\t\t{\n\t\t\tstd::string DPSL;\n\t\t\tstd::string DPIC;\n\t\t\tGetValueByKey(\"DPSL\", DPSL);\n\t\t\tGetValueByKey(\"DPIC\", DPIC);\n\t\t\tEVP_MD* es256 = (EVP_MD*)EVP_sha256();\n\t\t\tint iter = ntohl(*(DWORD*)&amp;DPIC[0]);\n\t\t\tPKCS5_PBKDF2_HMAC(&amp;password[0], password.size(), (byte*)&amp;DPSL[0], 20, iter, es256, 32, pw);\n\t\t}\n\t\tstd::string SALT;\n\t\tstd::string ITER;\n\t\tEVP_MD* es1 = (EVP_MD*)EVP_sha1();\n\t\tGetValueByKey(\"SALT\", SALT);\n\t\tGetValueByKey(\"ITER\", ITER);\n\t\tint iter = ntohl(*(DWORD*)&amp;ITER[0]);\n\t\tPKCS5_PBKDF2_HMAC((char*)pw, 32, (byte*)&amp;SALT[0], 20, iter, es1, 32, pw);\n<\/code><\/pre>\n\n\n<p style=\"font-size:24px\">\u7136\u540e\u6211\u4eec\u9700\u8981\u5c06 <strong>BackupKeyBag<\/strong> \u4e2d\u6240\u6709\u7684<strong>WPKY<\/strong>\u5b57\u6bb5\u7684\u503c\u52a0\u5bc6\u3002\u52a0\u5bc6\u65b9\u5f0f\u672a\u77e5\uff0c\u51fd\u6570\u662f\u5bf9\u7167\u8c03\u8bd5\u624b\u52a8\u5b9e\u73b0\u7684\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>int Unknown_AesCrypt(DWORD len, byte* key, std::string&amp; indata, byte* outdata, int&amp; outlen)\n{\n\tint* v8;\n\tint v19;\n\tint v20 = 5;\n\tDWORD v7 = 6 * ((DWORD)(len - 8) &gt;&gt; 3);\n\tDWORD v15 = (DWORD)(len - 8) &gt;&gt; 3;\n\tint v21[4] = { *(DWORD*)&amp;indata[0],*(DWORD*)(&amp;indata[0] + 4),0,0 };\n\tmemcpy(outdata, &amp;indata[0] + 8, len - 8);\n\tint* v18 = (int*)((char*)outdata + len - 16);\n\twhile (true)\n\t{\n\t\tv8 = v18;\n\t\tv19 = v15;\n\t\tif (v15 &gt;= 1)\n\t\t\tbreak;\n\tLABEL_10:\n\t\tif (--v20 &lt; 0)\n\t\t{\n\t\t\toutlen = len - 8;\n\t\t\treturn 3;\n\t\t}\n\t}\n\twhile (true)\n\t{\n\t\tint v9 = 7;\n\t\tint v10 = v7;\n\t\tdo\n\t\t{\n\t\t\tif (!v10)\n\t\t\t\tbreak;\n\t\t\t*((BYTE*)&amp;v21 + v9) ^= v10;\n\t\t\tv10 &gt;&gt;= 8;\n\t\t\t--v9;\n\t\t} while (v9 &gt;= 0);\n\t\tv21[2] = *v8;\n\t\tv21[3] = v8[1];\n\t\tif (sub_3010((byte*)v21, key, (byte*)v21))\n\t\t\treturn 2;\n\t\t*v8 = v21[2];\n\t\tv8[1] = v21[3];\n\t\t--v7;\n\t\tv8 -= 2;\n\t\tif (--v19 &lt; 1)\n\t\t\tgoto LABEL_10;\n\t}\n}<\/code><\/pre>\n\n\n<p style=\"font-size:24px\"><strong>ManifestKey<\/strong>\u4e2d\u5305\u542b<strong>Manifest.db<\/strong>\u89e3\u5bc6\u6240\u9700\u8981\u7684\u5bc6\u5319\u5e8f\u53f7\u548c\u52a0\u5bc6\u5bc6\u5319\u3002<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-4.png\" alt=\"\" class=\"wp-image-3576\" width=\"575\" height=\"66\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-4.png 392w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-4-300x34.png 300w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u524d\u56db\u5b57\u8282\u662f\u5e8f\u53f7\uff0c\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u9700\u8981\u53d6\u51fa\u5e8f\u53f7<strong>3<\/strong>\u7684 <strong>WPKY<\/strong> \u52a0\u5bc6\u5b57\u6bb5\uff0c\u548c\u56db\u5b57\u8282\u540e\u7684\u90e8\u5206\u7b97\u51fa\u6587\u4ef6\u89e3\u5bc6\u5bc6\u5319\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>\t\tint index = *(int*)&amp;ManifestKey[0];\n\t\tint outlen = 0;\n\t\tstd::string Mkey;\n\t\tMkey.resize(0x28);\n\t\tmemcpy(&amp;Mkey[0], (byte*)&amp;ManifestKey[0] + 4, 0x28);\n\t\tUnknown_AesCrypt(40, (byte*)&amp;maplist[index][\"WPKYEncrypt\"][0], Mkey, dbdecodekey, outlen);\n\t\tDecryptandWrite((localpath + L\"\/newManifest.db\").c_str(), (localpath + L\"\/Manifest.db\").c_str(), (byte*)dbdecodekey, outlen);<\/code><\/pre>\n\n\n<p style=\"font-size:24px\">\u5f88\u663e\u7136\u6570\u636e\u5e93\u89e3\u5bc6\u6210\u529f\u4e86<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-5.png\" alt=\"\" class=\"wp-image-3577\" width=\"576\" height=\"100\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u4f7f\u7528\u5de5\u5177\u6253\u5f00\u540e\u5f88\u660e\u663e<strong>file<\/strong>\u5b57\u6bb5\u4e2d\u7684blob\u662f\u4e2aplist\u3002<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-6-1024x342.png\" alt=\"\" class=\"wp-image-3578\" width=\"589\" height=\"196\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-6-1024x342.png 1024w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-6-300x100.png 300w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-6-768x256.png 768w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-6-1536x513.png 1536w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-6-1200x400.png 1200w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-6.png 1645w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u5728\u9006\u5411\u5206\u6790\u4e2d\uff0c\u6211\u4eec\u53ef\u77e5plist\u4e2d\u7684<strong>NS.data<\/strong>\u5b57\u6bb5\u5b58\u6709\u5bf9\u5e94\u6587\u4ef6\u89e3\u5bc6\u7684\u4e2d\u95f4\u5bc6\u5319\u3002\u6240\u4ee5\u6211\u4eec\u53d6\u51fa\u540e\u8fdb\u884cbase64\u89e3\u5bc6\uff1a<\/p>\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/09\/image-7.png\" alt=\"\" class=\"wp-image-3579\" width=\"582\" height=\"59\" srcset=\"http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-7.png 438w, http:\/\/www.sniper97.cn\/wp-content\/uploads\/2020\/09\/image-7-300x30.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/figure>\n\n\n<p style=\"font-size:24px\">\u548c  <strong>ManifestKey<\/strong>\u89e3\u5bc6<strong>Manifest.db<\/strong> \u7c7b\u4f3c\uff0c\u53d6\u51fa\u5e8f\u53f7<strong>3<\/strong>\u7684 <strong>WPKY<\/strong> \u52a0\u5bc6\u5b57\u6bb5\uff0c\u548c\u56db\u5b57\u8282\u540e\u7684\u90e8\u5206\u7b97\u51fa\u6587\u4ef6\u89e3\u5bc6\u5bc6\u5319\u3002 \u7136\u540e\u8fdb\u884c\u89e3\u5bc6\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u5e94\u8be5\u662f\u4e00\u7bc7\u5173\u4e8eios\u5907\u4efd\u89e3\u5bc6\u6700\u5168\u9762\u7684\u6587\u7ae0\u3002 ios\u5907\u4efd\u5206\u4e3a\u4e09\u4e2a\u7248\u672c\uff1a\u4f4e\u4e8e3.0\u30013.0\u3001\u9ad8\u4e8e3.0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"views":6675,"_links":{"self":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/3567"}],"collection":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/comments?post=3567"}],"version-history":[{"count":0,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/3567\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3567"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}