SlideShare a Scribd company logo
Beyond the
Perimeter
PREVOTY
Chad Tindel
Principal Solution Architect
chad@prevoty.com
@ctindel
July 2015
Hubsan X4 Quadcopter With Video
http://info.prevoty.com/win
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730
Prevoty NYC Java SIG 20150730
Evolution of
security
ENTERPRISE APPS
• Dynamic and static
• Developed in many languages
• Deployed to irons and clouds
SECURITY PILLARS / TIME
PILLAR CONTROLS VALUE / TIME
NETWORK Network / Web Firewalls
Perimeter has changed,
assume internal = external
ENDPOINT
Patches / Intrusion Detection +-
Prevention
Critical bugs in common
infrastructure (heartbleed)
APPLICATION SAST / DAST / People
Running a testing tool doesn’t
actually fix code
Prevoty NYC Java SIG 20150730
DEFENSES HAVEN’T SCALED
• Volumetric defense isn’t sufficient
• Zero days evade pattern matching
• Security testing isn’t impactful
84% OF ATTACKS TARGET
APPLICATIONS
GARTNER 2013
90% OF APPS HAVE >1 CRITICAL
BUG
HP PROTECT 2014
AVERAGE OF 138 DAYS TO FIX 1
SQL INJECTION
HP PROTECT 2014
CONTROLS, EVOLVED
OLD CONTROLS NEW CONTROLS
Network / Web Firewalls
Micro-Segmentation
Assume the attackers will get in
Patches / Intrusion Systems
Micro-Virtualization
Assume the process will execute
SASTs / DASTs / People
Runtime Application Security
Assume the app will be hit
OWASP Top-10
Open Web
Application Security
Project Top 10
Application
Vulnerabilities
A1 SQL Injection A6 Sensitive Data Exposure
A2
Broken Authentication and Session
Management
A7
Missing Function Level Access
Control
A3 Cross-Site Scripting A8
Cross Site Request Forgery
(CSRF)
A4 Insecure Direct Object References A9
Using Known Vulnerable
Components
A5 Security Misconfiguration A10
Unvalidated Redirects and
Forwards
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
OWASP Top-10
Open Web
Application Security
Project Top 10
Application
Vulnerabilities
“97 percent of data breaches worldwide are still due
to an SQL injection somewhere along the line”
-Neira Jones, Barclays Head of Payment Security for
Barclaycard.
Cross-site scripting carried out on websites accounted
for roughly 84% of all security vulnerabilities
documented by Symantec
Secure cloud hosting firm FireHost reveals that in the
first quarter of 2013, the volume of Cross-Site Request
Forgery (CSRF) attacks increased by 132% compared
to the same period of 2012.
New attacks found all the time
A1: SQL Injection
1=1 is always true
txtUserName = getRequestString("UserName");
txtSQL = "SELECT * FROM Users WHERE UserId = " + txtUserName;
What if someone supplies the username “ctindel or 1=1” ?
Then this statement will select all user rows:
SELECT UserId, Name, Password FROM Users WHERE UserId =
ctindel or 1=1
3=2+1 is also always true
Sin(0) = cos(PI) + 1 is also always true
A1: SQL Injection
What if someone supplies the username “ctindel; DROP TABLE Users”
A1: SQL Injection
Exploits of a Mom
https://xkcd.com/327/
A1: SQL Injection
Primary Defenses
Prepared
Statements and
Parameterized
Queries
Prepared Statements (Parameterized Queries)
String custname = request.getParameter("customerName”);
String query = "SELECT account_balance FROM user_data WHERE
user_name = ? ";
PreparedStatement pstmt = connection.prepareStatement( query );
pstmt.setString( 1, custname);
ResultSet results = pstmt.executeQuery( );
A1: SQL Injection
Primary Defenses
Stored Procedures
String custname = request.getParameter("customerName");
try {
CallableStatement cs = connection.prepareCall("{call
sp_getAccountBalance(?)}");
cs.setString(1, custname);
ResultSet results = cs.executeQuery();
// … result set handling
} catch (SQLException se) {
// … logging and error handling
}
A3: Cross-site
Scripting (XSS)
Cross-Site Scripting (XSS) attacks occur when:
1. Data enters a Web application through an untrusted source, most
frequently a web request.
2. The data is included in dynamic content that is sent to a web user
without being validated for malicious content.
The most severe XSS attacks involve disclosure of the user’s session
cookie, allowing an attacker to hijack the user’s session and take over the
account.
<script>alert(document.cookie)</script>
“><script>alert(document.cookie)</script>
"%3cscript%3ealert(document.cookie)%3c/script%3e
<scr<script>ipt>alert(document.cookie)</script>
<body onload=alert(document.cookie)>
<b onmouseover=alert(document.cookie)>click me!</b>
If your method of XSS protection uses pattern matching or regex, it
is most likely vulnerable to fuzzing.
A3: Cross-site
Scripting (XSS)
1. Stored XSS attacks are those where the injected script is permanently
stored on the target servers, such as in a database, in a message forum,
visitor log, comment field, etc. The victim then retrieves the malicious script
from the server when it requests the stored information. Stored XSS is also
sometimes referred to as Persistent or Type-I XSS.
1. Reflected XSS attacks are those where the injected script is reflected off the
web server, such as in an error message, search result, or any other response
that includes some or all of the input sent to the server as part of the request.
Reflected attacks are delivered to victims via another route, such as in an
e-mail message, or on some other web site. Reflected XSS is also sometimes
referred to as Non-Persistent or Type-II XSS.
1. DOM-Based XSS (or as it is called in some texts, “type-0 XSS”) is an XSS
attack wherein the attack payload is executed as a result of modifying the
DOM “environment” in the victim’s browser used by the original client side
script, so that the client side code runs in an “unexpected” manner.
A3: Cross-site
Scripting (XSS)
What does the browser interpret this as?
$=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_
$$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++
$,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++$,$__$:++$};$.$_=($.$_=$
+"")[$.$_$]+($._$=$.$_[$.__$])+($.$$=($.$+"")[$.__$])+((!$)+"")[$._$$]
+($.__=$.$_[$.$$_])+($.$=(!""+"")[$.__$])+($._=(!""+"")[$._$_])+$.$_[$
.$_$]+$.__+$._$+$.$;$.$$=$.$+(!""+"")[$._$$]+$.__+$._+$.$+$.$$;$.$
=($.___)[$.$_][$.$_];$.$($.$($.$$+"""+$.$_$_+(![]+"")[$._$_]+$.$$$_+
""+$.__$+$.$$_+$._$_+$.__+"(""+$.__$+$.__$+$.___+$.$$$_+(![
]+"")[$._$_]+(![]+"")[$._$_]+$._$+","+$.$__+$.___+""+$.__$+$.__$
+$.$$_+$.$$$_+""+$.__$+$.$$_+$.$$$+""+$.$__+$.___+""+$.__$
+$._$$+$.__$+$._$+""+$.__$+$.$$_+$._$_+""+$.__$+$.$_$+$._$
$+""+$.$__+$.___+""+$.__$+$.___+$._$$+""+$.__$+$.$_$+$.__$
+$.__+""+$.__$+$.$$$+$.__$+"""+$.$__+$.___+")"+""")())();
A3: Cross-site
Scripting (XSS)
alert("Hello, New York City”);
http://utf-8.jp/public/jjencode.html
A3: XSS
Primary Defenses
1. Never Insert Untrusted Data directly in a script, inside an HTML comment, in
an attribute name, in a tag name, or directly in CSS. Never accept actual
JavaScript code from an untrusted source and then run it.
2. Encode untrusted data before reflecting it back out. HTML Escape Before
Inserting Untrusted Data into HTML Element Content (convert “&” to “&amp;”
and “<“ to “&lt;” etc).
OWASP Publishes a Java Encoder you can use in your app to help with a lot of
this:
https://www.owasp.org/index.php/OWASP_Java_Encoder_Project
https://github.com/OWASP/owasp-java-encoder/
String safe = ESAPI.encoder().encodeForHTML( request.getParameter( "input" ) );
String safe = ESAPI.encoder().encodeForHTMLAttribute( request.getParameter(
"input" ) );
String safe = ESAPI.encoder().encodeForJavaScript( request.getParameter(
"input" ) );
String safe = ESAPI.encoder().encodeForCSS( request.getParameter( "input" ) );
A8: Cross-site
Request Forgery
(CSRF)
An attack that forces an end user to execute unwanted
actions on a web application in which they're currently
authenticated.
CSRF attacks specifically target state-changing
requests, not theft of data, since the attacker has no
way to see the response to the forged request.
A8: CSRF
Primary Defenses
The preferred option is to include the unique token in a hidden form field or
via a session cookie. This causes the value to be sent in the body of the HTTP
request, avoiding its inclusion in the URL, which is subject to exposure.
The token should be a function of things like the sessionID, Form Action
Parameter, a time-based nonce, and some expiration TTL. When the form is
submitted the token will be checked for validity and immediately invalidated so that
it can only be used once.
OWASP Publishes a Java library called CSRFGuard which is integrated through
the use of JavaEE Filter.
https://www.owasp.org/index.php/Category:OWASP_CSRFGuard_Project
The token approach will break down when the site on which it is deployed contains
XSS (Cross-Site Scripting) vulnerabilities. If attackers can XSS your site, they
can read the content and extract the token you are using.
There Is No
Silver Bullet
In App Sec
Root Causes
• Perimeter-based controls (WAFs) lack context to make reliable
decisions (high % of false positives)
• Pattern matching doesn’t work: computationally inexpensive to
generate millions of fuzzed attack payloads
• Developers are continuously building new products/features
(increasing attack surface)
Top 2 Challenges
1. There is no scalable solution to defeat the vulnerability backlog and
growing legacy codebase
2. There is no real-time visibility about application attacks: who has the
attack payload and metadata?
Popular topics that
security teams must
address when
building out an
Application Security
program
Non-invasive
Remediation
For Java Apps
Gartner Maverick Research
“Runtime Application Self-Protection (RASP)”
“Applications should not be delegating — as is done today — most of their runtime
protection to external devices. Applications should be capable of self-protection —
that is, have protection features built into the application runtime
environment.
These features should see all data coming in and out of the application, all events
affecting the application, all executed instructions, and all database access. Once
RASP is deployed into production, the application runtime environment should be
able to detect attacks and protect applications with a high level of assurance.”
• Be able to protect applications by detecting and blocking attacks.
• Have deep visibility into application logic flow and data flow, configuration,
executed instructions and data processing to accurately identify attacks.
• Be instrumented into the application runtime environment. This instrumentation
should be noninvasive or require no/minimal invasiveness into application code.
- Joseph Feiman, Gartner Analyst
Non-invasive
Remediation
For Java Apps
HDIV
http://www.hdiv.org/
Non-invasive
Remediation
For Java Apps
HP App Defender
Prevoty
Architecture
Prevoty has
developed framework
plugins for Java,
.NET and Ruby on
Rails
SDKs are available
for nearly any and
every language
C# Java .NET / IIS node.js Go PHP Python Ruby
Introducing Prevoty Runtime Application Self-Protection (RASP)
Prevoty delivers application security from
inside the app itself, leveraging our
contextual and behavioral engine to
automatically secure content, queries and
users in real-time
39
Dynamic
Built in-house
& externally
Distributed
Database
Internal
Employees
Firewall
incl. WAFs
External
Employees
Cloud, Web Services, Partner Apps,
SAML
External Data
Services
User Generated
Content
Mobile & Multi-
device
Users
The Prevoty
Difference
Root Causes Addressed By Prevoty
• Prevoty applies the contextually correct level of security to prevent
XSS, SQLi and CSRF (lives in your applications)
• Prevoty doesn’t rely on pattern matching - it’s built on top of unique
content/query virtualization engines
• Prevoty makes it easy for developers to integrate this level of security
via plugins for all major application frameworks
Top 2 Challenges Solved By Prevoty
1. Prevoty can significantly diminish vulnerability backlogs and SSDLC
churn; it can be dropped in to provide immediate relief for legacy
2. Prevoty gives you attack visibility: who + what + when + where
How Prevoty
addresses the
challenges of
Application Security
Unparalleled insights into what
threats are actually hitting your
applications at runtime
Includes IP address, session information
(including User ID if available), cookie detail
IDENTIFY THE ORIGIN OF THE THREAT
WHO
Contents of the payload, payload intelligence
PROVIDE DETAILS OF THE NATURE OF
THE THREAT
WHAT
Timestamp (down to the nanosecond)
WHEN DID THE ATTACK TAKE PLACE
WHEN
URL for web applications, stack trace for SQL
queries
WHERE THE EXPLOIT HAPPENED IN
YOUR APPLICATIONS
WHERE
PREVOTY
APPLICATION
SECURITY
MONITORING
(ASM)
Real-time application threat
intelligence on attacks in
progress can easily be delivered
to:
- SIEM’s (such as Splunk)
- NGFW’s
- IPS’s
- WAF’s
PREVOTY
APPLICATION
SECURITY
MONITORING
Thank
You
Learn more at prevoty.com
PREVOTY

More Related Content

PPTX
20160225 OWASP Atlanta Prevoty RASP
PPTX
20160211 OWASP Charlotte RASP
PDF
Beyond OWASP Top 10 - Hack In Paris 2017
ODP
Top 10 Web Security Vulnerabilities
PPT
Intro to Web Application Security
PDF
Protecting web apps
PPT
Static Analysis: The Art of Fighting without Fighting
PPT
Filter Evasion: Houdini on the Wire
20160225 OWASP Atlanta Prevoty RASP
20160211 OWASP Charlotte RASP
Beyond OWASP Top 10 - Hack In Paris 2017
Top 10 Web Security Vulnerabilities
Intro to Web Application Security
Protecting web apps
Static Analysis: The Art of Fighting without Fighting
Filter Evasion: Houdini on the Wire

What's hot (20)

PDF
Web Application Security 101
PPTX
Secure Software Engineering
PPTX
OWASP Top 10 Proactive Controls
PPTX
OWASP top 10-2013
PDF
Secure code
PPTX
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
PPTX
Web application security
PPT
Application Security Part 1 Threat Defense In Client Server Applications ...
PPTX
Secure coding practices
PDF
Pentesting Rest API's by :- Gaurang Bhatnagar
PPT
Top 10 Web Security Vulnerabilities (OWASP Top 10)
PPT
Secure code practices
PDF
Owasp top 10 web application security hazards part 2
PPT
Encoded Attacks And Countermeasures
PPTX
Secure programming with php
PDF
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
PPTX
Ebu class edgescan-2017
PPT
香港六合彩
PPTX
Practical API Security - PyCon 2018
PPT
Owasp Top 10 And Security Flaw Root Causes
Web Application Security 101
Secure Software Engineering
OWASP Top 10 Proactive Controls
OWASP top 10-2013
Secure code
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
Web application security
Application Security Part 1 Threat Defense In Client Server Applications ...
Secure coding practices
Pentesting Rest API's by :- Gaurang Bhatnagar
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Secure code practices
Owasp top 10 web application security hazards part 2
Encoded Attacks And Countermeasures
Secure programming with php
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Inje...
Ebu class edgescan-2017
香港六合彩
Practical API Security - PyCon 2018
Owasp Top 10 And Security Flaw Root Causes
Ad

Viewers also liked (20)

PPTX
XSS Defence with @manicode and @eoinkeary
PDF
If You Don't Like the Game, Hack the Playbook... (Zatko)
DOCX
JPJ1404 Building Confidential And Efficient Query Services In The Cloud Wit...
PDF
State of Web Security RailsConf 2016
PDF
GoSec 2015 - Protecting the web from within
PPTX
Skillful scalefull fullstack security in a state of constant flux
PDF
RailsConf 2015 - Metasecurity: Beyond Patching Vulnerabilities
PPTX
HTTP basics in relation to Applicaiton Security - OWASP
PPTX
The Quiet Rise of Account Takeover
PPTX
xxx">&lt;x>
PPTX
PyCon Canada 2015 - Is your python application secure
PDF
Prevoty Integri Datasheet
PDF
Achieving Visible Security at Scale with the NIST Cybersecurity Framework
PPTX
Vulnerability management and threat detection by the numbers
PDF
HackFest 2015 - Rasp vs waf
PDF
DevCommerce Conference 2016: SecDevOps – Testes contínuos de segurança em apl...
PDF
Running a High-Efficiency, High-Visibility Application Security Program with...
PPTX
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
PDF
Workshop: Application Security
PPTX
Archer Users Group / Southern Risk Council 2016 Enterprise Risk Management an...
XSS Defence with @manicode and @eoinkeary
If You Don't Like the Game, Hack the Playbook... (Zatko)
JPJ1404 Building Confidential And Efficient Query Services In The Cloud Wit...
State of Web Security RailsConf 2016
GoSec 2015 - Protecting the web from within
Skillful scalefull fullstack security in a state of constant flux
RailsConf 2015 - Metasecurity: Beyond Patching Vulnerabilities
HTTP basics in relation to Applicaiton Security - OWASP
The Quiet Rise of Account Takeover
xxx">&lt;x>
PyCon Canada 2015 - Is your python application secure
Prevoty Integri Datasheet
Achieving Visible Security at Scale with the NIST Cybersecurity Framework
Vulnerability management and threat detection by the numbers
HackFest 2015 - Rasp vs waf
DevCommerce Conference 2016: SecDevOps – Testes contínuos de segurança em apl...
Running a High-Efficiency, High-Visibility Application Security Program with...
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
Workshop: Application Security
Archer Users Group / Southern Risk Council 2016 Enterprise Risk Management an...
Ad

Similar to Prevoty NYC Java SIG 20150730 (20)

PDF
Security Awareness
PPT
OWASP_Top_10_Introduction_and_Remedies_2017.ppt
PDF
Owasp top 10 vulnerabilities 2013
PPTX
OWASP Top Ten 2017
PPT
Web Apps Security
PDF
Owasp top 10_openwest_2019
PDF
C01461422
PDF
Web vulnerabilities
PDF
Wakanda and the top 5 security risks - JS.everyrwhere(2012) Europe
DOCX
Pantallas escaneo Sitio Web
ODP
Secure coding in C#
PDF
PDF
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
PDF
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
PPTX
Top web apps security vulnerabilities
PPTX
ASP.NET security vulnerabilities
PDF
Owasp top 10 2013
PPTX
Top Ten Java Defense for Web Applications v2
PPTX
Owasp web security
PDF
2013 OWASP Top 10
Security Awareness
OWASP_Top_10_Introduction_and_Remedies_2017.ppt
Owasp top 10 vulnerabilities 2013
OWASP Top Ten 2017
Web Apps Security
Owasp top 10_openwest_2019
C01461422
Web vulnerabilities
Wakanda and the top 5 security risks - JS.everyrwhere(2012) Europe
Pantallas escaneo Sitio Web
Secure coding in C#
OWASP Top 10 Proactive Controls 2016 - PHP Québec August 2017
OWASP Top 10 Proactive Controls 2016 - NorthEast PHP 2017
Top web apps security vulnerabilities
ASP.NET security vulnerabilities
Owasp top 10 2013
Top Ten Java Defense for Web Applications v2
Owasp web security
2013 OWASP Top 10

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPT
Introduction Database Management System for Course Database
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
history of c programming in notes for students .pptx
PDF
System and Network Administration Chapter 2
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Nekopoi APK 2025 free lastest update
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Softaken Excel to vCard Converter Software.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
L1 - Introduction to python Backend.pptx
Introduction to Artificial Intelligence
Design an Analysis of Algorithms II-SECS-1021-03
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Introduction Database Management System for Course Database
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
2025 Textile ERP Trends: SAP, Odoo & Oracle
ISO 45001 Occupational Health and Safety Management System
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
history of c programming in notes for students .pptx
System and Network Administration Chapter 2
Wondershare Filmora 15 Crack With Activation Key [2025
Nekopoi APK 2025 free lastest update
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Upgrade and Innovation Strategies for SAP ERP Customers
Design an Analysis of Algorithms I-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Softaken Excel to vCard Converter Software.pdf

Prevoty NYC Java SIG 20150730

  • 1. Beyond the Perimeter PREVOTY Chad Tindel Principal Solution Architect chad@prevoty.com @ctindel July 2015
  • 2. Hubsan X4 Quadcopter With Video http://info.prevoty.com/win
  • 10. ENTERPRISE APPS • Dynamic and static • Developed in many languages • Deployed to irons and clouds
  • 11. SECURITY PILLARS / TIME PILLAR CONTROLS VALUE / TIME NETWORK Network / Web Firewalls Perimeter has changed, assume internal = external ENDPOINT Patches / Intrusion Detection +- Prevention Critical bugs in common infrastructure (heartbleed) APPLICATION SAST / DAST / People Running a testing tool doesn’t actually fix code
  • 13. DEFENSES HAVEN’T SCALED • Volumetric defense isn’t sufficient • Zero days evade pattern matching • Security testing isn’t impactful
  • 14. 84% OF ATTACKS TARGET APPLICATIONS GARTNER 2013
  • 15. 90% OF APPS HAVE >1 CRITICAL BUG HP PROTECT 2014
  • 16. AVERAGE OF 138 DAYS TO FIX 1 SQL INJECTION HP PROTECT 2014
  • 17. CONTROLS, EVOLVED OLD CONTROLS NEW CONTROLS Network / Web Firewalls Micro-Segmentation Assume the attackers will get in Patches / Intrusion Systems Micro-Virtualization Assume the process will execute SASTs / DASTs / People Runtime Application Security Assume the app will be hit
  • 18. OWASP Top-10 Open Web Application Security Project Top 10 Application Vulnerabilities A1 SQL Injection A6 Sensitive Data Exposure A2 Broken Authentication and Session Management A7 Missing Function Level Access Control A3 Cross-Site Scripting A8 Cross Site Request Forgery (CSRF) A4 Insecure Direct Object References A9 Using Known Vulnerable Components A5 Security Misconfiguration A10 Unvalidated Redirects and Forwards https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
  • 19. OWASP Top-10 Open Web Application Security Project Top 10 Application Vulnerabilities “97 percent of data breaches worldwide are still due to an SQL injection somewhere along the line” -Neira Jones, Barclays Head of Payment Security for Barclaycard. Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec Secure cloud hosting firm FireHost reveals that in the first quarter of 2013, the volume of Cross-Site Request Forgery (CSRF) attacks increased by 132% compared to the same period of 2012.
  • 20. New attacks found all the time
  • 21. A1: SQL Injection 1=1 is always true txtUserName = getRequestString("UserName"); txtSQL = "SELECT * FROM Users WHERE UserId = " + txtUserName; What if someone supplies the username “ctindel or 1=1” ? Then this statement will select all user rows: SELECT UserId, Name, Password FROM Users WHERE UserId = ctindel or 1=1 3=2+1 is also always true Sin(0) = cos(PI) + 1 is also always true
  • 22. A1: SQL Injection What if someone supplies the username “ctindel; DROP TABLE Users”
  • 23. A1: SQL Injection Exploits of a Mom https://xkcd.com/327/
  • 24. A1: SQL Injection Primary Defenses Prepared Statements and Parameterized Queries Prepared Statements (Parameterized Queries) String custname = request.getParameter("customerName”); String query = "SELECT account_balance FROM user_data WHERE user_name = ? "; PreparedStatement pstmt = connection.prepareStatement( query ); pstmt.setString( 1, custname); ResultSet results = pstmt.executeQuery( );
  • 25. A1: SQL Injection Primary Defenses Stored Procedures String custname = request.getParameter("customerName"); try { CallableStatement cs = connection.prepareCall("{call sp_getAccountBalance(?)}"); cs.setString(1, custname); ResultSet results = cs.executeQuery(); // … result set handling } catch (SQLException se) { // … logging and error handling }
  • 26. A3: Cross-site Scripting (XSS) Cross-Site Scripting (XSS) attacks occur when: 1. Data enters a Web application through an untrusted source, most frequently a web request. 2. The data is included in dynamic content that is sent to a web user without being validated for malicious content. The most severe XSS attacks involve disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account. <script>alert(document.cookie)</script> “><script>alert(document.cookie)</script> "%3cscript%3ealert(document.cookie)%3c/script%3e <scr<script>ipt>alert(document.cookie)</script> <body onload=alert(document.cookie)> <b onmouseover=alert(document.cookie)>click me!</b> If your method of XSS protection uses pattern matching or regex, it is most likely vulnerable to fuzzing.
  • 27. A3: Cross-site Scripting (XSS) 1. Stored XSS attacks are those where the injected script is permanently stored on the target servers, such as in a database, in a message forum, visitor log, comment field, etc. The victim then retrieves the malicious script from the server when it requests the stored information. Stored XSS is also sometimes referred to as Persistent or Type-I XSS. 1. Reflected XSS attacks are those where the injected script is reflected off the web server, such as in an error message, search result, or any other response that includes some or all of the input sent to the server as part of the request. Reflected attacks are delivered to victims via another route, such as in an e-mail message, or on some other web site. Reflected XSS is also sometimes referred to as Non-Persistent or Type-II XSS. 1. DOM-Based XSS (or as it is called in some texts, “type-0 XSS”) is an XSS attack wherein the attack payload is executed as a result of modifying the DOM “environment” in the victim’s browser used by the original client side script, so that the client side code runs in an “unexpected” manner.
  • 28. A3: Cross-site Scripting (XSS) What does the browser interpret this as? $=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_ $$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++ $,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++$,$__$:++$};$.$_=($.$_=$ +"")[$.$_$]+($._$=$.$_[$.__$])+($.$$=($.$+"")[$.__$])+((!$)+"")[$._$$] +($.__=$.$_[$.$$_])+($.$=(!""+"")[$.__$])+($._=(!""+"")[$._$_])+$.$_[$ .$_$]+$.__+$._$+$.$;$.$$=$.$+(!""+"")[$._$$]+$.__+$._+$.$+$.$$;$.$ =($.___)[$.$_][$.$_];$.$($.$($.$$+"""+$.$_$_+(![]+"")[$._$_]+$.$$$_+ ""+$.__$+$.$$_+$._$_+$.__+"(""+$.__$+$.__$+$.___+$.$$$_+(![ ]+"")[$._$_]+(![]+"")[$._$_]+$._$+","+$.$__+$.___+""+$.__$+$.__$ +$.$$_+$.$$$_+""+$.__$+$.$$_+$.$$$+""+$.$__+$.___+""+$.__$ +$._$$+$.__$+$._$+""+$.__$+$.$$_+$._$_+""+$.__$+$.$_$+$._$ $+""+$.$__+$.___+""+$.__$+$.___+$._$$+""+$.__$+$.$_$+$.__$ +$.__+""+$.__$+$.$$$+$.__$+"""+$.$__+$.___+")"+""")())();
  • 31. A3: XSS Primary Defenses 1. Never Insert Untrusted Data directly in a script, inside an HTML comment, in an attribute name, in a tag name, or directly in CSS. Never accept actual JavaScript code from an untrusted source and then run it. 2. Encode untrusted data before reflecting it back out. HTML Escape Before Inserting Untrusted Data into HTML Element Content (convert “&” to “&amp;” and “<“ to “&lt;” etc). OWASP Publishes a Java Encoder you can use in your app to help with a lot of this: https://www.owasp.org/index.php/OWASP_Java_Encoder_Project https://github.com/OWASP/owasp-java-encoder/ String safe = ESAPI.encoder().encodeForHTML( request.getParameter( "input" ) ); String safe = ESAPI.encoder().encodeForHTMLAttribute( request.getParameter( "input" ) ); String safe = ESAPI.encoder().encodeForJavaScript( request.getParameter( "input" ) ); String safe = ESAPI.encoder().encodeForCSS( request.getParameter( "input" ) );
  • 32. A8: Cross-site Request Forgery (CSRF) An attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated. CSRF attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request.
  • 33. A8: CSRF Primary Defenses The preferred option is to include the unique token in a hidden form field or via a session cookie. This causes the value to be sent in the body of the HTTP request, avoiding its inclusion in the URL, which is subject to exposure. The token should be a function of things like the sessionID, Form Action Parameter, a time-based nonce, and some expiration TTL. When the form is submitted the token will be checked for validity and immediately invalidated so that it can only be used once. OWASP Publishes a Java library called CSRFGuard which is integrated through the use of JavaEE Filter. https://www.owasp.org/index.php/Category:OWASP_CSRFGuard_Project The token approach will break down when the site on which it is deployed contains XSS (Cross-Site Scripting) vulnerabilities. If attackers can XSS your site, they can read the content and extract the token you are using.
  • 34. There Is No Silver Bullet In App Sec Root Causes • Perimeter-based controls (WAFs) lack context to make reliable decisions (high % of false positives) • Pattern matching doesn’t work: computationally inexpensive to generate millions of fuzzed attack payloads • Developers are continuously building new products/features (increasing attack surface) Top 2 Challenges 1. There is no scalable solution to defeat the vulnerability backlog and growing legacy codebase 2. There is no real-time visibility about application attacks: who has the attack payload and metadata? Popular topics that security teams must address when building out an Application Security program
  • 35. Non-invasive Remediation For Java Apps Gartner Maverick Research “Runtime Application Self-Protection (RASP)” “Applications should not be delegating — as is done today — most of their runtime protection to external devices. Applications should be capable of self-protection — that is, have protection features built into the application runtime environment. These features should see all data coming in and out of the application, all events affecting the application, all executed instructions, and all database access. Once RASP is deployed into production, the application runtime environment should be able to detect attacks and protect applications with a high level of assurance.” • Be able to protect applications by detecting and blocking attacks. • Have deep visibility into application logic flow and data flow, configuration, executed instructions and data processing to accurately identify attacks. • Be instrumented into the application runtime environment. This instrumentation should be noninvasive or require no/minimal invasiveness into application code. - Joseph Feiman, Gartner Analyst
  • 38. Prevoty Architecture Prevoty has developed framework plugins for Java, .NET and Ruby on Rails SDKs are available for nearly any and every language C# Java .NET / IIS node.js Go PHP Python Ruby
  • 39. Introducing Prevoty Runtime Application Self-Protection (RASP) Prevoty delivers application security from inside the app itself, leveraging our contextual and behavioral engine to automatically secure content, queries and users in real-time 39 Dynamic Built in-house & externally Distributed Database Internal Employees Firewall incl. WAFs External Employees Cloud, Web Services, Partner Apps, SAML External Data Services User Generated Content Mobile & Multi- device Users
  • 40. The Prevoty Difference Root Causes Addressed By Prevoty • Prevoty applies the contextually correct level of security to prevent XSS, SQLi and CSRF (lives in your applications) • Prevoty doesn’t rely on pattern matching - it’s built on top of unique content/query virtualization engines • Prevoty makes it easy for developers to integrate this level of security via plugins for all major application frameworks Top 2 Challenges Solved By Prevoty 1. Prevoty can significantly diminish vulnerability backlogs and SSDLC churn; it can be dropped in to provide immediate relief for legacy 2. Prevoty gives you attack visibility: who + what + when + where How Prevoty addresses the challenges of Application Security
  • 41. Unparalleled insights into what threats are actually hitting your applications at runtime Includes IP address, session information (including User ID if available), cookie detail IDENTIFY THE ORIGIN OF THE THREAT WHO Contents of the payload, payload intelligence PROVIDE DETAILS OF THE NATURE OF THE THREAT WHAT Timestamp (down to the nanosecond) WHEN DID THE ATTACK TAKE PLACE WHEN URL for web applications, stack trace for SQL queries WHERE THE EXPLOIT HAPPENED IN YOUR APPLICATIONS WHERE PREVOTY APPLICATION SECURITY MONITORING (ASM)
  • 42. Real-time application threat intelligence on attacks in progress can easily be delivered to: - SIEM’s (such as Splunk) - NGFW’s - IPS’s - WAF’s PREVOTY APPLICATION SECURITY MONITORING
  • 43. Thank You Learn more at prevoty.com PREVOTY

Editor's Notes

  • #7: And not that I like using toilet humor for cheap laughs….
  • #8: And not that I like using toilet humor for cheap laughs….
  • #20: http://www.techworld.com/news/security/barclays-97-percent-of-data-breaches-still-due-sql-injection-3331283/ http://eval.symantec.com/mktginfo/enterprise/white_papers/b-whitepaper_exec_summary_internet_security_threat_report_xiii_04-2008.en-us.pdf http://news.softpedia.com/news/CSRF-and-SQL-Injection-Attacks-Increase-in-Frequency-FireHost-Finds-347737.shtml
  • #40: So it’s time for a new approach and Prevoty can help. Prevoty has built RASP (Runtime Application Self Protection) technology which allows robust security to be built into applications without requiring security expertise from developers and without any reliance on past definitions or signatures. The technology was built in conjunction with a number of large enterprises, including Visa, Sony and Time Warner.  Application threats come from three major vectors: content, database queries and users. Prevoty has built three products (modules) to handle each of these in real-time without any reliance on past definitions or signatures. Applications make inline calls to our contextual security engine (which is delivered in the public or private cloud). The engine uses sophisticated proprietary lexical and behavioral analysis in the same way the application would render content, execute queries and validate users a split second before they are allowed to impact an application. It’s like altering the DNA of your application - the application is always protected, from the inside, even beyond the perimeter when accessed by untrusted users from untrusted devices.
  • #41: legacy apps: too hard to add prepared statements, parameterized queries, input sanitization, CSRF tokens.