Commit Graph

50048 Commits (ed98fc8b713d966db89e6479ccbb334e5f99eaf2)

Author SHA1 Message Date
Pedro Ribeiro 34c9555717
Fix byte_xori encoder
The byte_xori encoder for mipsbe does not work correctly. At the end of the decoding, it should invoke cacheflush() with the correct parameters:
int cacheflush(char *addr, int nbytes, int cache)

I think this is because the encoder is based of the longxori encoder, which itself is pretty old (2008), and before kernel 2.6.11, cacheflush() did not need any parameters (from the cacheflush man page):
BUGS
Linux kernels older than version 2.6.11 ignore the addr and nbytes arguments, making this function fairly expensive. Therefore, the whole cache is always flushed.

This commit fixes that by setting up the parameters correctly. As an unfortunate side effect this increases the shellcode by 16 bytes, but it is absolutely necessary for it to work properly.

Note that this bug is not present when testing the encoder output on an emulator like qemu; emulators do not need to flush the caches to work properly.
2018-12-18 15:37:47 +00:00
Quentin Kaiser 177ae2f927 fail_with is not allowed in check method. Use vprint_error and return a CheckCode instead. Cleaner response check in check function. Usage of CheckCode instead of Exploit::CheckCode. 2018-12-18 16:33:53 +01:00
Quentin Kaiser 0feadf636b Define in RPORT and SSL in register_options rather than DefaultOptions. Support for echo and printf command stager flavors + support for curl and wget command stager flavors (hence reactivation of SRVHOST, SRVPORT, URIPATH and SSLCert). 2018-12-18 16:29:36 +01:00
Quentin Kaiser 0acdcd98f2 Merge branch 'master' into consul_service_exec 2018-12-18 16:27:08 +01:00
Quentin Kaiser f487f978c2 Merge branch 'consul_exec' of github.com:QKaiser/metasploit-framework into consul_exec 2018-12-18 16:09:18 +01:00
Quentin Kaiser 08541cd7b9 Merge branch 'master' into consul_exec 2018-12-18 16:07:08 +01:00
Quentin Kaiser a1e1e4a4f4 Remove useless comment. 2018-12-18 16:05:50 +01:00
Quentin Kaiser b80e5715d4 Add support for authorization with X-Consul-Token ACL header. 2018-12-18 16:02:39 +01:00
Wei Chen 847e3232ab
Land #11102, remove old metasm remnants 2018-12-18 08:53:53 -06:00
Quentin Kaiser 551f8c5e92 Support for echo and printf command stager flavors + support for curl and wget command stager flavors (hence reactivation of SRVHOST, SRVPORT, URIPATH and SSLCert). 2018-12-18 15:48:58 +01:00
Quentin Kaiser f290221a66 Cleaner response check in check function. Usage of CheckCode instead of Exploit::CheckCode. 2018-12-18 15:36:52 +01:00
Quentin Kaiser aeec5cf23e Cleaner to define this as a Hash, then call .to_json on it. Better support of agent definition in check function. 2018-12-18 15:31:30 +01:00
Quentin Kaiser e51530688b fail_with is not allowed in check method. Use vprint_error and return a CheckCode instead. 2018-12-18 15:09:04 +01:00
Quentin Kaiser 4682cf5796 Define in register_options rather than DefaultOptions. 2018-12-18 15:04:28 +01:00
Pedro Ribeiro 86cbddf46d
fix spacing 2018-12-18 13:35:16 +00:00
Pedro Ribeiro fff850a07e
Make longxor encoder great again
The longxor encoder for mipsbe does not work correctly. At the end of the decoding, it should invoke cacheflush() with the correct parameters:
int cacheflush(char *addr, int nbytes, int cache)

The encoder previously did not setup the arguments, as it even said so in the comments:
;       addiu   $4, $16, -4       ; not checked by Linux
;       li      $5,40                   ; not checked by Linux
;       li      $6,3                    ; $6 is set above

I think this is because the encoder is pretty old (2008), and before kernel 2.6.11, cacheflush() did not need any parameters (from the cacheflush man page):
BUGS
       Linux  kernels older than version 2.6.11 ignore the addr and nbytes arguments, making this function fairly expensive.  Therefore, the
       whole cache is always flushed.

This commit fixes that by setting up the parameters correctly. As an unfortunate side effect this increases the shellcode by 16 bytes, but it is absolutely necessary for it to work properly. 

Note that this bug is not present when testing the encoder output on an emulator like qemu; emulators do not need to flush the caches to work properly.

