|
368 | 368 | "SecRule ARGS \"@detectSQLi\" \"id:1208,phase:2,capture,pass,t:trim,setvar:tx.sqli_hit=1\"", |
369 | 369 | "SecRule TX:sqli_hit \"@eq 1\" \"id:2208,phase:2,deny,status:403\"" |
370 | 370 | ] |
| 371 | + }, |
| 372 | + { |
| 373 | + "enabled": 1, |
| 374 | + "version_min": 300000, |
| 375 | + "client": { |
| 376 | + "ip": "200.249.12.31", |
| 377 | + "port": 123 |
| 378 | + }, |
| 379 | + "server": { |
| 380 | + "ip": "200.249.12.31", |
| 381 | + "port": 80 |
| 382 | + }, |
| 383 | + "response": { |
| 384 | + "headers": { |
| 385 | + "Date": "Mon, 13 Jul 2015 20:02:41 GMT", |
| 386 | + "Last-Modified": "Sun, 26 Oct 2014 22:33:37 GMT", |
| 387 | + "Content-Type": "text/html", |
| 388 | + "Content-Length": "8" |
| 389 | + }, |
| 390 | + "body": [ |
| 391 | + "no need." |
| 392 | + ] |
| 393 | + }, |
| 394 | + "title": "Testing Operator :: @detectSQLi :: capture stores fingerprint in TX.0", |
| 395 | + "request": { |
| 396 | + "headers": { |
| 397 | + "Host": "localhost", |
| 398 | + "User-Agent": "curl/7.38.0", |
| 399 | + "Accept": "*/*", |
| 400 | + "Content-Length": "61", |
| 401 | + "Content-Type": "application/x-www-form-urlencoded" |
| 402 | + }, |
| 403 | + "uri": "/", |
| 404 | + "method": "POST", |
| 405 | + "body": [ |
| 406 | + "param1=ascii(substring(version() from 1 for 1))¶m2=value2" |
| 407 | + ] |
| 408 | + }, |
| 409 | + "expected": { |
| 410 | + "http_code": 403 |
| 411 | + }, |
| 412 | + "rules": [ |
| 413 | + "SecRuleEngine On", |
| 414 | + "SecRule ARGS \"@detectSQLi\" \"id:1209,phase:2,capture,pass,t:trim,setvar:tx.sqli_hit=1\"", |
| 415 | + "SecRule TX:0 \"@streq f(f(f\" \"id:2209,phase:2,deny,status:403\"" |
| 416 | + ] |
| 417 | + }, |
| 418 | + { |
| 419 | + "enabled": 1, |
| 420 | + "version_min": 300000, |
| 421 | + "client": { |
| 422 | + "ip": "200.249.12.31", |
| 423 | + "port": 123 |
| 424 | + }, |
| 425 | + "server": { |
| 426 | + "ip": "200.249.12.31", |
| 427 | + "port": 80 |
| 428 | + }, |
| 429 | + "response": { |
| 430 | + "headers": { |
| 431 | + "Date": "Mon, 13 Jul 2015 20:02:41 GMT", |
| 432 | + "Last-Modified": "Sun, 26 Oct 2014 22:33:37 GMT", |
| 433 | + "Content-Type": "text/html", |
| 434 | + "Content-Length": "8" |
| 435 | + }, |
| 436 | + "body": [ |
| 437 | + "no need." |
| 438 | + ] |
| 439 | + }, |
| 440 | + "title": "Testing Operator :: @detectSQLi :: no capture keeps TX.0 unchanged", |
| 441 | + "request": { |
| 442 | + "headers": { |
| 443 | + "Host": "localhost", |
| 444 | + "User-Agent": "curl/7.38.0", |
| 445 | + "Accept": "*/*", |
| 446 | + "Content-Length": "61", |
| 447 | + "Content-Type": "application/x-www-form-urlencoded" |
| 448 | + }, |
| 449 | + "uri": "/", |
| 450 | + "method": "POST", |
| 451 | + "body": [ |
| 452 | + "param1=ascii(substring(version() from 1 for 1))¶m2=value2" |
| 453 | + ] |
| 454 | + }, |
| 455 | + "expected": { |
| 456 | + "http_code": 403 |
| 457 | + }, |
| 458 | + "rules": [ |
| 459 | + "SecRuleEngine On", |
| 460 | + "SecRule ARGS \"@detectSQLi\" \"id:1210,phase:2,pass,t:trim,setvar:tx.sqli_hit=1\"", |
| 461 | + "SecRule TX:0 \"@streq f(f(f\" \"id:2210,phase:2,deny,status:409\"", |
| 462 | + "SecRule TX:sqli_hit \"@eq 1\" \"id:2211,phase:2,deny,status:403\"" |
| 463 | + ] |
371 | 464 | } |
372 | 465 | ] |
0 commit comments