• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1135
  • Last Modified:

Site being hacked?

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?
0
thrill_house
Asked:
thrill_house
3 Solutions
 
Rich RumbleSecurity SamuraiCommented:
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
http://www.kiwisyslog.com/links.htm
http://www.intersectalliance.com/projects/SnareWindows/index.html
-rich
0
 
PugnaciousOneCommented:
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.
0
 
kruptosCommented:
Yeap,

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.

http://msdn.microsoft.com/msdnmag/issues/04/09/SQLInjection/

http://cyberforge.com/weblog/aniltj/archive/2004/05/21/535.aspx

Also,

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

http://www.governmentsecurity.org/articles/SQLinjectionBasicTutorial.php



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

Hope this helps,

-Kruptos
0
 
PugnaciousOneCommented:
Also, since you're using asp.net i'm not completely sure this code applies, as i use ASP, but you can use something like this:

< % response.write(Server.URLEncode("http://www.yoururl.com")) % >

and

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

These re-encode the url and various site code.  Basically it's sanitizing the input.
0
 
GangloffCommented:
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.).
0

Featured Post

Become a Leader in Data Analytics

Gain the power to turn raw data into better business decisions and outcomes in your industry. Transform your career future by earning your MS in Data Analytics. WGU’s MSDA program curriculum features IT certifications from Oracle and SAS.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now