As an added bonus I have also made it compatible with toupper() restrictions, which is common in web server exploits too. This did not add any extra bytes to the encoder.
2018-12-18 12:30:55 +00:00
Metasploit 483a3618ae
automatic module_metadata_base.json update 2018-12-17 19:32:00 -08:00
Brent Cook fc2d217c0a
Land #11135, strip comments from source code before uploading it to the target 2018-12-17 21:23:29 -06:00
Brent Cook 333d44186b
Land #11138, add reverse_tcp mixin for vax payload 2018-12-17 21:17:40 -06:00
Metasploit 595ebf5dc7
automatic module_metadata_base.json update 2018-12-17 12:23:47 -08:00
bwatters bf13693d37
Land #11101, temp fix for x64/xor stage encoder
Merge branch 'land-11101' into upstream-master
2018-12-17 14:14:55 -06:00
LouDnl 2a69fffa6b
fix for ReverseTcp error
Update vax shell_reverse_tcp.rb to fix ReverseTcp NameError
Error:
/opt/metasploit-framework/embedded/framework/modules/payloads/singles/bsd/vax/shell_reverse_tcp.rb:24:in `initialize': uninitialized constant Msf::Handler::ReverseTcp (NameError)

After adding this line the error dissapeared for me and I was able to run msfconsole again.
2018-12-17 19:28:07 +01:00
Metasploit 1b581b0c1f
automatic module_metadata_base.json update 2018-12-17 08:11:04 -08:00
Shelby Pace 2fc501d260
Land #11112, Fix bpf_priv_esc exploit module 2018-12-17 10:00:50 -06:00
Metasploit 601804d315
automatic module_metadata_base.json update 2018-12-17 07:18:35 -08:00
Jacob Robles 7839add2fd
Land #11123, Add module windows persistent service 2018-12-17 09:07:21 -06:00
Green-m cb0cde3602
Merge pull request #7 from jrobles-r7/patch/service_doc
Documentation Update
2018-12-17 21:44:43 +08:00
Jacob Robles 80e70b29ef
Doc Formatting 2018-12-17 07:34:52 -06:00
Green-m b5904bcd82
Merge pull request #6 from jrobles-r7/patch/service_space
Fix additional path space issues
2018-12-17 21:20:42 +08:00
Jacob Robles 88b7b7df4a
Fix additional path space issues 2018-12-17 07:00:23 -06:00
Brendan Coles d973a58052 Clean up linux/local/vmware_alsa_config 2018-12-17 08:01:34 +00:00
Green-m 0aa6e5a640
Handle path with spaces correctly. 2018-12-17 10:25:06 +08:00
Brendan Coles fcb512878c Add strip_comments method to Linux local exploits 2018-12-16 14:11:54 +00:00
Wei Chen 5bf28887d2
Land #11127, Fix TARGETURI support in struts2_namespace_ognl 2018-12-15 09:33:48 -06:00
Green-m b2c6dfa0df
Merge pull request #5 from jrobles-r7/patch/service_code
Patch/service code
2018-12-15 14:06:17 +08:00
Brendan Coles cba195b7d8 Update tested versions 2018-12-15 05:44:32 +00:00
Brendan Coles a7b5737980 Update documentation 2018-12-15 05:41:40 +00:00
Brendan Coles b8e134b95d Update version check 2018-12-15 05:39:50 +00:00
Brendan Coles 8d93812c0a Add Rex::Exploitation::CmdStagerFetch 2018-12-15 03:30:00 +00:00
Francesco Soncina 6237740116
lint: remove spaces 2018-12-15 01:02:13 +01:00
Metasploit ed03590ad8
automatic module_metadata_base.json update 2018-12-14 14:02:44 -08:00
Wei Chen e268691511
Land #11124, delete unused variable 2018-12-14 15:22:42 -06:00
Jacob Robles 8adfef5730
Remove Version, Fix Whitespace 2018-12-14 13:19:49 -06:00
Jacob Robles e67eaa94c9
Move code to ERB template 2018-12-14 13:13:32 -06:00
William Vu 38bdee19e8 Fix TARGETURI support in struts2_namespace_ognl 2018-12-14 13:08:50 -06:00
Matthew Kienow eec7a3dafc
Remove debug code 2018-12-14 13:33:16 -05:00
Matthew Kienow ad6b80bd08
Remove unused session_dto flag 2018-12-14 13:01:20 -05:00
Matthew Kienow a683cedcce
Enhance race condition workaround in report_host 2018-12-14 12:28:16 -05:00
Matthew Kienow c2af36f405
Use update_session rather than Mdm save method
The changes ensure that updates to an Mdm::Session are reflected on a
remote data service.
2018-12-14 12:22:49 -05:00
Matthew Kienow b6cdf7aa9d
Add update_session method 2018-12-14 12:04:55 -05:00