SlideShare a Scribd company logo
(Web Application)
Security Test Automation
Marek Puchalski
marek.puchalski@capgemini.com
marek.puchalski@owasp.org
@marek_devsec
About me
Security Testing in Projects
Pentest
Static Code Analysis
Dynamic Code Analysis
Unit Tests
Table of Contents
• Waterfall VS Agile
• OWASP ASVS
• Examples
WATERFALL VS AGILE
http://www.michaelmolloy.co.uk/construction-photography.html
Waterfall
http://www.letgoyourmind.com/wp-content/uploads/2017/03/buildingtall.jpg
Agile
Security in Waterfall
Security in Agile
Best idea so far
Automate security tests
OWASP ASVS
OWASP Application Security
Verification Standard (ASVS)
• Provides a list of requirements for secure
development
• Defines different security assurance levels
(Opportunistic, Standard, Advanced, also
called Level 1, 2, 3)
Example
# of requirements
EXAMPLES
Example 1, ASVS 11.8
Verify that the X-XSS-Protection: 1;
mode=block header is in place.
„
„
HTTP Communication Example
GET http://oasp-ci.cloudapp.net/oasp4j-
sample/services/rest/offermanagement/v1/offer HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:37.0)
Gecko/20100101 Firefox/37.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
X-CSRF-TOKEN: fcbfc729-15d2-4f04-8e50-082f20cb2dfb
Referer: http://oasp-ci.cloudapp.net/oasp4j-
sample/jsclient/
Cookie: JSESSIONID=F340544E6AE9078812ECF61139D03C7B
Connection: keep-alive
Host: oasp-ci.cloudapp.net
HTTP request
HTTP/1.1 200 OK
Date: Sat, 11 Jul 2015 20:28:36 GMT
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
[{"id":1,"modificationCounter":1,"revision":null,"name":null,"
description":"Schnitzel-
Menü","number":null,"mealId":1,"drinkId":10,"sideDishId":5,"
state":"NORMAL","price":"6.99"},{"id":2,"modificationCounte
r":1, (…)
HTTP response
Why do we have to deal with HTTP?
• It’s a trust boundary between the client and
the server
• It offers maximum flexibility by allowing
request manipulation on the text/byte level
• One can fabricate request the client side of
application would never generate
• This is what the hackers are doing :)
What does X-XSS-Protection do?
• Offers (reflected) XSS protection
• Turned on by default, but works in the
sanitization mode
• Turn the most rigorous mode on over X-XSS-
Protection: 1; mode=block
Preferred type of test
Source: https://blogs.msdn.microsoft.com/visualstudioalmrangers/2017/04/20/set-up-a-cicd-pipeline-to-run-automated-tests-efficiently/
Code
import static io.restassured.RestAssured.*;
(...)
when()
.get("https://haveibeenpwned.com/")
.then()
.statusCode(200)
.header("X-XSS-Protection", "1; mode=block");
Example 2, ASVS 5.5
Verify that input validation routines are
enforced on the server side.
„
„
Tested application
Source: http://demoqa.com/contact/
Request
Response
Code
import static io.restassured.RestAssured.*;
(...)
String body = TEMPLATE.replace("<name>", "Marek")
.replace("<email>", "marek@test");
given(new RequestSpecBuilder()
.addHeader("X-Requested-With", "XMLHttpRequest")
.addHeader("Accept", "application/json, text/javascript, */*; q=0.01")
.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
.setBody(body)
.build()).
when()
.post("http://demoqa.com/contact/").
then()
.statusCode(200)
.body("mailSent", equalTo(false),
"invalids[0].message", equalTo("Email address seems invalid."));
Wait! Is this really this easy?
I would not call that „easy”
• Understanding security requirements takes time
• We need to deal with traffic on the HTTP level
• Some technologies are easier to automate than
others
• We didn't show how to deal with authentication
or CSRF protection
• But yes, in many cases the code can still be sexy!
Example 3, ASVS 10.16
Verify that the TLS settings are in line with
current leading practice, particularly as
common configurations, ciphers, and
algorithms become insecure.
„
„
What is TLS?
• It’s the „S” in HTTPS ;)
• It’s actually much more than this, but let’s not
complicate things, because…
Understanding TLS is hard
• Understand: PKI, CA, MAC, OCSP, CSR, cipher
suites, ...
• Use: RSA, ECDHE, DHE, AES, GCM, CBC, SHA,...
• Don't use: MD5, RC4, SSL, ...
• Prevent: Drown, BEAST, padding oracle,
CRIME, TIME, BREACH, Heartbleed,
DUAL_EC_DRBG, ...
How to deal with it?
Source: https://www.ssllabs.com/ssltest/
Code
import io.beekeeper.ssllabs.junit.BaseSSLLabsTest;
@RunWith(Parameterized.class)
public class AppTest extends BaseSSLLabsTest
{
public AppTest(String host) {
super(host);
}
@Parameters(name = "Host: {0}")
public static Iterable<String> data() {
return Arrays.asList("marek.puchal.ski", "www.poczta-polska.pl");
}
}
Source: https://github.com/beekpr/ssllabs
Example 4, ASVS 1.11
Verify that all application components, libraries,
modules, frameworks, platform, and operating
systems are free from known vulnerabilities.
„
„
Case Equifax
(STRUTS 2, CVE-2017-5638)
BTW: Struts 2 had 15 known vulnerabilities in 2016
Source: https://www.imperva.com/blog/2017/03/cve-2017-5638-new-remote-code-execution-rce-vulnerability-in-apache-struts-2/
How to deal with it?
• Update every library every release
• Or use a library scanning tool
– OWASP Dependency Check
– Victims
– Black Duck (Copilot)
– Many other
Code
.bindependency-check.bat --project
victim --scan victim*
OWASP Dependency Check
Summary
• First step to security assurance - know what is
to be done
• Don't fear HTTP – test implementation is not
necessary hard
• You can even deal with „special cases” like TLS
validation and software composition analysis
on the code level
QUESTIONS?
marek.puchalski@capgemini.com
marek.puchalski@owasp.org
@marek_devsec

