Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create wordpress_cp_calendar_sqli.rb scanner #5167

Merged
merged 2 commits into from Apr 19, 2015
Merged

Create wordpress_cp_calendar_sqli.rb scanner #5167

merged 2 commits into from Apr 19, 2015

Conversation

brandonprry
Copy link
Contributor

This module will scan for vulnerable instances of CP Multi-View Calendar v1.1.4 (and prior) for Wordpress by exploiting an unauthenticated UNION-based SQL injection.

http://www.exploit-db.com/exploits/36243/

Quick run:

msf auxiliary(wordpress_cp_calendar_sqli) > show options

Module options (auxiliary/scanner/http/wordpress_cp_calendar_sqli):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   Proxies                     no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS     172.31.16.49     yes       The target address range or CIDR identifier
   RPORT      80               yes       The target port
   TARGETURI  /wordpress/      yes       Target URI of the Wordpress instance
   THREADS    1                yes       The number of concurrent threads
   VHOST                       no        HTTP server virtual host

msf auxiliary(wordpress_cp_calendar_sqli) > run

[+] 172.31.16.49:80 - Vulnerable to unauthenticated SQL injection within CP Multi-View Calendar 1.1.4 for Wordpress
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(wordpress_cp_calendar_sqli) > 

Passes msftidy:

$ tools/msftidy.rb modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb 
$

Thanks!


class Metasploit4 < Msf::Auxiliary

include Msf::Exploit::Remote::HttpClient
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is wordpress, can use the Msf::HTTP::Wordpress.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this would buy me, don't need fingerprinting or authentication... Can certainly add if there is a benefit though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brandonprry jeah there is no benefit in this module when using the wordpress mixin. But you could include it and write a check method calling check_plugin_version_from_readme (https://github.com/rapid7/metasploit-framework/blob/master/lib/msf/http/wordpress/version.rb#L50). But as this module only checks for the SQLI without exploiting it, the main method already acts as a "check method".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It technically does exploit the vuln in order to check the validity of the vuln :)

It also isn't a wordpress vuln per se, just a plugin for wordpress, the version of wordpress itself doesn't matter.

In any case, I agree, the scanner is essentially its own check method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_plugin_version_from_readme checks the plugins readme and extracts the version number (not the version from wordpress itself). So if you call it with check_plugin_version_from_readme('cp-multi-view-calendar', fixed_in_version) it will say vulnerable or not only determined by the plugins version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. I misunderstood.

@espreto
Copy link
Contributor

espreto commented Apr 18, 2015

@firefart is the most suitable for the recommendations. \o

'License' => MSF_LICENSE,
'References' =>
[
[ 'EDB', '36243']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry wrong vuln, will create a new one for this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use wpvulndbid 7910

https://wpvulndb.com/vulnerabilities/7910

@firefart
Copy link
Contributor

works for me:

msf auxiliary(wordpress_cp_calendar_sqli) > run

[+] 10.211.55.4:80 - Vulnerable to unauthenticated SQL injection within CP Multi-View Calendar 1.1.4 for Wordpress
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

can you please add the additional reference @brandonprry ?

@brandonprry
Copy link
Contributor Author

Yes, doing that now.

@firefart firefart merged commit 8c0bcd2 into rapid7:master Apr 19, 2015
@firefart
Copy link
Contributor

thx @brandonprry !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants