{"id":423,"date":"2022-11-14T00:42:31","date_gmt":"2022-11-13T16:42:31","guid":{"rendered":"http:\/\/pareto.fun\/?p=423"},"modified":"2022-11-14T00:42:32","modified_gmt":"2022-11-13T16:42:32","slug":"%e6%8c%87%e4%bb%a4%e6%8a%bd%e5%8f%96%e5%a3%b3-%e5%88%9d%e6%8e%a2","status":"publish","type":"post","link":"http:\/\/pareto.fun\/?p=423","title":{"rendered":"\u6307\u4ee4\u62bd\u53d6\u58f3 &#8211; \u521d\u63a2"},"content":{"rendered":"\n<p>\u53c2\u8003\u8d44\u6599\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/bbs.pediy.com\/thread-261939.htm#msg_header_h1_3\">https:\/\/bbs.pediy.com\/thread-261939.htm#msg_header_h1_3<\/a> \u5404\u4ee3\u58f3\u5b9e\u73b0\u7684\u4ecb\u7ecd<\/p>\n\n\n\n<p><a href=\"https:\/\/bbs.pediy.com\/thread-260251.htm\">https:\/\/bbs.pediy.com\/thread-260251.htm<\/a> \u65e9\u671f\u4ee3\u7801\u62bd\u53d6\u58f3\u5165\u95e8\uff0c \u4e86\u89e3\u6307\u4ee4\u62bd\u53d6\u58f3\u7684\u5927\u6982\u6d41\u7a0b\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/bbs.pediy.com\/thread-271362.htm\">https:\/\/bbs.pediy.com\/thread-271362.htm<\/a> \u4e50\u56fa\u5206\u6790<\/p>\n\n\n\n<p>\u603b\u7ed33\u4e2a\u6280\u672f\u70b9<\/p>\n\n\n\n<ol><li>application \u7684\u8f6c\u79fb\u3002<\/li><li>dex \u6587\u4ef6\u52a0\u8f7d\u3002<\/li><li>\u5b9a\u4f4d\u88ab\u62bd\u53d6\u76ee\u6807\u5b57\u8282\u7801\u5e76\u8fd8\u539f\u3002<\/li><\/ol>\n\n\n\n<p>\u4e09\u4e2a\u91cd\u8981\u51fd\u6570<\/p>\n\n\n\n<p>sub_C9E0 \uff0c\u901a\u8fc7oat\u6587\u4ef6\u83b7\u53d6\u5230\u52a0\u56fa\u5bf9\u8c61\u7684dex\u6570\u636e\u3002<\/p>\n\n\n\n<p> sub_6DC0  \uff0c \u8fd8\u539f\u539f\u59cb\u7684\u6307\u4ee4\u3002<\/p>\n\n\n\n<p>sub_5800 \uff0c application\u7684\u66ff\u6362\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u51fd\u6570\u5206\u6790<\/h2>\n\n\n\n<p>sub_C9E0<\/p>\n\n\n\n<ul><li>info+149\uff1a\u5f53\u524d\u7cfb\u7edf SDK \u7248\u672c<\/li><li>info+151\uff1a\u7cfb\u7edf\u865a\u62df\u673a\uff0c\u503c\u4e3a1\u65f6\u662f Dalvik \u865a\u62df\u673a\uff0c\u503c\u4e3a2\u65f6\u662f Art \u865a\u62df\u673a<\/li><li>info+129\uff1a\u53d8\u91cf WrapperProxyApplication.baseContext\uff0c\u58f3 apk \u7684 context<\/li><li>info+130\uff1a\u53d8\u91cf WrapperProxyApplication.baseContext.mPackageInfo<\/li><li>info+131\uff1a\u53d8\u91cf WrapperProxyApplication.baseContext.mPackageInfo.mActivityThread \u5f53\u524d Activity \u7ebf\u7a0b<\/li><li>info+132: \u83b7\u53d6\u4e86\u67d0\u4e2a\u7c7b\u7684\u7684mBoundApplication\u5b57\u6bb5\u7684providers\u5b57\u6bb5\uff0c\u5e76\u91cd\u65b0\u8bbe\u7f6e\u4e86\u5b57\u6bb5\u3002<\/li><li>info+133\uff1a\u7c7b com\/wrapper\/proxyapplication\/WrapperProxyApplication<\/li><li>info+166\uff1aMethodID\uff0ccom\/wrapper\/proxyapplication\/WrapperProxyApplication-&gt;init()<\/li><li>info+134\uff1a\u7c7b dalvik\/system\/DexFile<\/li><li>info+135\uff1a\u53d8\u91cf WrapperProxyApplication.shellApp\uff0c\u58f3\u7684 Application<\/li><li>info+138\uff1a\u53d8\u91cf \u58f3\u7684ClassLoader<\/li><li>info+150\uff1a\u673a\u5668\u67b6\u6784 \u503c\u4e3a1\u65f6\u662f arm \u67b6\u6784\uff0c\u503c\u4e3a3\u65f6\u662f x86 \u67b6\u6784\u3002<\/li><li>info+145: \/data\/data\/com.tencent.qqpimsecure.sc\/files\/prodexdir\/o0oooOO0ooOo.dat\u6587\u4ef6\u9690\u5c04\u8d77\u59cb\u5730\u5740<\/li><li>info+147: \u6587\u4ef6\u5927\u5c0f\uff1f\uff1f\uff1f\uff1f\uff1f<\/li><li>info+152: \u4fdd\u5b58\u52a0\u56faApp\u7684Dex\u6587\u4ef6\u6570\u91cf<\/li><\/ul>\n\n\n\n<p>\u5f88\u597d\u5947\uff0c\u4f5c\u8005\u8bf4\u8fd9\u4e2ainfo+161 \u4fdd\u5b58Dalvik_dalvik_system_DexFile_openDexFile_bytearray \uff0cdlsym \u83b7\u53d6\u7684dvm_dalvik_system_DexFile \u7684\u7b26\u53f7\u5730\u5740\u3002<\/p>\n\n\n\n<p><strong>\u6a21\u62df\u5668\u4e2d\u6ca1\u6709\u62ff\u5230libdvm.so \uff0c \u6709\u7f18\u518d\u770b<\/strong><\/p>\n\n\n\n<p>sub_B110<\/p>\n\n\n\n<ul><li>sub_B800 \u83b7\u53d6\u5230oat\u6587\u4ef6\u540d\u79f0<\/li><li>sub_8D10 \u4ece\u5185\u5b58\u4e2d\u83b7\u53d6\u5230oat\u6587\u4ef6\u7684\u8d77\u59cb\u5730\u5740\u548c\u7ec8\u6b62\u5730\u5740<\/li><li>sub_AD10 \u83b7\u53d6\u5230Dex\u7684\u5185\u5b58\u5730\u5740<\/li><\/ul>\n\n\n\n<p>\u8fd4\u56de\u58f3Dex\u6587\u4ef6\u5728\u5185\u5b58\u4e2d\u7684\u5730\u5740\u3002<\/p>\n\n\n\n<p>sub_B960<\/p>\n\n\n\n<ul><li>\u89e3\u538b\u88ab\u62bd\u53d6\u7684dex\u6587\u4ef6<\/li><\/ul>\n\n\n\n<p>sub_58000<\/p>\n\n\n\n<ul><li>\u53cd\u8c03\u8bd5\u3001\u8bc1\u4e66\u6821\u9a8c<\/li><li>\u52a0\u8f7ddex\uff0c\u5e76\u8fd8\u539f\u6307\u4ee4<ul><li>4f80,\u5bf9fstat \u3001mmap \u548cmunmap \u8fdb\u884chook\u3002\uff1f\uff1f\uff1f\u4e3a\u4ec0\u4e48\u8981hook\u4ed6\u5462 \u54e6\u54e6 \u4f3c\u4e4e\u8981\u505a\u5185\u5b58\u52a0\u8f7ddex\u7684\u64cd\u4f5c\u3002<\/li><li>6DC0 \u62bd\u53d6\u6307\u4ee4\u8fd8\u539f\u3002<\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Application \u66ff\u6362<\/p>\n\n\n\n<p>\u55ef \uff0c\u8ddf\u4e86\u7b80\u5355\u7684\u6d41\u7a0b\uff0c\u8fd8\u662f\u6709\u4e9b\u7591\u95ee\u3002android\u58f3\u7684\u7ed3\u6784\uff0c<\/p>\n\n\n\n<ol><li>\u58f3\u7a0b\u5e8f<\/li><li>\u52a0\u58f3\u5de5\u5177<\/li><li>\u52a0\u58f3\u5bf9\u8c61<\/li><\/ol>\n\n\n\n<p>\u52a0\u58f3\u5de5\u5177 \uff0c\u5c06\u5bf9\u8c61\u8fdb\u884c\u6267\u884c\u62bd\u53d6\uff0c\u4fee\u6539\u76f8\u5173application\u7684\u5165\u53e3\u4e3a\u58f3\u7a0b\u5e8f\uff1b\u58f3\u7a0b\u5e8f\u542f\u52a8\u65f6\u5c06\u5bf9\u8c61\u7684\u6307\u4ee4\u8fdb\u884c\u8fd8\u539f\u540e\uff0c\u5b8c\u6210\u76f8\u5173application\u7684\u66ff\u6362\u5c06\u7a0b\u5e8f\u6d41\u8fd8\u7ed9\u52a0\u58f3\u5bf9\u8c61\u3002<\/p>\n\n\n\n<p>\u7591\u95ee1\uff1b\u4ece\u6587\u7ae0\u7684\u8bf4\u660e\u6765\u8bf4\uff0c\u88ab\u62bd\u53d6\u7684\u5bf9\u8c61\u4eceoat\u6587\u4ef6\u4e2d\u63d0\u53d6\uff0c\u80fd\u4e0d\u80fd\u6539\u4e3a\u4ecedex\u6587\u4ef6\u4e2d\u6216APK\u6587\u4ef6\u4e2d\u63d0\u53d6\uff1f\u731c\u6d4b\u53ef\u4ee5<\/p>\n\n\n\n<p>\u60ca\u53f91\uff1aapplication\u7684\u66ff\u6362\u4ec5\u9700\u8981\u505a\u76f8\u5173\u5b57\u6bb5\u7684\u66ff\u6362\u5c31\u884c\u4e86\uff1f\uff1f\uff1f\u90a3\u8fd9\u51e0\u4e2a\u7684\u5b57\u6bb5\u662f\u4ec0\u4e48\u610f\u4e49\uff1f\uff1f\u6211\u8981\u662f\u81ea\u5df1\u5b9e\u8df5\u4e0b\u5e94\u8be5\u4e5f\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u901a\u8fc7\u8c03\u8bd5\u518d\u8ddf\u8e2a\u4e00\u904d\u5457\uff0c\u6574\u4f53\u8ddf\u8e2a\u5230\u4e86\uff0c\u7ec6\u8282\u8fd8\u6ca1\u6709get\u5230\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">JNI_OnLoad {<br>    \u6ce8\u518c\u4e24\u4e2anative\u51fd\u6570<br>    sub_C9E0 \u521d\u59cb\u5316\u9700\u8981\u4f7f\u7528\u7684\u53d8\u91cf\uff0c\u58f3\u7684context \u3001application\u3001classLoader\u3001\u83b7\u53d6oat\u5730\u5740\u3001\u63d0\u53d6\u88ab\u62bd\u53d6\u7684dex\u5730\u5740<br>    sub_9E40 \u83b7\u53d6API level<br>    sub_98E0 \u83b7\u53d6\/data\/data\/....\/files \u76ee\u5f55<br>    \u521b\u5efa\/data\/data\/...\/files\/prodexdir \u76ee\u5f55<br>    sub_1C540 \u53cd\u8c03\u8bd5,\u5148\u8df3\u8fc7\u53cd\u8c03\u8bd5\u7684\u5185\u5bb9<br>    sub_4A10 \u8bc1\u4e66\u6821\u9a8c\uff0c\u4e5f\u5148\u8df3\u8fc7<br>    sub_5800 \u4f5c\u8005\u8bf4\u91cd\u8981\u7684\u64cd\u4f5c{<br>        sub_8860 \u6084\u54aa\u54aa\u7684\u53c8\u6ce8\u518c\u4e86\u4e00\u4e2anative\u51fd\u6570defineClassNative(Ljava\/lang\/String;Ljava\/lang\/ClassLoader;Ljava\/lang\/Object;)Ljava\/lang\/Class;sub_8600<br>        sub_4F80 \u91cd\u8981\u64cd\u4f5c\uff0c{<br>            \u505a\u4e86got\u8868hook\u6765\u5b8c\u6210\u5185\u5b58\u52a0\u8f7ddex\u6587\u4ef6\uff1f\u5185\u5b58\u52a0\u8f7d\u53c8\u4e3a\u4ec0\u4e48\u9700\u8981hook\u8fd9\u4e09\u4e2a\u51fd\u6570(fstat , mmap ,unmap)\uff1f<br>            \u53cd\u5c04\u8c03\u7528java\u5c42\uff0ccom.wrapper.proxyapplication.MultiDex\u7684installdex\u65b9\u6cd5\u3002<br>        }<br>        sub_6DC0  \u88ab\u62bd\u53d6\u6307\u4ee4\u8fd8\u539f\u3002<br>        application\u5e94\u7528\u66ff\u6362\u3002    <br>    }<br>    <br>}<\/pre>\n\n\n\n<p>\u8c03\u8bd5\u7528\u547d\u4ee4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">adb shell am start -D  com.tencent.qqpimsecure.sc\/.MainView\nadb shell \"ps | grep tencent | awk '{print $2}'\" # \u83b7\u53d6\u76ee\u6807\u8fdb\u7a0b\njdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700\nbreakpoint set --func-regex do_dlopen\np\/x *(char **)($esp+4)\nb *0xbc258720\nj *0xBC258CD1\n\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u9488\u5bf9\u5185\u5b58\u52a0\u8f7d\u7684\u731c\u6d4b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"757\" src=\"http:\/\/pareto.fun\/wp-content\/uploads\/2022\/11\/image-1024x757.png\" alt=\"\" class=\"wp-image-425\" srcset=\"http:\/\/pareto.fun\/wp-content\/uploads\/2022\/11\/image-1024x757.png 1024w, http:\/\/pareto.fun\/wp-content\/uploads\/2022\/11\/image-300x222.png 300w, http:\/\/pareto.fun\/wp-content\/uploads\/2022\/11\/image-768x568.png 768w, http:\/\/pareto.fun\/wp-content\/uploads\/2022\/11\/image.png 1170w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u6dfb\u52a0dex\u6587\u4ef6\u7684\u52a0\u8f7d\u5217\u8868\u548ccookie \uff0c \u7136\u540e\u52ab\u6301dex\u6587\u4ef6\u7684\u5185\u5b58\u6570\u636e\u5b9e\u73b0\uff0c\u5185\u5b58\u52a0\u8f7d\u3002<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u8d44\u6599\uff1a https:\/\/bbs.pediy.com\/thread-261939.htm#msg_ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[41,40],"_links":{"self":[{"href":"http:\/\/pareto.fun\/index.php?rest_route=\/wp\/v2\/posts\/423"}],"collection":[{"href":"http:\/\/pareto.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pareto.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pareto.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pareto.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=423"}],"version-history":[{"count":2,"href":"http:\/\/pareto.fun\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions"}],"predecessor-version":[{"id":426,"href":"http:\/\/pareto.fun\/index.php?rest_route=\/wp\/v2\/posts\/423\/revisions\/426"}],"wp:attachment":[{"href":"http:\/\/pareto.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pareto.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=423"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pareto.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}