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

Wordpress wp_popular_posts rce (CVE-2021-42362) #15948

Merged
merged 3 commits into from
Dec 20, 2021

Conversation

h00die
Copy link
Contributor

@h00die h00die commented Dec 8, 2021

This PR adds a new exploit for wp_popular_posts <=5.3.2.

You've been warned, this is a pain to test.

You'll need to install the plugin, add the widget to the homepage. Then register a FQDN that resolves to a non-local IP address (dyndns or other solution is best). Then punch a hole in your firewall for port 80/443/8080 (whatever you want to use).

Verification

List the steps needed to make sure this thing works

  • Install the plugin to wordpress
  • Start msfconsole
  • Do: use exploits/multi/http/wp_popular_posts_rce
  • Do: set rhosts
  • Do: set username
  • Do: set password
  • Do: set SRVHOSTNAME
  • Do: set SRVPORT
  • Do: run
  • You should get a shell.
  • check docs

While i was in there, i updated the wordpress wordlists as well.

### SRVHOSTNAME

FQDN of the metasploit server. Must not resolve to a reserved address (192/10/127/172).
[Ref](https://github.com/WordPress/wordpress-develop/blob/5.8/src/wp-includes/http.php#L560)
Copy link
Contributor

Choose a reason for hiding this comment

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

As a note for future travelers, I'd be curious about how this treats IPv6.

@bwatters-r7
Copy link
Contributor

You know.... given this is unpleasant to set up, but relatively easy to see, any chance we could trouble you for a pcap?

@h00die
Copy link
Contributor Author

h00die commented Dec 14, 2021

sent

@h00die
Copy link
Contributor Author

h00die commented Dec 15, 2021

@bwatters-r7 let me know if the file was acceptable. I put IP and MAC sanitization in place, and if it is good I'll add a doc to the wiki and update the PR template with instructions.

@bwatters-r7 bwatters-r7 self-assigned this Dec 16, 2021
@bwatters-r7
Copy link
Contributor

@h00die Yup; got it. Thanks!
Looks good. Did you want me to wait on landing it until you finished the updates?

@h00die
Copy link
Contributor Author

h00die commented Dec 19, 2021

ready to roll!

@bwatters-r7 bwatters-r7 merged commit 2705d6a into rapid7:master Dec 20, 2021
@bwatters-r7
Copy link
Contributor

Release Notes

This PR adds a new exploit for wp_popular_posts <=5.3.2.

@h00die h00die deleted the popular branch December 20, 2021 20:05
@erran-r7 erran-r7 added the rn-modules release notes for new or majorly enhanced modules label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs module rn-modules release notes for new or majorly enhanced modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants