Code Monkey home page Code Monkey logo

Comments (7)

wargio avatar wargio commented on June 1, 2024 1

depends on the requests, you can try to check what logs generates and dump also the request parameters

from naxsi.

sahrulfatih avatar sahrulfatih commented on June 1, 2024

Thanks For you reply.

I want to block WPS to scan User and author from my wordpress

this is the access log from nginx.
image

and what are the exact rules of blocking naxsi based on WPS User Agent?

Thanks..

from naxsi.

wargio avatar wargio commented on June 1, 2024

First i would suggest to use these rules: https://github.com/wargio/naxsi/tree/main/naxsi_rules/blocking (and if you are not yet, please use my repository for naxsi since this one is abandoned.. i'm the only active developer)

second i guess i haven't yet added wpscan UA in the scanner list rule (i will make a MR after writing this here) but depending on what is in the request you should probably create custom rules, also because wp plugins are many so is kinda hard to keep track of all of them.

Anyway the rule for blocking the wpscan UA is simply MainRule id:1234567 "s:$UWA:8" "str:wpscan" "mz:$HEADERS_VAR:User-Agent" "msg:wpscan in user-agent";

Another suggestion is to have more data in the logs like request parameters in the post request, etc.. but you need to setup custom logs on nginx for that.

On my setup where i do use naxsi i have configured nginx to output json logs and send them to logstash which parses them and then logstash logs are sent to elastic search + kibana where i have a nice graph with details, etc..
image

Then what i do is look to the traffic and check what parameters looks suspicious and i create rules.
Most of the "bad traffic" can be simply blocked by adding bad user-agents rules in naxsi

from naxsi.

sahrulfatih avatar sahrulfatih commented on June 1, 2024

thanks for your response

i have used your repository and tried naxsi rules to block wps UA and set custom log in nginx.
The result in the error log nginx successfully blocked WPScan, I tried to enumerate author/user on wordpress even after WPScan UA was successfully blocked in the nginx log, user/author can still be found. what are the proper rules to block wpscan from enumerating author/user? then whether naxsi can block the IP address?

WPScan Log
image

Thanks

from naxsi.

wargio avatar wargio commented on June 1, 2024

i do not think there is much you can do there, if those apis are intended to be used by the blog.
If they are not, then you can just ban the api call with a rule.

from naxsi.

sahrulfatih avatar sahrulfatih commented on June 1, 2024

any suggestion or tutorial how to do that?

from naxsi.

wargio avatar wargio commented on June 1, 2024

MainRule id:123456789 "s:$UWA:8" "str:author" "mz:ARGS|NAME" "msg:block author enumeration";
could be something like that. these are well explained in the wiki:

from naxsi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.