The PHP version of the source code is complete and runnable_[Dry goods] PHP kernel analysis of FPM and disable_function security issues

Maybe I’ve been busy at work lately,Maybe I’m lazy,The efficiency is not very high,In recent months, I have read some PHP kernel source code intermittently. In this year’s TCTF,there was a scene of attacking FPM to bypass the sandbox. Decided to explore the FPM life cycle and disable_function source code implementation , phpinfo cannot be displayed accurately. There are still many places that I am not familiar with,I will slowly add later,Worship RR and President P,ORZ. 【tips: Please swipe left and right to view all the code lines in this article】Debugging environment Install the debugging tool gdb apt install gdb Download php source code : wget https://www.php .net/distributions/php-7.1.0.tar.gz Then configure ./configure as follows ./configure –prefix=/root/php7.1.0 –enable-phpdbg-debug –enable-debug –enable-fpm CFLAGS=”-g3 -gdwarf-4″ View the Makefile as follows: CC = gcc CFLAGS = $(CFLAGS_CLEAN) – prefer-non-pic -static CFLAGS_CLEAN = -I/usr/include -g3 -gdwarf-4 -fvisibility=hidden -O0 -Wall -DZEND_SIGNALS $(PROF_FLAGS) CPP = gcc -E CPPFLAGS = CXX = CXXFLAGS = -g -O0 -prefer-non-pic -static $(PROF_FLAGS) CXXFLAGS_CLEAN = -g -O0 DEBUG_CFLAGS = -Wall Only the necessary debug module & # 43; fpm module & # xff0c; other modules are installed as required. CFLAGS=”-g3 -gdwarf-4″ is an additional configuration of compilation parameters , turn off all compilation optimization…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索