Skip to content

Commit ad3eed5

Browse files
committed
Handing newer version of WP, fallback CHUNKSIE to 1
1 parent c89c0c3 commit ad3eed5

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

lib/metasploit/framework/login_scanner/wordpress_multicall.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,31 @@ module LoginScanner
88
class WordpressMulticall < HTTP
99

1010
# @!attribute passwords
11-
# @return [Array]
11+
# @return [Array]
1212
attr_accessor :passwords
1313

14-
# @!attribute chunk_size
15-
# @return [Fixnum]
14+
# @!attribute chunk_size, limits number of passwords per XML request
15+
# @return [Fixnum]
1616
attr_accessor :chunk_size
1717

18-
# @!attribute block_wait
19-
# @return [Fixnum]
18+
# @!attribute block_wait, time to wait if got blocked by the target
19+
# @return [Fixnum]
2020
attr_accessor :block_wait
2121

2222
# @!attribute base_uri
23-
# @return [String]
23+
# @return [String]
2424
attr_accessor :base_uri
2525

2626
# @!attribute wordpress_url_xmlrpc
27-
# @return [String]
27+
# @return [String]
2828
attr_accessor :wordpress_url_xmlrpc
2929

30+
3031
def set_default
3132
self.wordpress_url_xmlrpc = 'xmlrpc.php'
3233
self.block_wait = 6
3334
self.base_uri = '/'
34-
self.chunk_size = 1800
35+
self.chunk_size = 1700
3536
end
3637

3738
# Returns the XML data that is used for the login.

modules/auxiliary/scanner/http/wordpress_multicall_creds.rb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,25 @@ class Metasploit3 < Msf::Auxiliary
1313
include Msf::Auxiliary::Scanner
1414
include Msf::Auxiliary::AuthBrute
1515
include Msf::Auxiliary::Report
16+
# include Metasploit::Framework::LoginScanner::WordpressMulticall
1617

1718
def initialize(info = {})
1819
super(update_info(info,
1920
'Name' => 'Wordpress XML-RPC system.multicall Credential Collector',
2021
'Description' => %q{
2122
This module attempts to find Wordpress credentials by abusing the XMLRPC
2223
APIs. Wordpress versions prior to 4.4.1 are suitable for this type of
23-
technique. For other versions, please try the wordpress_xmlrpc_login
24-
module instead.
24+
technique. For newer versions, the script will drop the CHUNKSIZE to 1 automatically.
2525
},
2626
'Author' =>
2727
[
28-
'Cenk Kalpakoglu <cenk.kalpakoglu[at]gmail.com>',
2928
'KingSabri <King.Sabri[at]gmail.com>' ,
3029
'William <WCoppola[at]Lares.com>',
3130
'sinn3r'
3231
],
3332
'License' => MSF_LICENSE,
3433
'References' =>
3534
[
36-
['URL', 'https://wordpress.org/'],
37-
['URL', 'http://www.ethicalhack3r.co.uk/security/introduction-to-the-wordpress-xml-rpc-api/'],
38-
['CVE', '1999-0502'], # Weak password
3935
['URL', 'https://blog.cloudflare.com/a-look-at-the-new-wordpress-brute-force-amplification-attack/' ],
4036
['URL', 'https://blog.sucuri.net/2014/07/new-brute-force-attacks-exploiting-xmlrpc-in-wordpress.html' ]
4137
],
@@ -49,7 +45,7 @@ module instead.
4945
register_options(
5046
[
5147
OptInt.new('BLOCKEDWAIT', [ true, 'Time(minutes) to wait if got blocked', 6 ]),
52-
OptInt.new('CHUNKSIZE', [ true, 'Number of passwords need to be sent per request. (1700 is the max)', 1500 ])
48+
OptInt.new('CHUNKSIZE', [ true, 'Number of passwords need to be sent per request. (1700 is the max)', 1500 ]),
5349
], self.class)
5450

5551
# Not supporting these options, because we are not actually letting the API to process the
@@ -84,8 +80,10 @@ def check_setup
8480
print_error("#{peer}:#{rport}#{wordpress_url_xmlrpc} does not enable XMLRPC")
8581
false
8682
elsif Gem::Version.new(version) >= Gem::Version.new('4.4.1')
87-
print_error("#{peer}:#{rport}#{wordpress_url_xmlrpc} Target's version (#{version}) is not vulnerable to this attack.")
88-
false
83+
print_error("#{peer}#{wordpress_url_xmlrpc} Target's version (#{version}) is not vulnerable to this attack.")
84+
vprint_status("Dropping CHUNKSIZE from #{datastore['CHUNKSIZE']} to 1")
85+
datastore['CHUNKSIZE'] = 1
86+
true
8987
else
9088
print_status("Target #{peer} is running Wordpress")
9189
true

0 commit comments

Comments
 (0)