Commit Graph

152 Commits

Author SHA1 Message Date
Grant Willcox 4c0da1c82f Ninja commit to fix a typo 2021-03-11 16:46:50 -06:00
suryasaradhi 37eaf7944b Added changes to regex expression
Now the search will be for the exact user error
2021-03-12 03:12:58 +05:30
suryasaradhi ae29e749c7 Fixed wordpress user login validation
## BUG

While trying using 

`module> auxiliary/scanner/http/wordpress_login_enum`

User validation does not occur correctly in wordpress 5.x



## Verification

- mkdir wordpress
- cd wordpress
- nano docker-compose.yml
- Enter the following into the file

```
version: '3.3'
services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress
       WORDPRESS_DB_NAME: wordpress
volumes:
    db_data: {}
```
- sudo docker-compose up -d

- Follow the setup instructions at 127.0.0.1:8000 and set up a new user in WordPress.
- Start msfconsole
- creds add user:test
- use auxiliary/scanner/http/wordpress_login_enum
- set RHOSTS 127.0.0.1
- set RPORT 8000
- set DB_ALL_USERS true
- run

## Expected Output

```
msf6 > use auxiliary/scanner/http/wordpress_login_enum 
msf6 auxiliary(scanner/http/wordpress_login_enum) > show options

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

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   BLANK_PASSWORDS      false            no        Try blank passwords for all users
   BRUTEFORCE           true             yes       Perform brute force authentication
   BRUTEFORCE_SPEED     5                yes       How fast to bruteforce, from 0 to 5
   DB_ALL_CREDS         false            no        Try each user/password couple stored in the current database
   DB_ALL_PASS          false            no        Add all passwords in the current database to the list
   DB_ALL_USERS         false            no        Add all users in the current database to the list
   ENUMERATE_USERNAMES  true             yes       Enumerate usernames
   PASSWORD                              no        A specific password to authenticate with
   PASS_FILE                             no        File containing passwords, one per line
   Proxies                               no        A proxy chain of format type:host:port[,type:host:port][...]
   RANGE_END            10               no        Last user id to enumerate
   RANGE_START          1                no        First user id to enumerate
   RHOSTS                                yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT                80               yes       The target port (TCP)
   SSL                  false            no        Negotiate SSL/TLS for outgoing connections
   STOP_ON_SUCCESS      false            yes       Stop guessing when a credential works for a host
   TARGETURI            /                yes       The base path to the wordpress application
   THREADS              1                yes       The number of concurrent threads (max one per host)
   USERNAME                              no        A specific username to authenticate as
   USERPASS_FILE                         no        File containing users and passwords separated by space, one pair per line
   USER_AS_PASS         false            no        Try the username as the password for all users
   USER_FILE                             no        File containing usernames, one per line
   VALIDATE_USERS       true             yes       Validate usernames
   VERBOSE              true             yes       Whether to print output for all attempts
   VHOST                                 no        HTTP server virtual host

msf6 auxiliary(scanner/http/wordpress_login_enum) > set RHOSTS 127.0.0.1
RHOSTS => 127.0.0.1
msf6 auxiliary(scanner/http/wordpress_login_enum) > set RPORT 8080
RPORT => 8080
msf6 auxiliary(scanner/http/wordpress_login_enum) > set DB_ALL_USERS true
DB_ALL_USERS => true
msf6 auxiliary(scanner/http/wordpress_login_enum) > run

[-] The connection was refused by the remote host (127.0.0.1:8080).
[-] / does not seem to be WordPress site
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/wordpress_login_enum) > set RPORT 8000
RPORT => 8000
msf6 auxiliary(scanner/http/wordpress_login_enum) > run

[*] / - WordPress Version 5.6.1 detected
[*] 127.0.0.1:8000 - / - WordPress User-Enumeration - Running User Enumeration
[*] 127.0.0.1:8000 - / - WordPress User-Validation - Running User Validation
[*] / - WordPress User-Validation - Checking Username:'Administrator'
[-] 127.0.0.1:8000 - [1/4] - / - WordPress User-Validation - Invalid Username: 'Administrator'
[*] / - WordPress User-Validation - Checking Username:'administrator'
[-] 127.0.0.1:8000 - [2/4] - / - WordPress User-Validation - Invalid Username: 'administrator'
[*] / - WordPress User-Validation - Checking Username:'test'
[+] / - WordPress User-Validation - Username: 'test' - is VALID
[+] / - WordPress User-Validation - Found 1 valid user
[-] 127.0.0.1:8000 - [4/4] - / - WordPress User-Validation - Invalid Username: 'normal'
[*] 127.0.0.1:8000 - [5/4] - / - WordPress Brute Force - Running Bruteforce
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/wordpress_login_enum) > 

```

## Linked Issue

[https://github.com/rapid7/metasploit-framework/issues/14790#issue-81372544](https://github.com/rapid7/metasploit-framework/issues/14790#issue-813725448,"https://github.com/rapid7/metasploit-framework/issues/14790#issue-813725448")

Please remind me if any issue is found with the fix! ;-)
2021-03-12 00:02:11 +05:30
zerosum0x0 fb393d8a36 add "Windows Storage Server 2008 R2" to fingerprints 2021-03-01 19:05:35 -07:00
dwelch-r7 319f15d938 Handle nil versions for rubygems 4 2021-02-25 16:47:49 +00:00
agalway-r7 275e9c5454 Land #14696, Further Zeitwerk lands to improve boot speed
Zeitwerk rex folder
2021-02-19 10:33:37 +00:00
dwelch-r7 b6eb940e46 Fix usage of Failure:: constant 2021-02-12 14:33:05 +00:00
dwelch-r7 7fbbe23426 Remove more requires that were missed before 2021-02-08 14:51:58 +00:00
dwelch-r7 b95be3ed10 Zeitwerk rex folder 2021-02-08 12:24:12 +00:00
dwelch-r7 8f83de865c Revert "Fix bug where vhost wasn't being set correctly when using rhost http url" 2021-02-01 16:33:18 +00:00
dwelch-r7 2578d824db Fix bug where vhost wasn't being set correctly when using rhost http url 2021-01-13 14:41:45 +00:00
bwatters 54f5e565fa Land #14330, SpamTitan Gateway Remote Code Execution
Merge branch 'land-14330' into upstream-master
2021-01-04 12:14:12 -06:00
Christophe De La Fuente afea5cd74e Use opts['RHOST'] and opts['RPORT'] to creating the SNMP::Manager instance in connect_snmp 2020-12-16 15:15:27 +01:00
William Vu 9452c1dcfa Fix merge conflict from #14202, in linear history 2020-12-09 17:24:29 -06:00
Spencer McIntyre 90a99ae7c3 Land #14423, Expand wordpress_scanner to look for themes & plugins 2020-12-09 09:12:28 -05:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Adam Galway 1a2bf98222 creates standard elog & updates exisiting usages 2020-06-22 12:48:39 +01:00
Jacob Robles 028890ec51 Move ncs mixin code to rex 2019-04-12 15:12:09 -05:00
Pedro Ribeiro 733f784472 add bcoles suggestions 2019-02-04 21:55:40 -06:00
Pedro Ribeiro c09515da82 Update nuuo.rb 2019-01-24 07:52:56 +07:00
bcoles b5dbacc42f Update lib/msf/core/exploit/remote/nuuo.rb
Co-Authored-By: pedrib <pedrib@gmail.com>
2019-01-23 16:09:43 +07:00
bcoles 08aa1c3ed0 Update lib/msf/core/exploit/remote/nuuo.rb
Co-Authored-By: pedrib <pedrib@gmail.com>
2019-01-23 15:32:15 +07:00
bcoles d8f9e41686 Update lib/msf/core/exploit/remote/nuuo.rb
Co-Authored-By: pedrib <pedrib@gmail.com>
2019-01-23 14:13:31 +07:00
Pedro Ribeiro 3b98add519 Update nuuo.rb 2019-01-23 11:16:41 +07:00
Pedro Ribeiro 9375ee2ffc Change only the last methods to private 2019-01-23 11:00:42 +07:00
Pedro Ribeiro 0562aa50b4 Update nuuo.rb 2019-01-22 12:45:18 +07:00
Pedro Ribeiro 94f5b4081f Fix file download / upload bug 2019-01-22 11:17:47 +07:00
Pedro Ribeiro 72a55fe0fc Add nuuo NUCS core lib 2019-01-21 16:39:16 +07:00
wchen-r7 f27ef55391 Land #7992, Improve Signature Evasions for browser exploits 2017-02-23 16:32:49 -06:00
Jeff Tang e3f613ecc6 Bypass: Metasploit OS detection
SEP is triggering on HTTP POSTs which start with `os_name`
2017-02-23 15:42:04 -05:00
Jeff Tang 84ab3c66cc Use obfuscated JS in BES 2017-02-22 12:47:36 -05:00
David Maloney 5fd531028c ome minor guards and spec fixes
some minor conditional guards and spec fixes
2017-01-03 14:38:51 -06:00
wchen-r7 390f69313a Fix grammar in browser_exploit_server 2016-07-21 11:51:10 -05:00
wchen-r7 ff4d150449 Show IP for print_* 2016-05-24 14:12:54 -05:00
Brent Cook 3bc020178f use the correct variable for cookie expiration 2016-05-24 07:16:55 -05:00
thao doan 5e36a3128c Fix #5197, Fixed yard doc errors
Fix #5197 Fixed issues that caused errors during yard doc generation
2016-04-21 13:06:00 -05:00
Brent Cook 85acfabfca remove various library workarounds for the datastore not preserving types 2016-03-05 23:10:57 -06:00
Brent Cook 1f58ad15ac Browser::Exploit::Server needs to have vprint* 2016-02-15 16:21:24 -06:00
wchen-r7 0582e7e3ca Return nil instead of "null"
A scenario is when FF disables Flash, BES returns "null", and when
modules try to use Gem::Version, the "null" is considered a malformed
data and it won't be able to continue.
2015-07-14 01:25:41 -05:00
wchen-r7 8384be6466 Fix rand_text_alpha and bump max exploit count to 21 2015-07-14 01:02:01 -05:00
wchen-r7 d6565a9aee Merge branch 'bes_flash' into bapv2_flash_test 2015-07-14 00:34:54 -05:00
jvazquez-r7 8fb6bedd94 Delete as3 detecotr 2015-07-13 18:23:39 -05:00
jvazquez-r7 8928c5529c Fix Javascript code 2015-07-13 17:43:04 -05:00
jvazquez-r7 244d9bae64 Add max timeout 2015-07-13 16:52:25 -05:00
jvazquez-r7 9116460cb0 Add prototype with AS3 2015-07-13 16:33:55 -05:00
wchen-r7 21e44f235e Example of doing Flash detection with Flash 2015-07-08 13:18:57 -05:00
wchen-r7 dc0ce88279 We're note actually using Mubex, it might be causing a crash too
A problem we are seeing is that sometimes when BAP terminates
(ie: jobs -K), we hit a deadlock while jobs are trying to cleanup,
and sometimes that might cause msfconsole to crash and terminate.
We suspect this Mubex is a contributing factor but it has been hard
to prove because it's very hard to reproduce the crash.
2015-07-07 00:32:20 -05:00
HD Moore 7858d63036 Typo 2015-07-02 15:34:44 -05:00
HD Moore 43d47ad83e Port BAPv2 to Auxiliary 2015-07-02 15:29:24 -05:00
HD Moore 6e31b9ef53 Initialize and rename the BES mutex 2015-07-02 15:11:03 -05:00