-
Notifications
You must be signed in to change notification settings - Fork 115
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
Multiple exceptions in LDAP #3
Comments
Thanks for reporting the issue! Will fix the exception handling later today. |
I prepared a debug script, which you can find here. You can checkout the script like that:
The script is then in the Can you please run this script and paste the output here? |
Here it is. I have tried a few times and shows a socket error `[root@Archlinux ~]# cd /usr/share/enum4linux-ng [root@Archlinux enum4linux-ng]# cd debug [root@Archlinux debug]# ls ldap-debug.py [root@Archlinux debug]# python3 ldap-debug.py localhost ('unable to open socket', [root@Archlinux debug]# |
Alright, some more tests...
I've update the ldap-debug.py script. Can you fetch the most recent version and run it again and paste the output here? |
No problem about doing all the tests you need. |
And the output of ldap-debug.py after the last update:
|
This this the output of `[root@Archlinux enum4linux-ng]# python enum4linux-ng.py 127.0.0.1 ==========================
|
Thanks for your reply, it seems that the exceptions have been disappeared with the latest commit. The output of your |
As an end of the topic, I have run enum4linux against an CTF Box (WestWild) `[root@Archlinux enum4linux-ng]# python enum4linux-ng.py 192.168.1.82 ==========================
|
Glad it works now! I think I spotted another issue which is unrelated to LDAP. I opened another issue for this here: #5 The printer enumeration doesn't work correctly. Could you run this command: This helps me to extend the code so that the output of rpcclient enumprinters is parsed correctly. |
Hi, |
Thanks again for your help! I updated the tool: 380d3e0 |
Glad to help you. If you need more tests tell me if you want. :) This time I have test with another CTF box "Synfonos".
==========================
|
Thank you! :) |
Hi.
That's what I get running on Archlinux. All requirements installed. Running python 3.8.2-2
==================================================
| Getting information via LDAP for 127.0.0.1 |
``[root@Archlinux enum4linux-ng]# python enum4linux-ng.py 127.0.0.1
ENUM4LINUX-NG
==========================
| Target Information |
[] Target ........... 127.0.0.1
[] Username ......... ''
[] Random Username .. 'pfrqocuh'
[] Password ......... ''
[] RID Range(s) ..... 500-550,1000-1050
[] Known Usernames .. 'administrator,guest,krbtgt,domain admins,root,bin,none'
==================================================
| Getting information via LDAP for 127.0.0.1 |
[*] Trying LDAP
Traceback (most recent call last):
File "enum4linux-ng.py", line 435, in get_namingcontexts
ldap_con = Connection(server, auto_bind=True)
File "/usr/lib/python3.8/site-packages/ldap3/core/connection.py", line 355, in init
self.do_auto_bind()
File "/usr/lib/python3.8/site-packages/ldap3/core/connection.py", line 370, in do_auto_bind
self.open(read_server_info=False)
File "/usr/lib/python3.8/site-packages/ldap3/strategy/sync.py", line 56, in open
BaseStrategy.open(self, reset_usage, read_server_info)
File "/usr/lib/python3.8/site-packages/ldap3/strategy/base.py", line 139, in open
raise exception_history[0][0]
ldap3.core.exceptions.LDAPSocketOpenError: socket connection error while opening: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "enum4linux-ng.py", line 1885, in
main()
File "enum4linux-ng.py", line 1817, in main
result = run_module_ldapsearch(target)
File "enum4linux-ng.py", line 1275, in run_module_ldapsearch
namingcontexts = get_namingcontexts(target)
File "enum4linux-ng.py", line 438, in get_namingcontexts
error = str(e.args[1][0][0])
IndexError: tuple index out of range
The text was updated successfully, but these errors were encountered: