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

Add handling of NT_STATUS_INVALID_PARAMETER when finding users #3

Merged

Conversation

rastating
Copy link
Contributor

When enumerating older systems (i.e. Windows 2000), the enumeration of the users will frequently return a status of NT_STATUS_INVALID_PARAMETER. When this happens, enum4linux assumes it was successful, as it only checks against NT_STATUS_ACCESS_DENIED to determine a failure; which results in an error as per below:

root@kali:~# enum4linux -U XXX.XXX.XXX.XXX
Starting enum4linux v0.8.9 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Sun Oct  1 07:50:31 2017
***
 ============================ 
|    Users on XXX.XXX.XXX.XXX    |
 ============================ 
Use of uninitialized value $users in print at ./enum4linux.pl line 875.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 878.

Use of uninitialized value $users in print at ./enum4linux.pl line 889.
Use of uninitialized value $users in pattern match (m//) at ./enum4linux.pl line 891.
enum4linux complete on Sun Oct  1 07:50:34 2017

This pull request adds in the validation for the invalid parameter status for older systems, and handles it properly. The same request from the above output, repeated with this patch, results in the below:

root@kali:~# enum4linux -U XXX.XXX.XXX.XXX
Starting enum4linux v0.8.9 ( http://labs.portcullis.co.uk/application/enum4linux/ ) on Sun Oct  1 07:56:08 2017

***
 ============================ 
|    Users on XXX.XXX.XXX.XXX   |
 ============================ 
[E] Couldn't find users using querydispinfo: NT_STATUS_INVALID_PARAMETER

[E] Couldn't find users using enumdomusers: NT_STATUS_INVALID_PARAMETER
enum4linux complete on Sun Oct  1 07:56:11 2017

@batterystaples
Copy link

This patch works for me for the querydispinfo part, but fails with the enumdomusers part - it's possibly because of the rpcclient version I'm using, but I haven't checked.

@mark-lowe mark-lowe merged commit 5e98318 into CiscoCXSecurity:master Mar 15, 2018
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.

3 participants