Look at the clouds, someone blew this. Vulnerability: http://www.wooyun.org/bugs/wooyun-2014-071516
The feeling should be a loophole in the editpost.inc.php vote. Because DZ has determined that it will not repair the 7.x before the loophole, so directly paste the details.
The problem is in editpost.inc.php 281 lines, the user commits the Polloption array directly parsed out into the SQL statement, because the default is only to filter the array value, not filter the key, so it will cause a delete injection.
?
1234567891011 |
$pollarray
[
‘options‘
] =
$polloption
;
if
(
$pollarray
[
‘options‘
]) {
if
(
count
(
$pollarray
[
‘options‘
]) >
$maxpolloptions
) {
showmessage(
‘post_poll_option_toomany‘
);
}
foreach
(
$pollarray
[
‘options‘
]
as $key =>
$value
) {
//这里直接解析出来没处理$key
if
(!trim(
$value
)) {
$db
->query(
"DELETE FROM {$tablepre}polloptions WHERE polloptionid=‘$key‘ AND tid=‘$tid‘"
);
unset(
$pollarray
[
‘options‘
][
$key
]);
}
}
|
How to use:
Use your registered account to publish a poll post, then click "Edit", as
Then use burp to intercept the request, click "Edit Post", modify the Polloption as the injection statement:
Because the code determines that trim ($value) is empty, execute the following statement, so be sure to delete Fan Bingbing.
The return result has been successfully injected:
Patching method:
If it is not convenient to upgrade to Discuz X, you can modify the editpost.inc.php file to add a line:
?
1 |
$key = addslashes Code class= "PHP plain" > ( $key |