banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Hỏi về test Mod_Security  XML
  [Question]   Hỏi về test Mod_Security 06/04/2011 15:54:36 (+0700) | #1 | 234898
[Avatar]
Michael_Scotfield
Member

[Minus]    0    [Plus]
Joined: 12/10/2009 02:23:16
Messages: 43
Location: Fox River Prison
Offline
[Profile] [PM]
Em đã setup xong mod_security, và tạo thử 1 rule đơn giản để test thử :
SecRule ARGS abc "phase:1,log,deny,status:503"
 


Nhưng khi truy cập vào server thì vẫn bình thường, không hiện lên status error 503, mặc dù audit log vẫn phát hiện và báo trùng rule ?
--1a203d52-A--
[06/Apr/2011:16:51:24 +0700] TZw3nH8AAQEAACawDO0AAABA 192.168.25.80 20062 192.168.25.90 80
--1a203d52-B--
GET /?test=abc HTTP/1.1
Host: 192.168.25.90
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
If-None-Match: "4163d-b1-4a03b3c0facd4"
If-Modified-Since: Wed, 06 Apr 2011 07:49:38 GMT

--1a203d52-F--
HTTP/1.1 304 Not Modified
Last-Modified: Wed, 06 Apr 2011 07:49:38 GMT
ETag: "4163d-b1-4a03b3c0facd4"
Accept-Ranges: bytes
Content-Length: 0
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=94
Connection: Keep-Alive
Content-Type: text/html

--1a203d52-E--

--1a203d52-H--
Message: Warning. Pattern match "abc" at ARGS:test. [file "/opt/modsecurity/etc/modsecurity.conf"] [line "28"]
Stopwatch: 1302083484907582 37118 (36600 36603 -)
Response-Body-Transformed: Dechunked
Producer: ModSecurity for Apache/2.5.13 http://www.modsecurity.org/).
Server: Apache/2.2.16 (Ubuntu)

--1a203d52-K--
SecRule "ARGS" "@rx abc" "phase:1,auditlog,log,deny,status:503"

--1a203d52-Z--
 


Thật sự thì em chỉ mới setup đuơc chứ chưa nắm rõ rule, em chỉ muốn test thử xem mod_security đã hoạt động chưa không thôi, nên nếu em sai xót chổ nào ace góp ý giùm
Em cám ơn
Breaking!!!!!
[Up] [Print Copy]
  [Question]   Hỏi về test Mod_Security 09/04/2011 08:14:57 (+0700) | #2 | 235117
[Avatar]
Michael_Scotfield
Member

[Minus]    0    [Plus]
Joined: 12/10/2009 02:23:16
Messages: 43
Location: Fox River Prison
Offline
[Profile] [PM]
Xin lổi mọi người, do làm theo tut mà chưa hiểu hết các option nên SecRule Engine đang bật ở chế độ DetectOnly, em đã sửa lạ và đã test được mod_security smilie
Breaking!!!!!
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|