More Related Content

PPTX
[Wroclaw #7] Security test automation
OWASP
 
PPTX
[Wroclaw #7] AWS (in)security - the devil is in the detail
OWASP
 
PDF
Introduction to Mod security session April 2016
Rahul
 
PDF
Csp and http headers
ColdFusionConference
 
PPTX
Automated Intrusion Detection and Response on AWS
2nd Sight Lab
 
PPTX
OWASP Serverless Top 10
Chandrapal Badshah
 
PDF
[Wroclaw #7] Why So Serial?
OWASP
 
PPTX
Web & Cloud Security in the real world
Madhu Akula
 
[Wroclaw #7] Security test automation
OWASP
 
[Wroclaw #7] AWS (in)security - the devil is in the detail
OWASP
 
Introduction to Mod security session April 2016
Rahul
 
Csp and http headers
ColdFusionConference
 
Automated Intrusion Detection and Response on AWS
2nd Sight Lab
 
OWASP Serverless Top 10
Chandrapal Badshah
 
[Wroclaw #7] Why So Serial?
OWASP
 
Web & Cloud Security in the real world
Madhu Akula
 

What's hot (20)

PPTX
Crypto Miners in the Cloud
2nd Sight Lab
 
PPTX
London Web - Web Application Security
Ben Haines
 
PDF
Edge immersion days module 2 - protect your application at the edge using a...
RoiElbaz1
 
PDF
Ieee S&P 2020 - Software Security: from Research to Industry.
Minded Security
 
PPTX
Packet Capture on AWS
2nd Sight Lab
 
PDF
Securing your AngularJS Application
Philippe De Ryck
 
PDF
Securing your EmberJS Application
Philippe De Ryck
 
PDF
The AWS Shared Responsibility Model in Practice
Alert Logic
 
PPTX
Red Team vs Blue Team on AWS - RSA 2018
2nd Sight Lab
 
PDF
Rails security: above and beyond the defaults
Matias Korhonen
 
PDF
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
drewz lin
 
PDF
Security and Privacy on the Web in 2015
Francois Marier
 
PDF
Javascript issues and tools in production for developers
Michael Haberman
 
PDF
OWASP Portland - OWASP Top 10 For JavaScript Developers
Lewis Ardern
 
PPTX
Phu appsec13
drewz lin
 
PDF
Pragmatic Cloud Security Automation
CloudVillage
 
ODP
pwnd.sh
Chandrapal Badshah
 
PDF
淺談WAF在AWS的架構
4ndersonLin
 
PPTX
Devouring Security Insufficient data validation risks Cross Site Scripting
gmaran23
 
PPTX
Devouring Security XML Attack surface and Defences
gmaran23
 
Crypto Miners in the Cloud
2nd Sight Lab
 
London Web - Web Application Security
Ben Haines
 
Edge immersion days module 2 - protect your application at the edge using a...
RoiElbaz1
 
Ieee S&P 2020 - Software Security: from Research to Industry.
Minded Security
 
Packet Capture on AWS
2nd Sight Lab
 
Securing your AngularJS Application
Philippe De Ryck
 
Securing your EmberJS Application
Philippe De Ryck
 
The AWS Shared Responsibility Model in Practice
Alert Logic
 
Red Team vs Blue Team on AWS - RSA 2018
2nd Sight Lab
 
Rails security: above and beyond the defaults
Matias Korhonen
 
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
drewz lin
 
Security and Privacy on the Web in 2015
Francois Marier
 
Javascript issues and tools in production for developers
Michael Haberman
 
OWASP Portland - OWASP Top 10 For JavaScript Developers
Lewis Ardern
 
Phu appsec13
drewz lin
 
Pragmatic Cloud Security Automation
CloudVillage
 
淺談WAF在AWS的架構
4ndersonLin
 
Devouring Security Insufficient data validation risks Cross Site Scripting
gmaran23
 
Devouring Security XML Attack surface and Defences
gmaran23
 
Ad

Similar to [QE 2018] Marek Puchalski – Web Application Security Test Automation (20)

PPTX
Started In Security Now I'm Here
Christopher Grayson
 
DOCX
Web Security Assessment ReportApplication NameVersion 1.0.docx
jessiehampson
 
PDF
Secure Coding for Java - An Introduction
Sebastien Gioria
 
PDF
2013 06-27-securecoding-en - jug pch
Sébastien GIORIA
 
PDF
Secure Coding for Java - An introduction
Sebastien Gioria
 
PDF
Securing Rails
Alex Payne
 
PPTX
Evaluating Web App, Mobile App, and API Security - Matt Cohen
Inman News
 
PDF
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays
 
PPTX
Applying OWASP web security testing guide (OWSTG)
Vandana Verma
 
PPT
Web Application Security Testing
Marco Morana
 
PPTX
The path of secure software by Katy Anton
DevSecCon
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v32.pptx
nmk42194
 
PDF
Owasp tds
snyff
 
PPTX
OWASP_Top_Ten_Proactive_Controls version 2
ssuser18349f1
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
johnpragasam1
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
azida3
 
PDF
Zane lackey. security at scale. web application security in a continuous depl...
Yury Chemerkin
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
cgt38842
 
PDF
What Every Developer And Tester Should Know About Software Security
Anne Oikarinen
 
PPTX
Becoming a SOC2 Ruby Shop - Montreal.rb November, 5, 2022 Ruby Meetup
Andy Maleh
 
Started In Security Now I'm Here
Christopher Grayson
 
Web Security Assessment ReportApplication NameVersion 1.0.docx
jessiehampson
 
Secure Coding for Java - An Introduction
Sebastien Gioria
 
2013 06-27-securecoding-en - jug pch
Sébastien GIORIA
 
Secure Coding for Java - An introduction
Sebastien Gioria
 
Securing Rails
Alex Payne
 
Evaluating Web App, Mobile App, and API Security - Matt Cohen
Inman News
 
apidays LIVE New York 2021 - Why Software Teams Struggle with API Security Te...
apidays
 
Applying OWASP web security testing guide (OWSTG)
Vandana Verma
 
Web Application Security Testing
Marco Morana
 
The path of secure software by Katy Anton
DevSecCon
 
OWASP_Top_Ten_Proactive_Controls_v32.pptx
nmk42194
 
Owasp tds
snyff
 
OWASP_Top_Ten_Proactive_Controls version 2
ssuser18349f1
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
johnpragasam1
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
azida3
 
Zane lackey. security at scale. web application security in a continuous depl...
Yury Chemerkin
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
cgt38842
 
What Every Developer And Tester Should Know About Software Security
Anne Oikarinen
 
Becoming a SOC2 Ruby Shop - Montreal.rb November, 5, 2022 Ruby Meetup
Andy Maleh
 
Ad

More from Future Processing (20)

PDF
DPTO_Inżynieria oprogramowania to proces uczenia się.pdf
Future Processing
 
PDF
DPTO_QA w świecie wartości biznesowych.pdf
Future Processing
 
PDF
DPTO_Hello_Clean_Architekture.pdf
Future Processing
 
PDF
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
Future Processing
 
PDF
[Quality Meetup #20] Dorota Tadych - Hyperion - wystarczy jeden shake
Future Processing
 
PDF
[Quality Meetup #19] Magdalena Drechsler-Nowak - Tester w pułapce myślenia
Future Processing
 
PDF
[Quality Meetup #19] Adrian Gonciarz - Testerska ruletka
Future Processing
 
PDF
[FDD 2018] Krzysztof Sikora - Jak Service Fabric rozwiąże twoje problemy z mi...
Future Processing
 
PDF
[FDD 2018] Ł. Turchan, A. Hulist, M. Duchnowski - CUDA - results over coffee ...
Future Processing
 
PDF
[FDD 2018] Lech Kalinowski - Prywatny Blockchain
Future Processing
 
PPTX
[FDD 2018] W. Malara, K. Kotowski - Autoenkodery – czyli zalety funkcji F(X)≈X
Future Processing
 
PPTX
[FDD 2018] Jarosław Ogiegło - Ludzie, zabezpieczajcie się! Wprowadzenie do OA...
Future Processing
 
PDF
[JuraSIC! Meetup] Krzysztof Sikora- Jak Service Fabric rozwiąże twoje problem...
Future Processing
 
PDF
[JuraSIC! Meetup] Mateusz Stasch - Monady w .NET
Future Processing
 
PDF
[QE 2018] Aleksandra Kornecka – Kognitywne podejście do testowania aplikacji ...
Future Processing
 
PDF
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
Future Processing
 
PDF
[QE 2018] Łukasz Gawron – Testing Batch and Streaming Spark Applications
Future Processing
 
PDF
[QE 2018] Rob Lambert – How to Thrive as a Software Tester
Future Processing
 
PDF
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
Future Processing
 
PDF
[QE 2018] Arnika Hryszko – Testy, które tworzą się same (prawie)
Future Processing
 
DPTO_Inżynieria oprogramowania to proces uczenia się.pdf
Future Processing
 
DPTO_QA w świecie wartości biznesowych.pdf
Future Processing
 
DPTO_Hello_Clean_Architekture.pdf
Future Processing
 
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
Future Processing
 
[Quality Meetup #20] Dorota Tadych - Hyperion - wystarczy jeden shake
Future Processing
 
[Quality Meetup #19] Magdalena Drechsler-Nowak - Tester w pułapce myślenia
Future Processing
 
[Quality Meetup #19] Adrian Gonciarz - Testerska ruletka
Future Processing
 
[FDD 2018] Krzysztof Sikora - Jak Service Fabric rozwiąże twoje problemy z mi...
Future Processing
 
[FDD 2018] Ł. Turchan, A. Hulist, M. Duchnowski - CUDA - results over coffee ...
Future Processing
 
[FDD 2018] Lech Kalinowski - Prywatny Blockchain
Future Processing
 
[FDD 2018] W. Malara, K. Kotowski - Autoenkodery – czyli zalety funkcji F(X)≈X
Future Processing
 
[FDD 2018] Jarosław Ogiegło - Ludzie, zabezpieczajcie się! Wprowadzenie do OA...
Future Processing
 
[JuraSIC! Meetup] Krzysztof Sikora- Jak Service Fabric rozwiąże twoje problem...
Future Processing
 
[JuraSIC! Meetup] Mateusz Stasch - Monady w .NET
Future Processing
 
[QE 2018] Aleksandra Kornecka – Kognitywne podejście do testowania aplikacji ...
Future Processing
 
[QE 2018] Adam Stasiak – Nadchodzi React Native – czyli o testowaniu mobilnyc...
Future Processing
 
[QE 2018] Łukasz Gawron – Testing Batch and Streaming Spark Applications
Future Processing
 
[QE 2018] Rob Lambert – How to Thrive as a Software Tester
Future Processing
 
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
Future Processing
 
[QE 2018] Arnika Hryszko – Testy, które tworzą się same (prawie)
Future Processing
 

Recently uploaded (20)

PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Become an Agentblazer Champion Challenge
Dele Amefo
 
PDF
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
PPTX
Presentation about variables and constant.pptx
kr2589474
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
Exploring AI Agents in Process Industries
amoreira6
 
Activate_Methodology_Summary presentatio
annapureddyn
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Become an Agentblazer Champion Challenge
Dele Amefo
 
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
Presentation about variables and constant.pptx
safalsingh810
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Presentation about variables and constant.pptx
kr2589474
 

[QE 2018] Marek Puchalski – Web Application Security Test Automation