dirkjanm / BloodHound.py

A Python based ingestor for BloodHound
MIT License
1.84k stars 315 forks source link

bloodhound.py won't run whatever i do (upgrade issue?) #43

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi,

At first, I've had some dns issues, which I've resolved.

Furthermore I've did an upgrade to the following.

pip install --upgrade domain-connect-dyndns pip install ldap3 pyasn1 --upgrade But it may seem, that there is an issue in regards to impacket ldap3? I'm not sure what to make of this.

Would you be so kind to help me out? I'm not really experienced with this tool. I've also used python & python3. Output stay's the same.

I'm on kali 2020.1 and performed a git clone repo of yours. After that chmod 755 setup.py and pip install .

root@localhost:/opt/BloodHound.py# python3 bloodhound.py -c all -d EGOTISTICAL-BANK.LOCAL -gc EGOTISTICAL-BANK.LOCAL -dc SAUNA.EGOTISTICAL-BANK.LOCAL -u '' -p '' INFO: Connecting to LDAP server: SAUNA.EGOTISTICAL-BANK.LOCAL Traceback (most recent call last): File "bloodhound.py", line 5, in <module> bloodhound.main() File "/opt/BloodHound.py/bloodhound/__init__.py", line 286, in main disable_pooling=args.disable_pooling) File "/opt/BloodHound.py/bloodhound/__init__.py", line 72, in run self.pdc.prefetch_info('objectprops' in collect, 'acl' in collect) File "/opt/BloodHound.py/bloodhound/ad/domain.py", line 394, in prefetch_info self.get_objecttype() File "/opt/BloodHound.py/bloodhound/ad/domain.py", line 224, in get_objecttype self.ldap_connect() File "/opt/BloodHound.py/bloodhound/ad/domain.py", line 64, in ldap_connect q = self.ad.dnsresolver.query(self.hostname, tcp=self.ad.dns_tcp) File "/usr/lib/python3/dist-packages/dns/resolver.py", line 1002, in query raise NXDOMAIN(qnames=qnames_to_try, responses=nxdomain_responses) dns.resolver.NXDOMAIN: None of DNS query names exist: SAUNA.EGOTISTICAL-BANK.LOCAL., SAUNA.EGOTISTICAL-BANK.LOCAL.

root@localhost:/opt/BloodHound.py# ping SAUNA.EGOTISTICAL-BANK.LOCAL PING SAUNA.EGOTISTICAL-BANK.LOCAL (10.10.10.175) 56(84) bytes of data. 64 bytes from sauna.htb (10.10.10.175): icmp_seq=1 ttl=127 time=21.1 ms 64 bytes from sauna.htb (10.10.10.175): icmp_seq=2 ttl=127 time=23.6 ms

dirkjanm commented 4 years ago

The error message indicates DNS errors, try with -ns 10.10.10.175 to manually specify your DNS server.

ghost commented 4 years ago

YEAH! Thanks dirkjanm!

python3 bloodhound.py -c all -d EGOTISTICAL-BANK.LOCAL -gc EGOTISTICAL-BANK.LOCAL -dc SAUNA.EGOTISTICAL-BANK.LOCAL -ns 10.10.10.175 -u '' -p ''

INFO: Found AD domain: egotistical-bank.local INFO: Connecting to LDAP server: SAUNA.EGOTISTICAL-BANK.LOCAL INFO: Found 1 domains INFO: Found 1 domains in the forest INFO: Found 1 computers INFO: Connecting to LDAP server: SAUNA.EGOTISTICAL-BANK.LOCAL INFO: Found 6 users INFO: Connecting to GC LDAP server: EGOTISTICAL-BANK.LOCAL INFO: Found 51 groups INFO: Found 0 trusts INFO: Starting computer enumeration with 10 workers INFO: Querying computer: SAUNA.EGOTISTICAL-BANK.LOCAL INFO: Done in 00M 43S root@localhost:/opt/BloodHound.py#

dirkjanm commented 4 years ago

Good to hear it's working, closing this issue.

amit-eng commented 10 months ago

Hi, DNS errors anyone can help me!!!

└─$ bloodhound-python -u fcastle -p Password1 -ns 192.168.220.220 -d MARVEL.local -c All

Traceback (most recent call last): File "/usr/bin/bloodhound-python", line 33, in sys.exit(load_entry_point('bloodhound==1.6.1', 'console_scripts', 'bloodhound-python')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/bloodhound/init.py", line 303, in main ad.dns_resolve(domain=args.domain, options=args) File "/usr/lib/python3/dist-packages/bloodhound/ad/domain.py", line 645, in dns_resolve q = self.dnsresolver.query(query, 'SRV', tcp=self.dns_tcp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dns/resolver.py", line 1262, in query return self.resolve( ^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dns/resolver.py", line 1204, in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dns/resolver.py", line 988, in _compute_timeout raise LifetimeTimeout(timeout=duration, errors=errors) dns.resolver.LifetimeTimeout: The resolution lifetime expired after 3.204 seconds: Server 192.168.220.220 UDP port 53 answered The DNS operation timed out.; Server 192.168.220.220 UDP port 53 answered The DNS operation timed out.

ring-buffer commented 9 months ago

Traceback (most recent call last): File "bloodhound.py", line 3, in import bloodhound File "/root/Downloads/absolute.htb/BloodHound.py-Kerberos/bloodhound/init.py", line 34, in from bloodhound.ad.domain import AD, ADDC File "/root/Downloads/absolute.htb/BloodHound.py-Kerberos/bloodhound/ad/domain.py", line 31, in from dns import resolver ModuleNotFoundError: No module named 'dns'

ring-buffer commented 9 months ago

I tried installing pip install dns or pip3 install dns and couple of other things but nothing works.

dirkjanm commented 9 months ago

As per the requirements, bloodhound.py needs dnspython installed https://github.com/dirkjanm/BloodHound.py/blob/master/setup.py

winsecurity commented 3 weeks ago

Hi, i am getting dns errors with proxychains.

$ proxychains python3 bloodhound.py -c all -dc dc.painters.htb -u riley -p testpassword -ns 192.168.110.55 -d painters.htb -gc dc.painters.htb [proxychains] config file found: /etc/proxychains4.conf [proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4 [proxychains] DLL init: proxychains-ng 4.16 INFO: Getting TGT for user [proxychains] Strict chain ... 127.0.0.1:6970 ... 192.168.110.55:88 ... OK [proxychains] Strict chain ... 127.0.0.1:6970 ... 192.168.110.55:88 ... OK INFO: Connecting to LDAP server: dc.painters.htb Traceback (most recent call last): File "/home/kali/Desktop/red_teaming_tools/BloodHound.py/bloodhound.py", line 5, in bloodhound.main() File "/home/kali/Desktop/red_teaming_tools/BloodHound.py/bloodhound/init.py", line 343, in main bloodhound.run(collect=collect, File "/home/kali/Desktop/red_teaming_tools/BloodHound.py/bloodhound/init.py", line 78, in run self.pdc.prefetch_info('objectprops' in collect, 'acl' in collect, cache_computers=do_computer_enum) File "/home/kali/Desktop/red_teaming_tools/BloodHound.py/bloodhound/ad/domain.py", line 572, in prefetch_info self.get_objecttype() File "/home/kali/Desktop/red_teaming_tools/BloodHound.py/bloodhound/ad/domain.py", line 261, in get_objecttype self.ldap_connect() File "/home/kali/Desktop/red_teaming_tools/BloodHound.py/bloodhound/ad/domain.py", line 68, in ldap_connect q = self.ad.dnsresolver.query(self.hostname, tcp=self.ad.dns_tcp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dns/resolver.py", line 1110, in query return self.resolve(qname, rdtype, rdclass, tcp, source, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dns/resolver.py", line 1053, in resolve (request, answer) = resolution.next_request() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/dns/resolver.py", line 632, in next_request raise NXDOMAIN(qnames=self.qnames_to_try, dns.resolver.NXDOMAIN: The DNS query name does not exist: dc.painters.htb.