SlideShare a Scribd company logo
.lusoftware verification & validation
VVS
A Search-based Testing Approach for XML
Injection Vulnerabilities in Web Applications
Sadeeq Jan, Cu D. Nguyen, Andrea Arcuri, Lionel Briand
SnT, University of Luxembourg,
Luxembourg
ICST2017
10th IEEE International Conference on Software Testing, Verification and Validation
13-17 March 2017, Tokyo,Japan
Background & Context
2
3
• Bypassing authentication
• Privilege escalation
• Information disclosure
• Generating errors/system crash
Impact
Definition
Injecting malicious content into XML files/messages to manipulate
or compromise the logic of an application or service
XML Injection
4
Example: Web Application for User
Registration with XML Database
Create new account
<user>
<username>Tom</username>
<password>m1U9q10</password>
<role>user</role>
<mail>a@b.com</mail>
</user>
<user>
<username>admin</username>
<password>s4n3p81</password>
<role>Administrator</role>
<mail>sv-admin@gmail.com</mail>
</user>
…..
......
<user>
<username>Tom</username>
<password>m1U9q10</password>
<role>user</role>
<mail>a@b.com</mail>
</user>
XML
Database
<user>
<username>Tom</username>
<password>m1U9q10</password>
<!--
</password>
<role>user</role>
<mail>
-->
<role>Administrator</role>
<mail>a@b.com</mail>
</user>
Web Form
Generated XML Message
Well-formed and valid
--><role>Administrator<role><mail>a@b.com
m1U9q10</password><!--
5
XML Injection Example
(Privilege Escalation)
Malicious strings for SQL injection or Cross-site scripting can also be used here.
Approach
6
Testing Focus
Front-end
System
XML
I1
I2
In
Generated XML
Messages
Back-end
Systems
System 1
System 2
System n
7
XML based Systems
• Is the front-end system (SUT) vulnerable to XML Injections?
• Step 1: Create/obtain a set of malicious XML messages
8
How to test the front-end system?
Front-end
System
XML
I1
I2
In
Generated XML
Messages
Back-end
Systems
System 1
System 2
System n
9
An example of a malicious XML message
created with SOLMI tool
SOLMI
Generation of Malicious XML Messages
• Automatically generating malicious XML messages for different types of
XML Injection
• Addressed by our tool SOLMI (ISSTA'16)
10
How to test the front-end system?
• Is the front-end system (SUT) vulnerable to XML Injections?
• Step 2: Search for inputs that can result in one of the malicious XML
messages (TO)
• If such inputs exist, the front-end system is vulnerable, i.e., testing
for TO coverage
Front-end
System
XML
I1
I2
In
Generated XML
Messages
Back-end
Systems
System 1
System 2
System n
SUT
11
Proposed Approach:
Search-based Testing (SBT)
Front-end
System
XML
I1
I2
In
Generated XML
Messages
Back-end
Systems
System 1
System 2
System n
Search input space to generate malicious XML output,
if possible
• Input space is very large (all
possible values of I1, I2…In)
• Front-end system à Black-box
• Adapted when source code is not
available (e.g., external penetration
testing)
XML
I1
I2
In
Front-end
System
Why SBT Approach for XML Injections?
12
Select * from Users where UserName = 'Mike' and
Passwrd = 'abc' OR '1'='1'
Unknown input-output transformations
13
Rejects inputs containing malicious characters
e.g., <,
Converts malicious input to valid ones e.g., delete
any text between < and >
Domain specific transformation e.g., JSON to
XML, calculating age from DOB etc.
Passwrd: abc' O<script>R <script>'1'='1
Passwrd: abc' <script…..> abc'
abc' OR '1'='1
Validation
Sanitisation
Other
transformations
SBT Approach for XML Injection
14
Test Objectives
(malicious XML messages)
TO1 TO2 TOn
XML XML XML
I1
I2
In
Front-end
System
(SUT)
XML
Generated XML
Messages
Test Case
Generator
Fitness
Function
Genetic Algorithm
String Edit Distance (Levenshtein distance)
<user>
<username>Tom</username>
<password>m1U9q10</password>
<role>user</role>
<mail>a</mail>
<role>Administrator</role>
<mail>tom@uni.lu</mail>
</user>
Test Objective (TO)
I1à username: Tom
I2à password: m1U9q10
I3à Email: “role=Adm”+tom@uni.lu
<user>
<username>Tom</username>
<password>m1U9q10</password>
<role>user</role>
<mail>role=Adm+
tom@uni.lu</mail>
</user>
Generated XML
Fitness Function (d)
-Distance between the output XML
message and the TO
d1=20
Test Generation & Fitness Function (dt-o)
Goal: Minimize d (0 is ideal)
Test Case1
15
I1
I2
In
Front-end
System
(SUT)
Test Case
Generator
<user>
<username>Tom</username>
<password>m1U9q10</password>
<role>user</role>
<mail>a</mail>
<role>Administrator</role>
<mail>tom@uni.lu</mail>
</user>
Test Objective (TO)
I1à username: Tom
I2à password: m1U9q10
I3à Email: <role>Administrator</peho>tom@uni.lu
<user>
<username>Tom</username>
<password>m1U9q10</password>
<role>user</role>
<mail> <role>Administrator<role>
<peho>tom@uni.lu </mail>
</user>
Generated XML
d2=10
Test Generation & Fitness Function (dt-o)
Goal: Minimize d (0 is ideal)
d2 < d1
(Test Case 2 is better Test Case 1)
Fitness Function (d)
-Distance between the output XML
message and the TO
16
I1
I2
In
Front-end
System
(SUT)
Test Case
Generator
Test Case2
Evaluation & Results
17
Research Questions
To what extent is our search-based approach effective in
detecting XMLi vulnerabilities?
How does our search-based approach perform
compared to random search?
18
RQ1: Effectiveness
RQ2: Comparison with random search
What is the cost, in terms of execution time, of applying
the proposed approach?
RQ3: Efficiency
Additional RQs
• Impact of input validation (RQ4)
• Impact of the number of input parameters (RQ5)
• Impact of input alphabet size (RQ6)
• Using all ASCII characters vs only those present in TOs
19
20
• Insecure Front-end for Bank Card Processing System (SBANK)
• Secure Front-end for Bank Card Processing System (SSBANK)
Study 1: RQs 1 to 6
• Open Source Web App (XMLMAO)
• Industrial Application (M)
Study 2: RQs 1 to 3
Subjects
Summary of Results
21
Application
TO Coverage
(SBT)
TO Coverage
(Random Search)
Avg. Exec time per TO
(min-max) in mins
SBANK
(Insecure)
98/98 (100%) 0 10-31
SSBANK
(Secure)
36/98 (36.73%) 0 11-25
XMLMao
(open source)
24/24 (100%) 0 5-7
M
(Industrial App)
1/4 (25 %) 0 32
Note: Each experiment was repeated 10 Times to account for randomness.
The proposed SBT approach is highly effective in searching
for inputs to detect XML Injection vulnerabilities, when they
exist.
Random Search could not cover a single TO in any
experiment, while the proposed approach covered all possible
TOs.
22
RQ1: Effectiveness
RQ2: Comparison with random search
Answers to RQs
The average execution time ranges from 5 to 32 minutes per
TO, which is acceptable in practice.
RQ3: Efficiency
Input validation adversely affects the TO coverage.
23
RQ4: Impact of input validation
Answers to Additional RQs
Increasing the number of input parameters makes the search
harder.
Using restricted alphabet makes the search easier.
RQ6: Impact of input alphabet size
RQ5: Impact of the number of input parameters
• A novel search-based testing approach for the
detection of XML Injections
• Extensive evaluation of the approach
• Highly effective in searching for inputs to detect
XML Injection vulnerabilities
• Random search does not work at all
• Generalizable to other types of attacks
Conclusion
24
Summary
25
Ad

Recommended

Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
Lionel Briand
 
Applications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security Testing
Lionel Briand
 
Search-driven String Constraint Solving for Vulnerability Detection
Search-driven String Constraint Solving for Vulnerability Detection
Lionel Briand
 
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Lionel Briand
 
System Testing of Timing Requirements based on Use Cases and Timed Automata
System Testing of Timing Requirements based on Use Cases and Timed Automata
Lionel Briand
 
Testing of Cyber-Physical Systems: Diversity-driven Strategies
Testing of Cyber-Physical Systems: Diversity-driven Strategies
Lionel Briand
 
Improving Fault Localization for Simulink Models using Search-Based Testing a...
Improving Fault Localization for Simulink Models using Search-Based Testing a...
Lionel Briand
 
AN EMPIRICAL STUDY ON THE POTENTIAL USEFULNESS OF DOMAIN MODELS FOR COMPLETEN...
AN EMPIRICAL STUDY ON THE POTENTIAL USEFULNESS OF DOMAIN MODELS FOR COMPLETEN...
Lionel Briand
 
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
Lionel Briand
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
Sung Kim
 
HITECS: A UML Profile and Analysis Framework for Hardware-in-the-Loop Testing...
HITECS: A UML Profile and Analysis Framework for Hardware-in-the-Loop Testing...
Lionel Briand
 
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Lionel Briand
 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Lionel Briand
 
SSBSE 2020 keynote
SSBSE 2020 keynote
Shiva Nejati
 
Scalable and Cost-Effective Model-Based Software Verification and Testing
Scalable and Cost-Effective Model-Based Software Verification and Testing
Lionel Briand
 
Research-Based Innovation with Industry: Project Experience and Lessons Learned
Research-Based Innovation with Industry: Project Experience and Lessons Learned
Lionel Briand
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
Sung Kim
 
Requirements in Cyber-Physical Systems: Specifications and Applications
Requirements in Cyber-Physical Systems: Specifications and Applications
Lionel Briand
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
Sung Kim
 
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
Iosif Itkin
 
Dynamic Adaptation of Software-defined Networks for IoT Systems: A Search-bas...
Dynamic Adaptation of Software-defined Networks for IoT Systems: A Search-bas...
Lionel Briand
 
Comparing Offline and Online Testing of Deep Neural Networks: An Autonomous C...
Comparing Offline and Online Testing of Deep Neural Networks: An Autonomous C...
Lionel Briand
 
Model-driven trace diagnostics for pattern-based temporal specifications
Model-driven trace diagnostics for pattern-based temporal specifications
Lionel Briand
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Sung Kim
 
Dissertation Defense
Dissertation Defense
Sung Kim
 
A Machine-Learning Approach for Demarcating Requirements in Textual Specifica...
A Machine-Learning Approach for Demarcating Requirements in Textual Specifica...
Lionel Briand
 
Enabling Model Testing of Cyber Physical Systems
Enabling Model Testing of Cyber Physical Systems
Lionel Briand
 
Known XML Vulnerabilities Are Still a Threat to Popular Parsers ! & Open Sour...
Known XML Vulnerabilities Are Still a Threat to Popular Parsers ! & Open Sour...
Lionel Briand
 
Learning Pulse - paper presentation at LAK17
Learning Pulse - paper presentation at LAK17
Daniele Di Mitri
 
Modernismo americano.
Modernismo americano.
valeriarahal
 

More Related Content

What's hot (20)

OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
Lionel Briand
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
Sung Kim
 
HITECS: A UML Profile and Analysis Framework for Hardware-in-the-Loop Testing...
HITECS: A UML Profile and Analysis Framework for Hardware-in-the-Loop Testing...
Lionel Briand
 
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Lionel Briand
 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Lionel Briand
 
SSBSE 2020 keynote
SSBSE 2020 keynote
Shiva Nejati
 
Scalable and Cost-Effective Model-Based Software Verification and Testing
Scalable and Cost-Effective Model-Based Software Verification and Testing
Lionel Briand
 
Research-Based Innovation with Industry: Project Experience and Lessons Learned
Research-Based Innovation with Industry: Project Experience and Lessons Learned
Lionel Briand
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
Sung Kim
 
Requirements in Cyber-Physical Systems: Specifications and Applications
Requirements in Cyber-Physical Systems: Specifications and Applications
Lionel Briand
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
Sung Kim
 
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
Iosif Itkin
 
Dynamic Adaptation of Software-defined Networks for IoT Systems: A Search-bas...
Dynamic Adaptation of Software-defined Networks for IoT Systems: A Search-bas...
Lionel Briand
 
Comparing Offline and Online Testing of Deep Neural Networks: An Autonomous C...
Comparing Offline and Online Testing of Deep Neural Networks: An Autonomous C...
Lionel Briand
 
Model-driven trace diagnostics for pattern-based temporal specifications
Model-driven trace diagnostics for pattern-based temporal specifications
Lionel Briand
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Sung Kim
 
Dissertation Defense
Dissertation Defense
Sung Kim
 
A Machine-Learning Approach for Demarcating Requirements in Textual Specifica...
A Machine-Learning Approach for Demarcating Requirements in Textual Specifica...
Lionel Briand
 
Enabling Model Testing of Cyber Physical Systems
Enabling Model Testing of Cyber Physical Systems
Lionel Briand
 
Known XML Vulnerabilities Are Still a Threat to Popular Parsers ! & Open Sour...
Known XML Vulnerabilities Are Still a Threat to Popular Parsers ! & Open Sour...
Lionel Briand
 
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
Lionel Briand
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
Sung Kim
 
HITECS: A UML Profile and Analysis Framework for Hardware-in-the-Loop Testing...
HITECS: A UML Profile and Analysis Framework for Hardware-in-the-Loop Testing...
Lionel Briand
 
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Lionel Briand
 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Lionel Briand
 
SSBSE 2020 keynote
SSBSE 2020 keynote
Shiva Nejati
 
Scalable and Cost-Effective Model-Based Software Verification and Testing
Scalable and Cost-Effective Model-Based Software Verification and Testing
Lionel Briand
 
Research-Based Innovation with Industry: Project Experience and Lessons Learned
Research-Based Innovation with Industry: Project Experience and Lessons Learned
Lionel Briand
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
Sung Kim
 
Requirements in Cyber-Physical Systems: Specifications and Applications
Requirements in Cyber-Physical Systems: Specifications and Applications
Lionel Briand
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
Sung Kim
 
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
Iosif Itkin
 
Dynamic Adaptation of Software-defined Networks for IoT Systems: A Search-bas...
Dynamic Adaptation of Software-defined Networks for IoT Systems: A Search-bas...
Lionel Briand
 
Comparing Offline and Online Testing of Deep Neural Networks: An Autonomous C...
Comparing Offline and Online Testing of Deep Neural Networks: An Autonomous C...
Lionel Briand
 
Model-driven trace diagnostics for pattern-based temporal specifications
Model-driven trace diagnostics for pattern-based temporal specifications
Lionel Briand
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Sung Kim
 
Dissertation Defense
Dissertation Defense
Sung Kim
 
A Machine-Learning Approach for Demarcating Requirements in Textual Specifica...
A Machine-Learning Approach for Demarcating Requirements in Textual Specifica...
Lionel Briand
 
Enabling Model Testing of Cyber Physical Systems
Enabling Model Testing of Cyber Physical Systems
Lionel Briand
 
Known XML Vulnerabilities Are Still a Threat to Popular Parsers ! & Open Sour...
Known XML Vulnerabilities Are Still a Threat to Popular Parsers ! & Open Sour...
Lionel Briand
 

Viewers also liked (13)

Learning Pulse - paper presentation at LAK17
Learning Pulse - paper presentation at LAK17
Daniele Di Mitri
 
Modernismo americano.
Modernismo americano.
valeriarahal
 
TCI network for practitioners
TCI network for practitioners
Dr. Amit Kapoor
 
Actividad 11 de yamileth lópez requena
Actividad 11 de yamileth lópez requena
Yamileth López Requena
 
Departamento de producción
Departamento de producción
Monserrat Correa
 
Presentation on healthy relationships
Presentation on healthy relationships
corrieperdok
 
Contenido1
Contenido1
mnunezg
 
Universidad politecnica
Universidad politecnica
Peglys Lopez
 
Leccion 5.2 sigh 2017
Leccion 5.2 sigh 2017
Sergio Sanchez
 
Leccion 5.3 qsoft 2017
Leccion 5.3 qsoft 2017
Sergio Sanchez
 
Leccion 5.1 tesis his 2017
Leccion 5.1 tesis his 2017
Sergio Sanchez
 
Descascarillado
Descascarillado
Martín Vinces Alava
 
Wheelster hoverboard riding techniques
Wheelster hoverboard riding techniques
Wheelster Inc.
 
Learning Pulse - paper presentation at LAK17
Learning Pulse - paper presentation at LAK17
Daniele Di Mitri
 
Modernismo americano.
Modernismo americano.
valeriarahal
 
TCI network for practitioners
TCI network for practitioners
Dr. Amit Kapoor
 
Departamento de producción
Departamento de producción
Monserrat Correa
 
Presentation on healthy relationships
Presentation on healthy relationships
corrieperdok
 
Contenido1
Contenido1
mnunezg
 
Universidad politecnica
Universidad politecnica
Peglys Lopez
 
Leccion 5.3 qsoft 2017
Leccion 5.3 qsoft 2017
Sergio Sanchez
 
Leccion 5.1 tesis his 2017
Leccion 5.1 tesis his 2017
Sergio Sanchez
 
Wheelster hoverboard riding techniques
Wheelster hoverboard riding techniques
Wheelster Inc.
 
Ad

Similar to A Search-based Testing Approach for XML Injection Vulnerabilities in Web Applications (20)

Automated Vulnerability Testing Using Machine Learning and Metaheuristic Search
Automated Vulnerability Testing Using Machine Learning and Metaheuristic Search
Lionel Briand
 
Automated and Effective Testing of Web Services for XML Injection Attacks
Automated and Effective Testing of Web Services for XML Injection Attacks
Lionel Briand
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
InMobi Technology
 
FORENSIC PRESTTN
FORENSIC PRESTTN
Rufa'i Mustapha
 
A Validation Model of Data Input for Web Services
A Validation Model of Data Input for Web Services
Rafael Brinhosa
 
Selenium Conference 2014 -- Bangalore
Selenium Conference 2014 -- Bangalore
Prasanna Kanagasabai
 
Pentester's Mindset! - Ravikumar Paghdal
Pentester's Mindset! - Ravikumar Paghdal
NSConclave
 
Presentation by Lionel Briand
Presentation by Lionel Briand
Ptidej Team
 
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Lionel Briand
 
Application Context and Discovering XSS without
Application Context and Discovering XSS without
Todd Benson (I.T. SPECIALIST and I.T. SECURITY)
 
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
ijwscjournal
 
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
ijwscjournal
 
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
ijwscjournal
 
a
a
Sandeep Kumar
 
Attacks on web services need to secure xml on web
Attacks on web services need to secure xml on web
cseij
 
Integrated security testing public
Integrated security testing public
Morgan Roman
 
Xss talk, attack and defense
Xss talk, attack and defense
Prakashchand Suthar
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA
guestfdcb8a
 
Hacking WebApps for fun and profit : how to approach a target?
Hacking WebApps for fun and profit : how to approach a target?
Yassine Aboukir
 
Timing attacks have never been so practical: Advance cross site search attacks
Timing attacks have never been so practical: Advance cross site search attacks
Priyanka Aash
 
Automated Vulnerability Testing Using Machine Learning and Metaheuristic Search
Automated Vulnerability Testing Using Machine Learning and Metaheuristic Search
Lionel Briand
 
Automated and Effective Testing of Web Services for XML Injection Attacks
Automated and Effective Testing of Web Services for XML Injection Attacks
Lionel Briand
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
InMobi Technology
 
A Validation Model of Data Input for Web Services
A Validation Model of Data Input for Web Services
Rafael Brinhosa
 
Selenium Conference 2014 -- Bangalore
Selenium Conference 2014 -- Bangalore
Prasanna Kanagasabai
 
Pentester's Mindset! - Ravikumar Paghdal
Pentester's Mindset! - Ravikumar Paghdal
NSConclave
 
Presentation by Lionel Briand
Presentation by Lionel Briand
Ptidej Team
 
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Lionel Briand
 
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
ijwscjournal
 
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
ijwscjournal
 
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
PXpathV: Preventing XPath Injection Vulnerabilities in Web Applications
ijwscjournal
 
Attacks on web services need to secure xml on web
Attacks on web services need to secure xml on web
cseij
 
Integrated security testing public
Integrated security testing public
Morgan Roman
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA
guestfdcb8a
 
Hacking WebApps for fun and profit : how to approach a target?
Hacking WebApps for fun and profit : how to approach a target?
Yassine Aboukir
 
Timing attacks have never been so practical: Advance cross site search attacks
Timing attacks have never been so practical: Advance cross site search attacks
Priyanka Aash
 
Ad

More from Lionel Briand (20)

LTM: Scalable and Black-box Similarity-based Test Suite Minimization based on...
LTM: Scalable and Black-box Similarity-based Test Suite Minimization based on...
Lionel Briand
 
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
Automated Test Case Repair Using Language Models
Automated Test Case Repair Using Language Models
Lionel Briand
 
Automated Testing and Safety Analysis of Deep Neural Networks
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
Lionel Briand
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
Lionel Briand
 
Metamorphic Testing for Web System Security
Metamorphic Testing for Web System Security
Lionel Briand
 
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Lionel Briand
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation Testing
Lionel Briand
 
Data-driven Mutation Analysis for Cyber-Physical Systems
Data-driven Mutation Analysis for Cyber-Physical Systems
Lionel Briand
 
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Lionel Briand
 
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
Lionel Briand
 
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Lionel Briand
 
PRINS: Scalable Model Inference for Component-based System Logs
PRINS: Scalable Model Inference for Component-based System Logs
Lionel Briand
 
Revisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software Testing
Lionel Briand
 
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Lionel Briand
 
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Lionel Briand
 
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Lionel Briand
 
LTM: Scalable and Black-box Similarity-based Test Suite Minimization based on...
LTM: Scalable and Black-box Similarity-based Test Suite Minimization based on...
Lionel Briand
 
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
Automated Test Case Repair Using Language Models
Automated Test Case Repair Using Language Models
Lionel Briand
 
Automated Testing and Safety Analysis of Deep Neural Networks
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
Lionel Briand
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
Lionel Briand
 
Metamorphic Testing for Web System Security
Metamorphic Testing for Web System Security
Lionel Briand
 
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Lionel Briand
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation Testing
Lionel Briand
 
Data-driven Mutation Analysis for Cyber-Physical Systems
Data-driven Mutation Analysis for Cyber-Physical Systems
Lionel Briand
 
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Lionel Briand
 
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
Lionel Briand
 
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Lionel Briand
 
PRINS: Scalable Model Inference for Component-based System Logs
PRINS: Scalable Model Inference for Component-based System Logs
Lionel Briand
 
Revisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software Testing
Lionel Briand
 
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Lionel Briand
 
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Lionel Briand
 
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Lionel Briand
 

Recently uploaded (20)

Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Top Time Tracking Solutions for Accountants
Top Time Tracking Solutions for Accountants
oliviareed320
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
mary rojas
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
Humans vs AI Call Agents - Qcall.ai's Special Report
Humans vs AI Call Agents - Qcall.ai's Special Report
Udit Goenka
 
Heat Treatment Process Automation in India
Heat Treatment Process Automation in India
Reckers Mechatronics
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
Microsoft-365-Administrator-s-Guide1.pdf
Microsoft-365-Administrator-s-Guide1.pdf
mazharatknl
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
WSO2
 
University Campus Navigation for All - Peak of Data & AI
University Campus Navigation for All - Peak of Data & AI
Safe Software
 
Simplify Insurance Regulations with Compliance Management Software
Simplify Insurance Regulations with Compliance Management Software
Insurance Tech Services
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
Test Case Design Techniques – Practical Examples & Best Practices in Software...
Test Case Design Techniques – Practical Examples & Best Practices in Software...
Muhammad Fahad Bashir
 
Digital Transformation: Automating the Placement of Medical Interns
Digital Transformation: Automating the Placement of Medical Interns
Safe Software
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Top Time Tracking Solutions for Accountants
Top Time Tracking Solutions for Accountants
oliviareed320
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
mary rojas
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
Humans vs AI Call Agents - Qcall.ai's Special Report
Humans vs AI Call Agents - Qcall.ai's Special Report
Udit Goenka
 
Heat Treatment Process Automation in India
Heat Treatment Process Automation in India
Reckers Mechatronics
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
Microsoft-365-Administrator-s-Guide1.pdf
Microsoft-365-Administrator-s-Guide1.pdf
mazharatknl
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
Foundations of Marketo Engage - Programs, Campaigns & Beyond - June 2025
BradBedford3
 
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
WSO2
 
University Campus Navigation for All - Peak of Data & AI
University Campus Navigation for All - Peak of Data & AI
Safe Software
 
Simplify Insurance Regulations with Compliance Management Software
Simplify Insurance Regulations with Compliance Management Software
Insurance Tech Services
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
Test Case Design Techniques – Practical Examples & Best Practices in Software...
Test Case Design Techniques – Practical Examples & Best Practices in Software...
Muhammad Fahad Bashir
 
Digital Transformation: Automating the Placement of Medical Interns
Digital Transformation: Automating the Placement of Medical Interns
Safe Software
 

A Search-based Testing Approach for XML Injection Vulnerabilities in Web Applications

  • 1. .lusoftware verification & validation VVS A Search-based Testing Approach for XML Injection Vulnerabilities in Web Applications Sadeeq Jan, Cu D. Nguyen, Andrea Arcuri, Lionel Briand SnT, University of Luxembourg, Luxembourg ICST2017 10th IEEE International Conference on Software Testing, Verification and Validation 13-17 March 2017, Tokyo,Japan
  • 3. 3 • Bypassing authentication • Privilege escalation • Information disclosure • Generating errors/system crash Impact Definition Injecting malicious content into XML files/messages to manipulate or compromise the logic of an application or service XML Injection
  • 4. 4 Example: Web Application for User Registration with XML Database Create new account <user> <username>Tom</username> <password>m1U9q10</password> <role>user</role> <mail>[email protected]</mail> </user> <user> <username>admin</username> <password>s4n3p81</password> <role>Administrator</role> <mail>[email protected]</mail> </user> ….. ...... <user> <username>Tom</username> <password>m1U9q10</password> <role>user</role> <mail>[email protected]</mail> </user> XML Database
  • 5. <user> <username>Tom</username> <password>m1U9q10</password> <!-- </password> <role>user</role> <mail> --> <role>Administrator</role> <mail>[email protected]</mail> </user> Web Form Generated XML Message Well-formed and valid --><role>Administrator<role><mail>[email protected] m1U9q10</password><!-- 5 XML Injection Example (Privilege Escalation) Malicious strings for SQL injection or Cross-site scripting can also be used here.
  • 8. • Is the front-end system (SUT) vulnerable to XML Injections? • Step 1: Create/obtain a set of malicious XML messages 8 How to test the front-end system? Front-end System XML I1 I2 In Generated XML Messages Back-end Systems System 1 System 2 System n
  • 9. 9 An example of a malicious XML message created with SOLMI tool SOLMI Generation of Malicious XML Messages • Automatically generating malicious XML messages for different types of XML Injection • Addressed by our tool SOLMI (ISSTA'16)
  • 10. 10 How to test the front-end system? • Is the front-end system (SUT) vulnerable to XML Injections? • Step 2: Search for inputs that can result in one of the malicious XML messages (TO) • If such inputs exist, the front-end system is vulnerable, i.e., testing for TO coverage Front-end System XML I1 I2 In Generated XML Messages Back-end Systems System 1 System 2 System n
  • 11. SUT 11 Proposed Approach: Search-based Testing (SBT) Front-end System XML I1 I2 In Generated XML Messages Back-end Systems System 1 System 2 System n Search input space to generate malicious XML output, if possible
  • 12. • Input space is very large (all possible values of I1, I2…In) • Front-end system à Black-box • Adapted when source code is not available (e.g., external penetration testing) XML I1 I2 In Front-end System Why SBT Approach for XML Injections? 12
  • 13. Select * from Users where UserName = 'Mike' and Passwrd = 'abc' OR '1'='1' Unknown input-output transformations 13 Rejects inputs containing malicious characters e.g., <, Converts malicious input to valid ones e.g., delete any text between < and > Domain specific transformation e.g., JSON to XML, calculating age from DOB etc. Passwrd: abc' O<script>R <script>'1'='1 Passwrd: abc' <script…..> abc' abc' OR '1'='1 Validation Sanitisation Other transformations
  • 14. SBT Approach for XML Injection 14 Test Objectives (malicious XML messages) TO1 TO2 TOn XML XML XML I1 I2 In Front-end System (SUT) XML Generated XML Messages Test Case Generator Fitness Function Genetic Algorithm String Edit Distance (Levenshtein distance)
  • 15. <user> <username>Tom</username> <password>m1U9q10</password> <role>user</role> <mail>a</mail> <role>Administrator</role> <mail>[email protected]</mail> </user> Test Objective (TO) I1à username: Tom I2à password: m1U9q10 I3à Email: “role=Adm”[email protected] <user> <username>Tom</username> <password>m1U9q10</password> <role>user</role> <mail>role=Adm+ [email protected]</mail> </user> Generated XML Fitness Function (d) -Distance between the output XML message and the TO d1=20 Test Generation & Fitness Function (dt-o) Goal: Minimize d (0 is ideal) Test Case1 15 I1 I2 In Front-end System (SUT) Test Case Generator
  • 16. <user> <username>Tom</username> <password>m1U9q10</password> <role>user</role> <mail>a</mail> <role>Administrator</role> <mail>[email protected]</mail> </user> Test Objective (TO) I1à username: Tom I2à password: m1U9q10 I3à Email: <role>Administrator</peho>[email protected] <user> <username>Tom</username> <password>m1U9q10</password> <role>user</role> <mail> <role>Administrator<role> <peho>[email protected] </mail> </user> Generated XML d2=10 Test Generation & Fitness Function (dt-o) Goal: Minimize d (0 is ideal) d2 < d1 (Test Case 2 is better Test Case 1) Fitness Function (d) -Distance between the output XML message and the TO 16 I1 I2 In Front-end System (SUT) Test Case Generator Test Case2
  • 18. Research Questions To what extent is our search-based approach effective in detecting XMLi vulnerabilities? How does our search-based approach perform compared to random search? 18 RQ1: Effectiveness RQ2: Comparison with random search What is the cost, in terms of execution time, of applying the proposed approach? RQ3: Efficiency
  • 19. Additional RQs • Impact of input validation (RQ4) • Impact of the number of input parameters (RQ5) • Impact of input alphabet size (RQ6) • Using all ASCII characters vs only those present in TOs 19
  • 20. 20 • Insecure Front-end for Bank Card Processing System (SBANK) • Secure Front-end for Bank Card Processing System (SSBANK) Study 1: RQs 1 to 6 • Open Source Web App (XMLMAO) • Industrial Application (M) Study 2: RQs 1 to 3 Subjects
  • 21. Summary of Results 21 Application TO Coverage (SBT) TO Coverage (Random Search) Avg. Exec time per TO (min-max) in mins SBANK (Insecure) 98/98 (100%) 0 10-31 SSBANK (Secure) 36/98 (36.73%) 0 11-25 XMLMao (open source) 24/24 (100%) 0 5-7 M (Industrial App) 1/4 (25 %) 0 32 Note: Each experiment was repeated 10 Times to account for randomness.
  • 22. The proposed SBT approach is highly effective in searching for inputs to detect XML Injection vulnerabilities, when they exist. Random Search could not cover a single TO in any experiment, while the proposed approach covered all possible TOs. 22 RQ1: Effectiveness RQ2: Comparison with random search Answers to RQs The average execution time ranges from 5 to 32 minutes per TO, which is acceptable in practice. RQ3: Efficiency
  • 23. Input validation adversely affects the TO coverage. 23 RQ4: Impact of input validation Answers to Additional RQs Increasing the number of input parameters makes the search harder. Using restricted alphabet makes the search easier. RQ6: Impact of input alphabet size RQ5: Impact of the number of input parameters
  • 24. • A novel search-based testing approach for the detection of XML Injections • Extensive evaluation of the approach • Highly effective in searching for inputs to detect XML Injection vulnerabilities • Random search does not work at all • Generalizable to other types of attacks Conclusion 24