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

Import of password list fails with undetailed error #126

Open
BerndAbb opened this issue Mar 6, 2024 · 8 comments
Open

Import of password list fails with undetailed error #126

BerndAbb opened this issue Mar 6, 2024 · 8 comments
Assignees
Labels
bug Something isn't working pinned

Comments

@BerndAbb
Copy link

BerndAbb commented Mar 6, 2024

Hi,
I encountered an error, whilst importing password lists into the solution.
Environment was one time a DC Server 2022 in German, VM and next try I used
another DC Server 2022 English which is a physical machine, getting the same error.

The first password list was the rockyou repository, the second I tried had about 8mb.

Error:
Import-CompromisedPasswords : Mindestens ein Fehler ist aufgetreten.
In Zeile:1 Zeichen:1

  • Import-CompromisedPasswords -Filename "C:\pwrep\rockyou.txt"
  •   + CategoryInfo          : NotSpecified: (:) [Import-CompromisedPasswords], AggregateException
      + FullyQualifiedErrorId : System.AggregateException,Lithnet.ActiveDirectory.PasswordProtection.PowerShell.ImportCo
     mpromisedPasswords
    
    

Any idea on this..?
BR
Bernd

@ryannewington ryannewington self-assigned this Mar 7, 2024
@ryannewington
Copy link
Member

Hi @BerndAbb

Can you reproduce the issue, and immediately run this command after to dump the whole exception for us to see

$Error[0].Exception.ToString()

@BerndAbb
Copy link
Author

BerndAbb commented Mar 8, 2024

Hi @ryannewington
Thank you very much for your quick response, did as you requested and digged out the following error:

PS C:\Windows\system32> $Error[0].Exception.ToString()
System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The process cannot access the file 'c:\pwrep\v3\p\AC9B.db.bin' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Lithnet.ActiveDirectory.PasswordProtection.BinaryStoreInstance.WriteStoreFile(String file, Boolean append, IEnumerable1 hashes) at Lithnet.ActiveDirectory.PasswordProtection.BinaryStoreInstance.AddHashRangeToTempStore(HashSet1 hashes, String range)
at Lithnet.ActiveDirectory.PasswordProtection.Store.<>c__DisplayClass32_0.b__0(KeyValuePair2 group) at System.Threading.Tasks.Parallel.<>c__DisplayClass42_02.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )
--- End of inner exception stack trace ---
at Lithnet.ActiveDirectory.PasswordProtection.PowerShell.Global.UnwrapAndThrow(Exception ex)
at Lithnet.ActiveDirectory.PasswordProtection.PowerShell.Global.ThrowIfFaulted(Task t)
at Lithnet.ActiveDirectory.PasswordProtection.PowerShell.ImportCompromisedPasswords.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
---> (Inner Exception #0) System.IO.IOException: The process cannot access the file 'c:\pwrep\v3\p\AC9B.db.bin' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Lithnet.ActiveDirectory.PasswordProtection.BinaryStoreInstance.WriteStoreFile(String file, Boolean append, IEnumerable1 hashes) at Lithnet.ActiveDirectory.PasswordProtection.BinaryStoreInstance.AddHashRangeToTempStore(HashSet1 hashes, String range)
at Lithnet.ActiveDirectory.PasswordProtection.Store.<>c__DisplayClass32_0.b__0(KeyValuePair2 group) at System.Threading.Tasks.Parallel.<>c__DisplayClass42_02.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )<---

I am going to erase the complete store content and will try a new import, will let you know then.

BR
Bernd

@ryannewington
Copy link
Member

Something has locked open your store database while LPP is trying to read it.

If it's replicated with DFS-R, pause the replication group.

Try add an exclusion for your antivirus for the store folder.

@BerndAbb
Copy link
Author

BerndAbb commented Mar 8, 2024

Am with you, I suspect DFS-R, will let you know the comeout.
BR
Bernd

@BerndAbb
Copy link
Author

BerndAbb commented Mar 8, 2024

Alright, DFS-R was the issue, paused the replication, recreated the p folder for the passwords and brew a fresh hash repository, all went perfectly fine. Thank you very much and kudos for the great solution and support here!

@BerndAbb BerndAbb closed this as completed Mar 8, 2024
@BerndAbb
Copy link
Author

BerndAbb commented Mar 8, 2024

DFS-R had a file in access, pausing the replication solved the issue

@ryannewington ryannewington reopened this Mar 8, 2024
@ryannewington
Copy link
Member

Glad you got it sorted

I'll leave this one open as a task to improve that error message in a future version.

@ryannewington ryannewington added bug Something isn't working pinned labels Mar 8, 2024
@BerndAbb
Copy link
Author

BerndAbb commented Mar 8, 2024

Perfectly fine, good idea to improve the error message!
All the best and thanks again!

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

No branches or pull requests

2 participants