website hit with SQL (Injection) bug.....

Status
Not open for further replies.

WayneOtis

Ars Tribunus Militum
2,752
I've got a website that's running Joomla 1.5. I've one out of date extension, and last Monday after Super Bowl, something took the site down.

I tried to repair the SQL infection, but I oviously didn't get it all, because as soon as I put the sites back up, what has me took it back down almost immediately, and took control of my Plesk Desktop on the server.

I really, really need to get this fixed....does anyone freelance this kind of thing? If so, email me...
 

A.W.

Ars Tribunus Angusticlavius
6,790
Start by searching all columns of all tables for <script or &lt;script, or any encoded versions thereof. You can use this site to get various encoded versions of strings: http://coderstoolbox.net/string/

This is by no means a comprehensive way to find any possible injected content, but it's a quick starting point.

Also, if no one else bites on the freelance thing, email me. It sounds familiar...
 
You can remove all the injected scripts out of your db, but if you don't fix the security exploit that put them there in first place this will keep happening. What you need to do is update joomla to the latest version. This has been my experience with Joomla also by the way. I would recommend pulling your site offline, or at least block all ips except yours, clean db, update joomla and all extensions and you should be ok.
 

Dracorat

Ars Tribunus Militum
2,798
A.W.":1rhwi6iy said:
By that logic, any unintended behavior would be a feature. But we call those unintended behaviors bugs.

I probably wasn't clear enough. Uneducated though the position may be (and perhaps it was fully educated) the code is working 100% "as intended".

The ramifications of that "intention" suck though. Thus, it does definitely need to be "fixed" but it's not really a "fix" - it's a change in requirements.

As programmer, we loosely call many of these things "bugs" but in reality, they weren't bugs. They were poorly designed requirements that were implemented correctly.

It's a minor point anyway - I agree 100% this sucks and getting it "fixed" is priority!
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
technophile":1yrm7ecx said:
Forget cleaning the DB; that's a fool's game.

Take the site offline, restore from a DB backup from before the attack, upgrade to the latest point release, bring the site online.
...and then immediately start migrating away from the pukeshitsuckvortex that is Joomla. Failure to do so will render the next one, and there will be a next one, a self-inflicted wound.
 

topham

Ars Legatus Legionis
13,756
Subscriptor
Dracorat":hbu8wa00 said:
A.W.":hbu8wa00 said:
By that logic, any unintended behavior would be a feature. But we call those unintended behaviors bugs.

I probably wasn't clear enough. Uneducated though the position may be (and perhaps it was fully educated) the code is working 100% "as intended".

The ramifications of that "intention" suck though. Thus, it does definitely need to be "fixed" but it's not really a "fix" - it's a change in requirements.

As programmer, we loosely call many of these things "bugs" but in reality, they weren't bugs. They were poorly designed requirements that were implemented correctly.

It's a minor point anyway - I agree 100% this sucks and getting it "fixed" is priority!

SQL Injection isn't because of poor requirements, except so far as the requirements left off "Don't Include SQL Injection Bugs".

SQL Injection comes from bad design, not poor requirements. Calling it bad requirements implies that requirements can document every single possible scenario, when in reality the only time they do is when the design process is used to go back and retroactively add requirements. Great for documentation, but lousy because it still puts the onus on the design stage, while blaming the requirements phase for any failures.

SQL Injection are a travesty caused by lazy programmers, pretending otherwise is foolish.
 

technophile

Ars Legatus Legionis
23,768
Dracorat":2248f627 said:
Oh it's fully the fault of the developer. My point is only that he had to write the code specifically open enough that it did not secure the app appropriately. Maybe he made it out of ignorance, out of laziness or out of "get it out the door".
There is at least one major ASP.NET controls vendor whose client-side databound grid basically requires that your site be open to SQL injection, as it passes filter values set on the client as preformatted SQL (i.e. if you set the filter for Column1 to Equals 'hello', it passes to the server the value "[Column1] = 'hello'"). :scared:

Back when I worked for an org that used that control, I wrote a wrapper that intercepted filter events and passed a list of objects back to the server with the column, comparison, and value as separate fields so that we could use parameterized queries (well, custom-built LINQ to Entities expressions, but same thing).

Then we stopped using their control suite entirely once I'd written custom replacements that didn't suck.

My point is that not every developer touches (or even sees) every bit of code, and while yeah yeah "due diligence", it's easy for a naive dev to get in trouble without even realizing there's a hole.
 

Dracorat

Ars Tribunus Militum
2,798
technophile":2or3qus4 said:
There is at least one major ASP.NET controls vendor whose client-side databound grid basically requires that your site be open to SQL injection, as it passes filter values set on the client as preformatted SQL (i.e. if you set the filter for Column1 to Equals 'hello', it passes to the server the value "[Column1] = 'hello'"). :scared:

Yikes!

Back when I worked for an org that used that control, I wrote a wrapper that intercepted filter events and passed a list of objects back to the server with the column, comparison, and value as separate fields so that we could use parameterized queries (well, custom-built LINQ to Entities expressions, but same thing).

Then we stopped using their control suite entirely once I'd written custom replacements that didn't suck.

I knew I liked you for some reason =)

My point is that not every developer touches (or even sees) every bit of code, and while yeah yeah "due diligence", it's easy for a naive dev to get in trouble without even realizing there's a hole.
Oh I know. I was just snickering a little at it being called a "bug".
 

CanSpice

Ars Tribunus Angusticlavius
7,147
Bhelyer":384muj4q said:
Dracorat":384muj4q said:
Bug:

Aww hell. The code is supposed to be doing "X". But it's not.

SQL Injection:

What do you mean I need to clean inputs / parameterize queries?

"The code is supposed to be cleaning inputs and parametrising queries. But it's not."
This should be assumed to be Requirement Zero for every human-facing project. It's amazing so many people don't do it.
 

Pont

Ars Legatus Legionis
26,160
Subscriptor
Bug is "oops, I failed to consider a border case in my logic" or "I have an off-by-one error in my for loop under certain conditions".

SQL injection vulnerabilities are bugs (don't make me whip up a venn diagram), but they are a special class of bug in the category of "failure to follow the most basic of software engineering principles." Really inexcusable. Anyone who codes an SQL injection bug should be forced into reeducation classes at a local community college. It's like a car mechanic who simply refuses to ever use a torque wrench. Dangerously negligent and bad for the entire industry's reputation.
 
Pont":28ov6hh7 said:
they are a special class of bug in the category of "failure to follow the most basic of software engineering principles."

No, they're not. Security in software engineering is a specialty requiring more than basic software engineering skill.

Now, if you would have said a web developer, you'd be a lot more accurate. That task, however, is still a specialty. I'd also call it a flaw and not bug. A bug infers that a function is not performed as expected, not that functionality was never developed. A bug would mean that security was attempted, and still was breached.
 

topham

Ars Legatus Legionis
13,756
Subscriptor
Pont":5coxitvy said:
No, they're not. Security in software engineering is a specialty requiring more than basic software engineering skill.
Security may be a specialty, but re-breaking a solved problem is not.
It's not a solved problem until the last bit of shit code/examples are off the Internet.
 

philj

Ars Tribunus Militum
1,591
Blacken00100":e34z1clj said:
technophile":e34z1clj said:
Forget cleaning the DB; that's a fool's game.

Take the site offline, restore from a DB backup from before the attack, upgrade to the latest point release, bring the site online.
...and then immediately start migrating away from the pukeshitsuckvortex that is Joomla. Failure to do so will render the next one, and there will be a next one, a self-inflicted wound.


And from 2008 thread about the same website http:/civis/viewtopic.php?p=3669021#p3669021 :-

Blacken00100":e34z1clj said:
If I get it, start looking at the Joomla bugtracker.

Why redo what's already been done well?

Who got the contract in the end anyway?
 
Status
Not open for further replies.