Problem mit mod_security - leere Seiten werde ausgegeben

Apache, Lighttpd, nginx, Cherokee
Post Reply
weally
Posts: 32
Joined: 2004-09-13 19:25
 

Problem mit mod_security - leere Seiten werde ausgegeben

Post by weally »

Hallo,

ich habe ein Problem mit der mod_security Installation und zwar werden nur leere Seiten ausgegeben :roll:

Installiert habe ich mod_security mit:

Code: Select all

- apxs2 -cia mod_security.c

- vi /etc/sysconfig/apache2 
  --> APACHE_MODULES mit "security" erweitert

- cd /usr/lib/apache2/apache2-prefork

- ln -s ../apache2/mod_security.so mod_security.so

- mod_security.conf erstellt unter /etc/apache2/conf.d/

- in der httpd.conf:
  --> Include /etc/apache2/conf.d/mod_security.conf eingetragen

- goroot Regeln eingetragen:
  --> Include /etc/modsecurity/regeln
Anschließend den Apache neugestartet, aber es werden nur leere Seiten ausgegeben

Vielleicht könnt ihr mir helfen?

Danke

weally

System: Suse 9.2 / Apache 2.2.0
timeless2
Posts: 415
Joined: 2005-03-04 14:45
Location: Paris
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by timeless2 »

Schau mal in deine Logdateien, wenn du das mod_security ordentlich eingestellt hat, bekommst du raus, welche Regel da greift.
weally
Posts: 32
Joined: 2004-09-13 19:25
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by weally »

In den mod-sec Log-Dateien steht leider gar nichts drin :roll:
lord_pinhead
Posts: 774
Joined: 2004-04-26 15:57
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by lord_pinhead »

Welche Regeln hast du eingefügt?
weally
Posts: 32
Joined: 2004-09-13 19:25
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by weally »

Eigentlich nur die von gotroot:

ich poste mal die mod_security.conf Datei

Code: Select all

<IfModule mod_security.c>

# Only inspect dynamic requests
# (YOU MUST TEST TO MAKE SURE IT WORKS AS EXPECTED)
#SecFilterEngine DynamicOnly

SecFilterEngine On

# Reject requests with status 500
SecFilterDefaultAction "deny,log,status:500"

# Some sane defaults
SecFilterScanPOST On
SecFilterCheckURLEncoding On
SecFilterCheckCookieFormat On
SecFilterCheckUnicodeEncoding Off
SecFilterNormalizeCookies On
# enable version 1 (RFC 2965) cookies
SecFilterCookieFormat 1

SecServerResponseToken Off

#If you want to scan the output, uncomment these
#SecFilterScanOutput On
#SecFilterOutputMimeTypes "(null) text/html text/plain"

# Accept almost all byte values
SecFilterForceByteRange 1 255

# Server masking is optional
#fake server banner - NOYB used - no one needs to know what we are using
SecServerSignature "Webplatz"

SecUploadDir /tmp
SecUploadKeepFiles Off

# Only record the interesting stuff
SecAuditEngine RelevantOnly
SecAuditLog /var/log/apache2/modsec_audit.log

# You normally won't need debug logging
SecFilterDebugLevel 0
SecFilterDebugLog /var/log/apache2/modsec_debug_log

#And now, the rules
#Remove any of these Include lines you do not use or have rules for.

#First, add in your exclusion rules:
#These MUST come first!
Include /etc/modsecurity/exclude.conf

#Application protection rules
Include /etc/modsecurity/rules.conf

#Comment spam rules
#Include /etc/modsecurity/blacklist.conf

#Bad hosts, bad proxies and other bad players
#Include /etc/modsecurity/blacklist2.conf

#Bad clients, known bogus useragents and other signs of malware
Include /etc/modsecurity/useragents.conf

#Known bad software, rootkits and other malware
Include /etc/modsecurity/rootkits.conf

#Signatures to prevent proxying through your server
#only rule these rules if your server is NOT a proxy
Include /etc/modsecurity/proxy.conf

#Additional rules for Apache 2.x ONLY! Do not add this line if you use Apache 1.x
Include /etc/modsecurity/apache2-rules.conf
</IfModule>
Habs auch schon versucht wenn ich die gotroot-Regeln weg lasse, das Ergebnis bleibt aber das gleiche -> leere Seite beim Aufruf einer Webseite.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by Joe User »

Was steht in der mod_security.conf? Welche gotroot-pakete verwendest Du und warum?

EDIT: Zu spät...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
weally
Posts: 32
Joined: 2004-09-13 19:25
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by weally »

Es werden derzeit folgende Regeln von gotroot verwendet:

apache2-rules.conf
proxy.conf
useragents.conf
rootkits.conf
rules.conf
exclude.conf

Aber wie gesagt auch wenn ich diese ausklammere hat dies keinen Effekt, es werden nur leere Seiten ausgegeben.
buddaaa
Posts: 163
Joined: 2004-11-08 09:59
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by buddaaa »

weally wrote:Es werden derzeit folgende Regeln von gotroot verwendet:

apache2-rules.conf
proxy.conf
useragents.conf
rootkits.conf
rules.conf
exclude.conf
fuer die menscheit: in rules.conf ist eine regel die probleme mit DAV macht (und in badips.conf ist es dummerweise eine substring-suche, d.h. wenn 1.2.3.4 als boese drinsteht darf 1.2.3.44 auch nicht).
Aber wie gesagt auch wenn ich diese ausklammere hat dies keinen Effekt, es werden nur leere Seiten ausgegeben.
steht was im error_log vom apache ? was passiertn bei "telnet localhost 80" und dann "GET / HTTP/1.0" ?
weally
Posts: 32
Joined: 2004-09-13 19:25
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by weally »

In der Log-Datei steht nur:
[notice] mod_security/1.9.3 configured - Apache/2.2.0 (Linux/SUSE)
hab mod_security nun nochmals installiert, jetzt erhalte ich zwar keine leeren Seiten mehr aber dafür wird die Datei zum Download angeboten wenn ich z.B. die index.php aufrufe :(
buddaaa
Posts: 163
Joined: 2004-11-08 09:59
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by buddaaa »

weally wrote:In der Log-Datei steht nur:

hab mod_security nun nochmals installiert, jetzt erhalte ich zwar keine leeren Seiten mehr aber dafür wird die Datei zum Download angeboten wenn ich z.B. die index.php aufrufe :(
und wenn Du mod_security wieder auskommentierst ist es wieder ok ?
weally
Posts: 32
Joined: 2004-09-13 19:25
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by weally »

ja dann läuft alles normal
buddaaa
Posts: 163
Joined: 2004-11-08 09:59
 

Re: Problem mit mod_security - leere Seiten werde ausgegeben

Post by buddaaa »

weally wrote:ja dann läuft alles normal
und was passiert wenn mod_security an ist, aber keine regeln definiert sind ?
Post Reply