Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 6.2.31 into kerberos feature branch #17379

Conversation

adfoster-r7
Copy link
Contributor

@adfoster-r7 adfoster-r7 commented Dec 13, 2022

Merging Metasploit 6.2.31 into the kerberos feature branch. This is useful in preparation to releasing 6.3.0, as well as gaining access to

Verification

Verify the ldap_query, windows/smb/psexec, smb_login (#17175) - similar to #17079

krastanoel and others added 30 commits November 8, 2022 14:14
Fix crash when generating payload sizes
- combine gitea_version into get_gitea_version for the check method
- validate empty username
- move cleanup process to its own method and handle the response
- remove timeout and http delay option
- adjust target type location as code review suggestion
- move repository migration to execute_command.
NOTE: the stageless payload is still unsuccessfull but keep this anyway for christophe to review.
- handle cleanup method on manual `check`
- adjust targets flavour option
- add :win_dropper target and handle the payload delivery
NOTE: the Windows dropper target is still unsuccessfull but keep this for further review
The address is returned in the packed format so it's always a string of
either length 0 (resolution failed), length 4 (IPv4) or length 16
(IPv6).

Anything else is invalid and will actually cause Rex::Socket.addr_ntoa
to throw an error. All meterpreters today return the IP address in one
of those three correct lengths.
…_39144.rb


Agreed !

Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
…_39144.rb

Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
adfoster-r7 and others added 22 commits December 12, 2022 17:19
Store service credentials in the database
specifically, the exploit will now search
for com.acronis.helpertool in addtion to the
2020 helper tool name. This also updates the
check() method to return CheckCode::Detected
for when we find the vulnerable service but
can't detect the build number
Remove unnecesary sleep in several bypassuac modules
Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com>
@adfoster-r7 adfoster-r7 changed the base branch from master to feature-kerberos-authentication December 13, 2022 19:45
@cgranleese-r7 cgranleese-r7 self-assigned this Dec 14, 2022
@cgranleese-r7
Copy link
Contributor

Everything seems to be working as expected 👍

windows/smb/psexec

Command:

run rhosts=192.168.175.135 smbuser=Administrator smbpass=Password1 smbauth=kerberos smbrhostname=dc1.vb.local domaincontrollerrhost=192.168.175.135 smbdomain=vb.local

image

scanner/smb/smb_login

Command:

run rhosts=192.168.175.135 smbuser=Administrator smbpass=Password1 smbauth=kerberos smbrhostname=dc1.vb.local domaincontrollerrhost=192.168.175.135 smbdomain=vb.local

image

gather/ldap_query

Command:

enum_accounts rhosts=192.168.175.135 username=Administrator password=Password1 ldapauth=kerberos ldaprhostname=dc1.vb.local domaincontrollerrhost=192.168.175.135 domain=vb.local

image

Full command output
msf6 auxiliary(gather/ldap_query) > enum_accounts rhosts=192.168.175.135 username=Administrator password=Password1 ldapauth=kerberos ldaprhostname=dc1.vb.local domaincontrollerrhost=192.168.175.135 domain=vb.local
[*] Running module against 192.168.175.135

[*] 192.168.175.135:88 - Using cached credential for krbtgt/VB.LOCAL@VB.LOCAL Administrator@VB.LOCAL
[+] 192.168.175.135:88 - Received a valid TGS-Response
[*] 192.168.175.135:88 - TGS MIT Credential Cache saved to /Users/cgranleese/.msf4/loot/20221214132010_default_192.168.175.135_mit.kerberos.cca_522639.bin
[+] 192.168.175.135:88 - Received a valid delegation TGS-Response
[*] Discovering base DN automatically
[+] 192.168.175.135:389 Discovered base DN: DC=vb,DC=local
CN=Administrator CN=Users DC=vb DC=local
========================================

 Name                Attributes
 ----                ----------
 badpwdcount         0
 description         Built-in account for administering the computer/domain
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           2022-12-14 13:19:31 UTC
 logoncount          79
 memberof            CN=Group Policy Creator Owners,CN=Users,DC=vb,DC=local || CN=Domain Admins,CN=Users,DC=vb,DC=local || CN=Enterprise Admins,CN=Users,DC=vb,DC=local || CN=Schema Admins
                     ,CN=Users,DC=vb,DC=local || CN=Administrators,CN=Builtin,DC=vb,DC=local
 name                Administrator
 pwdlastset          133077245773368214
 samaccountname      Administrator
 useraccountcontrol  66048

CN=Guest CN=Users DC=vb DC=local
================================

 Name                Attributes
 ----                ----------
 badpwdcount         0
 description         Built-in account for guest access to the computer/domain
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           1601-01-01 00:00:00 UTC
 logoncount          0
 memberof            CN=Guests,CN=Builtin,DC=vb,DC=local
 name                Guest
 pwdlastset          0
 samaccountname      Guest
 useraccountcontrol  66082

CN=foo CN=Users DC=vb DC=local
==============================

 Name                Attributes
 ----                ----------
 badpwdcount         4
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           2022-09-20 13:02:55 UTC
 logoncount          18
 memberof            CN=Users,CN=Builtin,DC=vb,DC=local || CN=Administrators,CN=Builtin,DC=vb,DC=local
 name                foo
 pwdlastset          133077244197159106
 samaccountname      foo
 useraccountcontrol  544

CN=DC1 OU=Domain Controllers DC=vb DC=local
===========================================

 Name                Attributes
 ----                ----------
 badpwdcount         0
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           2022-12-14 13:13:30 UTC
 logoncount          279
 name                DC1
 pwdlastset          133139135796977432
 samaccountname      DC1$
 useraccountcontrol  532480

CN=krbtgt CN=Users DC=vb DC=local
=================================

 Name                Attributes
 ----                ----------
 badpwdcount         0
 description         Key Distribution Center Service Account
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           1601-01-01 00:00:00 UTC
 logoncount          0
 memberof            CN=Denied RODC Password Replication Group,CN=Users,DC=vb,DC=local
 name                krbtgt
 pwdlastset          133077251997412893
 samaccountname      krbtgt
 useraccountcontrol  514

CN=Joe Bloggs OU=Users OU=UK DC=vb DC=local
===========================================

 Name                Attributes
 ----                ----------
 badpwdcount         0
 displayname         Joe Bloggs
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           1601-01-01 00:00:00 UTC
 logoncount          0
 memberof            CN=Production,OU=Groups,OU=UK,DC=vb,DC=local
 name                Joe Bloggs
 pwdlastset          0
 samaccountname      j.bloggs
 useraccountcontrol  512
 userprincipalname   j.bloggs@vb.local

CN=wîth.dìáçriticš OU=Users OU=UK DC=vb DC=local
================================================

 Name                Attributes
 ----                ----------
 badpwdcount         0
 displayname         w\xc3\xaeth.d\xc3\xac\xc3\xa1\xc3\xa7ritic\xc5\xa1
 lastlogoff          1601-01-01 00:00:00 UTC
 lastlogon           1601-01-01 00:00:00 UTC
 logoncount          0
 memberof            CN=Production,OU=Groups,OU=UK,DC=vb,DC=local
 name                w\xc3\xaeth.d\xc3\xac\xc3\xa1\xc3\xa7ritic\xc5\xa1
 pwdlastset          0
 samaccountname      w\xc3\xaeth.d\xc3\xac\xc3\xa1\xc3\xa7ritic\xc5\xa1
 useraccountcontrol  512
 userprincipalname   w\xc3\xaeth.d\xc3\xac\xc3\xa1\xc3\xa7ritic\xc5\xa1@vb.local

[*] Auxiliary module execution completed

scanner/winrm/winrm_login

Command:

run rhosts=192.168.175.135 username=Administrator password=Password1 winrmauth=kerberos winrmrhostname=dc1.vb.local domaincontrollerrhost=192.168.175.135 domain=vb.local

image

@cgranleese-r7 cgranleese-r7 added rn-no-release-notes no release notes feature-kerberos-authentication Adds Kerberos Authentication support to framework labels Dec 14, 2022
@cgranleese-r7 cgranleese-r7 merged commit 7face44 into rapid7:feature-kerberos-authentication Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-kerberos-authentication Adds Kerberos Authentication support to framework rn-no-release-notes no release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet