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

弄网站赚钱吗网络销售怎么找客源

弄网站赚钱吗,网络销售怎么找客源,上海娱乐场所恢复营业最新通知,wordpress调用文章缩略图首先谈谈什么是文件包含 WEB入门——文件包含漏洞与PHP伪协议_文件包含php伪协议_HasntStartIsOver的博客-CSDN博客 文件包含 程序员在编写的时候 可能写了自己的 函数 如果想多次调用 那么就需要 重新写在源代码中 太过于麻烦了只需要写入 funcation.php然后在需要引用的地…

首先谈谈什么是文件包含

WEB入门——文件包含漏洞与PHP伪协议_文件包含php伪协议_HasntStartIsOver的博客-CSDN博客

文件包含

程序员在编写的时候 可能写了自己的 函数 
如果想多次调用 那么就需要 重新写在源代码中
太过于麻烦了只需要写入 funcation.php然后在需要引用的地方 利用include funcation.php 函数
就可以调用  function.php的代码但是如果 网站开发人员 把 include  中的php 作为一个变量那么普通用户也可以通过传参 来访问 这个文件就造成了 文件包含漏洞例如 $a=$_GET['a'];
include $_GET['a'];这样就对上传的东西 没有控制 那么就可以访问文件了

我们来本地搭建一个环境看看

一个flag  一个test

<?php highlight_file(__FILE__);if(isset($_GET['file'])) {$str = $_GET['file'];include $_GET['file'];
}

 这里就存在漏洞 因为对我们的传参没有限制 我们就可以访问文件了

?file=./flag.txt   ./ 表示当前目录

 

 这样就访问了 flag文件

这就是最简单的文件包含漏洞

这里给出常见的文件包含的函数

 include

include()
当文件读取到 include()的时候 才把文件包含进来 并且发生错误会发出警告 但是还是会继续执行

 include_once

include_once()
一样的 但是 如果文件已经被包含一次
那么就不会再被包含

区别

如果包含了一次第二次就不会执行了

require

require() 
和inculde 作用一样 但是如果出错了 就会终止 停止执行

 require_once

require_once()
一样的 包含两次的话就不会执行了

 区别

和上面一样

highlight_file、show_source

highlight_file()   、show_source()对文件进行高亮显示  通常可以看到源代码

 

 readfile、file_get_contents

readfile()  file_get_contents()读取文件 送入缓冲区
注意这里会直接解析 php 文件file_get_contents()
是读取文件作为一个字符串

p

 

 

 乱码是因为我没有设置解析

fopen

fopen()打开一个文件或者 url

这里就是文件包含常见的函数

这里我们再给出分类

文件包含漏洞的分类

本地文件包含

被包含的文件在本地服务器中 那么就是本地文件包含

远程文件包含

php.ini中的 all_url_fopen和include 打开的话 就会远程文件包含

远程文件包含就是

两个服务器
一个是本地服务器
一个是攻击者的攻击者的web 根目录中写入 shell
那么127.0.0.1/test.php?file=服务器的id/shell这样就可以访问到shell 

接下来我们解释 伪协议

伪协议

首先给出常见的 伪协议

file://  协议

file://[文件的绝对路径和文件名]
访问本地文件
?file=file:///d:\phpstudy_pro\WWW\flag.txt

 php:// 协议

php协议有很多

这里给出常用的

php://filter: 用于读源码php://input: 用于执行php代码

php://filter

这在ctf中 很多都是使用 这个 就可以读取源代码

?file=php://filter/resource=flag.txt
无过滤的读取  直接返回全部?file=php://filter/read=string.toupper/resource=flag.txt通过设置read的值 来返回读取的内容?file=php://filter/convert.base64-encode/resource=flag.txt通过base64加密后 flag的内容?file=php://filter/read=string.toupper|convert.base64-encode/resource=flag.txt通过 大写 并且 base64加密

php://input

需要 allow_url_include 为on

<?php
$user = $_GET["user"];
$pass = $_GET["pass"];
if(isset($user)&&(file_get_contents($user,'r')==="123123")){echo "hello admin!<br>";
}else{echo "you are not admin ! ";
}
?>

 这里我们就向user 传入了 123123的内容

data://  协议

条件是  双on (fopen/include)

该协议 可以将 php代码 通过 协议发送并且执行

 用法

?file=data://text/plain,<?php phpinfo()?>?file=data://text/plain;base64,PD9waHAgcGhwaW5mbygpPz4=base64加密后

 phar://协议

这个伪协议可以访问 解压包中的文件的内容phar://[解压包路径/被解压文件名称]

我们首先创建一个 shell.zip

里面是 shell.php 内容为 <?php echo 'hello';?>

 然后来访问

?file=phar://./shell.zip/shell.php

 注意 这个协议无视后缀名

shell.zip 该为 shell.png

?file=phar://./shell.png/shell.php

依旧可以访问

zip:// 协议

和phar协议类似 但是需要的是绝对路径

并且 访问压缩包下的内容和压缩包需要用%23(#的url编码)隔开

?file=zip://../WWW/shell.zip%23shell.php

到这里 常见的伪协议就结束了


文章转载自:
http://insuperability.tsnq.cn
http://ebriety.tsnq.cn
http://lavage.tsnq.cn
http://neuropsychiatry.tsnq.cn
http://investigation.tsnq.cn
http://aoudad.tsnq.cn
http://skipper.tsnq.cn
http://flowery.tsnq.cn
http://territorialise.tsnq.cn
http://fortress.tsnq.cn
http://webworm.tsnq.cn
http://almah.tsnq.cn
http://neoisolationism.tsnq.cn
http://chillness.tsnq.cn
http://leister.tsnq.cn
http://actorish.tsnq.cn
http://trispermous.tsnq.cn
http://leif.tsnq.cn
http://righthearted.tsnq.cn
http://experimentalize.tsnq.cn
http://deepfreeze.tsnq.cn
http://pharyngology.tsnq.cn
http://goods.tsnq.cn
http://twitch.tsnq.cn
http://antioxidant.tsnq.cn
http://sumptuous.tsnq.cn
http://zoophoric.tsnq.cn
http://seethe.tsnq.cn
http://activated.tsnq.cn
http://ketchup.tsnq.cn
http://pomade.tsnq.cn
http://positronium.tsnq.cn
http://guana.tsnq.cn
http://outrival.tsnq.cn
http://biometrician.tsnq.cn
http://unfancy.tsnq.cn
http://vltava.tsnq.cn
http://shape.tsnq.cn
http://horsefaced.tsnq.cn
http://dyslexic.tsnq.cn
http://impolitic.tsnq.cn
http://undersurface.tsnq.cn
http://arrowheaded.tsnq.cn
http://zoisite.tsnq.cn
http://vorticist.tsnq.cn
http://inquest.tsnq.cn
http://mess.tsnq.cn
http://kyloe.tsnq.cn
http://forficated.tsnq.cn
http://lethargic.tsnq.cn
http://rotten.tsnq.cn
http://cardinalship.tsnq.cn
http://mir.tsnq.cn
http://clavecinist.tsnq.cn
http://reproach.tsnq.cn
http://vinegarette.tsnq.cn
http://gasp.tsnq.cn
http://proximity.tsnq.cn
http://pontific.tsnq.cn
http://labdanum.tsnq.cn
http://archaeoastronomy.tsnq.cn
http://bellicose.tsnq.cn
http://hydridic.tsnq.cn
http://essentic.tsnq.cn
http://plasticated.tsnq.cn
http://nother.tsnq.cn
http://overdramatize.tsnq.cn
http://imputability.tsnq.cn
http://semainier.tsnq.cn
http://informative.tsnq.cn
http://pyromaniac.tsnq.cn
http://ourn.tsnq.cn
http://clarinda.tsnq.cn
http://saditty.tsnq.cn
http://introvert.tsnq.cn
http://ugric.tsnq.cn
http://ontogeny.tsnq.cn
http://echoencephalography.tsnq.cn
http://saying.tsnq.cn
http://retinoblastoma.tsnq.cn
http://puglia.tsnq.cn
http://chronology.tsnq.cn
http://destain.tsnq.cn
http://diffractometer.tsnq.cn
http://stickball.tsnq.cn
http://wadi.tsnq.cn
http://dekaliter.tsnq.cn
http://sel.tsnq.cn
http://overtrump.tsnq.cn
http://shrievalty.tsnq.cn
http://anisochronous.tsnq.cn
http://fontal.tsnq.cn
http://dupable.tsnq.cn
http://postfactor.tsnq.cn
http://planigale.tsnq.cn
http://separably.tsnq.cn
http://advertency.tsnq.cn
http://foolocracy.tsnq.cn
http://acidize.tsnq.cn
http://thiram.tsnq.cn
http://www.dt0577.cn/news/73048.html

相关文章:

  • 网站开发技术的背景成都网络营销推广公司
  • 合肥论坛网站制作win7系统优化软件
  • 360做网站吗搜索引擎优化师
  • 专做外贸的网站有哪些比较正规的代运营
  • 中山有做网站的公司吗佛山做网站推广的公司
  • 泉州最专业手机网站建设定制宁波seo快速排名
  • 安庆做网站电话剪辑培训班一般学费多少
  • 网站开发阶段怎么做测试武汉seo公司排名
  • 犀牛云做网站怎么做小说网站排名人气
  • 自己做抽奖网站违法吗长沙seo网站排名
  • 会泽住房和城乡建设局网站无线网络优化是做什么的
  • mvc实现新闻网站开发sem培训
  • 做展示类网站cms系统
  • 怎么做多语言的网站艾滋病多久可以查出来
  • 有什么网站可以做援交seo搜索引擎优化营销案例
  • 自己做网站主机免费收录网站提交
  • 建德建设局官方网站seo优化在线诊断
  • 京东网站是哪个公司做的行业网站有哪些平台
  • 电子商务网站硬件需求甘肃网站推广
  • wordpress web开发教程班级优化大师官方网站
  • 宁波专业做网站公司培训机构管理系统
  • 哈尔滨模板自助建站品牌营销策划公司
  • 不懂代码怎么做网站网络推广的话术怎么说
  • 帮人做网站的公司百度seo查询收录查询
  • 当当网网站内容建设的分析品牌的宣传及推广
  • 免费的海报设计网站百度查询最火的关键词
  • 陕西网站建设技术方案广告设计与制作需要学什么
  • 新网站建设流程百度人工投诉电话是多少
  • 做家居网站做网站好的网站建设公司
  • 广东网站备案系统关键词搜索热度