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

Security VS habridge #390

Closed
stefan73 opened this issue Jan 25, 2017 · 10 comments
Closed

Security VS habridge #390

stefan73 opened this issue Jan 25, 2017 · 10 comments

Comments

@stefan73
Copy link

habridge allows to execute scripts and programs on the hosting system. These scripts/programs are executed with root permissions. habridge also allows to add and test new configurations without any authentication to the system. i.e. habridge is a great tool but on the other hand exposes root to any user on the net. I guess there should be a password protection to the habridge configuration.

@bwssytems
Copy link
Owner

This is something that can be controlled by the user. As being open, it is a risk if you put items on it that could be an issue. This is something that should be noted.

@stefan73
Copy link
Author

stefan73 commented Jan 25, 2017

Can the user really control this? - I do not think so. The default config of a package should also not by default open up the root account to anyone.

Of course you may configure iptables to make sure that the habridge WebIF is only accessible by localhost. Then use a reverse proxy approach to get it channeled through Apache and add authentication. Such option sounds more like a work-around to me.

I can imagine two solutions:

  1. Make a password mandatory for the habridge WebIF before one can set-up devices.
  2. Eliminate the execute script/program option from habridge completely. It is much safer, if scripts get called by a webserver like apache / lighthttpd, where the user explicitly sets up e.g. a php script. The account running the script is also more appropriate then.

@pr3sidentspence
Copy link

pr3sidentspence commented Jan 25, 2017 via email

@bwssytems
Copy link
Owner

@stefan73 This is an application that is open to any one to use and configure. This type of application is inherently risky in security due to it's implementation. This also, allows some flexibility on how it operates. If people do not want to understand the risks, such as blindly opening ports from the internet and that if anyone that gets onto their internal network inappropriately, they should not run this software. Please feel free to fork this project and remove what you do not want until it can be added as a feature. Also, even if these features are added, this is still a risk as the Hue API is already inherently risky.
@pr3sidentspence Yes, you should never open this up to the internet. Even if you have a better router....

@pr3sidentspence
Copy link

pr3sidentspence commented Jan 25, 2017 via email

@bwssytems
Copy link
Owner

@pr3sidentspence Your idea of sequestering scripts or programs to a specific directory is what I will probably implement. So as long as a user doesn't give up the system in a script or a link to a program to run, it will be mitigated somewhat.

@stefan73
Copy link
Author

stefan73 commented Jan 26, 2017

The directory idea is great & simple. The solution though needs to make sure that oen can only call scripts/programs with parameters and not a chain of commands.
Thanks for considering.

@bwssytems
Copy link
Owner

This will be implemented with the security update.

@linuxkidd
Copy link

This could also be accomplished by:

  • Setup reverse proxy using any web server ( lighttpd, nginx, apache, etc.. )
  • Configure the reverse proxy to require user authentication
  • Use iptables to block access to the default port 8080, or configure ha-bridge to listen for web only on localhost ( 127.x.x.x ).

Viola, secured access to ha-bridge web interface.

@bwssytems
Copy link
Owner

There will be multiple levels integrated. i.e. Secure just the user config portion, secure the api portion and also, secure only to registered user via "link button" ala hue. And there is some mix and match.

@bwssytems bwssytems added this to the v4.5.0 milestone Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants