sql-injection

Are there any SQL injection tools out there so I can test my site's vulnerabality?

Are there any SQL injection tools out there so I can test my site for vulnerabilities? Any good ones? Free ones would be good. ...

Mysql subquery, Update embedded into select?

Hi, I am doing a mysql injection on a site (for educational purpose i promise hehe), now, It uses mysql as its database, I cannot do: "; UPDATE..." so my question is, if i do: "OR id=(update...)".. as a subquery, that of course doesn't make any sense yet will it execute the update on the table i choose? ...

How can i update a table using SQL Injection?

Hi all, How can i able to update a table in a MySQL database using SQL Injection? I have heard about how we can enter the query in the address bar and it is possible to update a table in the MySQL database. But I am not sure about it. Kindly give me an idea professionals... ...

SQL injections and .NET 4

Is there instruments in .NET 4 to "automatize" verifications of SQL fields against SQL injections? I saw this article, but afraid could be not to date... EDIT: Oracle Db compatible... ...

Update every column in every table

My database has recently been hacked by SQL injection leaving tags throughout data in all columns in all tables in my database. Is there a quick way of running a REPLACE UPDATE on all tables? Something like: UPDATE [all tables] SET [all columns]=REPLACE([all columns], '<script>....</script>', '') ...

Best Way to Prevent SQL Injection Using Javascript or C#?

Hey.. I'm currently writing an application which uses ajax on the front end and ASP.NET (C#) on the back end.. A Small Part of the application does an AJAX call to the backend code (to get entries from the SQL database) How can i prevent SQL of JScript injection? I know it is generally unsecure to validate with javascript because jav...

Zend - Do I need to use quote() when inserting/updating?

I'm developing an application that allows users to input into VARCHAR(255) fields in mySQL, so security is a major concern. I am having trouble understanding quote(). If I use quote('test'), the data returns as '\'test\'' on SELECT, which is undesirable. How do I unquote this data? If I bypass quote(), I can peek into phpmyadmin and...

Sanitizing MySQL Queries without preprared statements (PHP + old mysql module)

Note: I've looked at this question: http://stackoverflow.com/questions/1238763/preventing-sql-injection-without-prepared-statements-jdbc . And as I somewhat expected... the answer is to use prepared statements. I'm in a different set of circumstances... so I'd like to know the best path for this. I'm using a downloaded script (phpsimple...

Need help understanding MySQL injection

From http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php I got: SQL injection refers to the act of someone inserting a MySQL statement to be run on your database without your knowledge. Injection usually occurs when you ask a user for input, like their name, and instead of a name they give you a MySQL statement...

Zend Framework Filter, prevent sql injection

Hello, For some important reasons I can't use standard methods provided by ZF to prevent sql injection. I have just wrote that (and I am using it on each POST/GET data from user): $filter = new Zend_Filter_PregReplace(); $filter->setMatchPattern(array("/[';`]/")) ->setReplacement(array('')); I am using MySQL database only. Is ...

What's the SQL significance of 0x5E5B7D7E?

Looking through some apache logs, I've run into the following pattern several times (URL decoded): GET /foo.php?id=1 and union select 0x5E5B7D7E,0x5E5B7D7E,0x5E5B7D7E,... -- Clearly this is an SQL injection attempt. But why the constant shown above? I can't see how it could be particularly significant, though it seems to appear quite ...

Prevent Sql injection in ZF

I use following code $this->getDb()->fetchRow($sql, $params); Is it free from sql injection? Please guide me. How i can make it free from sql injection. ...

PHP & SQL: Best way to protect this query from SQL injections NOT using PDO

Hi, I have a query which is run against a mssql database and I'm not using PDO drivers. Is there something like prepared statement i can use? Here is the query: $tsql = "INSERT INTO cplinktable (liferayid, bmsid, autotaskid, waspdb, cpid) VALUES ($liferayid, $bmsid, $autotaskid, '$waspdb', $cpid)"; thanks, Jonesy ...

Preventing SQL Injection attacks: the differences between mySql and SQL Server 2008

Is there any reason to migrate from MySql to SQL server 2008 if one's main concern is the blocking of SQL injection attacks? Does Linq2Sql or EF provide additional protection? ...

Will this regex patterns catch all the needed SQL injections?

We changed our firewall rules (REGEX) to the following: Name Type Context Severity Pattern CS:select_into signature http-url critical .*\[select\]\s+.*\[into\].* CS:select_from signature http-url critical .*\[select\]\s+.*\[from\].* CS:insert_into signature http-url critical .*\[insert\]\s+.*\[into\].* CS:drop_databa...

How to avoid SQL Injection when using '[' and ']' characters for schema/table names?

Hi, I have had several contexts where table names or schemas were not hard-coded, but rather configured by the administrator, or, worse, generated from user input. Since cases were easy (schemas and table names in plain English, without numbers nor symbols), it was easy to avoid SQL Injection by just forbid any character outside A-Z an...

Is the SimpleJdbcTemplate in Spring safe from SQL Injection?

I realise it's possible to pass in a manually constructed String to the execute(String) which is vulnerable. However I'm interested in where you pass the parameters to the query using MapSqlParameterSource or one of the other exposed methods such as in the below examples. Digging into the source it looks like it's using a prepared stat...

Preventing SQL Injection in ASP.Net VB.Net

I have this code UPDATE OPENQUERY (db,'SELECT * FROM table WHERE ref = ''"+ Ref +"'' AND bookno = ''"+ Session("number") +"'' ') How would I prevent SQL Injections on this? Thanks Jamie UPDATE Here's what i'm trying SqlCommand cmd = new SqlCommand("Select * from Table where ref=@ref", con); cmd.Parameters.AddWithValue("@ref", 3...

sql injection attack

Possible Duplicates: What is SQL injection? What is the best way to avoid SQL injection attacks? Hi All, Could you please help me in learning sql injection attack. Please provide me with the code which is vulnerable to sql injection and the one which is not. Thanks in advance ...

nettiers Utility.DetectSqlInjection flagging wrong words

We are using .nettiers as our DAL and also using the Utility.DetectSqlInjection for extra security. We hit an odd error today, Someone tried to enter "Executive" into a title textbox, and the Utility.DetectSqlInjection is saying this is an injection attack. It looks as thought it is seeing the "EXEC" command used to execute sql command...