{"id":1341,"date":"2018-10-28T00:09:42","date_gmt":"2018-10-27T16:09:42","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=1341"},"modified":"2018-10-29T09:14:21","modified_gmt":"2018-10-29T01:14:21","slug":"ios%e8%84%b1%e5%a3%b3%e5%b7%a5%e5%85%b7dumpdecrypted%e7%9a%84%e5%9f%ba%e6%9c%ac%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/reverse\/2018\/10\/28\/0009421341.html","title":{"rendered":"iOS\u8131\u58f3\u5de5\u5177dumpdecrypted\u7684\u57fa\u672c\u4f7f\u7528"},"content":{"rendered":"<p>1\u3001\u5565\u662f\u8131\u58f3(\u4e5f\u53eb\u7838\u58f3)\uff1f\u6211\u8bd5\u7740\u4ece\u5934\u5f00\u59cb\u8bf4\u8d77\u3002<br \/>\n1.1\u3001\u5b89\u88c5\u5728iPhone\u4e0a\u7684App\u6269\u5c55\u540d\u4e3a.ipa\uff0cipa\u4e2d\u6700\u5173\u952e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u53ebMach-o\u6587\u4ef6\uff1b<br \/>\n1.2\u3001\u8fd9\u4e2aMach-o\u6587\u4ef6\u76f8\u5f53\u4e8ewindows\u5e73\u53f0\u7684exe\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u4e00\u822c\u4e0eipa\u6587\u4ef6\u540c\u540d\uff1b<br \/>\n1.3\u3001\u8131\u58f3\u662f\u9006\u5411\u5de5\u7a0b\u4e2d\u7684\u4e13\u4e1a\u672f\u8bed\uff0c\u6240\u8c13\u9006\u5411\u5de5\u7a0b\u5373\u901a\u8fc7Mach-o\u6587\u4ef6\u53cd\u63a8\u7a0b\u5e8f\u6e90\u4ee3\u7801(\u6682\u65f6\u8fd9\u4e48\u7406\u89e3\u5427)\uff1b<br \/>\n1.4\u3001\u4e0a\u8ff0\u51e0\u70b9\u7684\u610f\u601d\u662f\u8bf4\uff0c\u4eba\u5bb6\u53ef\u80fd\u62ff\u5230\u4f60\u7684ipa\u6587\u4ef6\u5373\u53ef\u7834\u89e3\u4f60\u7684app\uff0c\u751a\u81f3\u4fee\u6539\u91cc\u9762\u7684\u529f\u80fd\uff1b<br \/>\n1.5\u3001\u597d\u4e86\uff0c\u82f9\u679c\u516c\u53f8\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u5b89\u5168\u6027\u95ee\u9898\uff0c\u5728App\u4e0a\u67b6AppStore\u540e\u4f1a\u5c06ipa\u5305\u518d\u52a0\u5bc6\u4e00\u6b21(\u52a0\u58f3)\uff1b<br \/>\n1.6\u3001\u8fd9\u6837\u4e00\u6765\u4ece\u6b63\u89c4\u6e20\u9053\u4e0b\u8f7d\u7684\u5e94\u7528\u5c31\u65e0\u6cd5\u76f4\u63a5\u88ab\u53cd\u7f16\u8bd1\u4e86\uff0c\u5dee\u4e0d\u591a\u5c31\u662f\u8fd9\u4e48\u56de\u4e8b\uff1b<\/p>\n<p>2\u3001\u63a5\u4e0b\u6765\u8981\u8bf4\u7684\u5c31\u662f\u5982\u679c\u201c\u89e3\u5bc6\u201d\u4eceAppStore\u4e0b\u8f7d\u4e0b\u6765\u7684App\uff0c\u5148\u505a\u51c6\u5907\uff1b<br \/>\n2.1\u3001\u51c6\u5907\u597d\u51e0\u4e2a\u5de5\u5177\uff1aclass-dump\u3001iFunBox\u3001Cycript\u3001MachOView\u3001Hopper Disassembler\uff1b<br \/>\n2.2\u3001\u5982\u679c\u8fd9\u51e0\u4e2a\u4e1c\u897f\u4f60\u4e0d\u719f\u6089\u5c31\u6bd4\u8f83\u96be\u641e\u4e86\uff0c\u8fc7\u4f1a\u8981\u7528\u7684\u6709iFunBox\u3001Cycript\uff1b<br \/>\n2.3\u3001dumpdecrypted\u7684Github\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/stefanesser\/dumpdecrypted\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/stefanesser\/dumpdecrypted<\/a>\uff0c\u76f4\u63a5\u4e0b\u8f7dzip\u5305\u5c31\u884c\uff1b<br \/>\n2.4\u3001\u89e3\u538b\u51fa\u6765\u5e94\u8be5\u662f\u6709\u4e09\u4e2a\u6587\u4ef6\uff0c\u5728\u7ec8\u7aef\u76f4\u63a5\u6267\u884c\u5f53\u524d\u76ee\u5f55\u4e0b\u7684MakeFile\u5373\u53ef\u751f\u6210\u4e00\u4e2adumpdecrypted.dylib\uff1b<br \/>\n2.5\u3001\u8fd9\u4e2adumpdecrypted.dylib\u662f\u91cd\u70b9\u4e86\uff0c\u540e\u5728\u5c31\u9760\u8fd9\u4e2a\u6587\u4ef6\u4e86\uff1b<\/p>\n<p>3\u3001\u5728iPhone\u4e0a\u8131\u58f3<br \/>\n3.1\u3001SSH\u767b\u5f55\u5230iPhone\u4e0a(\u8fd9\u4e2a\u5982\u679c\u6709\u95ee\u9898\uff0c\u4f60\u662f\u600e\u4e48\u575a\u6301\u770b\u5230\u8fd9\u91cc\u6765\u7684)\uff1b<br \/>\n3.2\u3001ps -A\u67e5\u770b\u5f53\u524d\u8fdb\u7a0b\uff0c\u53ef\u4ee5\u627e\u5230\u4f60\u9700\u8981\u8131\u58f3\u7684App\uff0c\u8bb0\u4e0bApp\u7684\u8def\u5f84\uff0c\u6bd4\u5982\uff1a<\/p>\n<pre lang=\"bash\">\/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper<\/pre>\n<p>3.3\u3001\u5c06dumpdecrypted.dylib\u62f7\u8d1d\u5230iPhone\u7684var\/root\u76ee\u5f55\u4e0b(\u5373root\u7528\u6237\u7684Home\u76ee\u5f55\uff0c\u901a\u8fc7iFunBox\u6216scp)\uff1b<br \/>\n3.4\u3001\u5728var\/root\u76ee\u5f55\u4e2d\u6267\u884cDYLD_INSERT_LIBRARIES\u8fd9\u4e2a\u52a8\u6001\u5e93\u6ce8\u5165\u547d\u4ee4\uff0c\u6ce8\u610f\u8981\u5927\u5199\uff01\uff01<\/p>\n<pre lang=\"bash\" line=\"1\">iPhone4s:~ root# dyld_insert_libraries=dumpdecrypted.dylib \/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper\r\nAbort trap: 6\r\niPhone4s:~ root# DYLD_INSERT_LIBRARIES=dumpdecrypted.dylib \/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper\r\nmach-o decryption dumper\r\n\r\nDISCLAIMER: This tool is only meant for security research purposes, not for application crackers.\r\n\r\n[+] detected 32bit ARM binary in memory.\r\n[+] offset to cryptid found: @0x6ca4c(from 0x6c000) = a4c\r\n[+] Found encrypted data at address 00004000 of length 4358144 bytes - type 1.\r\n[+] Opening \/private\/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper for reading.\r\n[+] Reading header\r\n[+] Detecting header type\r\n[+] Executable is a FAT image - searching for right architecture\r\n[+] Correct arch is at offset 16384 in the file\r\n[+] Opening Wallpaper.decrypted for writing.\r\n[+] Copying the not encrypted start of the file\r\n[+] Dumping the decrypted data into the file\r\n[+] Copying the not encrypted remainder of the file\r\n[+] Setting the LC_ENCRYPTION_INFO->cryptid to 0 at offset 4a4c\r\n[+] Closing original file\r\n[+] Closing dump file<\/pre>\n<p>3.5\u3001\u6ca1\u6709\u62a5\u9519\u5c31\u662f\u6210\u529f\u4e86\uff0c\u5f53\u524d\u76ee\u5f55\u4e0b\u4f1a\u751f\u6210\u4e00\u4e2aWallpaper.decrypted\u6587\u4ef6\uff0c\u5373\u4e3a\u8131\u58f3\u540e\u7684\u6587\u4ef6\uff0c\u5230\u6b64\u7ed3\u675f\uff1b<br \/>\n3.6\u3001\u5c06\u8be5\u6587\u4ef6\u62f7\u51fa\u6765\uff0cclass-dump &#8211;arch armv7 -H Wallpaper.decrypted -o Headers\uff1b<br \/>\n3.7\u3001\u8fd9\u91cc\u8981\u6ce8\u610f\u7684\u662f&#8211;arch armv7\uff0c\u8fd9\u4e2aarmv7\u662f\u56e0\u4e3a\u5f53\u524d\u624b\u673a\u662farmv7\u67b6\u6784\uff0c\u5b9e\u9645\u60c5\u51b5\u5b9e\u9645\u5bf9\u5f85\uff1b<br \/>\n3.8\u3001\u4f7f\u7528MachOView\u3001Hopper\u6216otool\u547d\u4ee4\u53bb\u89e3\u6790\u8be5Mach-o\u6587\u4ef6\uff0c\u53ea\u6709armv7\u67b6\u6784\u5bf9\u5e94\u90e8\u5206\u8131\u58f3\u4e86\uff0c\u8fd9\u4e2a\u9700\u8981\u6ce8\u610f\u4e00\u4e0b\uff1b<br \/>\n3.9\u3001\u540e\u9762\u7684\u4e8b\u60c5\u5c31\u4e0e\u58f3\u65e0\u5173\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u5565\u662f\u8131\u58f3(\u4e5f\u53eb\u7838\u58f3)\uff1f\u6211\u8bd5\u7740\u4ece\u5934\u5f00\u59cb\u8bf4\u8d77\u3002 1.1\u3001\u5b89\u88c5\u5728iPhone\u4e0a\u7684App\u6269\u5c55\u540d\u4e3a.ipa\uff0cipa\u4e2d\u6700\u5173\u952e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u53ebMach-o\u6587\u4ef6\uff1b 1.2\u3001\u8fd9\u4e2aMach-o\u6587\u4ef6\u76f8\u5f53\u4e8ewindows\u5e73\u53f0\u7684exe\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u4e00\u822c\u4e0eipa\u6587\u4ef6\u540c\u540d\uff1b 1.3\u3001\u8131\u58f3\u662f\u9006\u5411\u5de5\u7a0b\u4e2d\u7684\u4e13\u4e1a\u672f\u8bed\uff0c\u6240\u8c13\u9006\u5411\u5de5\u7a0b\u5373\u901a\u8fc7Mach-o\u6587\u4ef6\u53cd\u63a8\u7a0b\u5e8f\u6e90\u4ee3\u7801(\u6682\u65f6\u8fd9\u4e48\u7406\u89e3\u5427)\uff1b 1.4\u3001\u4e0a\u8ff0\u51e0\u70b9\u7684\u610f\u601d\u662f\u8bf4\uff0c\u4eba\u5bb6\u53ef\u80fd\u62ff\u5230\u4f60\u7684ipa\u6587\u4ef6\u5373\u53ef\u7834\u89e3\u4f60\u7684app\uff0c\u751a\u81f3\u4fee\u6539\u91cc\u9762\u7684\u529f\u80fd\uff1b 1.5\u3001\u597d\u4e86\uff0c\u82f9\u679c\u516c\u53f8\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u5b89\u5168\u6027\u95ee\u9898\uff0c\u5728App\u4e0a\u67b6AppStore\u540e\u4f1a\u5c06ipa\u5305\u518d\u52a0\u5bc6\u4e00\u6b21(\u52a0\u58f3)\uff1b 1.6\u3001\u8fd9\u6837\u4e00\u6765\u4ece\u6b63\u89c4\u6e20\u9053\u4e0b\u8f7d\u7684\u5e94\u7528\u5c31\u65e0\u6cd5\u76f4\u63a5\u88ab\u53cd\u7f16\u8bd1\u4e86\uff0c\u5dee\u4e0d\u591a\u5c31\u662f\u8fd9\u4e48\u56de\u4e8b\uff1b 2\u3001\u63a5\u4e0b\u6765\u8981\u8bf4\u7684\u5c31\u662f\u5982\u679c\u201c\u89e3\u5bc6\u201d\u4eceAppStore\u4e0b\u8f7d\u4e0b\u6765\u7684App\uff0c\u5148\u505a\u51c6\u5907\uff1b 2.1\u3001\u51c6\u5907\u597d\u51e0\u4e2a\u5de5\u5177\uff1aclass-dump\u3001iFunBox\u3001Cycript\u3001MachOView\u3001Hopper Disassembler\uff1b 2.2\u3001\u5982\u679c\u8fd9\u51e0\u4e2a\u4e1c\u897f\u4f60\u4e0d\u719f\u6089\u5c31\u6bd4\u8f83\u96be\u641e\u4e86\uff0c\u8fc7\u4f1a\u8981\u7528\u7684\u6709iFunBox\u3001Cycript\uff1b 2.3\u3001dumpdecrypted\u7684Github\u5730\u5740\uff1ahttps:\/\/github.com\/stefanesser\/dumpdecrypted\uff0c\u76f4\u63a5\u4e0b\u8f7dzip\u5305\u5c31\u884c\uff1b 2.4\u3001\u89e3\u538b\u51fa\u6765\u5e94\u8be5\u662f\u6709\u4e09\u4e2a\u6587\u4ef6\uff0c\u5728\u7ec8\u7aef\u76f4\u63a5\u6267\u884c\u5f53\u524d\u76ee\u5f55\u4e0b\u7684MakeFile\u5373\u53ef\u751f\u6210\u4e00\u4e2adumpdecrypted.dylib\uff1b 2.5\u3001\u8fd9\u4e2adumpdecrypted.dylib\u662f\u91cd\u70b9\u4e86\uff0c\u540e\u5728\u5c31\u9760\u8fd9\u4e2a\u6587\u4ef6\u4e86\uff1b 3\u3001\u5728iPhone\u4e0a\u8131\u58f3 3.1\u3001SSH\u767b\u5f55\u5230iPhone\u4e0a(\u8fd9\u4e2a\u5982\u679c\u6709\u95ee\u9898\uff0c\u4f60\u662f\u600e\u4e48\u575a\u6301\u770b\u5230\u8fd9\u91cc\u6765\u7684)\uff1b 3.2\u3001ps -A\u67e5\u770b\u5f53\u524d\u8fdb\u7a0b\uff0c\u53ef\u4ee5\u627e\u5230\u4f60\u9700\u8981\u8131\u58f3\u7684App\uff0c\u8bb0\u4e0bApp\u7684\u8def\u5f84\uff0c\u6bd4\u5982\uff1a \/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper 3.3\u3001\u5c06dumpdecrypted.dylib\u62f7\u8d1d\u5230iPhone\u7684var\/root\u76ee\u5f55\u4e0b(\u5373root\u7528\u6237\u7684Home\u76ee\u5f55\uff0c\u901a\u8fc7iFunBox\u6216scp)\uff1b 3.4\u3001\u5728var\/root\u76ee\u5f55\u4e2d\u6267\u884cDYLD_INSERT_LIBRARIES\u8fd9\u4e2a\u52a8\u6001\u5e93\u6ce8\u5165\u547d\u4ee4\uff0c\u6ce8\u610f\u8981\u5927\u5199\uff01\uff01 iPhone4s:~ root# dyld_insert_libraries=dumpdecrypted.dylib \/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper Abort trap: 6 iPhone4s:~ root# DYLD_INSERT_LIBRARIES=dumpdecrypted.dylib \/var\/mobile\/Applications\/C84FAD25-C206-40AF-A920-EABAE384FA67\/Wallpaper.app\/Wallpaper mach-o decryption dumper DISCLAIMER: This tool is only meant for security research purposes, not for application crackers. [+] detected 32bit ARM binary in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120],"tags":[148,149,145,150,146,147,144,143],"class_list":["post-1341","post","type-post","status-publish","format-standard","hentry","category-reverse","tag-class-dump","tag-cycript","tag-dumpdecrypted","tag-hopper","tag-mach-o","tag-otool","tag-144","tag-143"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=1341"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1341\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=1341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=1341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=1341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}