admin1987
Goto Top

Server-Side Request Forgery Apache Proxy

Hallo Zusammen,

Thema: Server-Side Request Forgery beim apache Proxy

ich möchte den Proxy-Server gerne etwas absichern, dass es nicht möglich ist, damit auf andere Ressourcen zuzugreifen.

Apache (2.4.54) unter Debian 11.6.

Aktuell kann man mit

https://service.domain.de/.domain2/test

den Proxy-Server dazu bringen, auf andere Web-Ressourcen zuzugreifen und die ursprünglichen Inhalte an diese auszuliefern.

Die Config schaut wie folgt aus:


# HTTP
<VirtualHost *:85>

  ServerName service.domain.de


  # Logging
  LogLevel warn
  ErrorLog ${APACHE_LOG_DIR}/service.domain.de-error_log
  CustomLog ${APACHE_LOG_DIR}/service.domain.de-access_log combined

 
  # HSTS (optional)
  Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"  
  # Remove this if you need to use frames or iframes
  Header always set X-Frame-Options DENY
  # Prevent MIME based attacks
  Header set X-Content-Type-Options "nosniff"  

  # Reverse proxy configuration
 <Location />
    ProxyPass http://standard-webseite.de
    ProxyPassReverse http:///standard-webseite.de
  </Location>

<Location "/api/1234567890">  
	ProxyPass http://10.20.230.13:81/api
	ProxyPassReverse http://10.20.230.13:81
</Location>

<Location "/api/5555555555">  
	ProxyPass http://10.20.230.14:81/api
	ProxyPassReverse http://10.20.230.14:81
</Location>



</VirtualHost>



Vielen Dank

Content-Key: 5211533714

Url: https://administrator.de/contentid/5211533714

Printed on: April 27, 2024 at 23:04 o'clock