Commit Graph

17636 Commits

Author SHA1 Message Date
Vladimir Ivanov 42726a70c0 client.rb - library for auxiliary and exploit modules
cve_2020_6207_solman_rce.rb - auxiliary module
cve_2020_6207_solman_rce.md - documentation for auxiliary module
cve_2020_6207_solman_rs.rb - exploit module
cve_2020_6207_solman_rs.md - documentation for exploit module
2021-03-21 16:51:21 +03:00
Grant Willcox 2126caf6a7 Land #14917, Add sort by category and reverse search results flags to the search command 2021-03-19 15:29:57 -05:00
Grant Willcox 9713402caf Add in more documentation to the help output, add support for searching by if modules have a check method or not, and support outputting an appropriate error message if the -s option is used with an invalid parameter 2021-03-19 15:01:58 -05:00
pingport80 332a076cec define sort, sort_options and desc 2021-03-19 15:01:56 -05:00
pingport80 bdf87c8080 add missing end 2021-03-19 15:01:56 -05:00
pingport80 d5ff94f101 add -s and -r options for search 2021-03-19 15:01:56 -05:00
pingport80 6584282b96 add sort to search command 2021-03-19 15:01:55 -05:00
cgranleese-r7 799ea56316 replace ::Rex::Socket.gethostbyname with Socket.getaddrinfo 2021-03-19 11:01:27 +00:00
bwatters 2c1869f9df Land #14907, Add exploit for CVE-2021-1732
Merge branch 'land-14907' into upstream-master
2021-03-18 14:29:59 -05:00
Metasploit 4e3f21dd7b Bump version of framework to 6.0.37 2021-03-18 12:03:22 -05:00
Metasploit 8cf3bead59 Bump version of framework to 6.0.36 2021-03-17 12:32:39 -05:00
Adam Cammack 736369b643 Land #14905, Use ensure to run exploit cleanup 2021-03-17 11:56:09 -05:00
Spencer McIntyre 0bff88c0c0 Update the module metadata and add module docs 2021-03-16 10:40:34 -04:00
Jeffrey Martin 13dae6730c remove random characters from yard-docs 2021-03-16 09:21:28 -05:00
Jeffrey Martin 83d757f0dd use ensure for cleanup
There exists a possibility that cleanup can be missed when an exploit raises
an exception other than `Interrupt` when run, by shifting the cleanup into
`ensure` for all exceptions when `keep_handler` is not set handlers and
other cleanup tasks from a module will be called for more possible error
states.
2021-03-15 17:17:09 -05:00
Grant Willcox 50ef32c121 Land #14888, Fix #13798 and #14128 by fixing unicode issues on Meterpreter caused by unicode file/directory names 2021-03-15 16:46:21 -05:00
Spencer McIntyre 2e3d98a36a Move the DLL injection code into a reusable function 2021-03-15 11:47:02 -04:00
adfoster-r7 ce48d758b4 Land #14887, Fix RequestError class undefined method issue 2021-03-15 15:20:58 +00:00
adfoster-r7 125603db35 land #14898, Add rubocop rule to correct Gem::Version to Rex::Version 2021-03-15 14:48:08 +00:00
dwelch-r7 6aaf44c902 rubocop files and make the exclusions more localised 2021-03-15 13:27:37 +00:00
dwelch-r7 26e70a290a Replace rexml autoload with an explicit require to prevent circular dependencies 2021-03-15 12:15:31 +00:00
dwelch-r7 596e1fb6f8 Add rubocop rule to correct Gem::Version to Rex::Version 2021-03-15 11:17:47 +00:00
Tim W 54c07c301a Fix #13798, Fix #14128, fix meterpreter > ls within a unicode directory 2021-03-13 10:58:04 +00:00
Shelby Pace f46c7b81fe convert const name to str before check 2021-03-12 18:01:22 -06:00
Tim W 1a7704787f Fix #13798, Fix #14128, fix meterpreter > download * on utf-8 filenames 2021-03-12 19:51:40 +00:00
adfoster-r7 78cb8b7f9a Land #14863, Fix remote db imports 2021-03-12 16:11:36 +00:00
Grant Willcox 94dbe9f39e Land #14882, Fix Wordpress user login validation for recent versions of WordPress 2021-03-11 16:47:42 -06:00
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
Metasploit 563c481c67 Bump version of framework to 6.0.35 2021-03-11 15:23:10 -06:00
Jeffrey Martin da31abc7ee Land #14874i, Fix autoloading when using the rpc client 2021-03-11 15:08:27 -06:00
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
Spencer McIntyre b0239b34e3 Document the new java deserialization mixin methods 2021-03-11 12:09:29 -06:00
Spencer McIntyre 8d2e644f4f Add a new Java Deserialization mixin and use it to set the shell 2021-03-11 12:09:29 -06:00
Spencer McIntyre 3ecf0914e1 Use 'none' as the original ysoserial type, increase the size
Increasing the size to occupy two bytes seems to be helping stabilize
the generation for both the ROME and CommonsCollections1 payloads.
2021-03-11 12:09:29 -06:00
dwelch-r7 fce10b8b76 fix autoloading when using the rpc client 2021-03-11 16:42:34 +00:00
dwelch-r7 bedbfbf000 Add autoload for REXML 2021-03-10 14:45:05 +00:00
dwelch-r7 ab93041409 Add autoload for bindata 2021-03-10 12:15:18 +00:00
Shelby Pace d114641468 Land #14201, add favorite command 2021-03-08 13:06:22 -06:00
Metasploit 8837345a2d Bump version of framework to 6.0.34 2021-03-04 12:04:28 -06:00
Alan Foster af330874f5 Prefix time module with namespace resolution operator 2021-03-04 13:19:09 +00:00
Grant Willcox 5576a2c4e9 Land #14843, Extract PseudoShell into its own file for zeitwerk 2021-03-03 16:57:27 -06:00
Grant Willcox 0b9cd7f6f4 Land #14816, Autoload faker to avoid potential missing constant errors 2021-03-03 15:59:18 -06:00
Grant Willcox f6fde70280 Land #14821 - Allow search to start from root path 2021-03-03 15:38:21 -06:00
Shelby Pace 8ba02f4c97 add module limit, other minor changes 2021-03-02 16:26:01 -06:00
dwelch-r7 4755aea4b5 autoload faker globally 2021-03-02 13:49:38 +00:00
dwelch-r7 1e8ec469fb Extract PseudoShell into it's own file for zeitwerk to pick it up properly 2021-03-02 12:39:41 +00:00
zerosum0x0 fb393d8a36 add "Windows Storage Server 2008 R2" to fingerprints 2021-03-01 19:05:35 -07:00
Shelby Pace 0d8df5e0bf allow searches to start from root path 2021-02-26 15:53:33 -06:00
Metasploit 95aa24ee4c Bump version of framework to 6.0.33 2021-02-25 12:03:54 -06:00