SlideShare a Scribd company logo
IJSRD - International Journal for Scientific Research & Development| Vol. 1, Issue 4, 2013 | ISSN (online): 2321-0613
All rights reserved by www.ijsrd.com 877
Abstract— In today's modern world, security is a necessary
fact of life. GreenSQL Security helps small to large
organizations protect their sensitive information against
internal and external threats. The rule-based engine offers
database firewall, intrusion detection and prevention
(IDS/IPS). GreenSQL Security Engine applies exception
detection to prevent hacker attacks, end-user intrusion and
unauthorized access by privileged insiders. The system
provides a web based intuitive and flexible policy
framework that enables users to create and edit their security
rules quickly and easily. GreenSQL interfaces between your
database and any source requiring a connection to it. This
approach shields your database application and database
operating system from direct, remote access.
GreenSQL Database Security
1) Stops SQL Injection attacks on your web
application
2) Blocks unauthorized database access and alerts you
in real time about unwanted access
3) Separates your application database access
privileges from administrator access
4) Gives you a complete event log for investigating
database traffic and access
5) Ensures you achieve successful implementation
with 24/7 support
Keywords: SQL injection, web architecture, SQL tautology,
IDS (intrusion detection), IPS (intrusion prevention )
I. SQL INJECTION
SQL injection is a code injection technique that exploits a
security vulnerability occurring in the database layer of an
application.
The vulnerability is present when user input is
either incorrectly filtered for string literal escape characters
embedded in SQL statements or user input is not strongly
typed and thereby unexpectedly executed.
It is an instance of a more general class of
vulnerabilities that can occur whenever one programming or
scripting language is embedded inside another.
SQL injection is a basic attack used to either gain
unauthorized access to database or to retrieve information
directly from the database.
SQL injection is a technique used to take
advantage of no validated input vulnerabilities to pass SQL
commands through a web application for execution by a
backend database. SQL commands are injected from the
web form into the databse of an application to change the
databse content or dump the database information like
creditcard or password to attacker.
Most web applications include a back-end
database, either running on a separate database server, or
installed on the same machine as the web server itself. SQL
Injection is one of the most common application layer attack
techniques used today[1].
A. Web Application Architecture
Web application commonly has three tiers: presentation,
logic, and storage.
The presentation tier is the topmost level of the
application. It displays information related to such services
as browsing merchandise, purchasing, and shopping cart
contents, and it communicates with other tiers by outputting
results to the browser/client tier and all other tiers in the
network. [2]
The logic tier is pulled out from the presentation
tier, and as its own layer, it controls an application’s
functionality by performing detailed processing.
The data tier consists of database servers. Here,
information is stored and retrieved. This tier keeps data
independent from application servers or business logic.
Fig.1: Web Application Architecture
Giving data its own tier also improves scalability and
performance. In this Figure, the Web browser (presentation)
sends requests to the middle tier (logic), which services
GreenSQL Security
Jaydeep K. Dabhi1
Ass. Prof. Tarun K. Sureja2
1
M.E. CE (I.T. Systems & Network Security) 2
M. Tech (CSE)
1
AVPTI, Rajkot, Gujarat Technological University 2
NIT, Rourkela
S.P.B.Patel Engineering College, Mehsana, Gujarat
GreenSQL Security
(IJSRD/Vol. 1/Issue 4/2013/0018)
All rights reserved by www.ijsrd.com 878
them by making queries and updates against the database
(storage).
A fundamental rule in three-tier architecture is that
the presentation tier never communicates directly with the
data tier; in a three-tier model, all communication must pass
through the middleware tier.
In this Figure, the user fires up his Web browser
and connect to http://www.victim.com. The Web server that
resides in the logic tier loads the script from the file system
and passes it through its scripting engine, where it is parsed
and executed.
The script opens a connection to the storage tier
using a database connector and executes an SQL statement
against the database.
The database returns the data to the database
connector, which is passed to the scripting engine within the
logic tier.
The logic tier then implements any application or
business logic rules before returning a Web page in HTML
format to the user’s Web browser within the presentation
tier.
The user’s Web browser renders the HTML and
presents the user with a graphical representation of the code.
[4]
B. GreenSQL
GreenSQL database firewall used to protect databases from
SQL injection attacks.
GreenSQL works as a proxy for SQL commands
and has built in support for MySQL & PostgreSQL.
GreenSQL secure database from unauthorized
access by monitoring every SQL command sent to the
databases. GreenSQL helps business secure their
information assets and demonstrate regulatory compliances.
The logic is based on evaluation of SQL
commands using a risk scoring matrix as well as blocking
known db Administrative commands (DROP, CREATE,
etch). GreenSQL is distributed under the GPL license.
C. Calculating a query's risk
GreenSQL calculates each query's risk. Essentially, this is
an anomaly detection subsystem. After the risk is calculated,
GreenSQL can block the query or just create a warning
message (this depends on the application mode). There are a
number of heuristics GreenSQL uses when calculating risk
[6]
For example, query risk is increased by:
1) Fingerprinting of Database (users, accounts, credit
information)
2) Stack Based Query (Comments inside SQL
commands)
3) An SQL expression that always returns true (SQL
tautology)[10]
II. SQL TAUTOLOGY
This type of attack injects SQL tokens to the conditional
query statement to be evaluated always true. This type of
attack used to bypass authentication control and access to
data by exploiting vulnerable input field which use WHERE
clause.
"SELECT * FROM employee WHERE userid = '112' and
password ='aaa' OR '1 '='1 III
As the tautology statement (1=1) has been added to the
query statement so it is always true.[11]
III. MODES OF GREENSQL
The GreenSQL db firewall can be used in a number of
ways:[7][8][9]
1) IDS
2) IPS
3) Learning mode
4) Database firewall
A. IDS Mode
During Simulation Mode basically nothing is blocked.
GreenSQL works as a database IDS system (IDS stands for
Intrusion Detection System).During this mode, our risk
scoring matrix engine identifies suspicious queries and
notifies the database administrator using the GreenSQL
Management Console.
B. IPS Mode
When the system is configured to Block Suspicious
Commands, GreenSQL uses its heuristics engine to find
"illegal" queries and block them automatically. In this
mode, GreenSQL is basically a database IPS system (IPS is
Intrusion Prevention System). If a query is considered
illegal, a whitelist is checked. If it is found in the whitelist,
it will be redirected to the genuine MySQL server. If it is
found to be "illegal", GreenSQL will return an empty result
set to THE application. During this mode, GreenSQL can
sometimes generate false positive and false negative errors.
As a result, some legal queries may be blocked or the
GreenSQL system may pass through an "illegal" query
undetected. These are the pros and cons of IPS systems.
GreenSQL is constantly improving its heuristics engine but
it is still not perfect.
C. Learning Mode
The above methods we recommend enabling Learning
Mode and then, after the learning period is over, switching
to the Active protection from unknown queries.
During the learning mode, all queries are
automatically added to the whitelist. When the learning
mode is over, GreenSQL automatically enables active
protection.
D. Database Firewall Mode
When Active protection from unknown queries mode is
enabled, all unknown commands are blocked. This is
database firewall mode. When an unknown SQL command
is detected, it is automatically blocked.
GreenSQL Security
(IJSRD/Vol. 1/Issue 4/2013/0018)
All rights reserved by www.ijsrd.com 879
IV. GREENSQL ARCHITECTURE
GreenSQL works as a reverse proxy for MySQL
connections. This means, that instead of connecting TO
THE MySQL server, your applications will connect to THE
GreenSQL server. [9]
GreenSQL will analyze SQL queries and then, if
they're safe, will forward them to the back-end MySQL
server.
The following picture describes the whole process. [12][7]
Fig 2: GreenSQL Architecture
As you can see, GreenSQL calls the real database server to
execute SQL commands and the web application connects
to the GreenSQL server as if it were a real database server.
GreenSQL can be installed together with the
database server on the same computer or it can use a distinct
server. By default GreenSQL listens on local port
127.0.0.1:3305 redirecting SQL requests to 127.0.0.1:3306
(the default MySQL setting). These settings can be altered
using the GreenSQL Console.
V. CONCLUSION
1) Provides great security regarding different sql attacks.
2) Can be used as a penetration tool!!!
REFERENCES
[1] Justin Clarke, SQL Injection Attacks and Defense,
Second Edition, Syngress Publication, July 2,
2012,ISBN-13: 978-1597494243
[2] GreenSQL Available: http://www.greensql.net/
[3] GreenSQL Available:
http://www.howtoforge.com/preventing-mysql-
injection-attacks-with-greensql-on-debian-etch
[4] GreenSQL Available: http://www.greensql.com/docs
[5] GreenSQL Available:
http://www.greensql.com/support/knowledge
[6] GreenSQL Available: http://www.greensql.com/why-
greensql-db-security/top-10-reasons
[7] GreenSQL Available:
http://community.spiceworks.com/topic/212598-
database-firewall-greensql
[8] GreenSQL Available:
http://www.techrepublic.com/blog/opensource/firewall-
mysql-with-greensql/317
[9] GreenSQL Available:
http://opensourcedba.wordpress.com/2012/03/26/databas
e-firewalls-from-oracle-and-greensql/

