Thinkphp5 RCE 代码审计
对thinkphp5 控制器过滤不严导致的RCE漏洞进行了一次审计
On Unix/Linux users with a uid=0 are root. This means any security checks are bypassed for them.
An adversary might go ahead and create a new account, or set an existing account’s user identifier (uid) or group identifier to zero.
A simple way to do this is to update /etc/passwd of an account, or use usermod -u 0 -o mallory.
Let’s create a new user named mallory:
wuzzi@saturn:/$ sudo adduser mallory [...] wuzzi@saturn:/$ cat /etc/passwd | grep mallory mallory:x:1001:1001::/home/mallory:/bin/shObserve that the user has the uid 1001.