Is there a way to Inject SQL command in LINQ Connection? When he's not using the typical
string sqlstr="SELECT * FROM TABLE WHERE COLUMN = '" + PARAMETER + "' ";
List
tbl = context.ExecuteQuery(sqlstr).ToList();
-we all know that by using this way, you can easily inject a sql command. But how about in this:
var sqlstr = (from tbl in context.Table
where column == parameter
select new{tbl.column}).ToList();
QUESTION: What would be the input in parameter in order for you to inject a sql command?
YinPosted Nov 15, 2012, 5:56 AM
Suthish NairPosted Nov 15, 2012, 5:53 AM
Read this:
http://www.hpenterprisesecurity.com/vulncat/en/vulncat/dotnet/sql_injection_linq.html