Havij SQL Injection Filter

Announcements

ATTENTION Customers, All Partners and Employees: The Customer Support Portal (CSP) will be undergoing maintenance and unavailable on Saturday, November 7, 2020, from 11 am to 11 pm PST. Please read our blog for more information.

Reply
Highlighted
Not applicable

Havij SQL Injection Filter

There doesn't seem to be a filter for this vulnerability at this time so I am trying to write one.  By default the program uses its name in the agent string;

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) Havij

I am trying to create a vulnerability filter that looks for "Havij" in the agent string, my belief based on what I have read is the filter should read something like pattern-match http-req-headers, where I am stuck though is the value, since it has to be at least 7 bytes, is there a way to pad "Havij" so it meets the requirement?  Or am I going about this wrong.

Thanks.



Accepted Solutions
Highlighted
L6 Presenter

Have you tried this:

\)\ Havij

View solution in original post


All Replies
Highlighted
L0 Member

In this case you don't have to create a Custom Vulnerability Signature but a Custom Application Signature, in the way you have told and creating a security policy with the deny action for that application.

You have to use "http-req-headers" and insert "Havij" as pattern match. This should works.

Highlighted
Not applicable

Same error, "must be at least 7 bytes".  I am running 3.1 if that helps.

Thanks.

Highlighted
L6 Presenter

if you do not have a 7 byte anchor for your data pattern then you will get that error.

In your case your data pattern is not long enough. Can you pad the pattern with additional characters?

Highlighted
Not applicable

The string I posted above is what is passed, is there an easy way to use that to create the match string included in it the padding I need/

Highlighted
L6 Presenter

Have you tried this:

\)\ Havij

View solution in original post

Highlighted
L0 Member

I am really happy to say that, It is a very interesting post to read. I learnt new information from your article, you are doing a great job MyCFAVisit! Thank you.

Highlighted
L0 Member

Thanks for spreading the knowledge MyAARPMedicare Login!

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!