Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

We are using ms-sql 2008 database for our asp.net website but last few days our database is hacked again and again. when our database is hacked we got the below script in all tables with all columns.

HTML
</title><style>.axaa{position:absolute;clip:rect(407px,auto,auto,407px);}</style><div class="axaa">fast <a href="http://corypaydayloans.com">online payday loans</a> fast <a href="http://drewpaydayloans.com">online payday loans</a></div></title><style>.axaa{position:absolute;clip:rect(407px,auto,auto,407px);}</style><div class="axaa">fast <a href="http://corypaydayloans.com">online payday loans</a> fast <a href="http://drewpaydayloans.com">online payday loans</a></div>


After it happened we have restored our last correct database backup on live server then we have changed database password, username, database name and also changed FTP password but it happen again and again so please give us correct suggestion.

We don't know exactly it happened from hacker or our internal server issue.

Thanks in advance.


Thanks
Sudhir Khune
Posted
Updated 3-Jun-13 0:20am
v2
Comments
Dec90 15-Mar-13 8:22am    
what's the possibility of someone injecting code within your page and your not properly checking your insert/updates haven't got malicious code within it? I.E I fill a field on your webpage, you take it on face value that it will be fine but you don't check what's in it. I put the value of ";UPDATE Table1 SET Column1 = 'inject html here'" in your input field which if not parsed will update your whole table and update columns 1 with the value I just entered. just a thought.
Member 8311797 15-Jun-15 7:55am    
hello

this is also happening to us.
do you have a lead or a solution?

thank you

1 solution

You need to have server validations implemented in backend (application server) or database to check for
1) data type
2) business validation

Make use of escape-HTML to render any string data

http://www.htmlescape.net/htmlescape_tool.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900