• 0 Posts
  • 42 Comments
Joined 22 days ago
cake
Cake day: June 9th, 2024

help-circle


  • Nope, that curl command says ‘connect to the public ip of the server, and ask for this specific site by name, and ignore SSL errors’.

    So it’ll make a request to the public IP for any site configured with that server name even if the DNS resolution for that name isn’t a public IP, and ignore the SSL error that happens when you try to do that.

    If there’s a private site configured with that name on nginx and it’s configured without any ACLs, nginx will happily return the content of whatever is at the server name requested.

    Like I said, it’s certainly an edge case that requires you to have knowledge of your target, but at the same time, how many people will just name their, as an example, vaultwarden install as vaultwarden.private.domain.com?

    You could write a script that’ll recon through various permuatations of high-value targets and have it make a couple hundred curl attempts to come up with a nice clean list of reconned and possibly vulnerable targets.




  • That’s the gotcha that can bite you: if you’re sharing internal and external sites via a split horizon nginx config, and it’s accessible over the public internet, then the actual IP defined in DNS doesn’t actually matter.

    If the attacker can determine that secret.local.mydomain.com is a valid server name, they can request it from nginx even if it’s got internal-only dns by including the header of that domain in their request, as an example, in curl like thus:

    curl --header 'Host: secret.local.mydomain.com' https://your.public.ip.here -k

    Admittedly this requires some recon which means 99.999% of attackers are never even going to get remotely close to doing this, but it’s an edge case that’s easy to work against by ACLs, and you probably should when doing split horizon configurations.










  • One thing to be careful of that I don’t see mentioned is you need to setup ACLs for any local-only services that are accessible via a web server that’s public.

    If you’re using the standard name-based hosting in say, nginx, and set up two domains publicsite.mydomain.com and secret.local.mydomain.com, anyone who figures out what the name of your private site is can simply use curl with a Host: header and request the internal one if you haven’t put up some ACLs to prevent it from being accessed.

    You’d want to use an allow/deny configuration to limit the blowback, something like

    allow internal.ip.block.here/24; deny all;

    in your server block so that local clients can request it, but everyone else gets told to fuck off.



  • I’ll be the contrary one: I tried a lot of things and ended up, eventually, going back to Nextclolud, simply because it’s extendable and can add more shit to do things as you need it.

    File sync and images may be all you need now, but let’s say in the future you want to dump Google Docs, or add calendar and contact syncing, or notes, or to do lists, or hosting your own bookmark sync app, or integrating webmail, or…

    It’s got a lot of flaws, to be sure, but the ability to make it essentially do every task you might want cloud syncing with to at least a level of ‘good enough’, has pretty much kept me on it.