SlideShare a Scribd company logo
1 of 47
Download to read offline
Common Vulnerabilities and How to Find Them:
e-Commerce and Financial Trading Applications
William Jardine & Anthony Fielding, MWR InfoSecurity
W a r s a w , 1 0 . 1 0 . 2 0 1 8
OWASP
Poland Day 2018
< o b l i g a t o r y $ w h o a m i f u n n y s l i d e >
• Security Consultants at MWR
• First time in Poland!
• Lots of e-Commerce and
financial trading app testing
(that’s quite fortunate!)
I s a n d I s n ’ t
Isn’t: Intended to be new or groundbreaking techniques
Is: A summary of the currently observed threats against these 2 sectors
I s a n d I s n ’ t
Isn’t: Intended to be new or groundbreaking techniques
Is: A summary of the currently observed threats against these 2 sectors
Isn’t: Hardcore war stories
Is: Simple, real-world, prevalent examples (arguably even scarier)
I s a n d I s n ’ t
Isn’t: Intended to be new or groundbreaking techniques
Is: A summary of the currently observed threats against these 2 sectors
Isn’t: Hardcore war stories
Is: Simple, real-world, prevalent examples (arguably even scarier)
Isn’t: A guide on how to fix
Is: A guide on how to (quickly) find
K e y p o i n t s
• OWASP Top 10 is valuable
• But we need context of the specific app domain
• Whitebox testing leads to more effective results
• Quick, easy tests can pick up low-hanging fruit
e - C o m m e r c e i n d u s t r y s u m m a r y
• An online shop – generally we mean a big one
• E.g. apps like Amazon, eBay, etc.
• Open source
• Lots of known vulnerabilities in many of these
e - C o m m e r c e i n d u s t r y s u m m a r y
• An online shop – generally we mean a big one
• E.g. apps like Amazon, eBay, etc.
• Open source
• Lots of known vulnerabilities in many of these
• More often using COTS $$$ solutions
• Less open source and explored
• More nuanced/complex installations…
e - C o m m e r c e f u n c t i o n a l i t y
• Search
• PDP vs. PLP
• Add to basket
• Flat user model (i.e. no real admin functionality)
• Payments
• AJAX
• Large product catalogues
e - C o m m e r c e f l o w
• CLP: Category List Page
e - C o m m e r c e f l o w
• CLP: Category List Page
• PLP: Product List Page
e - C o m m e r c e f l o w
• CLP: Category List Page
• PLP: Product List Page
• PDP: Product Display Page
S e l e c t i v e C S R F i n P L P p a g e s
• PLP lists ~1000 items
• 1000 “add to basket” buttons
• Devs don’t want to have to list and verify 1000 unique CSRF
tokens
• And if a PLP page is cached, CSRF tokens would become stale…
P a y m e n t f l o w a b u s e
• Legitimate flow
Add to basket:
2x items @ £10
Calculate cost
2 x £10: £20
Pay basket cost:
2 items: £20
P a y m e n t f l o w a b u s e
• Malicious flow
• Occurs due to faulty business logic / lack of secure 3rd party vendor
Add to basket:
2x items @ £10
Calculate cost
2 x £10: £20
Pay basket cost:
1002 items: £20
Add to basket:
1000x item @ £10
M i c r o - s e r v i c e a r c h i t e c t u r e s
• Front-end is monolithic
• Back-end comprises several “micro-services”
• Auth service, payment service, enterprise search service, etc.
• Obviously this can become quite complex…
• https://technologyconversations.com/2015/08/
09/including-front-end-web-components-into-
microservices/
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1
• Something like:
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1
• Cookies store some identifying session info
• Encrypted with a server-side session key
* in this case, just the AES encrypted form of:
userid=1;sessioncookie=1234;someotherstuff=2;test
SomeCookie=LFfTTadH2MnC3ae9exhYr1jauab3ssORTQuPrpJzHlKGpCeB6T4erJ
Kco6rYJO/FraIn3W9ZYjVc4MbyciJiFA==
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1
• The web server (Apache, IIS, whatever) then decrypts the cookies
• And creates request headers, which it uses to authenticate to back-
end services
UserID: 1234
EmailAddress: test@example.com
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1
• We can just send these headers in the initial web app request…
GET / HTTP/1.1
Host: www.some-ecommerceapp.com
SomeCookie=some-value
UserID: 1234
EmailAddress: test@example.com
Connection: close
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2
• Observed on several occasions
• Where apps are overly reliant on something else
• API Gateway
• WAF
• Or where they’re not sticking to centralised procedures properly
• E.g. Checking the HTTP code, not the actual body…
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2
• Request with valid cookies
HTTP /1.1 200 OK
...
{“Response”: “Authenticated”}
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2
• Request with valid cookies
HTTP /1.1 200 OK
...
{“Response”: “Authenticated”}
• Request with invalid cookies
HTTP /1.1 200 OK
...
{“Response”: “Unauthenticated”}
…
M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2
• “Abstraction of security” can be a good thing
• But beware a lack of context
• Defence-in-depth!
N i c h e s e a r c h b a c k - e n d
• 9 pentests out of 10 will just spam ‘or 1=1
• And the top 100 SQLi payloads
• Is a large product catalogue really going to be stored in an SQL
DB?
• Is the question even asked a lot of the time?
O r a c l e E n d e c a i n j e c t i o n d e m o
• Or EQLi™ (© William Jardine 2018)
• https://labs.mwrinfosecurity.com/blog/eql-injection-and-oracle-endeca/
• Common in Oracle ATG e-Commerce installations
• E.g. Google:
• inurl:ntt inurl:nty
• inurl:ntk inurl:p_price
O r a c l e E n d e c a i n j e c t i o n d e m o
Nrs=collection()/record[LISTING_ID%3D "T123456"]
Nrs=collection()/record[endeca:matches(.,"P_Marked_For_Emergency_
Withdrawal ","Y")]
Ns=P_Stock_Availability|0||P_Best_Seller|0
Ntt=someitem&Ntk=All
S u m m a r y : C o n t e x t
Vulnerability Severity Frequency Complexity
Payment flow vulnerabilities High Rarely* Medium
Insecure direct object references Medium Sometimes Low
Niche search injections Medium Sometimes Medium
Nuanced broken access control High Sometimes High
Selective CSRF Low** Frequent Medium
Insecure CORS/CSP settings Low Frequent Low
* Rarely in broadly secure apps that use 3DSecure
** Low on its own; higher impact if chained with other things
F i n a n c i a l i n d u s t r y s u m m a r y
• Online banking and trading platforms
• Complex, big systems with lots of functionality
• Exciting words like butterfly trades, swaps, bonds, forex, etc…
• Developed in-house over 6 months to many years
• Mix of old (Silverlight, Flash) and new technologies e.g.
AngularJS Single Page Application (SPA)
F i n a n c i a l f u n c t i o n a l i t y
• Limited or read-only functionality for regular users
• Highly customisable and rich user experience
• Spreadsheet import/export
• Extensive reporting capabilities
• Visualisations and live data
• Create trades, transfer funds, approve payments
F i n a n c i a l f u n c t i o n a l i t y
• Complex user model
• Workflow heavy
• Upstream dependencies and downstream dependents
• Many departments involved
• Apps within apps
• Often use Single Sign-On (SSO) for authentication
• Prevalence of Single Page Application (SPA)s e.g. AngularJS
S i m p l e U s e r M o d e l
Subscriber
Onboarding
User
Admin
User
Subscriber
Onboarding
Group
Subscriber
Group
Standard
User
Premier
User
Admin
Group
F i n a n c e U s e r M o d e l
Internal Users
App 1
Approver
Entitlement
External Users
Premier
Company
Trading User
External Trading
Company
Group
Premier
Company
Entitlement
App 2
Reporting
Entitlement
App 1
Supervisor User
Audit
Department
User
App 2
Audit Report
Entitlement
App 1
Reporting
Entitlement
W h a t d o w e f i n d ?
• Broken access control
• Primarily horizontal privilege escalation
• Reliance on “out of scope” SSO
• More and more hardened against Cross-Site Scripting (XSS)
• Old: Due to age
• New: Use of AngularJS
• Still find relatively frequently though
• User-targeted Remote Code Execution (RCE) via formula injection
• Output encoded (in browser) so we’re fine
F o r m u l a e I n j e c t i o n
• The following payloads test for this vulnerability
=cmd|' /C calc'!A0
+cmd|' /C calc'!A0
@SUM(1+1)*cmd|' /C calc'!A0
DDE ("cmd";"/C calc";"!A0")A0
+MSEXCEL|'......WindowsSystem32cmd /c calc'!A0
W h a t d o w e f i n d ?
• Occasionally direct SQL query access on back-end panels
• Retired and long forgotten systems still in production
• Insecure Direct Object References
• E.g. https://sometradingapp.com/export?DocumentID=11
• Client-Side Template Injection (CSTI)
• Test for {{ 7*7 }}
• Missing headers and poor cookie configuration
• Out of date and vulnerable software
• No or broken CSRF protection
M E G A B A N K d e m o
S u m m a r y : C o n t e x t
Vulnerability Severity Frequency Complexity
Formula injection Medium Frequent Medium
Broken access control High Frequent Medium
Insecure direct object references High Sometimes Medium
CSTI Medium Sometimes Medium
XSS Medium Sometimes Medium
Direct SQL query execution High Rarely Low
Lack of CSRF protection Low Frequent Low
Insecure cookies Low Frequent Low
O v e r l a p ( f r e q u e n c y )
Vulnerability Frequency
(e-Commerce)
Frequency
(financial trading)
1. Some lack of CSRF protection Frequent Frequent
2. Broken access control Sometimes Frequent
O v e r l a p ( f r e q u e n c y )
Vulnerability Frequency
(e-Commerce)
Frequency
(financial trading)
1. Some lack of CSRF protection Frequent Frequent
2. Broken access control Sometimes Frequent
3. Formula injection N/A Frequent
O v e r l a p ( f r e q u e n c y )
Vulnerability Frequency
(e-Commerce)
Frequency
(financial trading)
1. Some lack of CSRF protection Frequent Frequent
2. Broken access control Sometimes Frequent
3. Formula injection N/A Frequent
4. Insecure CORS/CSP settings Frequent N/A
5. Insecure cookies N/A Frequent
O v e r l a p ( f r e q u e n c y )
Vulnerability Frequency
(e-Commerce)
Frequency
(financial trading)
1. Some lack of CSRF protection Frequent Frequent
2. Broken access control Sometimes Frequent
3. Formula injection N/A Frequent
4. Insecure CORS/CSP settings Frequent N/A
5. Insecure cookies N/A Frequent
6. Insecure direct object references Sometimes Sometimes
7. Search injections Sometimes Rarely
8. XSS N/A Sometimes
9. CSTI N/A Sometimes
O v e r l a p ( f r e q u e n c y )
Vulnerability Frequency
(e-Commerce)
Frequency
(financial trading)
1. Some lack of CSRF protection Frequent Frequent
2. Broken access control Sometimes Frequent
3. Formula injection N/A Frequent
4. Insecure CORS/CSP settings Frequent N/A
5. Insecure cookies N/A Frequent
6. Insecure direct object references Sometimes Sometimes
7. Search injections Sometimes Rarely
8. XSS N/A Sometimes
9. CSTI N/A Sometimes
10. Payment flow vulnerabilities Rarely* N/A
H u h … T h a t ’s 1 0 …
Vulnerability Frequency
(e-Commerce)
Frequency
(financial
trading)
1. Some lack of CSRF protection Frequent Frequent
2. Broken access control Sometimes Frequent
3. Formula injection N/A Frequent
4. Insecure CORS/CSP settings Frequent N/A
5. Insecure cookies N/A Frequent
6. Insecure direct object
references
Sometimes Sometimes
7. Search injections Sometimes Rarely
8. XSS N/A Sometimes
9. CSTI N/A Sometimes
10. Payment flow vulnerabilities Rarely* N/A
OWASP Top 10 Vulnerability Higher/Lower
A1. Injection
A2. Broken Authentication N/A
A3. Sensitive Data Exposure N/A
A4. XXE N/A
A5. Broken Access Control
A6. Security Misconfigurations
A7. XSS
A8. Insecure Deserialization N/A
A9. Components w/ Known Vulns N/A
A10. Insufficient Logging/Monitoring N/A
V e r y r o u g h h i t - l i s t
Vulnerability How to find?
1. Some lack of CSRF protection Burp CSRF PoC; is it in a cookie? Is it JSON?
2. Broken access control Burp Repeater w/ different cookies; check response codes
3. Formula injection =cmd|’ /C calc’!A0
4. Insecure CORS/CSP settings DevTools fetch(); OPTIONS; all 3rd party resources
5. Rubbish cookies HttpOnly and Secure; domains; age
6. Insecure direct object references e.g. DocumentID=2
7. Search injections What DB is used? Audit code
8. XSS <img src=x onerror=alert(1)>
9. CSTI {{7*7}}
10. Payment flow vulnerabilities Re-send requests after basket calculation
K e y p o i n t s
• OWASP Top 10 is valuable
• But we need context of the specific app domain
• Whitebox testing leads to more effective results
• Quick, easy tests can pick up low-hanging fruit
Any questions?
Hit us up on Twitter (unless negative, in which case please don’t...)
<REDACTED BECAUSE GDPR>
@williamkjardine / @antfie

More Related Content

Similar to OWASP Poland Day 2018 - Anthony Fielding and William Jardine - Common App Vulns

If I want a perfect cyberweapon, I'll target ERP - second edition
If I want a perfect cyberweapon, I'll target ERP - second editionIf I want a perfect cyberweapon, I'll target ERP - second edition
If I want a perfect cyberweapon, I'll target ERP - second editionERPScan
 
SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)
SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)
SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)Laura Chiticariu
 
