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

Enhance documentation and error messaging for start subcommand #15

Open
PenFr opened this issue Sep 7, 2022 · 5 comments
Open

Enhance documentation and error messaging for start subcommand #15

PenFr opened this issue Sep 7, 2022 · 5 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@PenFr
Copy link

PenFr commented Sep 7, 2022

Hi,
I always get a tcp error: Connection cant be established, Host denies connection.

I tried the precomipled binary and self compiled binarys on windows and linux. Even on different computers and with different login methods.
Poking arround in the code it seems its trying to establish a connection to a blank host - wich obv. fails but i cant find the reason for it.

Any help would be appreciated :)

Edit: running it directly (-u "user@" -p "pwd") and not over the configfile seems to work!

@ddlees
Copy link
Contributor

ddlees commented Sep 12, 2022

@PenFr Can you provided the exact steps you're taking to reproduce this issue and provide any logs (sensitive data redacted)?

@x41x4a
Copy link

x41x4a commented Feb 2, 2023

@ddlees I'm seeing something similar. I'm trying to run azurehound with a certificate-based auth config as shown below. The output makes it look like it's trying to connect to an empty/null targetUrl.

Error message:

AzureHound v1.2.3
Created by the BloodHound Enterprise team - https://bloodhoundenterprise.io

2023-02-02T22:21:19Z DBG Config File: /root/.config/azurehound/config.json
2023-02-02T22:21:19Z DBG testing connections
2023-02-02T22:21:19Z TRC dialing... targetUrl=https://login.microsoftonline.com
2023-02-02T22:21:20Z TRC dialing... targetUrl=https://graph.microsoft.com
2023-02-02T22:21:21Z TRC dialing... targetUrl=https://management.azure.com
2023-02-02T22:21:25Z TRC dialing... targetUrl=
2023-02-02T22:21:25Z ERR encountered unrecoverable error error="dial tcp :443: connect: connection refused"

Example config.json:

{
  "access-types": [],
  "app": "<removed>",
  "auth": "",
  "cert": "/opt/cert.pem",
  "config": "/root/.config/azurehound/config.json",
  "graph": "",
  "instance": "",
  "json": false,
  "jwt": "",
  "key": "/opt/key.pem",
  "keypass": "<removed>",
  "log-file": "",
  "mgmt": "",
  "mgmtgroupid": [],
  "output": "",
  "password": "",
  "proxy": "",
  "refresh-token": "",
  "region": "cloud",
  "secret": "",
  "subscriptionid": [],
  "tenant": "<removed>",
  "token": "",
  "tokenid": "",
  "username": "",
  "verbosity": 0
}

@ddlees
Copy link
Contributor

ddlees commented Feb 14, 2023

@x41x4a Are you executing azurehound list or azurehound start?

The start subcommand is specifically for BloodHound Enterprise and requires that instance provide a valid URL to a BloodHound Enterprise instance.

If you are not targeting a BloodHound Enterprise instance then you should use the list subcommand instead.

Note to self: enhance documentation and error messaging

@x41x4a
Copy link

x41x4a commented Feb 14, 2023

@x41x4a Are you executing azurehound list or azurehound start?

The start subcommand is specifically for BloodHound Enterprise and requires that instance provide a valid URL to a BloodHound Enterprise instance.

If you are not targeting a BloodHound Enterprise instance then you should use the list subcommand instead.

Note to self: enhance documentation and error messaging

Thanks for pointing that out. That seems to have fixed it.

@ddlees ddlees changed the title TCP-Error Enhance documentation and error messaging for start subcommand Feb 14, 2023
@ddlees ddlees added the documentation Improvements or additions to documentation label Feb 14, 2023
@ddlees
Copy link
Contributor

ddlees commented Feb 14, 2023

Acceptance Criteria

  • AzureHound should be more explicit in its error messaging when it fails to connect to a specific type of url
  • AzureHound start subcommand should suggest using the list subcommand when BloodHound Enterprise URL is not specified

@ddlees ddlees added the enhancement New feature or request label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants