Những gì chúng tôi có thể làm để Stop này? Như đã nói nhiều lần, có chiều sâu phòng thủ là quan trọng nhất của thiết kế cân nhắc. Đưa lên nhiều lớp bảo vệ sẽ cho phép bạn chịu đựng được các cuộc tấn công. Kiểu tấn công này có thể được bảo vệ chống lại ở mức độ htaccess. Và bằng cách lọc các đầu vào | This material is copyright and is licensed for the sole use by Thomas Rosenblum on 4th December 2008 1010 SW High Ave. Topeka 66604 Chapter 5 Here we re instructing the server to force our path to change in our environment to match the code located out there. Here is such a shell php file _GET evil-page include file . .php What Can We Do to Stop This As stated repeatedly in-depth defense is the most important of design considerations. Putting up many layers of defense will enable you to withstand the attacks. This type of attack can be defended against at the .htaccess level and by filtering the inputs. One problem is that we tend to forget that many defaults in PHP set up a condition for failure. Take this for instance allow_url_fopen is on by default. Default Why do you care you may ask. This if enabled allows the PHP file functions such as file_get_contents and the ever present include and require statements to work in a manner you may not have anticipated such as retrieving the entire contents of your website or allowing a determined attacker to break in. Since programmers sometimes forget to do proper input filtering in their user fields such as an input box that allows any type of data to be inputted or code to be inserted for an injection attack. Lots of site break-ins defacements and worse are the result of a combination of poor programming on the coder s part and not disabling the allow_url_fopen option. This leads to code injections as in our previous examples. Make sure you keep the Global Registers OFF. This is a biggie that will prevent much evil There are a few ways to do this and depending on your version of Joomla they are handled differently. In Joomla versions less than look for this code in the no direct access defined _VALID_MOS or die Restricted access Use 1 to emulate register_globals on WARNING SETTING TO 1 MAY BE REQUIRED FOR BACKWARD COMPATIBILITY 117 This material is copyright and is licensed for the sole use by Thomas .