More Related Content

PDF
FRONT END AND BACK END DATABASE SECURITY IN THREE TIER WEB APPLICATION
PDF
Survey on cloud computing security techniques
PDF
Sql injection
PDF
IRJET - Blockchain-based Public Integrity Verification for Cloud Storage Agai...
PPTX
Sql injection
PPT
Towards secure and dependable storage service in cloud
PDF
Towards Secure and Dependable Storage Services in Cloud Computing
PPTX
Distributed accountability for data sharing in cloud
FRONT END AND BACK END DATABASE SECURITY IN THREE TIER WEB APPLICATION
Survey on cloud computing security techniques
Sql injection
IRJET - Blockchain-based Public Integrity Verification for Cloud Storage Agai...
Sql injection
Towards secure and dependable storage service in cloud
Towards Secure and Dependable Storage Services in Cloud Computing
Distributed accountability for data sharing in cloud

What's hot (20)

PPTX
Towards secure and dependable storage
PDF
Sensitive Data Protection in DBaaS
PDF
Ensuring Distributed Accountability in the Cloud
PPTX
cloud computing preservity
PDF
IRJET-Survey Paper on Security for Data Storage and Regeneration of Code by A...
PDF
Owasp Backend Security Project 1.0beta
PPT
Sql injection
DOC
Ensuring distributed accountability for data sharing in the cloud
PPTX
Sql injection
DOCX
Cloud Storage and Security
PDF
Overview of cloud computing architecture service
PDF
Overview of cloud computing architecture
PDF
Ijarcet vol-2-issue-3-942-946
PPTX
Sql injection & command injection
PPTX
Ensuring Distributed Accountability in the Cloud
PDF
Sql
PDF
Attribute based encryption with privacy preserving in clouds
PDF
Two Aspect Validation Control Frameworks for Online Distributed Services
DOCX
Oruta privacy preserving public auditing for shared data in the cloud
PDF
Ensuring distributed accountability for data sharing in the cloud
Towards secure and dependable storage
Sensitive Data Protection in DBaaS
Ensuring Distributed Accountability in the Cloud
cloud computing preservity
IRJET-Survey Paper on Security for Data Storage and Regeneration of Code by A...
Owasp Backend Security Project 1.0beta
Sql injection
Ensuring distributed accountability for data sharing in the cloud
Sql injection
Cloud Storage and Security
Overview of cloud computing architecture service
Overview of cloud computing architecture
Ijarcet vol-2-issue-3-942-946
Sql injection & command injection
Ensuring Distributed Accountability in the Cloud
Sql
Attribute based encryption with privacy preserving in clouds
Two Aspect Validation Control Frameworks for Online Distributed Services
Oruta privacy preserving public auditing for shared data in the cloud
Ensuring distributed accountability for data sharing in the cloud
Ad

