Back In Black:
Towards Formal, Black Box Analysis Of Sanitizers and Filters
George Argyros*, Ioannis Stais**, Angelos Keromytis* and Aggelos Kiayias***
* ** ***
Back In Black: Towards Formal, Black Box Analysis Of Sanitizers and - - PowerPoint PPT Presentation
Back In Black: Towards Formal, Black Box Analysis Of Sanitizers and Filters George Argyros* , Ioannis Stais**, Angelos Keromytis* and Aggelos Kiayias*** * ** *** Motivation Sanitizers and filters are important components of securing
George Argyros*, Ioannis Stais**, Angelos Keromytis* and Aggelos Kiayias***
* ** ***
Learning Algorithm Target M
Learning Algorithm Target M
Membership Query string s Is s accepted by M?
Learning Algorithm Target M
Equivalence Query Model H Is M = H ? Yes, or provide counterexample.
[Angluin ’87], [Rivest-Schapire ’93]
Equivalence.
to previously undiscovered states.
q0 q0 q1 q2
q0 q1 q2 q3 q0 q1 q2 q3 q4
q0 q1 q2
Classical Automata
Symbolic Automata
guards
to generate guards.
method to handle incorrect guards.
q0
q0 q1 q2 a b
guardgen()
(q0,a,q1), (q0,b,q2), … q0 q1 q2 φ0,0(x) φ0,1(x) φ1,0(x)
q0 q1 q2 q3 q4 φ0,0(x) φ0,1(x) φ1,0(x) φ2,0(x) φ2,1(x) φ1,1(x)
… select_exp: SELECT name any_all_some: ANY | ALL column_ref: name parameter: name
Context Free Grammar G
… select_exp: SELECT name any_all_some: ANY | ALL column_ref: name parameter: name
Context Free Grammar G
(alter{s}*{w}+.*character{s} +set{s}+{w}+)|(\";{s} *waitfor{s}+time{s}+\")
Normal output or REJECT /index.php?id=1’ or ‘1’=‘1
… select_exp: SELECT name any_all_some: ANY | ALL column_ref: name parameter: name
Context Free Grammar G Regular Filter F
(alter{s}*{w}+.*character{s} +set{s}+{w}+)|(\";{s} *waitfor{s}+time{s}+\")
Normal output or REJECT /index.php?id=1’ or ‘1’=‘1
… select_exp: SELECT name any_all_some: ANY | ALL column_ref: name parameter: name
Context Free Grammar G Regular Filter F
Find string s such that
May Require Exponential Number of Queries!
Context Free Grammar G Regular Filter F
Context Free Grammar G Regular Filter F
Membership Query string s True if REJECT is returned False otherwise
Context Free Grammar G Regular Filter F
Equivalence Query H If no such s exists then terminate If REJECT: s is a counterexample for H. Otherwise: s is a bypass for the filter F.
Context Free Grammar G Regular Filter F
Application Firewalls(WAFs).
✓On average 15x less queries. ✓Increase in Equivalence queries. ✓Speedup is not a simple function of the automaton size.
bypasses the filter.
✓SFA utilizes x35 less queries. ✓States recovered:
PHPIDS.
Evasions found for both web application firewalls. ✓ Authentication Bypass: 1 or isAdmin like 1 ✓ Data Retrieval: 1 right join users on author.id = users.id
Evasion attacks aknowledged by ModSecurity team.
George Argyros*, Ioannis Stais**, Angelos Keromytis* and Aggelos Kiayias***
* ** ***