ScriptSentry icon indicating copy to clipboard operation
ScriptSentry copied to clipboard

Update Invoke-ScriptSentry.ps1

Open CryingWelkin opened this issue 1 year ago • 3 comments

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.

CryingWelkin avatar May 05 '24 17:05 CryingWelkin

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!!

techspence avatar May 07 '24 12:05 techspence

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.

CryingWelkin avatar May 10 '24 18:05 CryingWelkin

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!

techspence avatar May 13 '24 21:05 techspence

Sure:

image

CryingWelkin avatar May 18 '24 10:05 CryingWelkin

Thanks again for bringing this up. I was being lazy, but not any more! Fixed: https://github.com/techspence/ScriptSentry/commit/78b423cc6bd5fea8efb5cfb0dbe48e798f25e559

techspence avatar Jul 23 '24 20:07 techspence