Viewers also liked (17)

PDF
Handwritten Script Recognition
PDF
Process parameter optimization of SLM process and application of Taguchi appr...
PDF
Waste Minimization and Cost Reduction in Process Industries
PDF
Exhaust analysis of four stroke single cylinder diesel engine using copper ba...
PDF
Analysis of Parking Demand and Suggesting Alternative for Parking (A Case Stu...
PDF
Wireless Sensor Network: Topology Issues
PDF
Energy Efficient LEACH protocol for Wireless Sensor Network (I-LEACH)
PDF
Analysis of SEPIC for PV-Applications using PI Controller and Current Mode Co...
PDF
Garbage Management using Android Smartphone
PDF
Performance Optimization of Clustering On GPU
PDF
Performance, Optimization and CFD Analysis of Submersible Pump Impeller
PDF
Material Removal Rate, Tool Wear Rate and Surface Roughness Analysis of EDM P...
PDF
Enhancing the Performance & Emission for the Blend of Diesel & Pyrolysis oil ...
PDF
VRaaS [Virtual Reality as a Service]: Integrated architecture for VR Applicat...
PDF
Analysis of VoIP Forensics with Digital Evidence Procedure
PDF
Voltage Stability & Power Quality Assessment of Distributed Generation Based ...
PDF
Real-Time Monitoring and Control System for Industry
Handwritten Script Recognition
Process parameter optimization of SLM process and application of Taguchi appr...
Waste Minimization and Cost Reduction in Process Industries
Exhaust analysis of four stroke single cylinder diesel engine using copper ba...
Analysis of Parking Demand and Suggesting Alternative for Parking (A Case Stu...
Wireless Sensor Network: Topology Issues
Energy Efficient LEACH protocol for Wireless Sensor Network (I-LEACH)
Analysis of SEPIC for PV-Applications using PI Controller and Current Mode Co...
Garbage Management using Android Smartphone
Performance Optimization of Clustering On GPU
Performance, Optimization and CFD Analysis of Submersible Pump Impeller
Material Removal Rate, Tool Wear Rate and Surface Roughness Analysis of EDM P...
Enhancing the Performance & Emission for the Blend of Diesel & Pyrolysis oil ...
VRaaS [Virtual Reality as a Service]: Integrated architecture for VR Applicat...
Analysis of VoIP Forensics with Digital Evidence Procedure
Voltage Stability & Power Quality Assessment of Distributed Generation Based ...
Real-Time Monitoring and Control System for Industry
Ad

Similar to GreenSQL Security (20)

PDF
Devoid Web Application From SQL Injection Attack
PDF
SQL Injection Prevention by Adaptive Algorithm
PDF
E017131924
PDF
Security vulnerabilities related to web-based data
PDF
INTRUSION DETECTION IN MULTITIER WEB APPLICATIONS USING DOUBLEGUARD
PPTX
Security For Application Development
PPT
SQLSecurity.ppt
PPT
SQLSecurity.ppt
PDF
Ld3420072014
PPTX
Modern Data Security for the Enterprises – SQL Server & Azure SQL Database
PPTX
SQL Injection and Clickjacking Attack in Web security
PPT
Sql security
PDF
A hybrid technique for sql injection attacks detection and prevention
PDF
International Journal of Engineering Inventions (IJEI)
PDF
1738 1742
PDF
1738 1742
PDF
Prevention of SQL Injection Attack in Web Application with Host Language
PPTX
Secure Software Engineering
PDF
Improve cyber resiliency and protect data from cyber ransomware threats by us...
PDF
Ijcatr04041018
Devoid Web Application From SQL Injection Attack
SQL Injection Prevention by Adaptive Algorithm
E017131924
Security vulnerabilities related to web-based data
INTRUSION DETECTION IN MULTITIER WEB APPLICATIONS USING DOUBLEGUARD
Security For Application Development
SQLSecurity.ppt
SQLSecurity.ppt
Ld3420072014
Modern Data Security for the Enterprises – SQL Server & Azure SQL Database
SQL Injection and Clickjacking Attack in Web security
Sql security
A hybrid technique for sql injection attacks detection and prevention
International Journal of Engineering Inventions (IJEI)
1738 1742
1738 1742
Prevention of SQL Injection Attack in Web Application with Host Language
Secure Software Engineering
Improve cyber resiliency and protect data from cyber ransomware threats by us...
Ijcatr04041018

More from ijsrd.com (20)

PDF
IoT Enabled Smart Grid
PDF
A Survey Report on : Security & Challenges in Internet of Things
PDF
IoT for Everyday Life
PDF
Study on Issues in Managing and Protecting Data of IOT
PDF
Interactive Technologies for Improving Quality of Education to Build Collabor...
PDF
Internet of Things - Paradigm Shift of Future Internet Application for Specia...
PDF
A Study of the Adverse Effects of IoT on Student's Life
PDF
Pedagogy for Effective use of ICT in English Language Learning
PDF
Virtual Eye - Smart Traffic Navigation System
PDF
Ontological Model of Educational Programs in Computer Science (Bachelor and M...
PDF
Understanding IoT Management for Smart Refrigerator
PDF
DESIGN AND ANALYSIS OF DOUBLE WISHBONE SUSPENSION SYSTEM USING FINITE ELEMENT...
PDF
A Review: Microwave Energy for materials processing
PDF
Web Usage Mining: A Survey on User's Navigation Pattern from Web Logs
PDF
APPLICATION OF STATCOM to IMPROVED DYNAMIC PERFORMANCE OF POWER SYSTEM
PDF
Making model of dual axis solar tracking with Maximum Power Point Tracking
PDF
A REVIEW PAPER ON PERFORMANCE AND EMISSION TEST OF 4 STROKE DIESEL ENGINE USI...
PDF
Study and Review on Various Current Comparators
PDF
Reducing Silicon Real Estate and Switching Activity Using Low Power Test Patt...
PDF
Defending Reactive Jammers in WSN using a Trigger Identification Service.
IoT Enabled Smart Grid
A Survey Report on : Security & Challenges in Internet of Things
IoT for Everyday Life
Study on Issues in Managing and Protecting Data of IOT
Interactive Technologies for Improving Quality of Education to Build Collabor...
Internet of Things - Paradigm Shift of Future Internet Application for Specia...
A Study of the Adverse Effects of IoT on Student's Life
Pedagogy for Effective use of ICT in English Language Learning
Virtual Eye - Smart Traffic Navigation System
Ontological Model of Educational Programs in Computer Science (Bachelor and M...
Understanding IoT Management for Smart Refrigerator
DESIGN AND ANALYSIS OF DOUBLE WISHBONE SUSPENSION SYSTEM USING FINITE ELEMENT...
A Review: Microwave Energy for materials processing
Web Usage Mining: A Survey on User's Navigation Pattern from Web Logs
APPLICATION OF STATCOM to IMPROVED DYNAMIC PERFORMANCE OF POWER SYSTEM
Making model of dual axis solar tracking with Maximum Power Point Tracking
A REVIEW PAPER ON PERFORMANCE AND EMISSION TEST OF 4 STROKE DIESEL ENGINE USI...
Study and Review on Various Current Comparators
Reducing Silicon Real Estate and Switching Activity Using Low Power Test Patt...
Defending Reactive Jammers in WSN using a Trigger Identification Service.

Recently uploaded (20)

PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Feature types and data preprocessing steps
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPTX
Software Engineering and software moduleing
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
Current and future trends in Computer Vision.pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
PPTX
communication and presentation skills 01
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
Soil Improvement Techniques Note - Rabbi
Automation-in-Manufacturing-Chapter-Introduction.pdf
Feature types and data preprocessing steps
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Software Engineering and software moduleing
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
Current and future trends in Computer Vision.pptx
Fundamentals of safety and accident prevention -final (1).pptx
COURSE DESCRIPTOR OF SURVEYING R24 SYLLABUS
communication and presentation skills 01
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Nature of X-rays, X- Ray Equipment, Fluoroscopy
Soil Improvement Techniques Note - Rabbi

GreenSQL Security

  • 1. IJSRD - International Journal for Scientific Research & Development| Vol. 1, Issue 4, 2013 | ISSN (online): 2321-0613 All rights reserved by www.ijsrd.com 877 Abstract— In today's modern world, security is a necessary fact of life. GreenSQL Security helps small to large organizations protect their sensitive information against internal and external threats. The rule-based engine offers database firewall, intrusion detection and prevention (IDS/IPS). GreenSQL Security Engine applies exception detection to prevent hacker attacks, end-user intrusion and unauthorized access by privileged insiders. The system provides a web based intuitive and flexible policy framework that enables users to create and edit their security rules quickly and easily. GreenSQL interfaces between your database and any source requiring a connection to it. This approach shields your database application and database operating system from direct, remote access. GreenSQL Database Security 1) Stops SQL Injection attacks on your web application 2) Blocks unauthorized database access and alerts you in real time about unwanted access 3) Separates your application database access privileges from administrator access 4) Gives you a complete event log for investigating database traffic and access 5) Ensures you achieve successful implementation with 24/7 support Keywords: SQL injection, web architecture, SQL tautology, IDS (intrusion detection), IPS (intrusion prevention ) I. SQL INJECTION SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It is an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another. SQL injection is a basic attack used to either gain unauthorized access to database or to retrieve information directly from the database. SQL injection is a technique used to take advantage of no validated input vulnerabilities to pass SQL commands through a web application for execution by a backend database. SQL commands are injected from the web form into the databse of an application to change the databse content or dump the database information like creditcard or password to attacker. Most web applications include a back-end database, either running on a separate database server, or installed on the same machine as the web server itself. SQL Injection is one of the most common application layer attack techniques used today[1]. A. Web Application Architecture Web application commonly has three tiers: presentation, logic, and storage. The presentation tier is the topmost level of the application. It displays information related to such services as browsing merchandise, purchasing, and shopping cart contents, and it communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network. [2] The logic tier is pulled out from the presentation tier, and as its own layer, it controls an application’s functionality by performing detailed processing. The data tier consists of database servers. Here, information is stored and retrieved. This tier keeps data independent from application servers or business logic. Fig.1: Web Application Architecture Giving data its own tier also improves scalability and performance. In this Figure, the Web browser (presentation) sends requests to the middle tier (logic), which services GreenSQL Security Jaydeep K. Dabhi1 Ass. Prof. Tarun K. Sureja2 1 M.E. CE (I.T. Systems & Network Security) 2 M. Tech (CSE) 1 AVPTI, Rajkot, Gujarat Technological University 2 NIT, Rourkela S.P.B.Patel Engineering College, Mehsana, Gujarat
  • 2. GreenSQL Security (IJSRD/Vol. 1/Issue 4/2013/0018) All rights reserved by www.ijsrd.com 878 them by making queries and updates against the database (storage). A fundamental rule in three-tier architecture is that the presentation tier never communicates directly with the data tier; in a three-tier model, all communication must pass through the middleware tier. In this Figure, the user fires up his Web browser and connect to http://www.victim.com. The Web server that resides in the logic tier loads the script from the file system and passes it through its scripting engine, where it is parsed and executed. The script opens a connection to the storage tier using a database connector and executes an SQL statement against the database. The database returns the data to the database connector, which is passed to the scripting engine within the logic tier. The logic tier then implements any application or business logic rules before returning a Web page in HTML format to the user’s Web browser within the presentation tier. The user’s Web browser renders the HTML and presents the user with a graphical representation of the code. [4] B. GreenSQL GreenSQL database firewall used to protect databases from SQL injection attacks. GreenSQL works as a proxy for SQL commands and has built in support for MySQL & PostgreSQL. GreenSQL secure database from unauthorized access by monitoring every SQL command sent to the databases. GreenSQL helps business secure their information assets and demonstrate regulatory compliances. The logic is based on evaluation of SQL commands using a risk scoring matrix as well as blocking known db Administrative commands (DROP, CREATE, etch). GreenSQL is distributed under the GPL license. C. Calculating a query's risk GreenSQL calculates each query's risk. Essentially, this is an anomaly detection subsystem. After the risk is calculated, GreenSQL can block the query or just create a warning message (this depends on the application mode). There are a number of heuristics GreenSQL uses when calculating risk [6] For example, query risk is increased by: 1) Fingerprinting of Database (users, accounts, credit information) 2) Stack Based Query (Comments inside SQL commands) 3) An SQL expression that always returns true (SQL tautology)[10] II. SQL TAUTOLOGY This type of attack injects SQL tokens to the conditional query statement to be evaluated always true. This type of attack used to bypass authentication control and access to data by exploiting vulnerable input field which use WHERE clause. "SELECT * FROM employee WHERE userid = '112' and password ='aaa' OR '1 '='1 III As the tautology statement (1=1) has been added to the query statement so it is always true.[11] III. MODES OF GREENSQL The GreenSQL db firewall can be used in a number of ways:[7][8][9] 1) IDS 2) IPS 3) Learning mode 4) Database firewall A. IDS Mode During Simulation Mode basically nothing is blocked. GreenSQL works as a database IDS system (IDS stands for Intrusion Detection System).During this mode, our risk scoring matrix engine identifies suspicious queries and notifies the database administrator using the GreenSQL Management Console. B. IPS Mode When the system is configured to Block Suspicious Commands, GreenSQL uses its heuristics engine to find "illegal" queries and block them automatically. In this mode, GreenSQL is basically a database IPS system (IPS is Intrusion Prevention System). If a query is considered illegal, a whitelist is checked. If it is found in the whitelist, it will be redirected to the genuine MySQL server. If it is found to be "illegal", GreenSQL will return an empty result set to THE application. During this mode, GreenSQL can sometimes generate false positive and false negative errors. As a result, some legal queries may be blocked or the GreenSQL system may pass through an "illegal" query undetected. These are the pros and cons of IPS systems. GreenSQL is constantly improving its heuristics engine but it is still not perfect. C. Learning Mode The above methods we recommend enabling Learning Mode and then, after the learning period is over, switching to the Active protection from unknown queries. During the learning mode, all queries are automatically added to the whitelist. When the learning mode is over, GreenSQL automatically enables active protection. D. Database Firewall Mode When Active protection from unknown queries mode is enabled, all unknown commands are blocked. This is database firewall mode. When an unknown SQL command is detected, it is automatically blocked.
  • 3. GreenSQL Security (IJSRD/Vol. 1/Issue 4/2013/0018) All rights reserved by www.ijsrd.com 879 IV. GREENSQL ARCHITECTURE GreenSQL works as a reverse proxy for MySQL connections. This means, that instead of connecting TO THE MySQL server, your applications will connect to THE GreenSQL server. [9] GreenSQL will analyze SQL queries and then, if they're safe, will forward them to the back-end MySQL server. The following picture describes the whole process. [12][7] Fig 2: GreenSQL Architecture As you can see, GreenSQL calls the real database server to execute SQL commands and the web application connects to the GreenSQL server as if it were a real database server. GreenSQL can be installed together with the database server on the same computer or it can use a distinct server. By default GreenSQL listens on local port 127.0.0.1:3305 redirecting SQL requests to 127.0.0.1:3306 (the default MySQL setting). These settings can be altered using the GreenSQL Console. V. CONCLUSION 1) Provides great security regarding different sql attacks. 2) Can be used as a penetration tool!!! REFERENCES [1] Justin Clarke, SQL Injection Attacks and Defense, Second Edition, Syngress Publication, July 2, 2012,ISBN-13: 978-1597494243 [2] GreenSQL Available: http://www.greensql.net/ [3] GreenSQL Available: http://www.howtoforge.com/preventing-mysql- injection-attacks-with-greensql-on-debian-etch [4] GreenSQL Available: http://www.greensql.com/docs [5] GreenSQL Available: http://www.greensql.com/support/knowledge [6] GreenSQL Available: http://www.greensql.com/why- greensql-db-security/top-10-reasons [7] GreenSQL Available: http://community.spiceworks.com/topic/212598- database-firewall-greensql [8] GreenSQL Available: http://www.techrepublic.com/blog/opensource/firewall- mysql-with-greensql/317 [9] GreenSQL Available: http://opensourcedba.wordpress.com/2012/03/26/databas e-firewalls-from-oracle-and-greensql/