SWAF@DTS Ali Hur
SWAF@DTS Ali Hur
SWAF@DTS Ali Hur
NUST
Defining Future
M ALI HUR
Team Lead
Web Application Security Group
AGENDA
Existing Solutions
Core Objectives
Proposed Solution
Semantic based Validation
Why Ontology?
Intro to SWAF
SWAF Features
Business Prospects of SWAF
Benchmark & Evaluation
SWAF Screen Shots
Demo
2
Semantic Based Web Application Firewall
3
Semantic Based Web Application Firewall
CORE OBJECTIVES
A generalized Solution for Application Security
• Not application dependent
Context based content filtering
• Should understand the context of the input
Zero day attack detection.
To minimize human intervention
• Adopts its working according to the changing
environment.
• Automatic rule generation
12
Semantic Based Web Application Firewall
PROPOSED SOLUTION
Detecting attacks semantically using the context of protocol,
attack and target application.
• Improved Detection
• Zero day attack detection
Rule based scheme instead of signature based
Automatic rule generation support
• Logic based Context Reasoning
Improved performance.
• Only related subset of the Rules are processed for each message
• Only related portions of the message are examined for each attack.
14
Semantic Based Web Application Firewall
WHY ONTOLOGY?
Extensibility
Reasoning
Granularity
15
Semantic Based Web Application Firewall
16
Semantic Based Web Application Firewall
DEPLOYMENT SCENARIO
The SWAF is
deployed as
reverse proxy.
Semantic Based Web Application Firewall
SWAF ARCHITECTURE OVERVIEW
Application Traffic Interceptor
DoS Validation
Response
https:// Assembly SWAF Service Startup
Request
Disassembly
Response SWAF Administration Console
Request
http:// Validation
Validation
INTERNET
Logging and Reporting
Application Traffic Analyzer
Access Log
Report
Rule Engine Generator
Infected Log
Knowledge Base
Store
Semantic Based Web Application Firewall
http://myserver.com/test.jsp?name=Stefan
<HTML>
<Body>
Welcome Stefan
</Body>
</HTML>
http://myserver.com/welcome.jsp?name=<script>alert("Attacked")</script>
<HTML>
<Body>
Welcome
<script>alert("Attacked")</script>
</Body>
</HTML>
19 09/16/2024 NUST School of Electrical Engineering and Co
Semantic Based Web Application Firewall
QueryString
Request Method
POST /index.jsp?var1=page1.html HTTP/1.1
Accept: */* Reqested Resource
Referer: http://www.myweb.com/index.html GET and POST Parameters
Accept-Language: en-us,de;q=0.5 Referer and User Agent
Accept-Encoding: gzip, deflate Cookie
Content-Type: application/x-www-url-encoded
Content-Lenght: 59
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: www.myweb.com
Cookie: CUSTOMER=WILE_E_COYOTE; PART_NUMBER=ROCKET_LAUNCHER_0001; SHIPPING=FEDEX
Connection: Keep-Alive
uid=fred&password=secret&pagestyle=default.css&action=login
uid=<script>alert(“Attacked“)</script> &password=secret&pagestyle=default.css&action=login
Post Parameters
HTTP Message
hasPart
hasPart hasPart
Version
But XSS malicious code
Method
Query String
can
Cookie
be anywhere where
Referrer
URI user input parameters
contains contains
are present
Parameters
infects
HTTP Message
SWAF FEATURES
Defenses against all OWASP top ten vulnerabilities and complex attacks.
Protocol Validation
• Validation based on RFCs
Dealing with SSL based Encrypted Traffic
• SSL offloading
Output Filtering (Filtering the HTTP Responses coming from the web
server)
Validation of Requests using Positive & Negative Policy Rules
• Application specific positive security model.
Performance, Reliability and Fault tolerance
• SSl offloading
• Load balancing
• Http traffic compression
• caching
26
Semantic Based Web Application Firewall
27
Semantic Based Web Application Firewall
EVALUATION
Cross Site SQL injection Directory
Scripting Traversal
29
Semantic Based Web Application Firewall
30
Semantic Based Web Application Firewall
31
Semantic Based Web Application Firewall
TEST RESULTS
32
Semantic Based Web Application Firewall
EVALUATION CRITERIA
False Positive = FP: the total number of records that are
classified as anomalous
False Negative = FN: the total number of anomalous
records that are classified as normal
Total #Normal = TN: the total number of normal records
Total #Attack = TA: the total number of attack records
Detection Rate = [(TA-FN)/TA]*100
False Alarm Rate = [FP/TN]*100
33
Semantic Based Web Application Firewall
Evaluation EVALUATION
FRAMEWORK
False
Attack #Normal #Attack False False Detection
Alarm
Type Record Record Positive Negative Rate
Rate
SQL
Injection 190 76 2 1 98.68 1.05
Directory
traversal 190 38 2 0 100 1.05
34
Semantic Based Web Application Firewall
35
Semantic Based Web Application Firewall
ACCESS LOG
36
Semantic Based Web Application Firewall
INFECTED LOG
37
Semantic Based Web Application Firewall
CONFIGURATION
38
Semantic Based Web Application Firewall
STATISTIC
39
Semantic Based Web Application Firewall
PDF REPORTS
40
Semantic Based Web Application Firewall
PDF REPORTS
41
Semantic Based Web Application Firewall
PDF REPORTS
42
Semantic Based Web Application Firewall
DEMO
43
Semantic Based Web Application Firewall
THANKS & ??
44
Semantic Based Web Application Firewall
The Enterprise
Web Server
DoS Databases
Parameter
Anti- Tampering Backend
spoofing Web Server Server/System
Cross Site Application
know Server
vulner- Scripting
abilities
The Internet
SQL
Pattern- Injection
Based
Attacks
Cookie
Port
Poisoning
Scanning
L
SQ tion
j e c
In
S
XS L
SQ ctio
e
Inj n
46
Semantic Based Web Application Firewall
47
Semantic Based Web Application Firewall
48
Semantic Based Web Application Firewall
PROPOSED FRAMEWORK
Semantic Web Application Firewall- SWAF
Log Viewer
Admin Console
Log Acess
Rule Engine
Inference Engine
M
Web Server Knowledge Base
Web Application
49
Semantic Based Web Application Firewall
FEATURES
Detection of complex and zero day web attacks
System understands the contextual nature of HTTP
request.
System is based on shared representation of
ontology's that can be refined and expanded over
time according to the application requirements.
Efficient system for analyzing the specified portion
of HTTP request where attack is possible and thus
provides significant search space reduction with low
false positive rate.
50
Semantic Based Web Application Firewall