[b]السلام عليكم بخصوص سيرفرات لينكس التى تعمل بالـsuphp وكان يستطيع
المخترق رفع ملف php.ini ويضع فيه اعدادت جديده فيقوم بتعطيل السيف مود
فتح جميع الدوال ويتمكن من ذلك بتشغيل اى شيل
وكان حل هذة المشكله هو اضافه هذا السطر
- الكود:
-
suPHP_ConfigPath /usr/local/lib/php.ini
الي هذا الملف
- الكود:
-
pico /usr/local/apache/conf/php.conf
ثم نبحث عن
- الكود:
-
[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
;application/x-httpd-php=/usr/local/lib/
;application/x-httpd-php4=/usr/local/php4/lib/
;application/x-httpd-php5=/usr/local/lib/
ونحذف علامه ; من اخر سطر بحيث يصبح بالشكل التالى
- الكود:
-
[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
;application/x-httpd-php=/usr/local/lib/
;application/x-httpd-php4=/usr/local/php4/lib/
application/x-httpd-php5=/usr/local/lib/
وجدت شيء يمنع هذا التخطى حتى برفع .htaccess
وهو ننفذ الامر التالي
- اقتباس :
- pico /opt/suphp/etc/suphp.conf
ونبحث عن
- الكود:
-
[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
;application/x-httpd-php=/usr/local/lib/
;application/x-httpd-php4=/usr/local/php4/lib/
;application/x-httpd-php5=/usr/local/lib/
ونحذف علامه ; من السطر الاخير بحيث يصبح الشكل
- الكود:
-
[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
;application/x-httpd-php=/usr/local/lib/
;application/x-httpd-php4=/usr/local/php4/lib/
application/x-httpd-php5=/usr/local/lib/
انتهي الدرس