Commit Graph

71 Commits

Author SHA1 Message Date
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
Matthew Dunn 1e50ba3415 Move to Hashes module, address requested changes
Fix rubocop

Move identify to hashes module up one layer, use full reference to identify_hash instead of full include

Fix SMTP require

Remove hashes require statement

Remove hashes require statement

Remove hashes require statement

Remove hashes require statement

Address remaining requested changes, reference constants directly

Add all the missing direct references

Co-Authored-By: Jeffrey Martin <jeffrey_martin@rapid7.com>
2022-10-17 17:28:31 -04:00
adfoster-r7 5d345e6689 Merge branch 'upstream-master' into feature-kerberos-authentication 2022-09-29 16:42:58 +01:00
adfoster-r7 3a281234df Add feature flagged datastore rewrite, with support for option fallback lookups 2022-09-16 12:59:02 +01:00
Spencer McIntyre 7da5f2ad4a Changes from PR feedback 2022-07-28 16:05:22 -04:00
Spencer McIntyre 95d8b7005e Allow reusing cached and explicit CCACHE files 2022-07-28 16:03:22 -04:00
Spencer McIntyre 4abef7d373 Remove an unused option and require SmbRhostname 2022-07-06 15:16:50 -04:00
Spencer McIntyre e53bccae85 Set the session key for older SMB dialects too 2022-07-06 15:16:40 -04:00
adfoster-r7 aea37f7137 Add initial SMB Kerberos authentication support 2022-07-06 16:15:33 +01:00
jheysel-r7 1a7cbe5b4f Update lib/msf/core/exploit/remote/smb/server/hash_capture.rb 2022-06-08 13:45:57 -04:00
jheysel-r7 2b99967d0c Merge branch 'master' into fix/duplicate-netntlm 2022-06-07 11:42:51 -04:00
Spencer McIntyre a47b3fe694 Don't report duplicate Net-NTLM hashes 2022-05-27 14:13:06 -04:00
Spencer McIntyre 1e5f86703f Report the correct JtR type 2022-05-27 10:16:02 -04:00
Spencer McIntyre 862c6a94a2 Log ntlm_session hashes too
Despite being called ntlm_session, these hashes are capable of being
cracked as the John 'netntlm' format. Additionally the format is
reported as NTLMv1-SSP in similar tools.
2022-05-27 10:07:39 -04:00
Spencer McIntyre 19a9ff1198 Update a couple of modules for the new SMB server 2022-05-16 14:39:45 -04:00
Spencer McIntyre e0b9002238 Fix an SMB relay bug 2022-05-16 14:39:45 -04:00
Spencer McIntyre f14f8da1df Use the new thread_factory 2022-05-16 14:39:45 -04:00
Spencer McIntyre b79b550d6c Centralize the log adapter
This should eventually be updated to map the levels to the framework
logger and appropriate module-print_* function.
2022-05-16 14:39:45 -04:00
Spencer McIntyre 7c15b144c4 Update the SMB capture server 2022-05-16 14:39:44 -04:00
Spencer McIntyre 22993e910e Move server code into the server mixin 2022-05-16 14:39:44 -04:00
Spencer McIntyre c39fd87073 Finish removing unneeded server code 2022-05-16 14:39:44 -04:00
Spencer McIntyre 475f6eee8c Capture hash when serving files over SMB 2022-05-16 14:39:44 -04:00
Spencer McIntyre d740786211 Add the on_client_connect callback
Also update the group_policy_startup module.
2022-05-16 14:39:44 -04:00
Spencer McIntyre 317516d90f Enable guest access 2022-05-16 14:39:44 -04:00
Spencer McIntyre 882bcf08f7 Fix bugs when stopping the service 2022-05-16 14:39:44 -04:00
Spencer McIntyre 09dc65eb6a Remove the FILE_CONTENTS datastore option
None of the 14 modules use this option, they all deregister it.
2022-05-16 14:39:44 -04:00