Commit Graph

198 Commits

Author SHA1 Message Date
adfoster-r7 73b269cf7e Land #15225, cookie jar cleanup 2021-06-01 10:49:56 +01:00
Alan Foster c84b651ca6 Remoce initial rhost http url attempt 2021-05-24 00:31:09 +01:00
A Galway 5e4af7241d prevent TLD use in tests & remove HTTP::Cookie DI 2021-05-20 17:49:21 +01:00
adfoster-r7 0f73031833 Land #15165, Add documentation for the new CookieJar functionality 2021-05-12 19:29:21 +01:00
A Galway 6b61eed3cd documention 2021-05-07 14:14:46 +01:00
A Galway a22ebdf76d cookie cleanup 2021-05-07 12:46:38 +01:00
Alan Foster 0be7452c28 Ensure cookie jars are correctly duped 2021-05-06 12:11:26 +01:00
A Galway 1b02344b55 consider vhost & expand tests 2021-04-20 15:12:54 +01:00
A Galway 5df0f0b164 improvements to tests and api 2021-04-19 15:13:42 +01:00
A Galway 88f17c5128 cleanup and removes cookies filtering 2021-04-16 17:31:11 +01:00
A Galway fc55d74b80 http-client cookie jar support and tests 2021-04-16 12:24:21 +01:00
ryananicholson d20285b507 Correct DNS PTR record crash
When using `auxiliary/gather/enum_dns` and setting `NS` to an internal system, the following crash occurs (which is fixed with this PR):
```
[-] Auxiliary failed: NoMethodError undefined method `ptr' for #<Dnsruby::RR::IN::PTR:0x00007f8b9e9cb450>
```
2021-04-14 09:58:50 -04:00
adfoster-r7 4c37e35d82 Land #14770, guard when spawn is used with TcpServer mixin 2021-04-14 11:34:25 +01:00
cgranleese-r7 893de0c45c Land #14987, Update RbMysql to the most recent version 2021-04-07 13:29:43 +01:00
dwelch-r7 278c56652e Update RbMysql to the most recent code from this gem https://github.com/tmtm/ruby-mysql 2021-04-01 14:17:28 +01:00
Ivanov Vladimir a803d7a0d1 CVE-2019-0307
Add post module smdagent_get_properties.rb
Add lib sap_smd_agent_unencrypted_property.rb
Update auxiliary module cve_2020_6207_solman_rce.rb
Update lib sap_sol_man_eem_miss_auth.rb
2021-03-29 20:29:30 +03:00
Grant Willcox 80ae750df5 Land #14697, Add Nagios XI mixin and auxiliary scanner module and docs 2021-03-26 18:12:16 -05:00
kalba-security 514f97f4fe Fix bug in nagios_xi_version regex 2021-03-26 14:18:25 -04:00
kalba-security 83e31aeaa4 Use safe navigation operator for get_nsp regex 2021-03-26 13:44:17 -04:00
Grant Willcox 9039b5687f Fix up version regex and also fix a description to be a little more accurate 2021-03-26 11:57:03 -05:00
Grant Willcox 1dbf1656d3 Update to introduce wrapping on some comments and also to fix up the CVE output a bit 2021-03-26 11:46:51 -05:00
kalba-security 65b35e4e6a Remove unnecessary empty check for nagios_rce_version_prior hash 2021-03-25 15:06:27 -04:00
kalba-security 122dbbea1e Add additional supported modules. Align results when printing in scanner. 2021-03-25 15:01:05 -04:00
kalba-security 6d1986e8ca Avoid mixing return types in login.rb 2021-03-25 14:13:55 -04:00
kalba-security 707f163e15 Avoid type mixing as much as possible, add other feedback from code review 2021-03-25 11:19:31 -04:00
Vladimir Ivanov 0487e451cf Updated payload
Updated make_rce_payload, renamed get_agent_os to check_agent in lib sap_sol_man_eem_miss_auth.rb
Updated action_ssrf, action_exec in auxiliary module cve_2020_6207_solman_rce.rb
Updated execute_command, exploit in exploit module cve_2020_6207_solman_rs.rb
2021-03-25 14:20:54 +03:00
Vladimir Ivanov 391e013d89 Removed var lhost, lport in exploit module cve_2020_6207_solman_rs.rb
Changed fail reason if agent_name is nil in lib sap_sol_man_eem_miss_auth.rb
2021-03-25 11:26:14 +03:00
Vladimir Ivanov 924f7feb76 Updated Arch in the exploit module cve_2020_6207_solman_rs.rb
Corrected by rubocop library sap_sol_man_eem_miss_auth.rb
2021-03-24 16:26:01 +03:00
Vladimir Ivanov abe8c73be9 Added get_agent_os in lib sap_sol_man_eem_miss_auth.rb 2021-03-24 16:03:20 +03:00
Vladimir Ivanov 567f78c532 Update PAYLOAD_XML, check_response in lib sap_sol_man_eem_miss_auth.rb
Delete class var agents in auxiliary and exploit modules
2021-03-24 11:21:57 +03:00
Vladimir Ivanov ce8a3eea12 Update check_response in lib sap_sol_man_eem_miss_auth.rb 2021-03-23 23:57:40 +03:00
Vladimir Ivanov 2c18435e6e Update pretty_agents_table in lib sap_sol_man_eem_miss_auth.rb
Change output in auxiliary and exploit modules
2021-03-23 23:00:34 +03:00
Vladimir Ivanov 81a22503d9 Update enable_eem, script_action in lib sap_sol_man_eem_miss_auth.rb 2021-03-23 22:20:46 +03:00
Vladimir Ivanov 4399fa73fc Update make_rce_payload, make_soap_body in lib sap_sol_man_eem_miss_auth.rb
Update rce command in auxiliary module cve_2020_6207_solman_rce.rb
2021-03-23 19:02:59 +03:00
Vladimir Ivanov d5ac1f8078 Update make_ssrf_payload, make_rce_payload, make_soap_body in lib sap_sol_man_eem_miss_auth.rb 2021-03-23 17:41:06 +03:00
Vladimir Ivanov 70a46d411e Update make_agents_array in lib sap_sol_man_eem_miss_auth.rb 2021-03-23 16:18:27 +03:00
Vladimir Ivanov d76224066f Rename option URIPATH to TARGETURI 2021-03-23 13:33:39 +03:00
Vladimir Ivanov 113dce79de Move lib/metasploit/framework/sap_solman/client.rb to lib/msf/core/exploit/remote/http/sap_sol_man_eem_miss_auth.rb 2021-03-23 13:20:27 +03:00
kalba-security a38e2702c8 Add recommendations from code review, avoid returning checkcodes 2021-03-18 12:21:51 -04:00
kalba-security 26c1ca56d1 Add unauthenticated version check for older Nagios XI versions 2021-03-18 12:21:51 -04:00
kalba-security 9434f30665 Move login_after_install_or_license to mixin login.rb, minor improments 2021-03-18 12:21:51 -04:00
kalba-security 484d5eee09 Correct version ranges for supported exploit modules, update documentation, make sure to return cookies after authentication 2021-03-18 12:21:51 -04:00
kalba-security 2b081847fa Add functionality to complete Nagios XI install and sign license agreement, improve cookie filtering logic 2021-03-18 12:21:51 -04:00
kalba-security 1749addbd8 Improve html checks and make cookie handling compatible with older versions 2021-03-18 12:21:51 -04:00
kalba-security aab3b4a7ee Add Nagios XI mixin and auxiliary scanner module and docs 2021-03-18 12:21:51 -04: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
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