SlideShare a Scribd company logo
Authors : Chintan Panjwani,Shivkumar Mishra,Prof. Veena
Kulkarni
Random4 and hirshberg algorithm
Introduction
• SQLIA is a type of attack in which the attacker tries to enter the
system by manipulating SQL queries i.e. by injecting malicious
queries in input fields of a web application
• Random4 algorithm is basically used to encrypt the data from
the input fields of application by using a lookup table for
encryption
• Hirschberg algorithm uses dynamic programming approach for
finding an optimal sequence alignment
Types of SQLI attacks
• Tautology
SELECT * FROM TABLE WHERE UNAME=”ABC” AND PWD=”ANYTHING” OR ‘1’=’1’;
As 1=1 is always true, attacker gains access to the database.
• Incorrect queries
Error: SELECT USERNAME,PASSWORD FROM STUDENT WHERE USERNAME=ABC’
• Piggy backed queries
SELECT * FROM USER WHWRE ID=123; DROP TABLE USER;
• Blind Injection
Execution model
• Random4 framework
Random4 lookup table Encryption technique
Execution model
• Hirschberg algorithm
Hirschberg algorithm Using Hirschberg Algorithm to find
similarities
Prevention strategies
• For Tautology
‘1’=‘1’ gets encrypted so it returns false
• For Piggy backed queries
Eg. “User” becomes “UserA2;h”
• For Incorrect queries
Similar to piggy backed queries
• For Blind Injection
Eg. “123” becomes “g4a”
Complexity analysis
• Hirschberg algorithm
– Time Complexity
O(nm)
where n is string in the database and m is the input data
– Space Complexity
O(min(m , n))
• Random4 algorithm
– Time Complexity
Encryption requires to access the lookup table which increases the time complexity compared to
Hirschberg algorithm
– Space Complexity
The lookup table also needs to be stored which increases the space complexity
Comparison
Sr. no. Parameters Random4 Hirschberg
1. Encryption User input Not required
2. Computational overhead Less More
3. Time complexity Less More
4. Space complexity Less More
Random4 and hirshberg algorithm
Random4 and hirshberg algorithm
©2015 TCET. All rights reserved. The information herein is for informational purposes only and represents the current view of TCET IT Department as of the date of this presentation.

More Related Content

PPTX
NFD InterestDigest
PDF
The Heatmap
 - Why is Security Visualization so Hard?
PPTX
Cyber Attacks Spatial Analysis
PDF
201411203 goto night on graphs for fraud detection
PDF
Research Plan 2014
PPSX
Secure and Privacy-Preserving Big-Data Processing
PPTX
Securing Text Messages Application Using MED
PDF
chapter 1-4.pdf
NFD InterestDigest
The Heatmap
 - Why is Security Visualization so Hard?
Cyber Attacks Spatial Analysis
201411203 goto night on graphs for fraud detection
Research Plan 2014
Secure and Privacy-Preserving Big-Data Processing
Securing Text Messages Application Using MED
chapter 1-4.pdf

Similar to Random4 and hirshberg algorithm (20)

PDF
information technology cryptography Msc chapter 1-4.pdf
PPTX
Crytography
PPTX
NS Classical Encryption Techniqnbbghghgues.pptx
PPTX
Introduction to cryptography part1-final
PPTX
sourabh_sipPPT.pptx
PPTX
Encryption techniques
PPTX
Cryptography and Network Security-ch1-4.pptx
PPTX
Ch9_Cryptokkkllllllllllllllllllllk6e.pptx
PPTX
PDF
H4CK1N6 - Web Application Security
PPTX
Detailed description about the concept of E Commerce UNIT IV.pptx
PPTX
Secure Coding 101 - OWASP University of Ottawa Workshop
PPTX
1. Cryptography Symmetric Cryptography.pptx
PDF
Basics of Data Security and Cryptographic techniques
PPT
NETWORK SECURITY
PPT
Lecture-01,02.ppt introduction to INFORMATION SECURITY, WEEK 1 , basics
PPT
CRYPTOGRAPHY
PPTX
Image Security
PPTX
Cryptography
PDF
Application Lecurity Lectures by professor
information technology cryptography Msc chapter 1-4.pdf
Crytography
NS Classical Encryption Techniqnbbghghgues.pptx
Introduction to cryptography part1-final
sourabh_sipPPT.pptx
Encryption techniques
Cryptography and Network Security-ch1-4.pptx
Ch9_Cryptokkkllllllllllllllllllllk6e.pptx
H4CK1N6 - Web Application Security
Detailed description about the concept of E Commerce UNIT IV.pptx
Secure Coding 101 - OWASP University of Ottawa Workshop
1. Cryptography Symmetric Cryptography.pptx
Basics of Data Security and Cryptographic techniques
NETWORK SECURITY
Lecture-01,02.ppt introduction to INFORMATION SECURITY, WEEK 1 , basics
CRYPTOGRAPHY
Image Security
Cryptography
Application Lecurity Lectures by professor
Ad

Recently uploaded (20)

PPT
Mechanical Engineering MATERIALS Selection
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Current and future trends in Computer Vision.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Sustainable Sites - Green Building Construction
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
web development for engineering and engineering
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Mechanical Engineering MATERIALS Selection
Automation-in-Manufacturing-Chapter-Introduction.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
CYBER-CRIMES AND SECURITY A guide to understanding
Current and future trends in Computer Vision.pptx
UNIT 4 Total Quality Management .pptx
Sustainable Sites - Green Building Construction
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
web development for engineering and engineering
Internet of Things (IOT) - A guide to understanding
additive manufacturing of ss316l using mig welding
Safety Seminar civil to be ensured for safe working.
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Model Code of Practice - Construction Work - 21102022 .pdf
Foundation to blockchain - A guide to Blockchain Tech
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Ad

Random4 and hirshberg algorithm

  • 1. Authors : Chintan Panjwani,Shivkumar Mishra,Prof. Veena Kulkarni
  • 3. Introduction • SQLIA is a type of attack in which the attacker tries to enter the system by manipulating SQL queries i.e. by injecting malicious queries in input fields of a web application • Random4 algorithm is basically used to encrypt the data from the input fields of application by using a lookup table for encryption • Hirschberg algorithm uses dynamic programming approach for finding an optimal sequence alignment
  • 4. Types of SQLI attacks • Tautology SELECT * FROM TABLE WHERE UNAME=”ABC” AND PWD=”ANYTHING” OR ‘1’=’1’; As 1=1 is always true, attacker gains access to the database. • Incorrect queries Error: SELECT USERNAME,PASSWORD FROM STUDENT WHERE USERNAME=ABC’ • Piggy backed queries SELECT * FROM USER WHWRE ID=123; DROP TABLE USER; • Blind Injection
  • 5. Execution model • Random4 framework Random4 lookup table Encryption technique
  • 6. Execution model • Hirschberg algorithm Hirschberg algorithm Using Hirschberg Algorithm to find similarities
  • 7. Prevention strategies • For Tautology ‘1’=‘1’ gets encrypted so it returns false • For Piggy backed queries Eg. “User” becomes “UserA2;h” • For Incorrect queries Similar to piggy backed queries • For Blind Injection Eg. “123” becomes “g4a”
  • 8. Complexity analysis • Hirschberg algorithm – Time Complexity O(nm) where n is string in the database and m is the input data – Space Complexity O(min(m , n)) • Random4 algorithm – Time Complexity Encryption requires to access the lookup table which increases the time complexity compared to Hirschberg algorithm – Space Complexity The lookup table also needs to be stored which increases the space complexity
  • 9. Comparison Sr. no. Parameters Random4 Hirschberg 1. Encryption User input Not required 2. Computational overhead Less More 3. Time complexity Less More 4. Space complexity Less More
  • 12. ©2015 TCET. All rights reserved. The information herein is for informational purposes only and represents the current view of TCET IT Department as of the date of this presentation.