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

Domain reference for Format-Custom views #179

Open
Jupithor opened this issue Apr 19, 2024 · 2 comments
Open

Domain reference for Format-Custom views #179

Jupithor opened this issue Apr 19, 2024 · 2 comments

Comments

@Jupithor
Copy link

I am working with multiple domains, and doing something like this:

foreach($DC in $DCs){
     $accounts += Get-ADReplAccount -All -Server $DC
}
$accounts |  Test-PasswordQuality -WeakPasswordHashesSortedFile $HIBP | Out-File $auditoutput  -Encoding ASCII
$accounts |  Format-Custom -View PwDump | Out-File $hashoutput -Encoding ASCII

In the output for Test-PasswordQuality i get domain\user.
But in the PwDump I only get username.
Is there a way to get a domain reference in the pwdump etc.?

Thank you

@MichaelGrafnetter
Copy link
Owner

Hi @Jupithor, all custom views would deserve some improvements, including a filter that would drop user accounts without password hashes and computer accounts.
You could try to manually modify the DSInternals.DSAccount.ExportViews.format.ps1xml file and replace $PSItem.SamAccountName with $PSItem.LogonName. I would be curious to hear if the \ character is compatible with the current versions of tools like Hashcat, John the Ripper, Ophcrack, Rainbowcrack, or Elcomsoft Distributed Password Recovery.

@Jupithor
Copy link
Author

Thank you for your reply.
Yes, i am currently using -replace to prepend $domain\ .
I can confirm that it works with Hashcat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants