Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,

Some one have entered few data in my tables in my DB.It is a SQL Injection.Now I want to find out how many tables are affected with the particular.The data received was
C#
<title><style fontsize:10px>
Posted
Updated 23-Sep-13 23:22pm
v2

The first thing to do is make sure your code can't allow it again! But assuming that you have done that...
If you mean you need to find all the rows and columns containing that specific text, you can use the CONTAINS clause in your WHERE, provided your table is full text indexed.:
SQL
SELECT * FROM MyTable WHERE CONTAINS((Column1, Column2), '<title><style fontsize:10px>')

If it isn't, then you will have to use a LIKE clause on each column specifically.
 
Share this answer
 
The below may be of help to you

http://stackoverflow.com/questions/15757263/find-a-string-by-searching-all-tables-in-sql-server-management-studio-2008
 
Share this answer
 
I think,you want to search this string in your database tables.
Plz see this thread
http://stackoverflow.com/questions/591853/search-for-a-string-in-an-all-the-tables-rows-and-columns-of-a-sqll-server-db[^]
 
Share this answer
 
Hello Arunprasath Natarajan,

Do you have access to IIS log files? There you can check sql injection queries that were used. This should work for queries using GET.

If the injection was made with POST method, verify if the code you're using logs the POST information.

Regards,
JAFC
 
Share this answer
 
Comments
Arunprasath Natarajan 24-Sep-13 5:41am    
Thank you for information, can to say me or share me any link related to "How to check log files in IIS"
José Amílcar Casimiro 24-Sep-13 8:44am    
Google it. ;)

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