Site being hacked?

Posted on 2006-07-10
Last Modified: 2008-03-10
This is the second time (two different IP's) I've seen this in the past 3 weeks.  Someone from China looks to be trying to use a SQL Injection technique to hack one of my sites.  What is interesting is that both times, they tried the exact same order of manipulation to the querystring, so I'm wondering if this is a program or something they are running.  Has anyone seen this?

News.aspx?ArticleID=1' and char(124)+user+char(124)=0 and ''='
News.aspx?ArticleID=1 and char(124)+user+char(124)=0
News.aspx?ArticleID=1' and char(124)+user+char(124)=0 and '%'='
News.aspx?ArticleID=1 and 1=1
News.aspx?ArticleID=1 and 1=2
News.aspx?ArticleID=1' and 1=1 and ''='

Both times it has been in the exact same order...  When I look at this technique, even if my site was suspect to sql injection, this stuff wouldn't even do anything.  

I put a few of this stuff into google, and it returned a site that has a few of these "techniques" listed on website, so I wonder if they are standard techniques.  Has anyone seen something like this before.  Should I be worried?
Question by:thrill_house
LVL 38

Assisted Solution

by:Rich Rumble
Rich Rumble earned 150 total points
ID: 17073973
Nessus, Gfi Languard Network Security scanner, any number of these kinds of tools can look for those vulnerabilites and report on them. You can create your own script to do these things quite easily, so it's hard to say for certain. You should follow best practices, and try to harden your systems as much as possible...
Only allow necessary ports in and out of your servers, try to block all unnecessary ports
Keep up2date with OS patches, as well as web-server patches, and software patches, like php, sql, java etc...
Install AV where possible, keep that up2date and schedule regualr scans, you may also consider getting an IDS like Snort implimented.
Log readers and alerting software like Gfi's SELM, "Snare" or KiwiTools can help you detect possible attempts also

Accepted Solution

PugnaciousOne earned 200 total points
ID: 17108074
Filter the input and url header to your site by disallowing any special characters and re-parsing the URL.  This should stop most SQL injection attacks cold.   This is definitely a standard technique.

Assisted Solution

kruptos earned 150 total points
ID: 17158670

This is a standard technique, mainly used just to see a sites DB is open to certain types of SQL Injection. Also, Pugnacious one had a good idea for helping crack down on this.

If you also google "prevent sql injection" you will get some good ideas to help combat these attacks.


Read up on some tutorials so you can get inside the mind of the bad guys :-)

But, to answer you last question...... Always be worried, when you stop being worried the crackers come out to play :-)

Hope this helps,


Expert Comment

ID: 17159695
Also, since you're using i'm not completely sure this code applies, as i use ASP, but you can use something like this:

< % response.write(Server.URLEncode("")) % >


< % response.write(Server.HTMLEncode("The image tag: < img >")) % >

These re-encode the url and various site code.  Basically it's sanitizing the input.

Expert Comment

ID: 23515304
I also see this exact thing in my web logs.

This is most probably a SQL injection attempt like people have suggested above. And the solutions do apply.

This particular sequence checks to see if your server is vulnerable to the particular attack. Basically, you've been probed for a potential vulnerability... When you see URLs like that or such messages in the logs, it's always good to try it yourself and see what happens. In most cases, nothing happens either because your system is not the type/version that is being targeted by the probe or your system is not vulnerable to the issue (your system is correctly patched, you don't have the earlier version that is being targeted, etc.).

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
As a business owner, there are many things that keep you up at night. Profit margins, employee retention, human resource protocols, whether your product or service will remain competitive. When you own or manage a technology company that operates la…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question