SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
The Advantages of SAST – WAF Correlation
The fact that it is easier to hack than protect is no secret. For example, attackers need to find a single
point of entry, whereas the defender needs to close all holes. As most of you know, defenders usually
work under tight time and budget constraints, while the attacker has no such limitations. He has full
discretion to decide how much effort, time and money he wants to put into hacking your system.
This asymmetric situation is unfair. The only way for defenders to break this asymmetry is by using the
information they have and the attacker doesn’t. The real advantage of the defenders is having internal
knowledge about their system, specifically having access to their internal source code. While designing
and implementing security solutions, it is crucial to keep that in mind.
This is especially true for WAF configuration and virtual patching. WAF are known to be very solid
solutions after being properly configured. They do great work in the process of virtual patching, by
shortening the window of the vulnerability(the time between the discovery of a security breach and the
time it is closed). This is accomplished by either fixing the code (real patch) or by giving appropriate
commands to the WAF (virtual patch)
In this paper, I will try to show several examples from different security realms of how source code
analysis can produce better WAF rules. You will see that dynamic analysis input will prove inferior
compared to SAST. We take advantage of the only puzzle piece that we have and neither Dynamic
simulators nor hackers have, the sources.

Azrieli Towers, Round Building - 22nd floor
132 Menahem Begin St., Tel-Aviv, ISRAEL
Tel: +972-3-7581800
Example: SQL Injection
Once a DAST tool identifies a SQL Injection, it knows exactly what page and field is vulnerable. It then
sends the information to the WAF, which creates a generic anti-SQL Injection virtual patch (for example,
the following Regex “[^’]*” – “any character but quote”). A SAST tool can tell exactly what field in the
query receives the input, and build a custom filter (“d*” for an integer type). This lowers radically the
FP and FN ratio of the WAF (for integer types, an attack can take place without using a quote).

Figure 1 -Numeric field SQL Injection

Generalization
DAST tool usually provides “black-list” patches (what values are forbidden), whereas SAST tools provide
“white-list” ones (what values are valid). White-listing is always the preferred method of validating
inputs, as attacker can easily find a way to encode their attack in a way that bypasses black lists.

Figure 2-ThreadFix SQL Injection Virtual Patch DAST->WAF rule.
Blacklists malicious patterns. Fails for numeric fields.

Azrieli Towers, Round Building - 22nd floor
132 Menahem Begin St., Tel-Aviv, ISRAEL
Tel: +972-3-7581800
Figure 3-ThreadFix rules. Blacklists malicious patterns

Example: Log Forgery  Command Injection
Log Forgery is an attack which invalidates the system’s log files by allowing the attacker to write tainted
values, therefore making these files untrustworthy. This is considered as a major breach of compliance
regulation where enterprises need to be accountable for their audit trails.
Command Injection takes advantage of application flow where user input is transformed into an OS
command and gets executed, for example erasing system files.
These kinds of attacks take place in the backend of the system and have no external exposure; hence
they can hardly be detected by DAST tools. In this case, DAST tools can’t create a WAF rule.

Generalization
DAST can detect vulnerabilities that have external sources or consequences (UI, network). They can’t
find issues that only have a backend influence

Example: Hardcoded debug code, hidden pages & time sensitivity
In cases where the developers mistakenly left a debug code, which gets executed only when using a
magic “keyword”, DAST tools can’t guess this keyword and remain unaware of this breach. A SAST tool
can easily detect these kinds of vulnerabilities. This also correlates to time-based attacks, where the
system is exposed to a security risk only at a specific time (nightly batch job). DAST will detect this only if
it is run at that very moment. The same issue exists for “hidden” pages, which are not linked from the
main site. A DAST solution will not be able to find these either.

Generalization
The SAST solution outperforms the DAST solution in detecting vulnerabilities that are out of the
standard application flow.

Azrieli Towers, Round Building - 22nd floor
132 Menahem Begin St., Tel-Aviv, ISRAEL
Tel: +972-3-7581800
Coverage
When a DAST tool detects an issue, it can tell what page and field are vulnerable. This information is
only the tip of the iceberg in the sense that it cannot correlate that finding with other similar findings
along this path. SAST’s backtracking capabilities allows setting multiple rules for multiple input points,
based on a single finding.

Summary
SAST advantages over DAST





Create white lists versus black lists
Find issues in the backend
Identify vulnerable leftover information
Systematic coverage of the full vulnerability path

SAST challenges vs. DAST



Requires access to the application sources
Has to correlate sources to URL

Azrieli Towers, Round Building - 22nd floor
132 Menahem Begin St., Tel-Aviv, ISRAEL
Tel: +972-3-7581800

Más contenido relacionado

Más de Checkmarx

Source Code vs. Binary Code Analysis
Source Code vs. Binary Code AnalysisSource Code vs. Binary Code Analysis
Source Code vs. Binary Code AnalysisCheckmarx
 
DevOps & Security: Here & Now
DevOps & Security: Here & NowDevOps & Security: Here & Now
DevOps & Security: Here & NowCheckmarx
 
AppSec How-To: Achieving Security in DevOps
AppSec How-To: Achieving Security in DevOpsAppSec How-To: Achieving Security in DevOps
AppSec How-To: Achieving Security in DevOpsCheckmarx
 
The App Sec How-To: Choosing a SAST Tool
The App Sec How-To: Choosing a SAST ToolThe App Sec How-To: Choosing a SAST Tool
The App Sec How-To: Choosing a SAST ToolCheckmarx
 
The Security State of The Most Popular WordPress Plug-Ins
The Security State of The Most Popular WordPress Plug-InsThe Security State of The Most Popular WordPress Plug-Ins
The Security State of The Most Popular WordPress Plug-InsCheckmarx
 
10 Steps To Secure Agile Development
10 Steps To Secure Agile Development10 Steps To Secure Agile Development
10 Steps To Secure Agile DevelopmentCheckmarx
 
Graph Visualization - OWASP NYC Chapter
Graph Visualization - OWASP NYC ChapterGraph Visualization - OWASP NYC Chapter
Graph Visualization - OWASP NYC ChapterCheckmarx
 
Happy New Year!
Happy New Year!Happy New Year!
Happy New Year!Checkmarx
 

Más de Checkmarx (8)

Source Code vs. Binary Code Analysis
Source Code vs. Binary Code AnalysisSource Code vs. Binary Code Analysis
Source Code vs. Binary Code Analysis
 
DevOps & Security: Here & Now
DevOps & Security: Here & NowDevOps & Security: Here & Now
DevOps & Security: Here & Now
 
AppSec How-To: Achieving Security in DevOps
AppSec How-To: Achieving Security in DevOpsAppSec How-To: Achieving Security in DevOps
AppSec How-To: Achieving Security in DevOps
 
The App Sec How-To: Choosing a SAST Tool
The App Sec How-To: Choosing a SAST ToolThe App Sec How-To: Choosing a SAST Tool
The App Sec How-To: Choosing a SAST Tool
 
The Security State of The Most Popular WordPress Plug-Ins
The Security State of The Most Popular WordPress Plug-InsThe Security State of The Most Popular WordPress Plug-Ins
The Security State of The Most Popular WordPress Plug-Ins
 
10 Steps To Secure Agile Development
10 Steps To Secure Agile Development10 Steps To Secure Agile Development
10 Steps To Secure Agile Development
 
Graph Visualization - OWASP NYC Chapter
Graph Visualization - OWASP NYC ChapterGraph Visualization - OWASP NYC Chapter
Graph Visualization - OWASP NYC Chapter
 
Happy New Year!
Happy New Year!Happy New Year!
Happy New Year!
 

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

The Advantages of SAST With WAF Correlation

  • 1. The Advantages of SAST – WAF Correlation The fact that it is easier to hack than protect is no secret. For example, attackers need to find a single point of entry, whereas the defender needs to close all holes. As most of you know, defenders usually work under tight time and budget constraints, while the attacker has no such limitations. He has full discretion to decide how much effort, time and money he wants to put into hacking your system. This asymmetric situation is unfair. The only way for defenders to break this asymmetry is by using the information they have and the attacker doesn’t. The real advantage of the defenders is having internal knowledge about their system, specifically having access to their internal source code. While designing and implementing security solutions, it is crucial to keep that in mind. This is especially true for WAF configuration and virtual patching. WAF are known to be very solid solutions after being properly configured. They do great work in the process of virtual patching, by shortening the window of the vulnerability(the time between the discovery of a security breach and the time it is closed). This is accomplished by either fixing the code (real patch) or by giving appropriate commands to the WAF (virtual patch) In this paper, I will try to show several examples from different security realms of how source code analysis can produce better WAF rules. You will see that dynamic analysis input will prove inferior compared to SAST. We take advantage of the only puzzle piece that we have and neither Dynamic simulators nor hackers have, the sources. Azrieli Towers, Round Building - 22nd floor 132 Menahem Begin St., Tel-Aviv, ISRAEL Tel: +972-3-7581800
  • 2. Example: SQL Injection Once a DAST tool identifies a SQL Injection, it knows exactly what page and field is vulnerable. It then sends the information to the WAF, which creates a generic anti-SQL Injection virtual patch (for example, the following Regex “[^’]*” – “any character but quote”). A SAST tool can tell exactly what field in the query receives the input, and build a custom filter (“d*” for an integer type). This lowers radically the FP and FN ratio of the WAF (for integer types, an attack can take place without using a quote). Figure 1 -Numeric field SQL Injection Generalization DAST tool usually provides “black-list” patches (what values are forbidden), whereas SAST tools provide “white-list” ones (what values are valid). White-listing is always the preferred method of validating inputs, as attacker can easily find a way to encode their attack in a way that bypasses black lists. Figure 2-ThreadFix SQL Injection Virtual Patch DAST->WAF rule. Blacklists malicious patterns. Fails for numeric fields. Azrieli Towers, Round Building - 22nd floor 132 Menahem Begin St., Tel-Aviv, ISRAEL Tel: +972-3-7581800
  • 3. Figure 3-ThreadFix rules. Blacklists malicious patterns Example: Log Forgery Command Injection Log Forgery is an attack which invalidates the system’s log files by allowing the attacker to write tainted values, therefore making these files untrustworthy. This is considered as a major breach of compliance regulation where enterprises need to be accountable for their audit trails. Command Injection takes advantage of application flow where user input is transformed into an OS command and gets executed, for example erasing system files. These kinds of attacks take place in the backend of the system and have no external exposure; hence they can hardly be detected by DAST tools. In this case, DAST tools can’t create a WAF rule. Generalization DAST can detect vulnerabilities that have external sources or consequences (UI, network). They can’t find issues that only have a backend influence Example: Hardcoded debug code, hidden pages & time sensitivity In cases where the developers mistakenly left a debug code, which gets executed only when using a magic “keyword”, DAST tools can’t guess this keyword and remain unaware of this breach. A SAST tool can easily detect these kinds of vulnerabilities. This also correlates to time-based attacks, where the system is exposed to a security risk only at a specific time (nightly batch job). DAST will detect this only if it is run at that very moment. The same issue exists for “hidden” pages, which are not linked from the main site. A DAST solution will not be able to find these either. Generalization The SAST solution outperforms the DAST solution in detecting vulnerabilities that are out of the standard application flow. Azrieli Towers, Round Building - 22nd floor 132 Menahem Begin St., Tel-Aviv, ISRAEL Tel: +972-3-7581800
  • 4. Coverage When a DAST tool detects an issue, it can tell what page and field are vulnerable. This information is only the tip of the iceberg in the sense that it cannot correlate that finding with other similar findings along this path. SAST’s backtracking capabilities allows setting multiple rules for multiple input points, based on a single finding. Summary SAST advantages over DAST     Create white lists versus black lists Find issues in the backend Identify vulnerable leftover information Systematic coverage of the full vulnerability path SAST challenges vs. DAST   Requires access to the application sources Has to correlate sources to URL Azrieli Towers, Round Building - 22nd floor 132 Menahem Begin St., Tel-Aviv, ISRAEL Tel: +972-3-7581800