Cybercrime and the Developer Java2Days 2016 Sofia
Cybercrime and the Developer Java2Days 2016 SofiaCybercrime and the Developer Java2Days 2016 Sofia
Cybercrime and the Developer Java2Days 2016 SofiaSteve Poole
 
Fraud Engineering, from Merchant Risk Council Annual Meeting 2012
Fraud Engineering, from Merchant Risk Council Annual Meeting 2012Fraud Engineering, from Merchant Risk Council Annual Meeting 2012
Fraud Engineering, from Merchant Risk Council Annual Meeting 2012Nick Galbreath
 
Penetration testing as an internal audit activity
Penetration testing as an internal audit activityPenetration testing as an internal audit activity
Penetration testing as an internal audit activityTranscendent Group
 
Zen and the art of Security Testing
Zen and the art of Security TestingZen and the art of Security Testing
Zen and the art of Security TestingTEST Huddle
 
00 13092011-1130-pamella-doyle
00 13092011-1130-pamella-doyle00 13092011-1130-pamella-doyle
00 13092011-1130-pamella-doyleguiabusinessmedia
 
The cyber security hype cycle is upon us
The cyber security hype cycle is upon usThe cyber security hype cycle is upon us
The cyber security hype cycle is upon usJonathan Sinclair
 
INFRAGARD 2014: Back to basics security
INFRAGARD 2014: Back to basics securityINFRAGARD 2014: Back to basics security
INFRAGARD 2014: Back to basics securityJoel Cardella
 
IBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's StandpointIBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's StandpointLuis Grangeia
 
2010 11 pubcon_hendison-hosting
2010 11 pubcon_hendison-hosting2010 11 pubcon_hendison-hosting
2010 11 pubcon_hendison-hostingshendison
 
Security in the News
Security in the NewsSecurity in the News
Security in the NewsJames Sutter
 
"Inter- application vulnerabilities. hunting for bugs in secure applications"...
"Inter- application vulnerabilities. hunting for bugs in secure applications"..."Inter- application vulnerabilities. hunting for bugs in secure applications"...
"Inter- application vulnerabilities. hunting for bugs in secure applications"...PROIDEA
 
What does it take to be a performance tester?
What does it take to be a performance tester?What does it take to be a performance tester?
What does it take to be a performance tester?SQALab
 
13 real ways to destroy business by breaking company’s SAP applications
13 real ways to destroy business by breaking company’s SAP applications13 real ways to destroy business by breaking company’s SAP applications
13 real ways to destroy business by breaking company’s SAP applicationsERPScan
 
Security in an Interconnected and Complex World of Software
Security in an Interconnected and Complex World of SoftwareSecurity in an Interconnected and Complex World of Software
Security in an Interconnected and Complex World of SoftwareMichael Coates
 
Best Website Design company in Bangladesh- Web3matrix.com
Best Website Design company in Bangladesh- Web3matrix.comBest Website Design company in Bangladesh- Web3matrix.com
Best Website Design company in Bangladesh- Web3matrix.comSyedKamal38
 
Slides: How Automating Data Lineage Improves BI Performance
Slides: How Automating Data Lineage Improves BI PerformanceSlides: How Automating Data Lineage Improves BI Performance
Slides: How Automating Data Lineage Improves BI PerformanceDATAVERSITY
 
SANSFIRE18: War Stories on Using Automated Threat Intelligence for Defense
SANSFIRE18: War Stories on Using Automated Threat Intelligence for DefenseSANSFIRE18: War Stories on Using Automated Threat Intelligence for Defense
SANSFIRE18: War Stories on Using Automated Threat Intelligence for DefenseJohn Bambenek
 

Similar to OWASP Poland Day 2018 - Anthony Fielding and William Jardine - Common App Vulns (20)

If I want a perfect cyberweapon, I'll target ERP - second edition
If I want a perfect cyberweapon, I'll target ERP - second editionIf I want a perfect cyberweapon, I'll target ERP - second edition
If I want a perfect cyberweapon, I'll target ERP - second edition
 
SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)
SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)
SystemT: Declarative Information Extraction (invited talk at MIT CSAIL)
 
Cybercrime and the Developer Java2Days 2016 Sofia
Cybercrime and the Developer Java2Days 2016 SofiaCybercrime and the Developer Java2Days 2016 Sofia
Cybercrime and the Developer Java2Days 2016 Sofia
 
Fraud Engineering, from Merchant Risk Council Annual Meeting 2012
Fraud Engineering, from Merchant Risk Council Annual Meeting 2012Fraud Engineering, from Merchant Risk Council Annual Meeting 2012
Fraud Engineering, from Merchant Risk Council Annual Meeting 2012
 
Penetration testing as an internal audit activity
Penetration testing as an internal audit activityPenetration testing as an internal audit activity
Penetration testing as an internal audit activity
 
Zen and the art of Security Testing
Zen and the art of Security TestingZen and the art of Security Testing
Zen and the art of Security Testing
 
00 13092011-1130-pamella-doyle
00 13092011-1130-pamella-doyle00 13092011-1130-pamella-doyle
00 13092011-1130-pamella-doyle
 
The cyber security hype cycle is upon us
The cyber security hype cycle is upon usThe cyber security hype cycle is upon us
The cyber security hype cycle is upon us
 
INFRAGARD 2014: Back to basics security
INFRAGARD 2014: Back to basics securityINFRAGARD 2014: Back to basics security
INFRAGARD 2014: Back to basics security
 
Luis Grangeia IBWAS
Luis Grangeia IBWASLuis Grangeia IBWAS
Luis Grangeia IBWAS
 
IBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's StandpointIBWAS 2010: Web Security From an Auditor's Standpoint
IBWAS 2010: Web Security From an Auditor's Standpoint
 
2010 11 pubcon_hendison-hosting
2010 11 pubcon_hendison-hosting2010 11 pubcon_hendison-hosting
2010 11 pubcon_hendison-hosting
 
Security in the News
Security in the NewsSecurity in the News
Security in the News
 
"Inter- application vulnerabilities. hunting for bugs in secure applications"...
"Inter- application vulnerabilities. hunting for bugs in secure applications"..."Inter- application vulnerabilities. hunting for bugs in secure applications"...
"Inter- application vulnerabilities. hunting for bugs in secure applications"...
 
What does it take to be a performance tester?
What does it take to be a performance tester?What does it take to be a performance tester?
What does it take to be a performance tester?
 
13 real ways to destroy business by breaking company’s SAP applications
13 real ways to destroy business by breaking company’s SAP applications13 real ways to destroy business by breaking company’s SAP applications
13 real ways to destroy business by breaking company’s SAP applications
 
