Sicher, hohe Portnummern zu verwenden? (Verdeckung von Web-Services)

17885
SofaKng

Ich habe ein kleines Heimnetzwerk und versuche, den Bedarf an Sicherheit und Komfort ausbalancieren zu müssen. Der sicherste Weg, um interne Webserver zu sichern, besteht darin, nur über VPNs eine Verbindung herzustellen. Dies scheint jedoch übertrieben zu sein, um beispielsweise die entfernte Webschnittstelle eines DVR zu schützen.

Wäre es als Kompromiss besser, sehr große Portnummern zu verwenden? (zB fünf Ziffern bis 65531)

Ich habe gelesen, dass Port-Scanner normalerweise nur die ersten 10.000 Ports scannen, daher ist die Verwendung sehr hoher Port-Nummern etwas sicherer.

Ist das wahr?

Gibt es bessere Möglichkeiten, Webserver zu schützen? (zB web guis für anwendungen)

9
Nein, das ist nicht wahr. Moderne (auch Desktop-) Multi-Core-CPU-Maschinen mit Breitbandzugang können alle 65535-Ports in Sekunden scannen. Und selbst wenn der Angreifer beschlossen hat, sie auf zwei Sekunden zu verteilen, um DoS-Tore zu durchkreuzen, wen kümmert das, Sie lassen Ihr System länger als einen Tag laufen, oder? Eine alte Maxime ist, wie andere unten gesagt haben, dass "Sicherheit durch Unklarheit" in der digitalen Welt grundsätzlich nutzlos ist. msanford vor 13 Jahren 0

4 Antworten auf die Frage

9
Stefan Lasiewski

I've read that port scanners typically only scan the first 10,000 ports so using very high port numbers is a bit more secure.

Many people believe this. I don't.

Maybe it's a bit more secure, but not much. The low numbered ports are more common, so some scanners will look there first.

If I was a cracker, I would scan the high ports first, just to catch people who rely on this method for security. People who rely on security-through-obscurity probably have a poor understanding of security, and are more likely to forget to use other security methods. Therefore, those services might be more vulnerable, and easier to crack.

Some scanners exploit this believe, and start at the top and work their way down the list. Other scans will pick random ports throughout the entire range, so all ports have an equal chance of being scanned.

Go ahead and test this yourself using NMAP. Run an nmap scan against ports 1-10,000 and look for a HTTP server, and compare that against a scan which scans against all 1-65,xxx ports. You'll see that the difference is typically 3-10 minutes. If I make a detailed scan using something like Nessus, the difference is sometimes 20-60 minutes.

A good cracker is a patient cracker. They will wait.

Wäre es besser oder schlechter, die Portnummern zu verschleiern, wenn alle anderen relevanten Sicherheitsmaßnahmen umgesetzt wurden? Meiner Meinung nach wäre es etwas besser, wenn der Server nicht speziell anvisiert wäre. wag2639 vor 13 Jahren 1
+1 "Ein guter Cracker ist ein geduldiger Cracker. Sie werden warten." msanford vor 13 Jahren 2
@ wag2639 Sie ändern nichts wirklich, indem Sie die Portnummer eines Dienstes ändern, aber ein Skript-Kiddie ein etwas besseres Skript suchen lassen. Das Wählen eines Blockes von IPs und des ALSO-Portscanners, bei dem jeder Port gescannt wird, ist trivial. msanford vor 13 Jahren 0
3
Antoine Benkemoun

Using odd port numbers is no security at all unless you're waging the fact that it's allowing you to run your application as a non-root user.

This sort of thing can be considered as security by obscurity but it's not actually security.

Gibt es Alternativen zur Verwendung eines ausgewachsenen VPNs? Vielleicht eine Art Reverse-Web-Proxy, das zusätzlichen Login / Passwortschutz hat? (Tintenfisch tut das nicht) SofaKng vor 13 Jahren 0
@sofakng: Möglicherweise interessieren Sie sich für einen SSL-Wrapper wie Stunnel: http: //www.stunnel.org/ Maxwell vor 13 Jahren 0
3
Sam Halicke

You can also use an ssh tunnel if you're using Linux on both ends:

ssh -f -N -L 9090:localhost:9090 user@remote-host

For example, that is what I use to forward port 9090 on the remote host to my local port 9090 for cherokee-admin, and I use similar setups for other web GUIs. You can protect applications in this way by specifying in the app configuration that they only run on localhost, i.e. on 127.0.0.1. In this way they aren't reachable from outside, but you can forward them with ssh. Check man ssh for more options using port forwarding (including X, which might solve your problem in another way entirely.)

This might be a suitable way to achieve your goal without installing / configuring additional software, depending on your setup.

1
Maxwell

If your firewall permits it you can make the authentification happen at the firewall level first, if your passwords complexity is good enought, that should enforce the security of the services exposed. you can also use SSL tunneling using for example stunnel and mutual auth.

Considering the fact that using higher ports number is more secure, in a certain way, maybe in reference to bots scanning your IP and trying some exploits, but if someone wants really to breack in, using higher ports numbers will not provide an increased security.

Ich verwende pfsense und einige meiner Webdienste verfügen über integrierte SSL (HTTPS) -Unterstützung. Ist es noch besser, stunnel zu benutzen? Ist die Verwendung von stunnel der Stufe "Authentifizierung bei der Firewall"? SofaKng vor 13 Jahren 0
Wie machen Sie "Authentifizierung an der Firewall"? wag2639 vor 13 Jahren 1
Ich weiß nicht, ob pfsense diese Funktionalität hat, aber auf Junipers-Routern können Sie lokale Benutzer (sogar RADIUS) verwenden, um Zugriff auf den HTTP-übersetzten Datenverkehr zu gewähren. In Bezug auf Stunnel können Sie die gegenseitige Authentifizierung mit Zertifikaten verwenden. Stunnel kapselt den HTTP-Verkehr mit SSL und behandelt die Authentifizierung. Maxwell vor 13 Jahren 0