Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 18

Displaying posts with tag: sql injection (reset)

Prevent SQL Injection in PHP
+0 Vote Up -0Vote Down

Two easy ways to prevent SQL Injection in PHP

To many people still execute sql queries using methods which does not prevent SQL Injection, and many tutorials out there give bad example of doing so.

SQL Injection? What? -> SQL Injection explained

There are two easy aproachs to prevent SQL Injection:

  • Using PDO:
    stmt = $pdo->prepare('SELECT * FROM employees WHERE name = :name'); 
    $stmt->execute(array(':name' => $name)); 
    foreach ($stmt as $row) {     
        // do something with $row 
  • Using mysqli:
    $stmt = $dbConnection->prepare('SELECT

  •   [Read more...]
    Transparent encryption does not make your database secure
    +5 Vote Up -0Vote Down
    Transparently encrypted storage of *any* kind (storage engine based data encryption, truecrypt volume encryption, bitkeeper, etc) is *just as insecure* to most types of attack as non-encrypted data.  SQL injection or security escalation vulnerabilities, operating system vulnerabilities and cross site scripting attacks could give attackers access to the database data.  It doesn't matter if you encrypt the database's physical storage in the database itself (in the storage engine layer) or on disk (at the filesystem level) since either way the data is presented unencrypted through the SQL interface. 

    Transparent encryption is great for protecting your laptop data from theft by stealing your laptop.  It is very unlikely someone will attack your server by stealing it.

    It doesn't protect you from a malicious SQL injection which drops all your tables or reads

      [Read more...]
    SQL Injections, Again…
    +0 Vote Up -0Vote Down
    Last Friday the Dutch TV program Zembla aired part two of the "verzuimpolitie" series. The first part was mainly about how employers could access medical information about employees. There is a news article about the second part here (with google translate).

      [Read more...]
    Join our live webinar and learn how to protect your most sensitive information – It’s time to take action!
    +0 Vote Up -0Vote Down

    In the past few years, hackers, hacktivists and criminals have targeted millions of databases. Any information you own is at risk.

    Join GreenSQL’s live webinar and learn the actions required in order to protect your invaluable information and that of your customers.

    Security expert David Maman, Founder and CTO of GreenSQL, the Unified Database Security Company, will cover the following topics:

    -         Advanced database hacking methods

    -         Common database security threats

    -         How to protect databases from SQL injection attacks

    -         Separation of

      [Read more...]
    New Frontiers in Information Security – Insights from my lecture at WizeNight
    +0 Vote Up -0Vote Down

    Last Wednesday evening, I gave a talk at the WizeNight gathering in Tel Aviv, Israel. Wize is a new nonprofit organization that organizes WizeNights, free lectures for people who want to learn interesting and important things, over a beer. This time, the event took place at the Bialik Bar.

    My talk covered topics such as the hype about recent computer security attacks, the lack of social networking security for our virtual presence, database information security, credit card readers and zero-day attacks.

    Here are 5 facts I shared with the crowd that most didn’t know:

    1. Identity theft is a bigger crime than drugs in the U.S.
    2. Social networking is highly unsecured.
    3. Many of the largest companies worldwide have been exposed to SQL injection attacks.

      [Read more...]
    New exploit to Oracle CVE-2007-4517 vulnerability
    +0 Vote Up -0Vote Down


    As part of GreenSQL’s Database security research,  we’ve been validating and extending coverage of known and unknown vulnerabilities in order to increase GreenSQL product security, at this post we will reveal a full working Prove of Concept for the CVE-2007-4517 vulnerability which executes arbitrary code.

    The Exploit: PL/SQL/2007-4517 exploit is a PL/SQL procedure that exploits the CVE-2007-4517 vulnerability, also known as Oracle Database XDB.XDB_PITRIG_PKG.PITRIG_DROPMETADATA Procedure Multiple Argument Remote Overflow.

    The vulnerability is caused due to a boundary error in the XDB.XDB_PITRIG_PKG.PITRIG_DROPMETADATA procedure when processing the OWNER and NAME arguments to create an SQL query.

    This can be exploited to cause a buffer overflow by passing overly long OWNER and NAME arguments to the affected

      [Read more...]
    Lateral SQL Injection in Oracle Database
    +0 Vote Up -0Vote Down
    Lateral SQL Injection in Oracle Database



    In order to get the system date in Oracle, you able to query for sysdate field in table dual.
    SQL> select sysdate from dual;

    SYSDATE format is set in: nls_date_format.

    Following the publication: Lateral SQL Injection: A New Class of Vulnerability in Oracle, (http://www.databasesecurity.com/dbsec/lateral-sql-injection.pdf) published by David Litchfield, FEB/2008.

    This post provides an overview and a demonstration on how this issue is still easily exploitable in Oracle Database.



    Nls_date_format allows input of any string without filtering.
    Example:  alter session set nls_date_format = ‘”the time is:”…

      [Read more...]
    Shortest SQL Injection Attack
    +0 Vote Up -0Vote Down


    Shortest SQL Injection Attack syntax


    In many cases, the user’s input is limited to a specific length.
    Although the user’s input length is limited, many times the server is vulnerable to SQL Injection attack’s.
    In this post, we’ll discuss two scenarios and how SQL injections attacks are being exploited using shortest SQL injection attack syntax.

    Get Database Name through 2-fields attack
    In this scenario, the attacker attacks a web application which receives First-Name and Last-Name, and outputs its matched e-mail address. (see appendix A)

    The original SQL query sent to the database is:

    select EmailAddress from Person.Contact where FirstName = ‘@fn’ and LastName = ‘@ln’; –where @fn and @ln are the user’s

      [Read more...]
    Time-Based Blind SQL Injection
    +0 Vote Up -0Vote Down
    Time-Based Blind SQL Injection

    Blind SQL Injection is an attack which the attacker gets an indication for the query execution success. The attacker doesn’t get the query results.
    Most of the time, the indication bases on server errors or customized application errors.

    Time-Based Blind SQL Injection
    Sometimes the attacker might not be able to identify the query execution success, because the server/application doesn’t show any error.
    One of the techniques to get an indication for the query execution success called Time-Based Blind SQL Injection.
    With this technique, the attacker executes functions that take some time to finish (for example: Benchmark, Delay, etc.). By measuring the time took the application to response, the attacker might be able to identify if the query

      [Read more...]
    GreenSQL May Webinars invitation
    +0 Vote Up -0Vote Down

    GreenSQL invites you to participate in our May Webinars
    MAY 18- Securing Databases in Minutes with GreenSQL Express
    MAY 24 – Unified Database Security, the Next Generation of Database Security
    Press here to sign

    GreenSQL Express Webinar, Wednesday March 16th
    +0 Vote Up -1Vote Down

    Hi Everyone,

    I would like to personally invite you to a GreenSQL Express Webinar,
    I’ll be demonstrating GreenSQL Express, the free and simple way to keep your information private and safe.

    On Wednesday, March 16th (just 2 weeks from now),
    It’s called “How to Protect Sensitive Information in Minutes: Setting up GreenSQL Express with Basic Security Rules”

    If you’re serious about protecting your data, you need to hear and see how it’s done. I’ll talk about:

    1. Why you need a Database firewall / security solution
    2. Where and How to install GreenSQL Express in your infrastructure
    3. How to use GreenSQL Express to protect you database
    4. How to create the security polices you need in minutes
    5. How to protect your database from SQL injection attacks
    6. How to

      [Read more...]
    From the Security threat report 2011 by Sophos
    +0 Vote Up -0Vote Down

    From the Security threat report 2011 by Sophos, Page 46:

    “Cybercrime is encroaching more and more into the business space. Industrial espionage, spearphishing of important employees to breach network boundaries and mass theft of customer information are more diffcult to detect and have very serious consequences. At the same time, network boundaries are becoming ever more indistinct and porous as new technologies enable greater access from remote workers and mobile devices. In addition, legal requirements place greater emphasis on traceability and compliance with predefned standards of data hygiene.

    Increasing amounts of sensitive data is stored, accessed and manipulated in databases connected to company websites as businesses increasingly interact with their customers

      [Read more...]
    New Community version: GreenSQL FW: 1.3.0 released
    +0 Vote Up -0Vote Down

    New Community version of GreenSQL Database Firewall, version 1.3 is now available.
    GreenSQL 1.3 includes new features, many bug fixes and enhancements.

    In this version, GreenSQL improvers the native support for PostgreSQL (http://www.postgresql.org) databases, improvers the native support for MySQL (http://www.mysql.com (http://www.mysql.com/)) databases and provides many Protocol and Network Optimizations. The Web Based GUI usability has been improved and many bugs been fixed.

    GreenSQL community version 1.3.0 improvements and enhancements include:

    1. Proxies dashboard: correctly displaying the proxy current status
    2. Proxies automatic reloading fixes
    3. Alerts include User IP Address
    4. MySQL and PostgreSQL protocol fixes
    5. Network optimizations
    6. Alerts

      [Read more...]
    Announcing the release of GreenSQL Pro and GreenSQL Light
    +0 Vote Up -0Vote Down

    We are proud to announce the release of GreenSQL Pro and GreenSQL Light, our first commercial Unified Database Security solutions, designed to provide all organizations – from small and medium businesses all the way to large enterprises – robust database security at an affordable price.

    “Commercial Unified Database Security solutions” is a mouthful. Let’s look at what that means.

    For us, commercial has several meanings. First, we have designed GreenSQL Pro for commercial organizations; second, we charge a modest fee for it; and third, unlike our open source code, we take full responsibility for it.

    How about unified? To be unified, something must first have parts. GreenSQL Pro and GreenSQL Light include many aspects of database security within them, all

      [Read more...]
    Database security, Database Firewall? Why should I use GreenSQL ?
    +0 Vote Up -0Vote Down

    Since the early days of GreenSQL, many people have written us asking why exactly they should implement a database security solution if they have already hardened their web application and are using a web application firewall, like mod_security, or even a professional closed source web application firewall such as Imperva, Breach, or F5.

    The answer is not as simple as you may think, and I’m not going to preach to you about the great advantages using GreenSQL in front of your MySQL or PostgreSQL Database.

    I’m going to highlight a few obvious current situations which will help you see the full picture of your Database security needs.

    What is the core of the company?

    When you come right down to it, the Database, eventually, is the core of your company or organization. All the information that the company is built

      [Read more...]
    MMUG: Second Meeting Review and Slides
    +0 Vote Up -0Vote Down

    The Malta MySQL User Group (MMUG) met for the second time this Thursday, and compared to last time, we had a much better venue: Ixaris Systems let us use their board room, so we had all the tools we needed to have a good meeting.

    We managed to get a group picture before everyone has arrived, so I guess we can call the people in this picture “early birds”.

    Once we all arrived, however, Sandro Gauci from EnableSecurity gave us a very interesting talk on SQL Injection security, and general security flaws from a developer point a view. You can find the slides here: sql-injection.pdf.

    Here’s a picture of

      [Read more...]
    Mysql-Proxy Heuristic SQL Injection Detection
    +0 Vote Up -0Vote Down

    MySQL Proxy is a simple program that sits between your client and MySQL server(s) that can monitor, analyze or transform their communication. Its flexibility allows for unlimited uses; common ones include: load balancing; failover; query analysis; query filtering and modification; and many more.”

    The flexibility of MySQL Proxy is based on the fact that every aspect is scriptable with Lua. Because I am new to MySQL Proxy and the Lua language I tried to implement a very simple script that waits for incoming SQL queries, tokenizes them and tries to detect SQL Injection heuristically by searching for certain disallowed SQL functions, databases, tables, statements or comments. When an SQL query is believed to contain an SQL injection is it not

      [Read more...]
    Database Security Using White-Hat Google Hacking
    +0 Vote Up -0Vote Down

    Here are the slides and links I am using for the “Database Security Using White-Hat Google Hacking” at the 2008 MySQL Users Conference and Expo.

    pdf slides

    Where to Start:


    for the impatient

    Google’s Terms of Service
    Google Operators

    More Googlehacks to run:
    Page 35 of

      [Read more...]
    Showing entries 1 to 18

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.