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

Kerberos ticket_search fix passing in a workspace #18400

Merged

Conversation

dwelch-r7
Copy link
Contributor

Thanks to @h00die for spotting this issue over here #18373 (comment)

When getting kerberos tickets the workspace was being passed in but being ignored, we were always using the users current workspace
This PR actually uses the passed in workspace while defaulting to the users current workspace

Before (using db_stats provided by #18373)

image
Both workspaces have the same number in the Kerberos Cache column as the current workspace

After (using db_stats provided by #18373)

image
The correct number is displayed for each workspace regardless of the current workspace

@dwelch-r7 dwelch-r7 changed the title Use passed in workspace if available, default to current workspace Kerberos ticket_search fix passing in a workspace Sep 25, 2023
@dwelch-r7 dwelch-r7 mentioned this pull request Sep 25, 2023
3 tasks
@h00die
Copy link
Contributor

h00die commented Oct 11, 2023

@dwelch-r7 do you want to keep this as a separate PR to framework or move it to a PR for #18373 since that would make it easier to test and land? Plus, then I could verify it, and push merge it into my PR in no time

@cdelafuente-r7 cdelafuente-r7 self-assigned this Oct 23, 2023
@cdelafuente-r7
Copy link
Contributor

Thanks @dwelch-r7 for fixing this. It looks good to me. I'll go ahead and land it.

Example output using PR #18373

  • Before
msf6 auxiliary(scanner/winrm/winrm_cmd) > db_stats
Session Type: Connected to msf. Connection type: postgresql.
Database Stats
==============

      ID     Name     Hosts  Services  Services per Host  Vulnerabilities  Vulns per Host  Notes  Creds  Kerberos Cache
      --     ----     -----  --------  -----------------  ---------------  --------------  -----  -----  --------------
  =>  1      default  11     4         0.36               7                0.63            45     123    2
      2      test     3      0         0.0                0                0.0             0      0      2
      Total  2        14     4         0.28               7                0.5             45     123    4

msf6 auxiliary(scanner/winrm/winrm_cmd) > workspace test
[*] Workspace: test
msf6 auxiliary(scanner/winrm/winrm_cmd) > db_stats
Session Type: Connected to msf. Connection type: postgresql.
Database Stats
==============

      ID     Name     Hosts  Services  Services per Host  Vulnerabilities  Vulns per Host  Notes  Creds  Kerberos Cache
      --     ----     -----  --------  -----------------  ---------------  --------------  -----  -----  --------------
      1      default  11     4         0.36               7                0.63            45     123    3
  =>  2      test     3      0         0.0                0                0.0             0      0      3
      Total  2        14     4         0.28               7                0.5             45     123    6
  • After
msf6 auxiliary(scanner/winrm/winrm_cmd) > db_stats
Session Type: Connected to msf. Connection type: postgresql.
Database Stats
==============

      ID     Name     Hosts  Services  Services per Host  Vulnerabilities  Vulns per Host  Notes  Creds  Kerberos Cache
      --     ----     -----  --------  -----------------  ---------------  --------------  -----  -----  --------------
  =>  1      default  11     4         0.36               7                0.63            45     123    2
      2      test     3      0         0.0                0                0.0             0      0      3
      Total  2        14     4         0.28               7                0.5             45     123    5

msf6 auxiliary(scanner/winrm/winrm_cmd) > workspace test
[*] Workspace: test
msf6 auxiliary(scanner/winrm/winrm_cmd) > db_stats
Session Type: Connected to msf. Connection type: postgresql.
Database Stats
==============

      ID     Name     Hosts  Services  Services per Host  Vulnerabilities  Vulns per Host  Notes  Creds  Kerberos Cache
      --     ----     -----  --------  -----------------  ---------------  --------------  -----  -----  --------------
      1      default  11     4         0.36               7                0.63            45     123    2
  =>  2      test     3      0         0.0                0                0.0             0      0      3
      Total  2        14     4         0.28               7                0.5             45     123    5

@cdelafuente-r7 cdelafuente-r7 added the rn-fix release notes fix label Oct 23, 2023
@cdelafuente-r7 cdelafuente-r7 merged commit b0b4da5 into rapid7:master Oct 23, 2023
58 checks passed
@cdelafuente-r7
Copy link
Contributor

Release Notes

This fixes an issue when searching for a Kerberos ticket and passing in the workspace. The workspace is now correctly used to query the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn-fix release notes fix
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants