SlideShare a Scribd company logo
1 of 42
Download to read offline
Secure By Default Web Applications
Robert Munteanu, Senior Computer Scientist, Adobe
About me
2
→ Threat modelling
OWASP Top 10 (selection)
Sample application
Apache Sling primer
Handling security threats
Demo
3
Threat modelling process
Define security requirements
Create application diagram
Identify threats
Mitigate threats
Validate mitigations
4
Security requirements examples
99.9% availability
confidentiality of user profiles
integrity of purchase transactions
prevent unauthorized users from modifying database entries
5
Data flow diagram
6
STRIDE model
Spoofing
Tampering
Repudiation
Information disclosure
Denial of service
Elevation of privilege
7
Threat modelling
→ OWASP Top 10 (selection)
Sample application
Apache Sling primer
Handling security threats
Demo
8
OWASP Top 10
9
A01:2021 - Broken Access Control
bypassing access control checks by modifying the URL, internal application state,
or the HTML page, or by using an attack tool modifying API requests.
viewing or editing someone else's account, by providing its unique identifier
(insecure direct object references)
API with missing access controls for POST, PUT and DELETE.
replaying or tampering with a JSON Web Token (JWT) access control token, or a
cookie or hidden field manipulated to elevate privileges or abusing JWT
invalidation.
10
A03:2021 - Injection
User-supplied data is not validated, filtered, or sanitized
Dynamic queries or non-parameterized calls without context-aware escaping are
used directly in the interpreter.
Hostile data is used within object-relational mapping (ORM) search parameters to
extract additional, sensitive records.
Hostile data is directly used or concatenated. The SQL or command contains the
structure and malicious data in dynamic queries, commands, or stored procedures.
11
A05:2021 - Security Misconfiguration
Missing appropriate security hardening across any part of the application stack
Improperly configured permissions on cloud services.
Unnecessary features are enabled or installed
Default accounts and their passwords are still enabled and unchanged.
Error handling reveals stack traces or other overly informative error messages to
users.
For upgraded systems, the latest security features are disabled or not configured
securely.
The server does not send security headers or directives, or they are not set to
secure values.
12
A06:2021 - Vulnerable and Outdated Components
Vulnerable, unsupported, or out of date software
OS
web/application server
database management system (DBMS)
applications
APIs
components
runtime environments
libraries.
Failure to regularly scan for vulnerabilities
Failure to timely patch security vulnerabilities 13
A09:2021 - Security Logging and Monitoring
Failures
Not logging auditable events
logins
failed logins
high-value transactions
Inadequate log messages for warnings and errors
Failure to monitor logs for suspicious activity
Local-only storage for logs
Missing alerting thresholds and response escalation processes
14
Threat modelling
OWASP Top 10 (selection)
→ Sample application
Apache Sling primer
Handling security threats
Demo
15
Sample application description
simple website
content authors can post articles
authenticated users can post comments
unauthenticated users can read articles and comments
16
Data flow
17
Threat catalogue
T001 - malicious content added by authors / A03:2021-Injection
T002 - malicious content added by authenticated users / A03:2021-Injection
T003 - unauthorized changes made by authenticated users / A01:2021-Broken
Access Control
T004 - unauthorized changes made by unauthenticated users / A01:2021-Broken
Access Control
T005 - comments deleted by authenticated users / A01:2021-Broken Access
Control
T006 - denial of service by bulk posting comments / A09:2021 - Security Logging
and Monitoring Failures
T007 - extraction of personally identifiable data / A01:2021 - Broken Access
Control
18
Threat modelling
OWASP Top 10 (selection)
Sample application
→ Apache Sling primer
Handling security threats
Demo
19
Web application framework
20
RESTful
$ curl http://localhost:8080/content/pospai/home/welcome.json
{
"jcr:primaryType": "sling:Folder",
"jcr:createdBy": "sling-package-install",
"jcr:title": "pospai Welcome",
"jcr:created": "Fri Jul 21 2023 15:05:11 GMT+0300",
"sling:resourceType": "pospai/page"
}
21
Resource types
{
"jcr:primaryType": "sling:Folder",
"jcr:createdBy": "sling-package-install",
"jcr:title": "pospai Welcome",
"jcr:created": "Fri Jul 21 2023 15:05:11 GMT+0300",
"sling:resourceType": "pospai/page"
}
22
Script resolution
23
Scripts
<div style="display: grid; grid-template-columns: 100px; 300px">
<div>
<img width="60px" src="/pospai/avatar.jpg/${resource.createdBy}">
</div>
<div>${resource.createdBy}</div>
<div>${resource.message}</div>
</div>
24
Servlets
@Component(
service = Servlet.class,
property = {
"sling.servlet.resourceTypes=pospai/avatar",
"sling.servlet.extensions=jpg",
}
)
public class AvatarServlet extends SlingSafeMethodsServlet {
@Override
protected void doGet(SlingHttpServletRequest request,
SlingHttpServletResponse response) throws ServletException,
IOException {
}
}
25
Content repository
26
Threat modelling
OWASP Top 10 (selection)
Sample application
Apache Sling primer
→ Handling security threats
Demo
27
Built-in access control
28
Built-in access control
29
Authentication opt-in for servlets
@Component(service = { Servlet.class },
property = { AuthConstants.AUTH_REQUIREMENTS +"=+/my/servlet"}
)
@SlingServletPaths("/my/servlet")
public class MyProtectedServlet extends SlingAllMethodsServlet {
/* implementation here */
}
30
XSS protection
31
Injection-safe APIs
// automatically loaded, ensures user has access
Resource requested = request.getResource();
// access properties
String title = requested.getValueMap().get("jcr:title", String.class);
// gather children paths
List<String> childrenPaths = new ArrayList<>();
for ( Resource child: requested.getChildren() ) {
childrenPaths.add(child.getPath());
}
// access parent resource
Resource parent = requested.getParent();
32
Side note: type-safe APIs
@Model(adaptables=Resource.class)
public class MyModel {
@ValueMapValue(name="jcr:title")
private String title;
public String getTitle() {
return title;
}
}
MyModel model = resource.adaptTo(MyModel.class)
model.getTitle();
33
Metrics
$ curl --silent http://localhost:8080/metrics | grep -E '^(sling|oak|jvm)' | wc -l
486
oak_SESSION_COUNT
oak_security_authentication_login_failed_total
oak_security_authentication_login_token_failed_total
34
Dashboards
35
Alerts
36
Fine-grained artifacts
37
Automatic updates
38
Threat modelling
OWASP Top 10 (selection)
Sample application
Apache Sling primer
Handling security threats
→ Demo
39
40
Resources
Apache Sling : https://sling.apache.org/
Apache Jackrabbit Oak: https://jackrabbit.apache.org/oak/
Pospai Sample App: https://github.com/rombert/pospai
STRIDE model: https://en.wikipedia.org/wiki/STRIDE_(security)
OWASP Top 10: https://owasp.org/www-project-top-ten/
41
42

More Related Content

Similar to Secure by Default Web Applications

OWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersOWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersLewis Ardern
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
DevSecOps - automating security
DevSecOps - automating securityDevSecOps - automating security
DevSecOps - automating securityJohn Staveley
 
Top 10 Web App Security Risks
Top 10 Web App Security RisksTop 10 Web App Security Risks
Top 10 Web App Security RisksSperasoft
 
OWASP App Sec US - 2010
OWASP App Sec US - 2010OWASP App Sec US - 2010
OWASP App Sec US - 2010Aditya K Sood
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxcgt38842
 
OWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root CausesOWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root CausesMarco Morana
 
Software Development Weaknesses - SecOSdays Sofia, 2019
Software Development Weaknesses - SecOSdays Sofia, 2019Software Development Weaknesses - SecOSdays Sofia, 2019
Software Development Weaknesses - SecOSdays Sofia, 2019Balázs Tatár
 
OWASP_Top_Ten_Proactive_Controls_v32.pptx
OWASP_Top_Ten_Proactive_Controls_v32.pptxOWASP_Top_Ten_Proactive_Controls_v32.pptx
OWASP_Top_Ten_Proactive_Controls_v32.pptxnmk42194
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxjohnpragasam1
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxazida3
 
OWASP zabezpieczenia aplikacji - Top 10 ASR
OWASP zabezpieczenia aplikacji - Top 10 ASROWASP zabezpieczenia aplikacji - Top 10 ASR
OWASP zabezpieczenia aplikacji - Top 10 ASRLaravel Poland MeetUp
 
Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...Netsparker
 
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities Braindev Kyiv
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxFernandoVizer
 
Web application penetration testing lab setup guide
Web application penetration testing lab setup guideWeb application penetration testing lab setup guide
Web application penetration testing lab setup guideSudhanshu Chauhan
 
Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)Ravindra Singh Rathore
 

Similar to Secure by Default Web Applications (20)

OWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersOWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript Developers
 
Cyber ppt
Cyber pptCyber ppt
Cyber ppt
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
DevSecOps - automating security
DevSecOps - automating securityDevSecOps - automating security
DevSecOps - automating security
 
OWASP -Top 5 Jagjit
OWASP -Top 5 JagjitOWASP -Top 5 Jagjit
OWASP -Top 5 Jagjit
 
Top 10 Web App Security Risks
Top 10 Web App Security RisksTop 10 Web App Security Risks
Top 10 Web App Security Risks
 
OWASP App Sec US - 2010
OWASP App Sec US - 2010OWASP App Sec US - 2010
OWASP App Sec US - 2010
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
OWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root CausesOWASP Top 10 And Insecure Software Root Causes
OWASP Top 10 And Insecure Software Root Causes
 
Software Development Weaknesses - SecOSdays Sofia, 2019
Software Development Weaknesses - SecOSdays Sofia, 2019Software Development Weaknesses - SecOSdays Sofia, 2019
Software Development Weaknesses - SecOSdays Sofia, 2019
 
OWASP_Top_Ten_Proactive_Controls_v32.pptx
OWASP_Top_Ten_Proactive_Controls_v32.pptxOWASP_Top_Ten_Proactive_Controls_v32.pptx
OWASP_Top_Ten_Proactive_Controls_v32.pptx
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
OWASP zabezpieczenia aplikacji - Top 10 ASR
OWASP zabezpieczenia aplikacji - Top 10 ASROWASP zabezpieczenia aplikacji - Top 10 ASR
OWASP zabezpieczenia aplikacji - Top 10 ASR
 
Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...Web Application Penetration Tests - Vulnerability Identification and Details ...
Web Application Penetration Tests - Vulnerability Identification and Details ...
 
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
Sergey Kochergan - OWASP Top 10 Web Application Vulnerabilities
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
Web application penetration testing lab setup guide
Web application penetration testing lab setup guideWeb application penetration testing lab setup guide
Web application penetration testing lab setup guide
 
Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)Sql injections (Basic bypass authentication)
Sql injections (Basic bypass authentication)
 
ASP.NET Web Security
ASP.NET Web SecurityASP.NET Web Security
ASP.NET Web Security
 

More from Robert Munteanu

Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveSling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveRobert Munteanu
 
Will it blend? Java agents and OSGi
Will it blend? Java agents and OSGiWill it blend? Java agents and OSGi
Will it blend? Java agents and OSGiRobert Munteanu
 
Escape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud ServiceEscape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud ServiceRobert Munteanu
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoringRobert Munteanu
 
Java agents for fun and (not so much) profit
Java agents for fun and (not so much) profitJava agents for fun and (not so much) profit
Java agents for fun and (not so much) profitRobert Munteanu
 
Will it blend? Java agents and OSGi
Will it blend? Java agents and OSGiWill it blend? Java agents and OSGi
Will it blend? Java agents and OSGiRobert Munteanu
 
Cloud-native legacy applications
Cloud-native legacy applicationsCloud-native legacy applications
Cloud-native legacy applicationsRobert Munteanu
 
From Monolith to Modules - breaking apart a one size fits all product into mo...
From Monolith to Modules - breaking apart a one size fits all product into mo...From Monolith to Modules - breaking apart a one size fits all product into mo...
From Monolith to Modules - breaking apart a one size fits all product into mo...Robert Munteanu
 
What's new in the Sling developer tooling?
What's new in the Sling developer tooling?What's new in the Sling developer tooling?
What's new in the Sling developer tooling?Robert Munteanu
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code baseRobert Munteanu
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code baseRobert Munteanu
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code baseRobert Munteanu
 
Zero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerZero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerRobert Munteanu
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code baseRobert Munteanu
 
Do you really want to go fully micro?
Do you really want to go fully micro?Do you really want to go fully micro?
Do you really want to go fully micro?Robert Munteanu
 
Effective web application development with Apache Sling
Effective web application development with Apache SlingEffective web application development with Apache Sling
Effective web application development with Apache SlingRobert Munteanu
 
Of microservices and microservices
Of microservices and microservicesOf microservices and microservices
Of microservices and microservicesRobert Munteanu
 
Slide IDE Tooling (adaptTo 2016)
Slide IDE Tooling (adaptTo 2016)Slide IDE Tooling (adaptTo 2016)
Slide IDE Tooling (adaptTo 2016)Robert Munteanu
 
Secure by Default Web Applications with Apache Sling
Secure by Default Web Applications with Apache SlingSecure by Default Web Applications with Apache Sling
Secure by Default Web Applications with Apache SlingRobert Munteanu
 

More from Robert Munteanu (20)

Sling Applications - A DevOps perspective
Sling Applications - A DevOps perspectiveSling Applications - A DevOps perspective
Sling Applications - A DevOps perspective
 
Will it blend? Java agents and OSGi
Will it blend? Java agents and OSGiWill it blend? Java agents and OSGi
Will it blend? Java agents and OSGi
 
Escape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud ServiceEscape the defaults - Configure Sling like AEM as a Cloud Service
Escape the defaults - Configure Sling like AEM as a Cloud Service
 
Crash course in Kubernetes monitoring
Crash course in Kubernetes monitoringCrash course in Kubernetes monitoring
Crash course in Kubernetes monitoring
 
Java agents for fun and (not so much) profit
Java agents for fun and (not so much) profitJava agents for fun and (not so much) profit
Java agents for fun and (not so much) profit
 
Will it blend? Java agents and OSGi
Will it blend? Java agents and OSGiWill it blend? Java agents and OSGi
Will it blend? Java agents and OSGi
 
Cloud-native legacy applications
Cloud-native legacy applicationsCloud-native legacy applications
Cloud-native legacy applications
 
Cloud-Native Sling
Cloud-Native SlingCloud-Native Sling
Cloud-Native Sling
 
From Monolith to Modules - breaking apart a one size fits all product into mo...
From Monolith to Modules - breaking apart a one size fits all product into mo...From Monolith to Modules - breaking apart a one size fits all product into mo...
From Monolith to Modules - breaking apart a one size fits all product into mo...
 
What's new in the Sling developer tooling?
What's new in the Sling developer tooling?What's new in the Sling developer tooling?
What's new in the Sling developer tooling?
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
Zero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using DockerZero downtime deployments for Sling application using Docker
Zero downtime deployments for Sling application using Docker
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
Do you really want to go fully micro?
Do you really want to go fully micro?Do you really want to go fully micro?
Do you really want to go fully micro?
 
Effective web application development with Apache Sling
Effective web application development with Apache SlingEffective web application development with Apache Sling
Effective web application development with Apache Sling
 
Of microservices and microservices
Of microservices and microservicesOf microservices and microservices
Of microservices and microservices
 
Slide IDE Tooling (adaptTo 2016)
Slide IDE Tooling (adaptTo 2016)Slide IDE Tooling (adaptTo 2016)
Slide IDE Tooling (adaptTo 2016)
 
Secure by Default Web Applications with Apache Sling
Secure by Default Web Applications with Apache SlingSecure by Default Web Applications with Apache Sling
Secure by Default Web Applications with Apache Sling
 

Recently uploaded

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 

Recently uploaded (20)

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 

