Skip to content
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

strange behavior with rules #139

Open
2327 opened this issue Jun 6, 2024 · 8 comments
Open

strange behavior with rules #139

2327 opened this issue Jun 6, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@2327
Copy link

2327 commented Jun 6, 2024

Details

  • NGINX version: 1.26.1
  • NAXSI version: 1.6
  • Did you install NAXSI from a package manager? * NO
  • Operating System: ubuntu 24, docker 26.1.3: debian-12-slim

If mz contains "URL" then naxsi accepted all requests. Possible its not bug coz i can restrict all URL via nginx location

@2327 2327 added the bug Something isn't working label Jun 6, 2024
@wargio
Copy link
Owner

wargio commented Jun 6, 2024

that is weird. can you provide an example? also is this referred to a rule or whitelist?

@2327
Copy link
Author

2327 commented Jun 6, 2024

I keep testing. Can proxy_pass cache cause unpredictable behavior? Every time i down and up my naxsi container. And suddenly it started work right.
only one thing that could unite different containers was the saved responses proxy cache in files in disk. I wasted 2 days for it :~~(

@wargio
Copy link
Owner

wargio commented Jun 7, 2024

tbh, i doubt, but maybe something changed on 1.26

@wargio
Copy link
Owner

wargio commented Jun 7, 2024

I just checked the CI and i only test up to 1.24.x so let me try to add extra versions

@wargio
Copy link
Owner

wargio commented Jun 7, 2024

#140

@2327
Copy link
Author

2327 commented Jun 10, 2024

I continue to test this fork in my small project. Temporarily result: it definitely works. I hope I'm not wrong :)

I'm having problem with the rules generator. I attempted run it, but i have exception "raise SQLWrapperException, 'Sorry, step is not supported'. I think that it definitely needs to be rewritten. The code is hopelessly outdated or I'm doing something wrong. I tried running it in docker with different versions of python and all attempts without success. I didn't delve into the code. lol.

Also i didn't do any load testing. I didn't make good attacks (but simple requests were denied). It would be great to add similar things to the project. I mean just simple scripts. I think i can make it.

The discussion has gone off topic. Maybe there is some kind of mailing list or you can write general questions somewhere so as not to clutter up your issues? May be you can email me and all this helped your fork?

Сool project. Especially for poor people like me. Let's update scripts, documentation and add simple tests. After this, the project comes to life again!

I can place all the configs and docker files on the paste.bin or do PR to your project

@wargio
Copy link
Owner

wargio commented Jun 12, 2024

Thank you for such great interest, very appreciated :)

Regarding the load testing, usually its mainly related to NGINX, i don't think there is any real reason to do such test, since i have seen naxsi handling millions of requests easily thanks to NGINX.

For the rule generator, many things needs to be rewritten. files are old and runs only on python 2.

I strongly suggest to setup a kibana/grafana dashboard and populate it, so you can easily see what is likely an attack or a false positive.

Currently i'm planning to work on it soon and maybe move towards v2.0 with a new format for the rules using yaml and probably split it into a c or c++ library for easily testing each components.

@wargio
Copy link
Owner

wargio commented Jun 15, 2024

I'm in the process to update the documentation, it could be useful if you could proof-read it.
You can find it here: https://wargio.github.io/naxsi/ (ignore any non /naxsi/new path since that is the old outdated documentation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants