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

Adds incorrect domain to results #106

Open
Techlisalh opened this issue Jun 28, 2023 · 6 comments
Open

Adds incorrect domain to results #106

Techlisalh opened this issue Jun 28, 2023 · 6 comments
Assignees
Labels
Bug Something isn't working

Comments

@Techlisalh
Copy link

Describe the bug
A clear and concise description of what the bug is.
When I run a tenant or user investigation, the results append the incorrect domain
To Reproduce
Steps to reproduce the behavior:
Run investigation, and answer questions, no matter where I indicate to save the output, it adds one of our tenant's names in the path instead of the tenant we are investigating.

Expected behavior
A clear and concise description of what you expected to happen. I expect that the folder name will include the actual domain name being looked at

Screenshots
If applicable, add screenshots to help explain your problem.

File (please complete the following information):

  • File Name: I save to a folder named "hawk"

Additional context
Add any other context about the problem here. I saw a possible feature request to add the default domain name to the folders; however, that only works if you work in a single tenant. We have 50 tenants that we have to run reports on at times. I do rename the folder after the fact, but many logs show I made the change. Please change the behavior back to the way it was, no domain added, then I can indicate the correct tenant, and don't have to remove the one set as default.

@Techlisalh Techlisalh added the Bug Something isn't working label Jun 28, 2023
@Techlisalh
Copy link
Author

This is the same issue as the "wrong scan name". Sorry for duplicating the entry. It gives the same path for all tenants. Completely different sessions, and different logins. I just did one for a user investigation only. Moved to C:\Temp instead of c:\hawk. it looks like the scan was for a different tenant than was scanned.

It's not life-threatening, it just looks unprofessional.

@T0pCyber T0pCyber self-assigned this Jun 29, 2023
@T0pCyber
Copy link
Owner

T0pCyber commented Jun 29, 2023

@Techlisalh - Would it be possible to schedule a time talk to better understand the use case when running against multiple tenants. If so please email me hawk_feedback@microsoft.com so we can get something on the books. Thanks

@Techlisalh
Copy link
Author

Techlisalh commented Jun 29, 2023 via email

@DOS-jabro
Copy link

Hi There,

It looks like the MSGraph sessions persist across PowerShell sessions - see https://learn.microsoft.com/en-us/powershell/microsoftgraph/authentication-commands?view=graph-powershell-1.0

To Replicate
Run Get-MGDomain in a new Powershell Session - it will show your last still valid MSGraph session

Workaround:
Manually run Disconnect-MgGraph and run HAWK in an new PowerShell session

As it seems to get the correct data for a tenant the permanent fix is to either have HAWK disconnect once done or grab the tenant name from elsewhere in

HAWK\<version>\internal\functions\Initialize-HawkGlobalObject.ps1 Line 81

[string]$TenantName = (Get-MGDomain | Where-Object {$_.isDefault}).ID

@T0pCyber
Copy link
Owner

@Techlisalh - Would Friday the 21st of July work for you? If so please email the Hawk email address so I can coordinate a meeting.
hawk_feedback@microsoft.com

@Techlisalh
Copy link
Author

Techlisalh commented Jul 13, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants