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

Update Invoke-ScriptSentry.ps1 #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PedantHTB
Copy link

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.

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.
@techspence
Copy link
Owner

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 techspence self-assigned this May 7, 2024
@techspence techspence added the bug Something isn't working label May 7, 2024
@PedantHTB
Copy link
Author

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.

@techspence
Copy link
Owner

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!

@PedantHTB
Copy link
Author

Sure:

image

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

Successfully merging this pull request may close these issues.

None yet

2 participants