Secure by Default Web Applications

  • 1. Secure By Default Web Applications Robert Munteanu, Senior Computer Scientist, Adobe
  • 3. → Threat modelling OWASP Top 10 (selection) Sample application Apache Sling primer Handling security threats Demo 3
  • 4. Threat modelling process Define security requirements Create application diagram Identify threats Mitigate threats Validate mitigations 4
  • 5. Security requirements examples 99.9% availability confidentiality of user profiles integrity of purchase transactions prevent unauthorized users from modifying database entries 5
  • 8. Threat modelling → OWASP Top 10 (selection) Sample application Apache Sling primer Handling security threats Demo 8
  • 10. A01:2021 - Broken Access Control bypassing access control checks by modifying the URL, internal application state, or the HTML page, or by using an attack tool modifying API requests. viewing or editing someone else's account, by providing its unique identifier (insecure direct object references) API with missing access controls for POST, PUT and DELETE. replaying or tampering with a JSON Web Token (JWT) access control token, or a cookie or hidden field manipulated to elevate privileges or abusing JWT invalidation. 10
  • 11. A03:2021 - Injection User-supplied data is not validated, filtered, or sanitized Dynamic queries or non-parameterized calls without context-aware escaping are used directly in the interpreter. Hostile data is used within object-relational mapping (ORM) search parameters to extract additional, sensitive records. Hostile data is directly used or concatenated. The SQL or command contains the structure and malicious data in dynamic queries, commands, or stored procedures. 11
  • 12. A05:2021 - Security Misconfiguration Missing appropriate security hardening across any part of the application stack Improperly configured permissions on cloud services. Unnecessary features are enabled or installed Default accounts and their passwords are still enabled and unchanged. Error handling reveals stack traces or other overly informative error messages to users. For upgraded systems, the latest security features are disabled or not configured securely. The server does not send security headers or directives, or they are not set to secure values. 12
  • 13. A06:2021 - Vulnerable and Outdated Components Vulnerable, unsupported, or out of date software OS web/application server database management system (DBMS) applications APIs components runtime environments libraries. Failure to regularly scan for vulnerabilities Failure to timely patch security vulnerabilities 13
  • 14. A09:2021 - Security Logging and Monitoring Failures Not logging auditable events logins failed logins high-value transactions Inadequate log messages for warnings and errors Failure to monitor logs for suspicious activity Local-only storage for logs Missing alerting thresholds and response escalation processes 14
  • 15. Threat modelling OWASP Top 10 (selection) → Sample application Apache Sling primer Handling security threats Demo 15
  • 16. Sample application description simple website content authors can post articles authenticated users can post comments unauthenticated users can read articles and comments 16
  • 18. Threat catalogue T001 - malicious content added by authors / A03:2021-Injection T002 - malicious content added by authenticated users / A03:2021-Injection T003 - unauthorized changes made by authenticated users / A01:2021-Broken Access Control T004 - unauthorized changes made by unauthenticated users / A01:2021-Broken Access Control T005 - comments deleted by authenticated users / A01:2021-Broken Access Control T006 - denial of service by bulk posting comments / A09:2021 - Security Logging and Monitoring Failures T007 - extraction of personally identifiable data / A01:2021 - Broken Access Control 18
  • 19. Threat modelling OWASP Top 10 (selection) Sample application → Apache Sling primer Handling security threats Demo 19
  • 21. RESTful $ curl http://localhost:8080/content/pospai/home/welcome.json { "jcr:primaryType": "sling:Folder", "jcr:createdBy": "sling-package-install", "jcr:title": "pospai Welcome", "jcr:created": "Fri Jul 21 2023 15:05:11 GMT+0300", "sling:resourceType": "pospai/page" } 21
  • 22. Resource types { "jcr:primaryType": "sling:Folder", "jcr:createdBy": "sling-package-install", "jcr:title": "pospai Welcome", "jcr:created": "Fri Jul 21 2023 15:05:11 GMT+0300", "sling:resourceType": "pospai/page" } 22
  • 24. Scripts <div style="display: grid; grid-template-columns: 100px; 300px"> <div> <img width="60px" src="/pospai/avatar.jpg/${resource.createdBy}"> </div> <div>${resource.createdBy}</div> <div>${resource.message}</div> </div> 24
  • 25. Servlets @Component( service = Servlet.class, property = { "sling.servlet.resourceTypes=pospai/avatar", "sling.servlet.extensions=jpg", } ) public class AvatarServlet extends SlingSafeMethodsServlet { @Override protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException { } } 25
  • 27. Threat modelling OWASP Top 10 (selection) Sample application Apache Sling primer → Handling security threats Demo 27
  • 30. Authentication opt-in for servlets @Component(service = { Servlet.class }, property = { AuthConstants.AUTH_REQUIREMENTS +"=+/my/servlet"} ) @SlingServletPaths("/my/servlet") public class MyProtectedServlet extends SlingAllMethodsServlet { /* implementation here */ } 30
  • 32. Injection-safe APIs // automatically loaded, ensures user has access Resource requested = request.getResource(); // access properties String title = requested.getValueMap().get("jcr:title", String.class); // gather children paths List<String> childrenPaths = new ArrayList<>(); for ( Resource child: requested.getChildren() ) { childrenPaths.add(child.getPath()); } // access parent resource Resource parent = requested.getParent(); 32
  • 33. Side note: type-safe APIs @Model(adaptables=Resource.class) public class MyModel { @ValueMapValue(name="jcr:title") private String title; public String getTitle() { return title; } } MyModel model = resource.adaptTo(MyModel.class) model.getTitle(); 33
  • 34. Metrics $ curl --silent http://localhost:8080/metrics | grep -E '^(sling|oak|jvm)' | wc -l 486 oak_SESSION_COUNT oak_security_authentication_login_failed_total oak_security_authentication_login_token_failed_total 34
  • 39. Threat modelling OWASP Top 10 (selection) Sample application Apache Sling primer Handling security threats → Demo 39
  • 40. 40
  • 41. Resources Apache Sling : https://sling.apache.org/ Apache Jackrabbit Oak: https://jackrabbit.apache.org/oak/ Pospai Sample App: https://github.com/rombert/pospai STRIDE model: https://en.wikipedia.org/wiki/STRIDE_(security) OWASP Top 10: https://owasp.org/www-project-top-ten/ 41
  • 42. 42