BloodHound icon indicating copy to clipboard operation
BloodHound copied to clipboard

Bug: port 2112 is opened to the outside

Open Lat3magnet1c opened this issue 1 year ago • 3 comments

Description:

Bloodhound opens up port 2112 on ipv6 to the outside. I did not find any possibility to deactivate this behavior from bloodhound. My expected behavior would be that port 2112 is only opened to 127.0.0.1 (same as port 8080 for the webui).

Are you intending to fix this bug?

no

Component(s) Affected:

  • UI
  • API

Steps to Reproduce:

  1. Start Bloodhound

Expected Behavior:

My expected behavior would be that also port 2112 is only opened to 127.0.0.1 (same as port 8080 for the webui).

Actual Behavior:

Port 2112 is opened on all interfaces.

Screenshots/Code Snippets/Sample Files:

Image

Environment Information:

BloodHound: 7.3.0 OS: Kali Linux

Contributor Checklist:

  • [x] I have searched the issue tracker to ensure this bug hasn't been reported before or is not already being addressed.
  • [x] I have provided clear steps to reproduce the issue.
  • [x] I have included relevant environment information details.

Lat3magnet1c avatar May 13 '25 11:05 Lat3magnet1c

Hi,

Could you please verify that this is still an issue with the newer version of BloodHound that is shipped with Kali? We are not able to reproduce from our installation steps.

Thank you.

Scoubi avatar Dec 16 '25 20:12 Scoubi

Hi,

just tested with a fresh Kali install and Bloodhound v8.4.1 (Bloodhound installed from Kali repo with apt). The behaviour is still the same.

Lat3magnet1c avatar Dec 19 '25 09:12 Lat3magnet1c

Hi, I would like to take this one.

I have confirmed the root cause: the tool API daemon binds cfg.MetricsPort, which defaults to :2112 鈥?an empty host binds all interfaces (including IPv6). The main API daemon, by contrast, uses cfg.BindAddress which defaults to 127.0.0.1, which is why port 8080 only listens on loopback while 2112 is exposed.

My plan:

  • Change the default MetricsPort to 127.0.0.1:2112 in cmd/api/src/config/default.go
  • Add a safety guard in the tool API so an empty host in metrics_port falls back to loopback
  • Update the config tests and deployment docs accordingly

I will open a PR once done.

sanjio3 avatar Sep 15 '26 16:09 sanjio3