Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Add password for initial configuration

Scheduled Pinned Locked Moved Solved Feature Requests
11 Posts 4 Posters 341 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mehdiM Offline
    mehdiM Offline
    mehdi App Dev
    wrote on last edited by
    #1

    Just went through a fresh cloudron install, and I must say I am not comfortable with the initial installation process : anyone connecting to the server's IP before the legitimate admin could basically "take over" the server in question. We could even imagine an advanced attacker taking full control of the server through this, then installing a "fake" installation page that mimics the original one, so the legitimate admin would not notice anything.

    The solution to this would be some sort of a password, or key, that the CLI would give you, or ask you for, upon install, that you would then have to enter into the web interface to authenticate to it. It could potentially be an optional parameter.

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by girish
    #2

    We actually implemented this a couple of releases ago. If you run cloudron-setup --generate-setup-token, it will create a setup token which is saved in /etc/cloudron/SETUP_TOKEN . At the end of setup script, it will also display the token.

    ruihildtR 1 Reply Last reply
    4
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #3

    I updated https://docs.cloudron.io/installation/

    1 Reply Last reply
    4
  • ruihildtR Offline
    ruihildtR Offline
    ruihildt
    replied to girish on last edited by
    #4

    @girish Wouldn't it be better if this was the default for new installations, and then have the flag for disabling it?

    nebulonN 1 Reply Last reply
    3
  • nebulonN Online
    nebulonN Online
    nebulon Staff
    replied to ruihildt on last edited by
    #5

    @ruihildt I guess that is a bit of a trade-off between usability and real threat. Generally an attacker would have to get the time window right, know the ip address and then will be able to setup the Cloudron. However to actually then also modify the code to let the normal user believe nothing the system is untampered with, he/she needs to have SSH access, which the dashboard does not give as such. So further an attacker would need to know a security hole in Cloudron components.

    Overall from my current perspective, that risk is quite low. Does anyone else have a different idea how to exploit this?

    mehdiM 1 Reply Last reply
    1
  • mehdiM Offline
    mehdiM Offline
    mehdi App Dev
    replied to nebulon on last edited by
    #6

    @nebulon No SSH access needed, an attacker could just use the Volumes feature to get write access to the cloudron code folder, and be able to do whatever they want.

    nebulonN 1 Reply Last reply
    0
  • nebulonN Online
    nebulonN Online
    nebulon Staff
    replied to mehdi on last edited by
    #7

    @mehdi interesting idea. The volumes however only allow to configure /mnt, /media, /opt or /srv for the filesystem type.

    1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #8

    Yeah, the volumes logic specifically prevents mounting random things when using the "unmanaged" mounts (i.e things which Cloudron does not mount and manage itself) - https://git.cloudron.io/cloudron/box/-/blob/master/src/volumes.js#L52

    1 Reply Last reply
    0
  • mehdiM Offline
    mehdiM Offline
    mehdi App Dev
    wrote on last edited by
    #9

    OK, my bad about volumes, but I believe the Cloudron dashboard was not designed with the goal of defending against an admin constantly in mind. So it is safe to assume that there are probably bypasses lurking somewhere, maybe in the docker addon, maybe in the backups stuff ... in any case, I believe that having this as default would be a minor inconvenience, with a non-negligible security benefit.

    ruihildtR 1 Reply Last reply
    3
  • ruihildtR Offline
    ruihildtR Offline
    ruihildt
    replied to mehdi on last edited by
    #10

    @mehdi This is exactly what I'm most worried about, the unknown unknowns, and it seems here the added friction is negligible: copying the token from the command line to the webbrowser.

    ruihildtR 1 Reply Last reply
    1
  • ruihildtR Offline
    ruihildtR Offline
    ruihildt
    replied to ruihildt on last edited by
    #11

    As you probably have access to the IP of the server, you could simply display a link once the setup is complete in the CLI:

    https://<IP>?<token>
    

    So not even copy/paste needed for most.^^

    1 Reply Last reply
    3

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.