Hallo, habe meine Seite mit den empfohlenen htaccess Dateien ausgestattet. Nun lese ich Pros und Contras im Netz hinsichtlich Security Plugins wie das Better WP Security. Hoffe ihr habt Tipps und Empfehlungen zum Thema
Empfehlung Sicherheits Plugins
-
-
- Gerade eben
- Anzeige
Hallo!
Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.
- ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
- ✔️ Deutsche Server & DSGVO-konform
- ✔️ Persönlicher Support (kein 0815-Ticket-System)
-
habe meine Seite mit den empfohlenen htaccess Dateien ausgestattet.gut!
Dann zeige mal den Inhalt
von
~/.htaccess
~/wp-admin/.htaccess
~/wp-content/uploads/.htaccess
usw.und verrate uns deine Apache Version. Pfade selbstverständlich nicht. auch keine Butzernamen oder IP Adressen!
Hoffe ihr habt Tipps und Empfehlungen zum ThemaSicherheit würde nur Experten überlassen. Ein PHP Entwickler geht anders an das Thema als ein System-Admin. Vor diesem Hintergrund würde ich nur eine Agentur beauftragen, die Mitarbeiter hat, die sich durch Schulungen auf das Thema spezialisiert haben.
Plugins bringen _nichts_ wenn man nicht ihnen nicht umgehen kann.
-
hi r23,
/.htaccess
Apache Configuration
Alles anzeigen<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> # Kompression aktivieren by FileType <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript </IfModule> # BEGINN CACHIFY <IfModule mod_rewrite.c> # ENGINE ON RewriteEngine On # GZIP FILE <IfModule mod_mime.c> RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_URI} !^/wp-admin/.* RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_ RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html.gz -f RewriteRule ^(.*) /wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html.gz [L] AddType text/html .gz AddEncoding gzip .gz </IfModule> # HTML FILE RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_URI} !^/wp-admin/.* RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_ RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html -f RewriteRule ^(.*) /wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html [L] </IfModule> # END CACHIFY # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # Zugriff auf .htaccess und .htpasswd verbieten, falls in Benutzung <FilesMatch "(\.htaccess)"> Order deny,allow Deny from all </FilesMatch> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ## # Block the include-only files. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] </IfModule> # 1 YEAR <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$"> Header set Cache-Control "public" Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT" Header unset Last-Modified Header set Connection keep-alive </FilesMatch> <Files xmlrpc.php> Order Deny,Allow Deny from all </Files> php_flag display_errors Off Options All -Indexes <files install.php> Order allow,deny Deny from all </files> <files wp-config.php> Order allow,deny Deny from all </files> <files wp-config-sample.php> Order allow,deny Deny from all </files> <files readme.html> Order Allow,Deny Deny from all Satisfy all </Files> <Files liesmich.html> Order Allow,Deny Deny from all Satisfy all </Files> <files error_log> Order allow,deny Deny from all </files> <files .htaccess> order allow,deny deny from all </files> <files *.sql> order allow,deny deny from all </files> <files *.txt> Order allow,deny Deny from all </files> <files license.txt> Order allow,deny Deny from all </files> # Keine URL based exploits zulassen RedirectMatch 403 \[ <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Double slashes in allen URLs verbieten RewriteCond %{THE_REQUEST} ^[A-Z]+\ /(([^/\ ]+/)*)/+([^\ ]*) RewriteRule ^ /%1%3 [L,R=301] </IfModule> # END WordPresswp-admin/.htaccess
Apache ConfigurationAuthName "secure" AuthType Basic AuthUserFile ../wp-admin/.htpasswd require valid-user <Files admin-ajax.php> Order allow,deny Allow from all Satisfy any </Files>wp-conten/uploads/.htaccess
zudem habe ich die htaccess im /wp-content abgesichert
-
Hallo,
du verwendest einen sehr alten Apache - mit aktuellen Versionen funktionieren deine .htaccess leider nicht.
[quote='madmaxy','RE: Empfehlung Sicherheits Plugins']
/.htaccess
Apache Configuration
Alles anzeigen# BEGINN CACHIFY <IfModule mod_rewrite.c> # ENGINE ON RewriteEngine On # GZIP FILE <IfModule mod_mime.c> RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_URI} !^/wp-admin/.* RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_ RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html.gz -f RewriteRule ^(.*) /wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html.gz [L] AddType text/html .gz AddEncoding gzip .gz </IfModule> # HTML FILE RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_URI} !^/wp-admin/.* RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_ RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html -f RewriteRule ^(.*) /wp-content/cache/cachify/%{HTTP_HOST}%{REQUEST_URI}index.html [L] </IfModule> # END CACHIFYbei CACHIFY solltes du die Rechte der Dateien in /wp-content/cache/cachify/%{HTTP_HOST}%
prüfen. Bei mir waren diese mal alle für alle beschreibbar chmod 666 rw- rw- rw-Apache Configuration# Keine URL based exploits zulassen RedirectMatch 403 \[ <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Double slashes in allen URLs verbieten RewriteCond %{THE_REQUEST} ^[A-Z]+\ /(([^/\ ]+/)*)/+([^\ ]*) RewriteRule ^ /%1%3 [L,R=301] </IfModule>ich bevorzuge von Better WP Security-Plugin die Erweiterung
Apache Configuration
Alles anzeigen<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteCond %{SCRIPT_FILENAME} !^(.*)wp-includes/ms-files.php RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK) [NC] RewriteRule ^(.*)$ - [F,L] RewriteCond %{REQUEST_METHOD} POST RewriteCond %{REQUEST_URI} ^(.*)wp-comments-post\.php* RewriteCond %{HTTP_REFERER} !^(.*)us.com.* RewriteCond %{HTTP_REFERER} !^http://jetpack\.wordpress\.com/jetpack-comment/ [OR] RewriteCond %{HTTP_USER_AGENT} ^$ RewriteRule ^(.*)$ - [F,L] RewriteCond %{QUERY_STRING} \.\.\/ [NC,OR] RewriteCond %{QUERY_STRING} ^.*\.(bash|git|hg|log|svn|swp|cvs) [NC,OR] RewriteCond %{QUERY_STRING} etc/passwd [NC,OR] RewriteCond %{QUERY_STRING} boot\.ini [NC,OR] RewriteCond %{QUERY_STRING} ftp\: [NC,OR] RewriteCond %{QUERY_STRING} http\: [NC,OR] RewriteCond %{QUERY_STRING} https\: [NC,OR] RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR] RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR] RewriteCond %{QUERY_STRING} ^.*(\[|\]|\(|\)|<|>|ê|"|;|\?|\*|=$).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*("|'|<|>|\|{||).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(%24&x).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(127\.0).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR] RewriteCond %{QUERY_STRING} ^.*(request|select|concat|insert|union|declare).* [NC] RewriteCond %{QUERY_STRING} !^loggedout=true RewriteCond %{QUERY_STRING} !^action=rp RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$ RewriteCond %{HTTP_REFERER} !^http://maps\.googleapis\.com(.*)$ RewriteRule ^(.*)$ - [F,L] </IfModule> # END Better WP Security[code]
wp-conten/uploads/.htaccessX-XSS-Protection fehlt mir persönlich.
http://blogs.msdn.com/b/ie/archive/2…xss-filter.aspx
http://blogs.msdn.com/b/ieinternals/…ttp-header.aspx
https://www.owasp.org/index.php/Cros…pting_%28XSS%29
https://hackademix.net/2009/11/21/ies…vulnerabilitiesReducing MIME type security risks fehlt mir persönlich
http://www.slideshare.net/hasegawayosuke/owasp-hasegawa
http://blogs.msdn.com/b/ie/archive/2…protection.aspx
https://msdn.microsoft.com/en-us/library/ie/gg622941.aspx
https://mimesniff.spec.whatwg.org/da ich in der Regel Shops betreibe... fehlt mir
http://www.html5rocks.com/en/tutorials/s…layer-security/
https://tools.ietf.org/html/draft-iet…-14#section-6.1
http://blogs.msdn.com/b/ieinternals/…ment-https.aspxContent Security Policy fehlt mir persönlich
http://content-security-policy.com/
http://www.html5rocks.com/en/tutorials/s…ecurity-policy/
http://www.w3.org/TR/CSP11/).Content Security Policy (CSP) ist ein Sicherheitskonzept, um Cross-Site-Scripting und andere Angriffe durch Einschleusen von Daten in Webseiten zu verhindern. Es handelt sich um einen W3C-Draft Arbeitsgruppe zur Sicherheit von Webanwendungen.
CSP wurde ursprünglich von der Mozilla Foundation entworfen und in Firefox 4.0 erstmals experimentell unterstützt.
Clickjacking fehlt mir persönlich
https://cure53.de/xfo-clickjacking.pdf.https://tools.ietf.org/html/rfc7034
http://blogs.msdn.com/b/ieinternals/…me-options.aspx
https://www.owasp.org/index.php/Clickjackingund .well-known würde ich vermutlich filtern
https://tools.ietf.org/html/rfc5785 -
wow,
danke. ich muss das erstmals abarbeiten. So viel Input!! :-)
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!