naxsi icon indicating copy to clipboard operation
naxsi copied to clipboard

I added a rule, but it did not take effect.

Open fushisanlang opened this issue 4 years ago • 4 comments

i need add a rule ,to denied a php request。it like:

MainRule "rx:.php" "mz:ARGS|BODY|URL" "s:$XSS:8" id:10009;

when i request ‘XXX.com/?1.php’,i can get a 403. but when i request 'XXX.com/1.php', I am not denied access。

i want to know is that a bug or a configuration error。

thank you

fushisanlang avatar Jul 24 '20 07:07 fushisanlang

What is the value of CheckRule ?

wargio avatar Jul 24 '20 08:07 wargio

#LearningMode; #Enables learning mode
SecRulesEnabled;
DeniedUrl "/RequestDenied";
include "/usr/local/nginx/conf/wl.conf";
#include "/tmp/naxsi_rules.tmp";
## check rules
CheckRule "$SQL >= 8" BLOCK;
CheckRule "$RFI >= 8" BLOCK;
CheckRule "$TRAVERSAL >= 4" BLOCK;
CheckRule "$XSS >= 8" BLOCK;
CheckRule "$EVADE >= 8" BLOCK;
CheckRule "$UPLOAD >= 8" BLOCK;

fushisanlang avatar Jul 24 '20 08:07 fushisanlang

Try to use MainRule "str:.php" "mz:ARGS|BODY|URL" "s:$XSS:8" id:10009;

wargio avatar Jul 24 '20 08:07 wargio

still not work

fushisanlang avatar Jul 24 '20 08:07 fushisanlang