S
sameergn
Hi,
We are trying to inject SQL code into an oracle 10g query. (Apache +
Tomcat Setup)
Statement stmt = conn.createStatement();
String query = "select * from some_table where some_column = '" +
some_value + "'";
rs = stmt.executeQuery(query);
where some_value is user input.
if some_value is set to "xxx';delete from test_sql_injection;--", the
query becomes
select * from some_table where some_column = 'xxx';delete from
test_sql_injection;--'
Which results in "java.sql.SQLException: ORA-00911: invalid
character"
Same error is thrown when the value is set to "xxx' or 1 = 1;--'"
which results in following query.
select * from some_table where some_column = 'xxx' or 1 = 1;--'
So how is it possible to demonstrate SQL injection attack using above
query?
Thanks,
Sameer
We are trying to inject SQL code into an oracle 10g query. (Apache +
Tomcat Setup)
Statement stmt = conn.createStatement();
String query = "select * from some_table where some_column = '" +
some_value + "'";
rs = stmt.executeQuery(query);
where some_value is user input.
if some_value is set to "xxx';delete from test_sql_injection;--", the
query becomes
select * from some_table where some_column = 'xxx';delete from
test_sql_injection;--'
Which results in "java.sql.SQLException: ORA-00911: invalid
character"
Same error is thrown when the value is set to "xxx' or 1 = 1;--'"
which results in following query.
select * from some_table where some_column = 'xxx' or 1 = 1;--'
So how is it possible to demonstrate SQL injection attack using above
query?
Thanks,
Sameer