Commit Graph

96 Commits

Author SHA1 Message Date
Christophe De La Fuente 24e19e4ebb Update the ESC8 relay module to use the new helper
It also fixes some unrelated minor issues found in the module and the documentation
2024-11-12 18:23:31 +01:00
Spencer McIntyre e130092d87 Add a missing require statement 2024-11-04 09:37:12 -05:00
Spencer McIntyre 7d8baee574 Add some error handling and more logging 2024-11-04 09:37:12 -05:00
Spencer McIntyre 4a4ec9aea4 Add some more logging 2024-11-04 09:37:12 -05:00
Spencer McIntyre 316a967414 Update the ESC8 module for the new changes 2024-11-04 09:37:08 -05:00
Spencer McIntyre 27d5c95323 Refactor into an SMB server relay mixin 2024-10-24 16:25:40 -04:00
Spencer McIntyre 9822f3e812 Decouple the NTLM relaying logic 2024-10-24 16:25:40 -04:00
Spencer McIntyre 8ba0019ca0 Refactor the existing relay target client code 2024-10-24 16:25:40 -04:00
bwatters-r7 a18b2b3671 code cleanup and documentation 2024-10-24 15:23:10 -05:00
bwatters dff4a8ba7c Updates per Spencer 2024-10-24 15:23:10 -05:00
bwatters c4c1aae565 Update smb thread logging, fix control flow, use RELAY_TARGET, other suggestions 2024-10-24 15:23:10 -05:00
bwatters 74f6bc7d13 Remove Rescues and Rubocop 2024-10-24 15:23:10 -05:00
bwatters 6dcf63267b Fix rescue clauses 2024-10-24 15:23:10 -05:00
bwatters 0b94fdf75f Fix up suggestions from Spencer et al. 2024-10-24 15:23:10 -05:00
bwatters 1fb0b728a8 Fix timeout, add query_only mode and allow skipping the termplate query 2024-10-24 15:23:10 -05:00
bwatters 4c598c1981 Move ESC8 logic to module and limit debug printing 2024-10-24 15:23:09 -05:00
bwatters 5b1746f73f Add support for multiple certs 2024-10-24 15:23:09 -05:00
bwatters 0ba3db9466 Working, but ugly 2024-10-24 15:23:09 -05:00
bwatters af25c94e6a Change to send_request_raw 2024-10-24 15:23:09 -05:00
bwatters d94081faf1 Not working; need to checnge to send_request_raw? 2024-10-24 15:23:09 -05:00
bwatters 2c760bd842 Tracking down hash issues 2024-10-24 15:23:09 -05:00
bwatters 7d86c99ba6 Currently getting a bad username/password message 2024-10-24 15:23:09 -05:00
sjanusz-r7 d569077564 Refactor smb_lookupsid module to use RubySMB 2024-05-17 10:59:37 +01:00
Spencer McIntyre a008288e05 Readd support for multiple ports 2024-04-22 13:45:20 -04:00
Spencer McIntyre 2292da9164 Add the UNC loading technique too 2024-03-29 09:33:47 -04:00
adfoster-r7 131585235b Update SMB Login to support additional configuration 2024-02-28 20:24:06 +00:00
Spencer McIntyre b5906418c2 Update the HashCapture mixin
Use #srvport instead of the datastore and pull in upstream chanes for
the metasploit-credential gem to enable use within payloads.
2024-01-29 13:35:56 -05:00
Spencer McIntyre 33306fa4dd The SRVPORT is already registered
The SRVPORT datastore option is registered by the Remote::SMB::Server
mixin so including it here is redundant.
2024-01-29 13:35:54 -05:00
Spencer McIntyre 024bdaec6d Add a proper rex-based service for the SMB server 2024-01-08 16:54:22 -05:00
Spencer McIntyre b10e8d566b Initial Rex SMB service to allow sharing 2024-01-05 17:18:08 -05:00
cgranleese-r7 5f396245f2 Land #18539, Add Smb session type 2023-12-12 11:45:19 +00:00
Jack Heysel 9f126a4d24 Land #18446, Make DomainControllerRhost optional
This PR makes the DomainControllerRhosts option optional,
even when auth is set to kerberos. This change requires
rapid7/rex-socket#64 which was released in the rex-socket 1.5.5 gem.
2023-12-05 17:47:45 -05:00
Spencer McIntyre f000c39b4a Update to mark DomainControllerRhost as optional 2023-12-05 16:23:35 -05:00
Dean Welch cd8cc75cf3 Add smb session type 2023-12-04 17:55:11 +00:00
Spencer McIntyre 6e9facbefb Merge pull request #18419 from smashery/dcsync_kerberos
DCSync using Kerberos Pass-the-Ticket
2023-10-30 09:41:22 -04:00
Ashley Donaldson 2a699b89fa Changes from code review 2023-10-30 12:51:55 +11:00
h00die d64ed33cdf code spell for a bunch of modules 2023-09-24 17:42:00 -04:00
adfoster-r7 08a2a293a9 Add proxies datastore support to kerberos 2023-07-21 11:19:50 +01:00
Spencer McIntyre afb31b0f21 Add a function to escaple cmd.exe string literals 2023-05-23 15:17:39 -04:00
bwatters 548a2d7ab4 Add fetch payloads for Windows and Linux x64 2023-05-18 10:47:29 -05:00
Jeff McJunkin b7d373d247 Typo in psexec.rb 2023-02-25 08:15:34 -08:00
adfoster-r7 2d30909a2f Change option name namespacing convention 2023-01-26 16:17:50 +00:00
adfoster-r7 9a6c298a43 Use shared helper for creating kerberos options 2023-01-23 11:04:01 +00:00
Christophe De La Fuente 3d22fbcad9 Add exploit module for Certifried exploit
- Move all the logic from `modules/auxiliary/admin/dcerpc/icpr_cert.rb`
  to `lib/msf/core/exploit/remote/ms_icpr.rb` library
- Move all the logic from `modules/auxiliary/admin/dcerpc/samr_computer.rb`
  to `lib/msf/core/exploit/remote/ms_samr.rb` library
- Add `modules/auxiliary/admin/dcerpc/cve_2022_26923_certifried.rb` module
- Update the SMB client to disable SSL by default
- Add documentation
- Kerbero client: pass `options` as argument to `send_request_as`
- `calculate_shared_key` returns an EncryptionKey instead of the raw key
- Update `pkinit_login` module to make it compatible
- Add support to `additional_tickets` when requesting tickets
- Add support to PAC CredentialInfo structures
- Add impersonation to escalate privileges
- Add ACTIONS
- Use elevated TGS to delete the computer account
- Update and add specs
2023-01-13 15:30:50 +01:00
Spencer McIntyre 138f3bb4b2 Make the encryption type configurable 2023-01-09 17:20:57 -05:00
Spencer McIntyre 785c5a8f4d Fix key calculation for Server 2022
Metasploit will negotiate the strongest mutually supported encryption
with the target. When the target supports AES-256 as Server 2022 and
Windows 11 do, the key needs to be 32-bytes long and not 16 as it is
when AES-128 is in use. This updates the logic to check if the
encryption algorithm is set to ensure that the key is the correct size.
2023-01-05 15:08:49 -05:00
Spencer McIntyre fea259f6e7 Switch everything to use the ticket storage 2022-12-15 18:31:14 -05:00
adfoster-r7 7774b7ddcf Merge remote-tracking branch 'upstream/master' into merge-6.2.25-master-into-kerberos-feature-branch 2022-10-31 23:15:11 +00:00
Christophe De La Fuente 4ec7eea436 Fixes from code review 2022-10-28 15:33:34 +02:00
Christophe De La Fuente 52904b8cb6 Add support to Kerberos
- Add kerberos authenticator to `scanner/smb/smb_login` and the
  corresponding login scanner library
- Add new options: `UseCachedCredentials` and `StoreCredentialCache`
- Add `use_cached_credentials` attribute to
  Kerberos::ServiceAuthenticator::Base. This enables/disables the use of
  cached Kerberos credentials from the database.
- Add `store_credential_cache` attribute to
  Kerberos::ServiceAuthenticator::Base. This enables/disables storing
  Kerberos TGS MIT Credential Cache to the database.
2022-10-21 16:16:10 +02:00