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

enum_shares improved error handling and regex for some cases #23

Merged
merged 2 commits into from Jan 29, 2023

Conversation

Xhoenix
Copy link
Contributor

@Xhoenix Xhoenix commented Dec 26, 2022

  • Handle error which occurs when enumerting IPC$ shares.
  • Extend regex for cases where the directory listing doesn't have ".." directory in it.

image

- Handle error which occurs when enumerting IPC$ shares.
- Extend regex for cases where the directory listing doesn't have ".." directory in it.
fixed "Use of uninitialized value" errors caused by enum_users() and get_user_details_from_rid() functions
@Xhoenix
Copy link
Contributor Author

Xhoenix commented Dec 26, 2022

The regex can be simplified to /\n\s+.*?\s+D.*\d{4}\n/

@Xhoenix
Copy link
Contributor Author

Xhoenix commented Dec 26, 2022

The get_user_details_from_rid() function does not implement check for the initialization of $user_info variable resulting in errors like these when used with the detailed(-d) flag.
image

While the get_group_details_from_rid() function implements such a check.
image

@Xhoenix
Copy link
Contributor Author

Xhoenix commented Dec 26, 2022

The enum_users() function works correctly but as the error NT_STATUS_ACCESS_DENIED is not shown as normal output in some cases it results in those errors mentioned in this issue. Turning up debuglevel upto 10 in rpcclient shows it.

@Xhoenix
Copy link
Contributor Author

Xhoenix commented Jan 26, 2023

@timb-machine Can you look into this?

@timb-machine timb-machine merged commit 09ca82f into CiscoCXSecurity:master Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants