Update Invoke-ScriptSentry.ps1
When running the tool on a domain without Mapped Drives nor GPO Logon Scripts, PowerShell hangs and then throws the exception ParameterArgumentValidationErrorNullNotAllowed.
I wrapped the function calls that use $GPOLogonScripts and $MappedDrives with an if statement to check for null. This might be applicable for other variables.
Ah yes. I had known about this but hadn't had the time to throw some error handling in to accommodate this use case. I appreciate the PR. I'll review this and other areas where this same issue might arise. I appreciate it!!
Most welcome. I did nothing. We mentioned and showcased your tool in an upcoming HTB Academy module called DACL Attacks II. Hope it will make it more well-known.
Oh wow @PedantHTB that's super awesome! Is there any way you might be able to send me a screenshot or something showing it in the HTB Academy? For posterity. 😀Thank you!
Sure:
Thanks again for bringing this up. I was being lazy, but not any more! Fixed: https://github.com/techspence/ScriptSentry/commit/78b423cc6bd5fea8efb5cfb0dbe48e798f25e559