Security in an Interconnected and Complex World of Software
Security in an Interconnected and Complex World of SoftwareSecurity in an Interconnected and Complex World of Software
Security in an Interconnected and Complex World of Software
 
Best Website Design company in Bangladesh- Web3matrix.com
Best Website Design company in Bangladesh- Web3matrix.comBest Website Design company in Bangladesh- Web3matrix.com
Best Website Design company in Bangladesh- Web3matrix.com
 
Slides: How Automating Data Lineage Improves BI Performance
Slides: How Automating Data Lineage Improves BI PerformanceSlides: How Automating Data Lineage Improves BI Performance
Slides: How Automating Data Lineage Improves BI Performance
 
SANSFIRE18: War Stories on Using Automated Threat Intelligence for Defense
SANSFIRE18: War Stories on Using Automated Threat Intelligence for DefenseSANSFIRE18: War Stories on Using Automated Threat Intelligence for Defense
SANSFIRE18: War Stories on Using Automated Threat Intelligence for Defense
 

More from OWASP

[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dApps[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dAppsOWASP
 
[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scale[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scaleOWASP
 
[OPD 2019] Life after pentest
[OPD 2019] Life after pentest[OPD 2019] Life after pentest
[OPD 2019] Life after pentestOWASP
 
[OPD 2019] .NET Core Security
[OPD 2019] .NET Core Security[OPD 2019] .NET Core Security
[OPD 2019] .NET Core SecurityOWASP
 
[OPD 2019] Top 10 Security Facts of 2020
[OPD 2019] Top 10 Security Facts of 2020[OPD 2019] Top 10 Security Facts of 2020
[OPD 2019] Top 10 Security Facts of 2020OWASP
 
[OPD 2019] Governance as a missing part of IT security architecture
[OPD 2019] Governance as a missing part of IT security architecture[OPD 2019] Governance as a missing part of IT security architecture
[OPD 2019] Governance as a missing part of IT security architectureOWASP
 
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
[OPD 2019] Storm Busters: Auditing & Securing AWS InfrastructureOWASP
 
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
[OPD 2019] Side-Channels on the Web:
Attacks and DefensesOWASP
 
[OPD 2019] AST Platform and the importance of multi-layered application secu...
[OPD 2019]  AST Platform and the importance of multi-layered application secu...[OPD 2019]  AST Platform and the importance of multi-layered application secu...
[OPD 2019] AST Platform and the importance of multi-layered application secu...OWASP
 
[OPD 2019] Inter-application vulnerabilities
[OPD 2019] Inter-application vulnerabilities[OPD 2019] Inter-application vulnerabilities
[OPD 2019] Inter-application vulnerabilitiesOWASP
 
[OPD 2019] Automated Defense with Serverless computing
[OPD 2019] Automated Defense with Serverless computing[OPD 2019] Automated Defense with Serverless computing
[OPD 2019] Automated Defense with Serverless computingOWASP
 
[OPD 2019] Advanced Data Analysis in RegSOC
[OPD 2019] Advanced Data Analysis in RegSOC[OPD 2019] Advanced Data Analysis in RegSOC
[OPD 2019] Advanced Data Analysis in RegSOCOWASP
 
[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokensOWASP
 
[OPD 2019] Rumpkernels meet fuzzing
[OPD 2019] Rumpkernels meet fuzzing[OPD 2019] Rumpkernels meet fuzzing
[OPD 2019] Rumpkernels meet fuzzingOWASP
 
[OPD 2019] Trusted types and the end of DOM XSS
[OPD 2019] Trusted types and the end of DOM XSS[OPD 2019] Trusted types and the end of DOM XSS
[OPD 2019] Trusted types and the end of DOM XSSOWASP
 
[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera Software[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera SoftwareOWASP
 
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security WorldOWASP
 
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure SoftwareOWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure SoftwareOWASP
 
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-miningOWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-miningOWASP
 
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contractsOWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contractsOWASP
 

More from OWASP (20)

[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dApps[OPD 2019] Web Apps vs Blockchain dApps
[OPD 2019] Web Apps vs Blockchain dApps
 
[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scale[OPD 2019] Threat modeling at scale
[OPD 2019] Threat modeling at scale
 
[OPD 2019] Life after pentest
[OPD 2019] Life after pentest[OPD 2019] Life after pentest
[OPD 2019] Life after pentest
 
[OPD 2019] .NET Core Security
[OPD 2019] .NET Core Security[OPD 2019] .NET Core Security
[OPD 2019] .NET Core Security
 
[OPD 2019] Top 10 Security Facts of 2020
[OPD 2019] Top 10 Security Facts of 2020[OPD 2019] Top 10 Security Facts of 2020
[OPD 2019] Top 10 Security Facts of 2020
 
[OPD 2019] Governance as a missing part of IT security architecture
[OPD 2019] Governance as a missing part of IT security architecture[OPD 2019] Governance as a missing part of IT security architecture
[OPD 2019] Governance as a missing part of IT security architecture
 
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
[OPD 2019] Storm Busters: Auditing & Securing AWS Infrastructure
 
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
 
[OPD 2019] AST Platform and the importance of multi-layered application secu...
[OPD 2019]  AST Platform and the importance of multi-layered application secu...[OPD 2019]  AST Platform and the importance of multi-layered application secu...
[OPD 2019] AST Platform and the importance of multi-layered application secu...
 
[OPD 2019] Inter-application vulnerabilities
[OPD 2019] Inter-application vulnerabilities[OPD 2019] Inter-application vulnerabilities
[OPD 2019] Inter-application vulnerabilities
 
[OPD 2019] Automated Defense with Serverless computing
[OPD 2019] Automated Defense with Serverless computing[OPD 2019] Automated Defense with Serverless computing
[OPD 2019] Automated Defense with Serverless computing
 
[OPD 2019] Advanced Data Analysis in RegSOC
[OPD 2019] Advanced Data Analysis in RegSOC[OPD 2019] Advanced Data Analysis in RegSOC
[OPD 2019] Advanced Data Analysis in RegSOC
 
[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens[OPD 2019] Attacking JWT tokens
[OPD 2019] Attacking JWT tokens
 
[OPD 2019] Rumpkernels meet fuzzing
[OPD 2019] Rumpkernels meet fuzzing[OPD 2019] Rumpkernels meet fuzzing
[OPD 2019] Rumpkernels meet fuzzing
 
[OPD 2019] Trusted types and the end of DOM XSS
[OPD 2019] Trusted types and the end of DOM XSS[OPD 2019] Trusted types and the end of DOM XSS
[OPD 2019] Trusted types and the end of DOM XSS
 
[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera Software[Wroclaw #9] The purge - dealing with secrets in Opera Software
[Wroclaw #9] The purge - dealing with secrets in Opera Software
 
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
[Wroclaw #9] To be or Not To Be - Threat Modeling in Security World
 
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure SoftwareOWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
OWASP Poland 13 November 2018 - Martin Knobloch - Building Secure Software
 
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-miningOWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
OWASP Poland Day 2018 - Amir Shladovsky - Crypto-mining
 
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contractsOWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
OWASP Poland Day 2018 - Damian Rusinek - Outsmarting smart contracts
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

OWASP Poland Day 2018 - Anthony Fielding and William Jardine - Common App Vulns

  • 1. Common Vulnerabilities and How to Find Them: e-Commerce and Financial Trading Applications William Jardine & Anthony Fielding, MWR InfoSecurity W a r s a w , 1 0 . 1 0 . 2 0 1 8 OWASP Poland Day 2018
  • 2. < o b l i g a t o r y $ w h o a m i f u n n y s l i d e > • Security Consultants at MWR • First time in Poland! • Lots of e-Commerce and financial trading app testing (that’s quite fortunate!)
  • 3. I s a n d I s n ’ t Isn’t: Intended to be new or groundbreaking techniques Is: A summary of the currently observed threats against these 2 sectors
  • 4. I s a n d I s n ’ t Isn’t: Intended to be new or groundbreaking techniques Is: A summary of the currently observed threats against these 2 sectors Isn’t: Hardcore war stories Is: Simple, real-world, prevalent examples (arguably even scarier)
  • 5. I s a n d I s n ’ t Isn’t: Intended to be new or groundbreaking techniques Is: A summary of the currently observed threats against these 2 sectors Isn’t: Hardcore war stories Is: Simple, real-world, prevalent examples (arguably even scarier) Isn’t: A guide on how to fix Is: A guide on how to (quickly) find
  • 6. K e y p o i n t s • OWASP Top 10 is valuable • But we need context of the specific app domain • Whitebox testing leads to more effective results • Quick, easy tests can pick up low-hanging fruit
  • 7. e - C o m m e r c e i n d u s t r y s u m m a r y • An online shop – generally we mean a big one • E.g. apps like Amazon, eBay, etc. • Open source • Lots of known vulnerabilities in many of these
  • 8. e - C o m m e r c e i n d u s t r y s u m m a r y • An online shop – generally we mean a big one • E.g. apps like Amazon, eBay, etc. • Open source • Lots of known vulnerabilities in many of these • More often using COTS $$$ solutions • Less open source and explored • More nuanced/complex installations…
  • 9. e - C o m m e r c e f u n c t i o n a l i t y • Search • PDP vs. PLP • Add to basket • Flat user model (i.e. no real admin functionality) • Payments • AJAX • Large product catalogues
  • 10. e - C o m m e r c e f l o w • CLP: Category List Page
  • 11. e - C o m m e r c e f l o w • CLP: Category List Page • PLP: Product List Page
  • 12. e - C o m m e r c e f l o w • CLP: Category List Page • PLP: Product List Page • PDP: Product Display Page
  • 13. S e l e c t i v e C S R F i n P L P p a g e s • PLP lists ~1000 items • 1000 “add to basket” buttons • Devs don’t want to have to list and verify 1000 unique CSRF tokens • And if a PLP page is cached, CSRF tokens would become stale…
  • 14. P a y m e n t f l o w a b u s e • Legitimate flow Add to basket: 2x items @ £10 Calculate cost 2 x £10: £20 Pay basket cost: 2 items: £20
  • 15. P a y m e n t f l o w a b u s e • Malicious flow • Occurs due to faulty business logic / lack of secure 3rd party vendor Add to basket: 2x items @ £10 Calculate cost 2 x £10: £20 Pay basket cost: 1002 items: £20 Add to basket: 1000x item @ £10
  • 16. M i c r o - s e r v i c e a r c h i t e c t u r e s • Front-end is monolithic • Back-end comprises several “micro-services” • Auth service, payment service, enterprise search service, etc. • Obviously this can become quite complex… • https://technologyconversations.com/2015/08/ 09/including-front-end-web-components-into- microservices/
  • 17. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1 • Something like:
  • 18. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1 • Cookies store some identifying session info • Encrypted with a server-side session key * in this case, just the AES encrypted form of: userid=1;sessioncookie=1234;someotherstuff=2;test SomeCookie=LFfTTadH2MnC3ae9exhYr1jauab3ssORTQuPrpJzHlKGpCeB6T4erJ Kco6rYJO/FraIn3W9ZYjVc4MbyciJiFA==
  • 19. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1 • The web server (Apache, IIS, whatever) then decrypts the cookies • And creates request headers, which it uses to authenticate to back- end services UserID: 1234 EmailAddress: test@example.com
  • 20. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 1 • We can just send these headers in the initial web app request… GET / HTTP/1.1 Host: www.some-ecommerceapp.com SomeCookie=some-value UserID: 1234 EmailAddress: test@example.com Connection: close
  • 21. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2 • Observed on several occasions • Where apps are overly reliant on something else • API Gateway • WAF • Or where they’re not sticking to centralised procedures properly • E.g. Checking the HTTP code, not the actual body…
  • 22. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2 • Request with valid cookies HTTP /1.1 200 OK ... {“Response”: “Authenticated”}
  • 23. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2 • Request with valid cookies HTTP /1.1 200 OK ... {“Response”: “Authenticated”} • Request with invalid cookies HTTP /1.1 200 OK ... {“Response”: “Unauthenticated”} …
  • 24. M i c r o - s e r v i c e A / C b y p a s s n u a n c e s # 2 • “Abstraction of security” can be a good thing • But beware a lack of context • Defence-in-depth!
  • 25. N i c h e s e a r c h b a c k - e n d • 9 pentests out of 10 will just spam ‘or 1=1 • And the top 100 SQLi payloads • Is a large product catalogue really going to be stored in an SQL DB? • Is the question even asked a lot of the time?
  • 26. O r a c l e E n d e c a i n j e c t i o n d e m o • Or EQLi™ (© William Jardine 2018) • https://labs.mwrinfosecurity.com/blog/eql-injection-and-oracle-endeca/ • Common in Oracle ATG e-Commerce installations • E.g. Google: • inurl:ntt inurl:nty • inurl:ntk inurl:p_price
  • 27. O r a c l e E n d e c a i n j e c t i o n d e m o Nrs=collection()/record[LISTING_ID%3D "T123456"] Nrs=collection()/record[endeca:matches(.,"P_Marked_For_Emergency_ Withdrawal ","Y")] Ns=P_Stock_Availability|0||P_Best_Seller|0 Ntt=someitem&Ntk=All
  • 28. S u m m a r y : C o n t e x t Vulnerability Severity Frequency Complexity Payment flow vulnerabilities High Rarely* Medium Insecure direct object references Medium Sometimes Low Niche search injections Medium Sometimes Medium Nuanced broken access control High Sometimes High Selective CSRF Low** Frequent Medium Insecure CORS/CSP settings Low Frequent Low * Rarely in broadly secure apps that use 3DSecure ** Low on its own; higher impact if chained with other things
  • 29. F i n a n c i a l i n d u s t r y s u m m a r y • Online banking and trading platforms • Complex, big systems with lots of functionality • Exciting words like butterfly trades, swaps, bonds, forex, etc… • Developed in-house over 6 months to many years • Mix of old (Silverlight, Flash) and new technologies e.g. AngularJS Single Page Application (SPA)
  • 30. F i n a n c i a l f u n c t i o n a l i t y • Limited or read-only functionality for regular users • Highly customisable and rich user experience • Spreadsheet import/export • Extensive reporting capabilities • Visualisations and live data • Create trades, transfer funds, approve payments
  • 31. F i n a n c i a l f u n c t i o n a l i t y • Complex user model • Workflow heavy • Upstream dependencies and downstream dependents • Many departments involved • Apps within apps • Often use Single Sign-On (SSO) for authentication • Prevalence of Single Page Application (SPA)s e.g. AngularJS
  • 32. S i m p l e U s e r M o d e l Subscriber Onboarding User Admin User Subscriber Onboarding Group Subscriber Group Standard User Premier User Admin Group
  • 33. F i n a n c e U s e r M o d e l Internal Users App 1 Approver Entitlement External Users Premier Company Trading User External Trading Company Group Premier Company Entitlement App 2 Reporting Entitlement App 1 Supervisor User Audit Department User App 2 Audit Report Entitlement App 1 Reporting Entitlement
  • 34. W h a t d o w e f i n d ? • Broken access control • Primarily horizontal privilege escalation • Reliance on “out of scope” SSO • More and more hardened against Cross-Site Scripting (XSS) • Old: Due to age • New: Use of AngularJS • Still find relatively frequently though • User-targeted Remote Code Execution (RCE) via formula injection • Output encoded (in browser) so we’re fine
  • 35. F o r m u l a e I n j e c t i o n • The following payloads test for this vulnerability =cmd|' /C calc'!A0 +cmd|' /C calc'!A0 @SUM(1+1)*cmd|' /C calc'!A0 DDE ("cmd";"/C calc";"!A0")A0 +MSEXCEL|'......WindowsSystem32cmd /c calc'!A0
  • 36. W h a t d o w e f i n d ? • Occasionally direct SQL query access on back-end panels • Retired and long forgotten systems still in production • Insecure Direct Object References • E.g. https://sometradingapp.com/export?DocumentID=11 • Client-Side Template Injection (CSTI) • Test for {{ 7*7 }} • Missing headers and poor cookie configuration • Out of date and vulnerable software • No or broken CSRF protection
  • 37. M E G A B A N K d e m o
  • 38. S u m m a r y : C o n t e x t Vulnerability Severity Frequency Complexity Formula injection Medium Frequent Medium Broken access control High Frequent Medium Insecure direct object references High Sometimes Medium CSTI Medium Sometimes Medium XSS Medium Sometimes Medium Direct SQL query execution High Rarely Low Lack of CSRF protection Low Frequent Low Insecure cookies Low Frequent Low
  • 39. O v e r l a p ( f r e q u e n c y ) Vulnerability Frequency (e-Commerce) Frequency (financial trading) 1. Some lack of CSRF protection Frequent Frequent 2. Broken access control Sometimes Frequent
  • 40. O v e r l a p ( f r e q u e n c y ) Vulnerability Frequency (e-Commerce) Frequency (financial trading) 1. Some lack of CSRF protection Frequent Frequent 2. Broken access control Sometimes Frequent 3. Formula injection N/A Frequent
  • 41. O v e r l a p ( f r e q u e n c y ) Vulnerability Frequency (e-Commerce) Frequency (financial trading) 1. Some lack of CSRF protection Frequent Frequent 2. Broken access control Sometimes Frequent 3. Formula injection N/A Frequent 4. Insecure CORS/CSP settings Frequent N/A 5. Insecure cookies N/A Frequent
  • 42. O v e r l a p ( f r e q u e n c y ) Vulnerability Frequency (e-Commerce) Frequency (financial trading) 1. Some lack of CSRF protection Frequent Frequent 2. Broken access control Sometimes Frequent 3. Formula injection N/A Frequent 4. Insecure CORS/CSP settings Frequent N/A 5. Insecure cookies N/A Frequent 6. Insecure direct object references Sometimes Sometimes 7. Search injections Sometimes Rarely 8. XSS N/A Sometimes 9. CSTI N/A Sometimes
  • 43. O v e r l a p ( f r e q u e n c y ) Vulnerability Frequency (e-Commerce) Frequency (financial trading) 1. Some lack of CSRF protection Frequent Frequent 2. Broken access control Sometimes Frequent 3. Formula injection N/A Frequent 4. Insecure CORS/CSP settings Frequent N/A 5. Insecure cookies N/A Frequent 6. Insecure direct object references Sometimes Sometimes 7. Search injections Sometimes Rarely 8. XSS N/A Sometimes 9. CSTI N/A Sometimes 10. Payment flow vulnerabilities Rarely* N/A
  • 44. H u h … T h a t ’s 1 0 … Vulnerability Frequency (e-Commerce) Frequency (financial trading) 1. Some lack of CSRF protection Frequent Frequent 2. Broken access control Sometimes Frequent 3. Formula injection N/A Frequent 4. Insecure CORS/CSP settings Frequent N/A 5. Insecure cookies N/A Frequent 6. Insecure direct object references Sometimes Sometimes 7. Search injections Sometimes Rarely 8. XSS N/A Sometimes 9. CSTI N/A Sometimes 10. Payment flow vulnerabilities Rarely* N/A OWASP Top 10 Vulnerability Higher/Lower A1. Injection A2. Broken Authentication N/A A3. Sensitive Data Exposure N/A A4. XXE N/A A5. Broken Access Control A6. Security Misconfigurations A7. XSS A8. Insecure Deserialization N/A A9. Components w/ Known Vulns N/A A10. Insufficient Logging/Monitoring N/A
  • 45. V e r y r o u g h h i t - l i s t Vulnerability How to find? 1. Some lack of CSRF protection Burp CSRF PoC; is it in a cookie? Is it JSON? 2. Broken access control Burp Repeater w/ different cookies; check response codes 3. Formula injection =cmd|’ /C calc’!A0 4. Insecure CORS/CSP settings DevTools fetch(); OPTIONS; all 3rd party resources 5. Rubbish cookies HttpOnly and Secure; domains; age 6. Insecure direct object references e.g. DocumentID=2 7. Search injections What DB is used? Audit code 8. XSS <img src=x onerror=alert(1)> 9. CSTI {{7*7}} 10. Payment flow vulnerabilities Re-send requests after basket calculation
  • 46. K e y p o i n t s • OWASP Top 10 is valuable • But we need context of the specific app domain • Whitebox testing leads to more effective results • Quick, easy tests can pick up low-hanging fruit
  • 47. Any questions? Hit us up on Twitter (unless negative, in which case please don’t...) <REDACTED BECAUSE GDPR> @williamkjardine / @antfie