SQL注入与简单的XSS
SQL注入的基本套路 本博客仅用于学习,只是一份网络安全的入门学习笔记 1)测试交互方法,判断浏览器提交数据和web服务器的交互方式 +get提交 提交的数据在url中显示 +post提交(表单提交) 没有在url中显示 2)判断提交变量的数据类型 +整形(int类型) id = 1 and 1=2 //让提交数据为false(假) 有交互显示则为整型(即输入后与加and之前显示的不一样) +字符型 id = 1 and 1=2 无交互显示,则进一步判断闭合方式 常见的闭合方法‘’,“”,(),(‘’),(“”)等 3)构造闭合(整型不需要) --+ 或者 # 4)在闭合中构造sql语句并判断数据库表的行数 确定显示位 union all select 1,2,3 5)在有显示的行输入需要回显的sql语句 爆数据库名 database() 表名 group_concat(table_name) from information_schema.tables where table_schema=‘your database’ 列名: group_concat(column_name) from information_schema.columns where table_name=‘your table’ and table_schema=‘your database’ 具体信息: