-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ModSecurityIIS: PHP Injection Attack (958976) protection does not work #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Original reporter: akurmi |
akurmi: ModSecurity rule set |
gregw: The reason why these rules return 200 is because they have 'capture' action in them. Change it to 'deny' and everything works. == Info: About to connect() to 127.0.0.1 port 80 (#0) Server Er |
Mod 0cb0: 75 6c 65 3c 2f 74 68 3e 3c 74 64 3e 4d 6f 64 53 ule | ModS 0cc0: 65 63 75 72 69 74 79 49 49 53 3c 2f 74 64 3e 3c ecurityIIS |
---|---|
BeginRequ 0d00: 65 73 74 3c 2f 74 64 3e 3c 2f 74 72 3e 20 0a 20 est | |
Handler</ 0d30: 74 68 3e 3c 74 64 3e 50 61 67 65 48 61 6e 64 6c th> | PageHandl 0d40: 65 72 46 61 63 74 6f 72 79 2d 49 6e 74 65 67 72 erFactory-Integr 0d50: 61 74 65 64 2d 34 2e 30 3c 2f 74 64 3e 3c 2f 74 ated-4.0 |
0d70: 45 72 72 6f 72 20 43 6f 64 65 3c 2f 74 68 3e 3c Error Code |
0db0: 64 69 76 3e 20 0a 20 20 3c 64 69 76 20 69 64 3d div> . <div id=
0dc0: 22 64 65 74 61 69 6c 73 2d 72 69 67 68 74 22 3e "details-right">
0dd0: 20 0a 20 20 20 3c 74 61 62 6c 65 20 62 6f 72 64 . <table bord
0de0: 65 72 3d 22 30 22 20 63 65 6c 6c 70 61 64 64 69 er="0" cellpaddi
0df0: 6e 67 3d 22 30 22 20 63 65 6c 6c 73 70 61 63 69 ng="0" cellspaci
0e00: 6e 67 3d 22 30 22 3e 20 0a 20 20 20 20 3c 74 72 ng="0"> . <tr
0e10: 20 63 6c 61 73 73 3d 22 61 6c 74 22 3e 3c 74 68 class="alt"><th
0e20: 3e 52 65 71 75 65 73 74 65 64 20 55 52 4c 3c 2f >Requested URL</
0e30: 74 68 3e 3c 74 64 3e 68 74 74 70 3a 2f 2f 31 32 th>http://12
0e40: 37 2e 30 2e 30 2e 31 3a 38 30 2f 74 65 73 74 2e 7.0.0.1:80/test.
0e50: 61 73 70 78 3c 2f 74 64 3e 3c 2f 74 72 3e 20 0a aspx .
0e60: 20 20 20 20 3c 74 72 3e 3c 74 68 3e 50 68 79 73 Phys
0e70: 69 63 61 6c 20 50 61 74 68 3c 2f 74 68 3e 3c 74 ical Path<t
0e80: 64 3e 43 3a 5c 69 6e 65 74 70 75 62 5c 77 77 77 d>C:\inetpub\www
0e90: 72 6f 6f 74 5c 74 65 73 74 2e 61 73 70 78 3c 2f root\test.aspx</
0ea0: 74 64 3e 3c 2f 74 72 3e 20 0a 20 20 20 20 3c 74 td> . <t
0eb0: 72 20 63 6c 61 73 73 3d 22 61 6c 74 22 3e 3c 74 r class="alt"><t
0ec0: 68 3e 4c 6f 67 6f 6e 20 4d 65 74 68 6f 64 3c 2f h>Logon Method</
0ed0: 74 68 3e 3c 74 64 3e 4e 6f 74 20 79 65 74 20 64 th>Not yet d
0ee0: 65 74 65 72 6d 69 6e 65 64 3c 2f 74 64 3e 3c 2f etermined</
0ef0: 74 72 3e 20 0a 20 20 20 20 3c 74 72 3e 3c 74 68 tr> . <th
0f00: 3e 4c 6f 67 6f 6e 20 55 73 65 72 3c 2f 74 68 3e >Logon User
0f10: 3c 74 64 3e 4e 6f 74 20 79 65 74 20 64 65 74 65 Not yet dete
0f20: 72 6d 69 6e 65 64 3c 2f 74 64 3e 3c 2f 74 72 3e rmined
0f30: 20 0a 20 20 20 20 20 0a 20 20 20 3c 2f 74 61 62 . . </tab
0f40: 6c 65 3e 20 0a 20 20 20 3c 64 69 76 20 63 6c 61 le> . <div cla
0f50: 73 73 3d 22 63 6c 65 61 72 22 3e 3c 2f 64 69 76 ss="clear"></div
0f60: 3e 20 0a 20 20 3c 2f 64 69 76 3e 20 0a 20 3c 2f > .
0f70: 66 69 65 6c 64 73 65 74 3e 20 0a 3c 2f 64 69 76 fieldset> .</div
0f80: 3e 20 0a 3c 64 69 76 20 63 6c 61 73 73 3d 22 63 > .
0fb0: 6c 65 67 65 6e 64 3e 4d 6f 73 74 20 6c 69 6b 65 legend>Most like
0fc0: 6c 79 20 63 61 75 73 65 73 3a 3c 2f 6c 65 67 65 ly causes:</lege
0fd0: 6e 64 3e 20 0a 20 20 3c 75 6c 3e 20 09 3c 6c 69 nd> .
- .<li
0fe0: 3e 54 68 69 73 20 69 73 20 61 20 67 65 6e 65 72 >This is a gener
0ff0: 69 63 20 34 30 33 20 65 72 72 6f 72 20 61 6e 64 ic 403 error and
1000: 20 6d 65 61 6e 73 20 74 68 65 20 61 75 74 68 65 means the authe
1010: 6e 74 69 63 61 74 65 64 20 75 73 65 72 20 69 73 nticated user is
1020: 20 6e 6f 74 20 61 75 74 68 6f 72 69 7a 65 64 20 not authorized
1030: 74 6f 20 76 69 65 77 20 74 68 65 20 70 61 67 65 to view the page
1040: 2e 3c 2f 6c 69 3e 20 3c 2f 75 6c 3e 20 0a 20 3c .
1050: 2f 66 69 65 6c 64 73 65 74 3e 20 0a 3c 2f 64 69 /fieldset> .</di
1060: 76 3e 20 0a 3c 64 69 76 20 63 6c 61 73 73 3d 22 v> .
1090: 3c 6c 65 67 65 6e 64 3e 54 68 69 6e 67 73 20 79 Things y
10a0: 6f 75 20 63 61 6e 20 74 72 79 3a 3c 2f 6c 65 67 ou can try:</leg
10b0: 65 6e 64 3e 20 0a 20 20 3c 75 6c 3e 20 09 3c 6c end> .
- .<l
10c0: 69 3e 43 72 65 61 74 65 20 61 20 74 72 61 63 69 i>Create a traci
10d0: 6e 67 20 72 75 6c 65 20 74 6f 20 74 72 61 63 6b ng rule to track
10e0: 20 66 61 69 6c 65 64 20 72 65 71 75 65 73 74 73 failed requests
10f0: 20 66 6f 72 20 74 68 69 73 20 48 54 54 50 20 73 for this HTTP s
1100: 74 61 74 75 73 20 63 6f 64 65 2e 20 46 6f 72 20 tatus code. For
1110: 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e more information
1120: 20 61 62 6f 75 74 20 63 72 65 61 74 69 6e 67 20 about creating
1130: 61 20 74 72 61 63 69 6e 67 20 72 75 6c 65 20 66 a tracing rule f
1140: 6f 72 20 66 61 69 6c 65 64 20 72 65 71 75 65 73 or failed reques
1150: 74 73 2c 20 63 6c 69 63 6b 20 3c 61 20 68 72 65 ts, click <a hre
1160: 66 3d 22 68 74 74 70 3a 2f 2f 67 6f 2e 6d 69 63 f="http://go.mic
1170: 72 6f 73 6f 66 74 2e 63 6f 6d 2f 66 77 6c 69 6e rosoft.com/fwlin
1180: 6b 2f 3f 4c 69 6e 6b 49 44 3d 36 36 34 33 39 22 k/?LinkID=66439"
1190: 3e 68 65 72 65 3c 2f 61 3e 2e 20 3c 2f 6c 69 3e >here.
11a0: 20 3c 2f 75 6c 3e 20 0a 20 3c 2f 66 69 65 6c 64
11b0: 73 65 74 3e 20 0a 3c 2f 64 69 76 3e 20 0a 20 0a set> .
11c0: 20 0a 3c 64 69 76 20 63 6c 61 73 73 3d 22 63 6f .<div class="co
11d0: 6e 74 65 6e 74 2d 63 6f 6e 74 61 69 6e 65 72 22 ntent-container"
11e0: 3e 20 0a 20 3c 66 69 65 6c 64 73 65 74 3e 3c 6c > . <l
11f0: 65 67 65 6e 64 3e 4c 69 6e 6b 73 20 61 6e 64 20 egend>Links and
1200: 4d 6f 72 65 20 49 6e 66 6f 72 6d 61 74 69 6f 6e More Information
1210: 3c 2f 6c 65 67 65 6e 64 3e 20 0a 20 20 54 68 69 . Thi
1220: 73 20 67 65 6e 65 72 69 63 20 34 30 33 20 65 72 s generic 403 er
1230: 72 6f 72 20 6d 65 61 6e 73 20 74 68 61 74 20 74 ror means that t
1240: 68 65 20 61 75 74 68 65 6e 74 69 63 61 74 65 64 he authenticated
1250: 20 75 73 65 72 20 69 73 20 6e 6f 74 20 61 75 74 user is not aut
1260: 68 6f 72 69 7a 65 64 20 74 6f 20 75 73 65 20 74 horized to use t
1270: 68 65 20 72 65 71 75 65 73 74 65 64 20 72 65 73 he requested res
1280: 6f 75 72 63 65 2e 20 41 20 73 75 62 73 74 61 74 ource. A substat
1290: 75 73 20 63 6f 64 65 20 69 6e 20 74 68 65 20 49 us code in the I
12a0: 49 53 20 6c 6f 67 20 66 69 6c 65 73 20 73 68 6f IS log files sho
12b0: 75 6c 64 20 69 6e 64 69 63 61 74 65 20 74 68 65 uld indicate the
12c0: 20 72 65 61 73 6f 6e 20 66 6f 72 20 74 68 65 20 reason for the
12d0: 34 30 33 20 65 72 72 6f 72 2e 20 49 66 20 61 20 403 error. If a
12e0: 73 75 62 73 74 61 74 75 73 20 63 6f 64 65 20 64 substatus code d
12f0: 6f 65 73 20 6e 6f 74 20 65 78 69 73 74 2c 20 75 oes not exist, u
1300: 73 65 20 74 68 65 20 73 74 65 70 73 20 61 62 6f se the steps abo
1310: 76 65 20 74 6f 20 67 61 74 68 65 72 20 6d 6f 72 ve to gather mor
1320: 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 e information ab
1330: 6f 75 74 20 74 68 65 20 73 6f 75 72 63 65 20 6f out the source o
1340: 66 20 74 68 65 20 65 72 72 6f 72 2e 20 0a 20 20 f the error. .
1350: 3c 70 3e 3c 61 20 68 72 65 66 3d 22 68 74 74 70
V
13b0: 69 65 77 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 iew more informa
13c0: 74 69 6f 6e 20 26 72 61 71 75 6f 3b 3c 2f 61 3e tion »
13d0: 3c 2f 70 3e 20 0a 20 20 20 0a 20 3c 2f 66 69 65
13e0: 6c 64 73 65 74 3e 20 0a 3c 2f 64 69 76 3e 20 0a ldset> .
13f0: 3c 2f 64 69 76 3e 20 0a 3c 2f 62 6f 64 79 3e 20 .
1400: 0a 3c 2f 68 74 6d 6c 3e 20 0a . .
== Info: Closing connection #0
MODSEC-346: ModSecurity rule set:
#
# PHP injection
#
WCAT Scenario:
transaction
{
id = "PHP Injection Attack (958976) 1";
weight = 100;
Web server returns 200 instead of 403.
The text was updated successfully, but these errors were encountered: