SlideShare a Scribd company logo
WEB APPSEC 101
Andrii Kudiurov
TeamLead @ SoftSeq
About me
- Python programming background
- Current job: Teamlead @ SoftSeq (Web app audits &
certification, embedding Secure SDLC)
- Successfully hacked banking, trading, insurance, security, mailing
providers, etc.
Plan
1. Basic knowledge to start
2. Never trust user input. How HTTP works.
3. Misconfiguration
4. Hidden options && forced navigation && mass parameter
assignment
5. CSRF
6. Injection
a. XSS
b. SQLi
c. OS Command injection
7. open redirect
8. path traversal
9. DoS due to application logic errors
10. Basic HOWTO
11. Links
12. Questions
What?
- Understanding common bugs that allows
doing something evil =)
- Web app vulnerabilities are based inside the app itself (web appsec !=
pentest)
How?
- There’s a lot of info. I’ve tried to explain vulnerabilities that can be found
by QA during testing routine. See links to get more HOWTO
Baseline
- How web app, browser and HTTP works, basic HTML
- Any programming language, including (very)basic JS
Tools
- Browser + FoxyFroxy + BurpSuite
- Google =)
Misconfiguration
- Opened ports
- Default or no passwords (e.g. RabbitMQ)
- Backup, .git and other sensitive folders accessible
- Default or unnecessary features enabled
- No pre-authorization to staging/testing environment
- Security headers missing (e.g. iframe is allowed: UI redress aka Clickjacking)
- Bad pseudorandom used for password/key/pin generation
- No “Secure”, “HTTPOnly” cookie flags, allowed subdomains and insecure path
- Using components with known vulnerabilities
- And more…
Good news: automated scanners can find it pretty well.
Components with known vulnerabilities
- Remember Equifax? They forgot to update library
- Average small app can have ~ 20-40 dependencies
- Enterprise apps can have over 200 dependencies
Components with known vulnerabilities
Basic rule: if there is info that component is vulnerable it doesn’t
matter if you can show how to exploit it. UPDATE! Search
vulnerabilities at https://cve.mite.org or https://nvd.nist.gov/
Try to find some of them automatically (all of them can be found
ONLY manually because of reasons =) )
- Dependency checker (ASP, Java)
- Retire.js (vulnerable forntend libs)
Directory
Browsing
Use Dirbuster and/or
burpsuite plugins to
detect
Click-jacking AKA UI Redress
<form action=”changemail”>
<input name=”email”
value=”myemail@m
ail.com”>
<input type=hidden
name=”id” value=”123”>
<button action=”submit”
value=”save”>
</form>
<script>
//script that checks that user
entered everything correctly and
didn’t modify ID
</script>
HTTP. Recall.
User pushes
button to
Save profile
Browser adds
headers, cookies
and
Makes request
POST /save HTTP/1.1
Host: bank.com
Cookies: auth=abcdi848d;
Content-length: 123
Connection: close
email=myemail@mail.com&id=123
HTTP. Recall.
User pushes
button to
Save profile
Browser adds
headers, cookies and
Makes request
POST /save HTTP/1.1
Host: bank.com
Cookies: auth=abcdi848d;
Connection: close
email=myemail@mail.com&
id=123
PROXY-SERVER
POST /save HTTP/1.1
Host: bank.com
Cookies: auth=abcdi848d;
Connection: close
email=myemail@mail.com&
id=124
<div class=’comment’>
…..
</div>
<button value=”answer”
action=”createAnswer()”>
<div class=’comment’>
…..
</div>
<button value=”answer”
action=”createAnser()”>
<button value=”edit”
action=”editPost()”>
Direct object reference examples:
- Yahoo: deleting ~ 1m comments and posts
- Apple: 300k 3rd party developers accounts
- FB, VK, Instagram photos
- Some hackers who tried to f*** fortune 100 companies
but totally blew it by exposing all info for scum emails
- Common anti-automation problem
Mass parameter assignment
User input:
email=email@email.com
DB model:
- ID
- Email
- IsBlocked
- Some app controllers may process not user input itself, but a model created
from the input to ease coding routine.
- In this case if no additional anti-forgery measures have been implemented,
it is possible to add additional parameters
What does it mean?
- No decision making on frontend pls
- Never trust user input. Consider any user input as harmful.
- Input validation on frontend - for UX, on backend - for decision making
More thinking…
- Humans make mistakes
- Developers think how to MAKE, not how to BREAK
- Parts written by several developers can be VERY different (one controller can
be totally secure,
another - totally broken)
- Companies with TOP developers and good security teams still are getting
hacked or reported by whitehats
CSRF (Cross site request forgery)
Root problem:
Browser sends cookies automatically for every URL or submitted form.
Exploit:
We can craft a form on a web-site we control and force a user to perform
request with desired parameters to a desired resource
Fix:
Unpredictable anti-CRSF token (as one of the parameters in POST queries)
<form action=
”http://bank.com/changemail”
>
<input name=”mail”
value=”hacker@mai
l.com”>
<button id=”x”
action=”submit”></form>
<script>x=document.getEle
mentById(“x”).click()</script>
<form action=”changemail”>
<input name=”mail”
value=”myemail@ma
il.com”>
<button action=”submit”>
</form>
XSS: (very) short info
- An ability to inject malicious JavaScript to the legitimate site
- Happens when server sends back user-generated data
without validation and sanitization
- Usually exploited by embedding HTML tags or breaking JS
syntax
http://example.com?search=asd”><script>alert(“hacked”)</script>
Two simple rules to prevent XSS:
1. All user input that comes back from server should be SANITIZED by
trusted functional (e.g. template engine).
2. NEVER write your own filters. They probably can be hacked.
WHY?
<scr<script>ipt>
<img src=x onerror=’alert(1)’>
<a href=”javascript:alert(1)”>click me</a>
<IMG
SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#
101;&#114;&#116;&#40;
&#39;&#88;&#83;&#83;&#39;&#41;>
<IMG SRC="jav&#x09;ascript:alert('XSS');">
<BODY onload!#$%&()*~+-_.,:;?@[/|]^`=alert("XSS")>
<iframe src=http://xss.rocks/scriptlet.html <
<STYLE>li {list-style-image: url("javascript:alert('XSS')");}</STYLE><UL><LI>XSS</br>
<META HTTP-EQUIV="refresh"
CONTENT="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K">
"'}})}}})});alert('hacked'); window.addEventListener('load', function() { new Vue({ methods:{
filter:function(){$.ajax({data:{a:'"
Own filter = bad idea
SQL Injection
- Happens when user input is passed to SQL query so it can be modified.
For example, user is trying to access some user item:
SELECT * FROM items WHERE itemname = 'secret_unique_id';
- If we have control over ‘secret_unique_id’, we can submit special syntax
and receive all items.
Like:
SELECT * FROM items WHERE itemname = 'secret_unique_id' OR
'a'='a';
SQL Injection
- Not very common in the new projects
- Exists because user input is not validated and for some reason raw SQL
queries are still used.
- Easier to search in the source code rather than blackbox
SQL Injection hints
- Easily avoided if ORM/parameterized queries are used
- Some ORM-parameters can be still exploited, read specs!
- Check stored procedures!
- Even if you think everybody is writing in a secure manner, someone
probably have used raw SQL to execute a complex query
OS Command Injection
- Accepting user input inside OS command invocation
- Can be easily found in the source code by keywords
Cases:
- Proto and video modification (imagemagic, ffmpeg)
- Operations with files, folders, systems (e.g. some deploy platforms)
Example 1:
Old-school zero-byte
www.example.com/get-the-page%00
DOS via application logic errors
Example 2: Modern world
www.cute-images.com/image/cute_puppy.png?width=100&height=100
www.cute-
images.com/image/save/resize/cute_puppy.png?width=100&height=100
….what if?
www.cute-
images.com/image/cute_puppy.png?width=2147483647&height=2147483647
www.cute-
images.com/image/save/resize/cute_puppy.png?width=2147483647&height=21
47483647
DOS via application logic errors
Open redirect.
Case:
1. User tries to reach URL, but he is not logged in.
2. For better UX, user should be redirected to login page and after — back to the
page he requested
Example:
User tries to reach http://example.com/page12134
User is redirected to http://example.com/login?redirect=/page1234
But what if we make user to follow link like this:
http://example.com/login?redirect=http://exampIe.com
Path traversal
Usually happens when user input is feeded directly in file path
parameter
e.g. f = open(“FOLDER_NAME” + user_input_file, “r”)
Basic “How to test”
BlackBox:
- Check how application handles unexpected data (single/double quotes, <>,
%0a%0d%00, etc.)
- Simple XSS test: '';!--"<XSS>=&{()}
- Simple SQLi test: 1' or '1' = '1
- Path traversal ../../../../../../../etc/passwd (or other known file)
- directory browsing and open folders DIRBUSTER (careful, can DOS the server)
- CSRF: check if anti-csrf token is present AND it’s required
- OS command injection: if something looks like shell command - try to insert
another
Desired result: unpredicted behavior or errors.
WhiteBox (access to source code)
Easy:
1. Find OWASP Code review guide
2. Find desired language and search for keywords, review them.
3. For frontend - search for .innerHTML, eval(), $.html (there is more. Search for
your framework)
Automation doesn’t work (as good as expected) because
CONTEXT MATTERS.
Automated solutions find
- hundreds of false-positives
- Can’t find not obvious vulnerabilities
But:
- Better than nothing
- Can work better for some projects
- Detects misconfiguration
- Can be tweaked and proxied to perform better for you
Info and literature:
1. GOOGLE
2. Our appsec knowledge checklist: link
a. Some playgrounds: p.5-10
3. OWASP ASVS (standard), OWASP Testing Guide at https://owasp.org
4. Web Application hacker’s handbook
Thank you!
Any questions?
FB: Andrii Kudiurov

More Related Content

What's hot

DevOps and Application Security
DevOps and Application SecurityDevOps and Application Security
DevOps and Application Security
Shahee Mirza
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
bilcorry
 
Web Application Security 101
Web Application Security 101Web Application Security 101
Web Application Security 101
Jannis Kirschner
 
Ethical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jainEthical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jain
Suvrat Jain
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security TestingMarco Morana
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
Secure Code Warrior
 
Penetration testing & Ethical Hacking
Penetration testing & Ethical HackingPenetration testing & Ethical Hacking
Penetration testing & Ethical Hacking
S.E. CTS CERT-GOV-MD
 
Application Security
Application SecurityApplication Security
Application Security
Reggie Niccolo Santos
 
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
Edureka!
 
Finacle - Secure Coding Practices
Finacle - Secure Coding PracticesFinacle - Secure Coding Practices
Finacle - Secure Coding Practices
Infosys Finacle
 
Penetration testing reporting and methodology
Penetration testing reporting and methodologyPenetration testing reporting and methodology
Penetration testing reporting and methodology
Rashad Aliyev
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
Netsparker
 
Web application security
Web application securityWeb application security
Web application security
Akhil Raj
 
Web PenTest Sample Report
Web PenTest Sample ReportWeb PenTest Sample Report
Web PenTest Sample ReportOctogence
 
Introduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration TestingIntroduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration Testing
Raghav Bisht
 
How to implement NIST cybersecurity standards in my organization
How to implement NIST cybersecurity standards in my organizationHow to implement NIST cybersecurity standards in my organization
How to implement NIST cybersecurity standards in my organization
Exigent Technologies LLC
 
Security Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic AttacksSecurity Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic Attacks
Marco Morana
 
From SIEM to SOC: Crossing the Cybersecurity Chasm
From SIEM to SOC: Crossing the Cybersecurity ChasmFrom SIEM to SOC: Crossing the Cybersecurity Chasm
From SIEM to SOC: Crossing the Cybersecurity Chasm
Priyanka Aash
 
Vapt( vulnerabilty and penetration testing ) services
Vapt( vulnerabilty and penetration testing ) servicesVapt( vulnerabilty and penetration testing ) services
Vapt( vulnerabilty and penetration testing ) services
Akshay Kurhade
 

What's hot (20)

DevOps and Application Security
DevOps and Application SecurityDevOps and Application Security
DevOps and Application Security
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
 
Web Application Security 101
Web Application Security 101Web Application Security 101
Web Application Security 101
 
Ethical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jainEthical Hacking n VAPT presentation by Suvrat jain
Ethical Hacking n VAPT presentation by Suvrat jain
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security Testing
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
Penetration testing & Ethical Hacking
Penetration testing & Ethical HackingPenetration testing & Ethical Hacking
Penetration testing & Ethical Hacking
 
Application Security
Application SecurityApplication Security
Application Security
 
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
What is SQL Injection Attack | How to prevent SQL Injection Attacks? | Cybers...
 
Finacle - Secure Coding Practices
Finacle - Secure Coding PracticesFinacle - Secure Coding Practices
Finacle - Secure Coding Practices
 
Penetration testing reporting and methodology
Penetration testing reporting and methodologyPenetration testing reporting and methodology
Penetration testing reporting and methodology
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
 
Web application security
Web application securityWeb application security
Web application security
 
Web PenTest Sample Report
Web PenTest Sample ReportWeb PenTest Sample Report
Web PenTest Sample Report
 
Introduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration TestingIntroduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration Testing
 
How to implement NIST cybersecurity standards in my organization
How to implement NIST cybersecurity standards in my organizationHow to implement NIST cybersecurity standards in my organization
How to implement NIST cybersecurity standards in my organization
 
Security Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic AttacksSecurity Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic Attacks
 
Security testing
Security testingSecurity testing
Security testing
 
From SIEM to SOC: Crossing the Cybersecurity Chasm
From SIEM to SOC: Crossing the Cybersecurity ChasmFrom SIEM to SOC: Crossing the Cybersecurity Chasm
From SIEM to SOC: Crossing the Cybersecurity Chasm
 
Vapt( vulnerabilty and penetration testing ) services
Vapt( vulnerabilty and penetration testing ) servicesVapt( vulnerabilty and penetration testing ) services
Vapt( vulnerabilty and penetration testing ) services
 

Similar to 4 andrii kudiurov - web application security 101

Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009mirahman
 
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan GandhiReliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan Gandhibhumika2108
 
Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
Edouard de Lansalut
 
Intro to Php Security
Intro to Php SecurityIntro to Php Security
Intro to Php Security
Dave Ross
 
Drupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal DevelopmentDrupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal Development
Steven Van den Hout
 
10 things I’ve learnt about web application security
10 things I’ve learnt about web application security10 things I’ve learnt about web application security
10 things I’ve learnt about web application security
James Crowley
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
Devnology
 
SQLSecurity.ppt
SQLSecurity.pptSQLSecurity.ppt
SQLSecurity.ppt
CNSHacking
 
SQLSecurity.ppt
SQLSecurity.pptSQLSecurity.ppt
SQLSecurity.ppt
LokeshK66
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012
ZIONSECURITY
 
ASP.NET Web Security
ASP.NET Web SecurityASP.NET Web Security
ASP.NET Web Security
SharePointRadi
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFBrian Huff
 
null Bangalore meet - Php Security
null Bangalore meet - Php Securitynull Bangalore meet - Php Security
null Bangalore meet - Php Security
n|u - The Open Security Community
 
Drupal Security Seminar
Drupal Security SeminarDrupal Security Seminar
Drupal Security Seminar
Calibrate
 
Php My Sql Security 2007
Php My Sql Security 2007Php My Sql Security 2007
Php My Sql Security 2007Aung Khant
 
Website Security
Website SecurityWebsite Security
Website SecurityCarlos Z
 
Website Security
Website SecurityWebsite Security
Website Security
MODxpo
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open Redirect
Blueinfy Solutions
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Brian Huff
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggetsguestbd1cdca
 

Similar to 4 andrii kudiurov - web application security 101 (20)

Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
 
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan GandhiReliable and fast security audits - The modern and offensive way-Mohan Gandhi
Reliable and fast security audits - The modern and offensive way-Mohan Gandhi
 
Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
Intro to Php Security
Intro to Php SecurityIntro to Php Security
Intro to Php Security
 
Drupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal DevelopmentDrupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal Development
 
10 things I’ve learnt about web application security
10 things I’ve learnt about web application security10 things I’ve learnt about web application security
10 things I’ve learnt about web application security
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
 
SQLSecurity.ppt
SQLSecurity.pptSQLSecurity.ppt
SQLSecurity.ppt
 
SQLSecurity.ppt
SQLSecurity.pptSQLSecurity.ppt
SQLSecurity.ppt
 
OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012OWASP Top 10 vs Drupal - OWASP Benelux 2012
OWASP Top 10 vs Drupal - OWASP Benelux 2012
 
ASP.NET Web Security
ASP.NET Web SecurityASP.NET Web Security
ASP.NET Web Security
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
 
null Bangalore meet - Php Security
null Bangalore meet - Php Securitynull Bangalore meet - Php Security
null Bangalore meet - Php Security
 
Drupal Security Seminar
Drupal Security SeminarDrupal Security Seminar
Drupal Security Seminar
 
Php My Sql Security 2007
Php My Sql Security 2007Php My Sql Security 2007
Php My Sql Security 2007
 
Website Security
Website SecurityWebsite Security
Website Security
 
Website Security
Website SecurityWebsite Security
Website Security
 
CSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open RedirectCSRF, ClickJacking & Open Redirect
CSRF, ClickJacking & Open Redirect
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
 

More from Ievgenii Katsan

8 andrew kalyuzhin - 30 ux-advices, that will make users love you
8   andrew kalyuzhin - 30 ux-advices, that will make users love you8   andrew kalyuzhin - 30 ux-advices, that will make users love you
8 andrew kalyuzhin - 30 ux-advices, that will make users love you
Ievgenii Katsan
 
5 hans van loenhoud - master-class the 7 skills of highly successful teams
5   hans van loenhoud - master-class the 7 skills of highly successful teams5   hans van loenhoud - master-class the 7 skills of highly successful teams
5 hans van loenhoud - master-class the 7 skills of highly successful teams
Ievgenii Katsan
 
4 alexey orlov - life of product in startup and enterprise
4   alexey orlov - life of product in startup and enterprise4   alexey orlov - life of product in startup and enterprise
4 alexey orlov - life of product in startup and enterprise
Ievgenii Katsan
 
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
3   dmitry gomeniuk - how to make data-driven decisions in saa s products3   dmitry gomeniuk - how to make data-driven decisions in saa s products
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
Ievgenii Katsan
 
7 hans van loenhoud - the problem-goal-solution trinity
7   hans van loenhoud - the problem-goal-solution trinity7   hans van loenhoud - the problem-goal-solution trinity
7 hans van loenhoud - the problem-goal-solution trinity
Ievgenii Katsan
 
1 hans van loenhoud -
1   hans van loenhoud - 1   hans van loenhoud -
1 hans van loenhoud -
Ievgenii Katsan
 
3 denys gobov - change request specification the knowledge base or the task...
3   denys gobov - change request specification the knowledge base or the task...3   denys gobov - change request specification the knowledge base or the task...
3 denys gobov - change request specification the knowledge base or the task...
Ievgenii Katsan
 
5 victoria cupet - learn to play business analysis
5   victoria cupet - learn to play business analysis5   victoria cupet - learn to play business analysis
5 victoria cupet - learn to play business analysis
Ievgenii Katsan
 
5 alina petrenko - key requirements elicitation during the first contact wi...
5   alina petrenko - key requirements elicitation during the first contact wi...5   alina petrenko - key requirements elicitation during the first contact wi...
5 alina petrenko - key requirements elicitation during the first contact wi...
Ievgenii Katsan
 
3 karabak kuyavets transformation of business analyst to product owner
3   karabak kuyavets transformation of business analyst to product owner3   karabak kuyavets transformation of business analyst to product owner
3 karabak kuyavets transformation of business analyst to product owner
Ievgenii Katsan
 
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
Ievgenii Katsan
 
3 zornitsa nikolova - the product manager between decision making and facil...
3   zornitsa nikolova - the product manager between decision making and facil...3   zornitsa nikolova - the product manager between decision making and facil...
3 zornitsa nikolova - the product manager between decision making and facil...
Ievgenii Katsan
 
4 viktoriya gudym - how to effectively manage remote employees
4   viktoriya gudym - how to effectively manage remote employees4   viktoriya gudym - how to effectively manage remote employees
4 viktoriya gudym - how to effectively manage remote employees
Ievgenii Katsan
 
9 natali renska - product and outsource development, how to cook 2 meals in...
9   natali renska - product and outsource development, how to cook 2 meals in...9   natali renska - product and outsource development, how to cook 2 meals in...
9 natali renska - product and outsource development, how to cook 2 meals in...
Ievgenii Katsan
 
7 denis parkhomenko - from idea to execution how to make a product that cus...
7   denis parkhomenko - from idea to execution how to make a product that cus...7   denis parkhomenko - from idea to execution how to make a product that cus...
7 denis parkhomenko - from idea to execution how to make a product that cus...
Ievgenii Katsan
 
6 anton vitiaz - inside the mvp in 3 days
6   anton vitiaz - inside the mvp in 3 days6   anton vitiaz - inside the mvp in 3 days
6 anton vitiaz - inside the mvp in 3 days
Ievgenii Katsan
 
5 mariya popova - ideal product management. unicorns in our reality
5   mariya popova - ideal product management. unicorns in our reality5   mariya popova - ideal product management. unicorns in our reality
5 mariya popova - ideal product management. unicorns in our reality
Ievgenii Katsan
 
2 victor podzubanov - design thinking game
2   victor podzubanov - design thinking game2   victor podzubanov - design thinking game
2 victor podzubanov - design thinking game
Ievgenii Katsan
 
3 sergiy potapov - analyst to product owner
3   sergiy potapov - analyst to product owner3   sergiy potapov - analyst to product owner
3 sergiy potapov - analyst to product owner
Ievgenii Katsan
 
4 anton parkhomenko - how to make effective user research with no budget at...
4   anton parkhomenko - how to make effective user research with no budget at...4   anton parkhomenko - how to make effective user research with no budget at...
4 anton parkhomenko - how to make effective user research with no budget at...
Ievgenii Katsan
 

More from Ievgenii Katsan (20)

8 andrew kalyuzhin - 30 ux-advices, that will make users love you
8   andrew kalyuzhin - 30 ux-advices, that will make users love you8   andrew kalyuzhin - 30 ux-advices, that will make users love you
8 andrew kalyuzhin - 30 ux-advices, that will make users love you
 
5 hans van loenhoud - master-class the 7 skills of highly successful teams
5   hans van loenhoud - master-class the 7 skills of highly successful teams5   hans van loenhoud - master-class the 7 skills of highly successful teams
5 hans van loenhoud - master-class the 7 skills of highly successful teams
 
4 alexey orlov - life of product in startup and enterprise
4   alexey orlov - life of product in startup and enterprise4   alexey orlov - life of product in startup and enterprise
4 alexey orlov - life of product in startup and enterprise
 
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
3   dmitry gomeniuk - how to make data-driven decisions in saa s products3   dmitry gomeniuk - how to make data-driven decisions in saa s products
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
 
7 hans van loenhoud - the problem-goal-solution trinity
7   hans van loenhoud - the problem-goal-solution trinity7   hans van loenhoud - the problem-goal-solution trinity
7 hans van loenhoud - the problem-goal-solution trinity
 
1 hans van loenhoud -
1   hans van loenhoud - 1   hans van loenhoud -
1 hans van loenhoud -
 
3 denys gobov - change request specification the knowledge base or the task...
3   denys gobov - change request specification the knowledge base or the task...3   denys gobov - change request specification the knowledge base or the task...
3 denys gobov - change request specification the knowledge base or the task...
 
5 victoria cupet - learn to play business analysis
5   victoria cupet - learn to play business analysis5   victoria cupet - learn to play business analysis
5 victoria cupet - learn to play business analysis
 
5 alina petrenko - key requirements elicitation during the first contact wi...
5   alina petrenko - key requirements elicitation during the first contact wi...5   alina petrenko - key requirements elicitation during the first contact wi...
5 alina petrenko - key requirements elicitation during the first contact wi...
 
3 karabak kuyavets transformation of business analyst to product owner
3   karabak kuyavets transformation of business analyst to product owner3   karabak kuyavets transformation of business analyst to product owner
3 karabak kuyavets transformation of business analyst to product owner
 
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
 
3 zornitsa nikolova - the product manager between decision making and facil...
3   zornitsa nikolova - the product manager between decision making and facil...3   zornitsa nikolova - the product manager between decision making and facil...
3 zornitsa nikolova - the product manager between decision making and facil...
 
4 viktoriya gudym - how to effectively manage remote employees
4   viktoriya gudym - how to effectively manage remote employees4   viktoriya gudym - how to effectively manage remote employees
4 viktoriya gudym - how to effectively manage remote employees
 
9 natali renska - product and outsource development, how to cook 2 meals in...
9   natali renska - product and outsource development, how to cook 2 meals in...9   natali renska - product and outsource development, how to cook 2 meals in...
9 natali renska - product and outsource development, how to cook 2 meals in...
 
7 denis parkhomenko - from idea to execution how to make a product that cus...
7   denis parkhomenko - from idea to execution how to make a product that cus...7   denis parkhomenko - from idea to execution how to make a product that cus...
7 denis parkhomenko - from idea to execution how to make a product that cus...
 
6 anton vitiaz - inside the mvp in 3 days
6   anton vitiaz - inside the mvp in 3 days6   anton vitiaz - inside the mvp in 3 days
6 anton vitiaz - inside the mvp in 3 days
 
5 mariya popova - ideal product management. unicorns in our reality
5   mariya popova - ideal product management. unicorns in our reality5   mariya popova - ideal product management. unicorns in our reality
5 mariya popova - ideal product management. unicorns in our reality
 
2 victor podzubanov - design thinking game
2   victor podzubanov - design thinking game2   victor podzubanov - design thinking game
2 victor podzubanov - design thinking game
 
3 sergiy potapov - analyst to product owner
3   sergiy potapov - analyst to product owner3   sergiy potapov - analyst to product owner
3 sergiy potapov - analyst to product owner
 
4 anton parkhomenko - how to make effective user research with no budget at...
4   anton parkhomenko - how to make effective user research with no budget at...4   anton parkhomenko - how to make effective user research with no budget at...
4 anton parkhomenko - how to make effective user research with no budget at...
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

4 andrii kudiurov - web application security 101

  • 1. WEB APPSEC 101 Andrii Kudiurov TeamLead @ SoftSeq
  • 2. About me - Python programming background - Current job: Teamlead @ SoftSeq (Web app audits & certification, embedding Secure SDLC) - Successfully hacked banking, trading, insurance, security, mailing providers, etc.
  • 3. Plan 1. Basic knowledge to start 2. Never trust user input. How HTTP works. 3. Misconfiguration 4. Hidden options && forced navigation && mass parameter assignment 5. CSRF 6. Injection a. XSS b. SQLi c. OS Command injection 7. open redirect 8. path traversal 9. DoS due to application logic errors 10. Basic HOWTO 11. Links 12. Questions
  • 4. What? - Understanding common bugs that allows doing something evil =) - Web app vulnerabilities are based inside the app itself (web appsec != pentest) How? - There’s a lot of info. I’ve tried to explain vulnerabilities that can be found by QA during testing routine. See links to get more HOWTO
  • 5. Baseline - How web app, browser and HTTP works, basic HTML - Any programming language, including (very)basic JS Tools - Browser + FoxyFroxy + BurpSuite - Google =)
  • 6.
  • 7. Misconfiguration - Opened ports - Default or no passwords (e.g. RabbitMQ) - Backup, .git and other sensitive folders accessible - Default or unnecessary features enabled - No pre-authorization to staging/testing environment - Security headers missing (e.g. iframe is allowed: UI redress aka Clickjacking) - Bad pseudorandom used for password/key/pin generation - No “Secure”, “HTTPOnly” cookie flags, allowed subdomains and insecure path - Using components with known vulnerabilities - And more… Good news: automated scanners can find it pretty well.
  • 8. Components with known vulnerabilities - Remember Equifax? They forgot to update library - Average small app can have ~ 20-40 dependencies - Enterprise apps can have over 200 dependencies
  • 9. Components with known vulnerabilities Basic rule: if there is info that component is vulnerable it doesn’t matter if you can show how to exploit it. UPDATE! Search vulnerabilities at https://cve.mite.org or https://nvd.nist.gov/ Try to find some of them automatically (all of them can be found ONLY manually because of reasons =) ) - Dependency checker (ASP, Java) - Retire.js (vulnerable forntend libs)
  • 12. <form action=”changemail”> <input name=”email” value=”myemail@m ail.com”> <input type=hidden name=”id” value=”123”> <button action=”submit” value=”save”> </form> <script> //script that checks that user entered everything correctly and didn’t modify ID </script> HTTP. Recall.
  • 13. User pushes button to Save profile Browser adds headers, cookies and Makes request POST /save HTTP/1.1 Host: bank.com Cookies: auth=abcdi848d; Content-length: 123 Connection: close email=myemail@mail.com&id=123 HTTP. Recall.
  • 14. User pushes button to Save profile Browser adds headers, cookies and Makes request POST /save HTTP/1.1 Host: bank.com Cookies: auth=abcdi848d; Connection: close email=myemail@mail.com& id=123 PROXY-SERVER POST /save HTTP/1.1 Host: bank.com Cookies: auth=abcdi848d; Connection: close email=myemail@mail.com& id=124
  • 15. <div class=’comment’> ….. </div> <button value=”answer” action=”createAnswer()”> <div class=’comment’> ….. </div> <button value=”answer” action=”createAnser()”> <button value=”edit” action=”editPost()”>
  • 16. Direct object reference examples: - Yahoo: deleting ~ 1m comments and posts - Apple: 300k 3rd party developers accounts - FB, VK, Instagram photos - Some hackers who tried to f*** fortune 100 companies but totally blew it by exposing all info for scum emails - Common anti-automation problem
  • 17. Mass parameter assignment User input: email=email@email.com DB model: - ID - Email - IsBlocked - Some app controllers may process not user input itself, but a model created from the input to ease coding routine. - In this case if no additional anti-forgery measures have been implemented, it is possible to add additional parameters
  • 18. What does it mean? - No decision making on frontend pls - Never trust user input. Consider any user input as harmful. - Input validation on frontend - for UX, on backend - for decision making
  • 19. More thinking… - Humans make mistakes - Developers think how to MAKE, not how to BREAK - Parts written by several developers can be VERY different (one controller can be totally secure, another - totally broken) - Companies with TOP developers and good security teams still are getting hacked or reported by whitehats
  • 20. CSRF (Cross site request forgery) Root problem: Browser sends cookies automatically for every URL or submitted form. Exploit: We can craft a form on a web-site we control and force a user to perform request with desired parameters to a desired resource Fix: Unpredictable anti-CRSF token (as one of the parameters in POST queries)
  • 21. <form action= ”http://bank.com/changemail” > <input name=”mail” value=”hacker@mai l.com”> <button id=”x” action=”submit”></form> <script>x=document.getEle mentById(“x”).click()</script> <form action=”changemail”> <input name=”mail” value=”myemail@ma il.com”> <button action=”submit”> </form>
  • 22. XSS: (very) short info - An ability to inject malicious JavaScript to the legitimate site - Happens when server sends back user-generated data without validation and sanitization - Usually exploited by embedding HTML tags or breaking JS syntax
  • 24. Two simple rules to prevent XSS: 1. All user input that comes back from server should be SANITIZED by trusted functional (e.g. template engine). 2. NEVER write your own filters. They probably can be hacked. WHY? <scr<script>ipt> <img src=x onerror=’alert(1)’> <a href=”javascript:alert(1)”>click me</a>
  • 25. <IMG SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&# 101;&#114;&#116;&#40; &#39;&#88;&#83;&#83;&#39;&#41;> <IMG SRC="jav&#x09;ascript:alert('XSS');"> <BODY onload!#$%&()*~+-_.,:;?@[/|]^`=alert("XSS")> <iframe src=http://xss.rocks/scriptlet.html < <STYLE>li {list-style-image: url("javascript:alert('XSS')");}</STYLE><UL><LI>XSS</br> <META HTTP-EQUIV="refresh" CONTENT="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K"> "'}})}}})});alert('hacked'); window.addEventListener('load', function() { new Vue({ methods:{ filter:function(){$.ajax({data:{a:'" Own filter = bad idea
  • 26. SQL Injection - Happens when user input is passed to SQL query so it can be modified. For example, user is trying to access some user item: SELECT * FROM items WHERE itemname = 'secret_unique_id'; - If we have control over ‘secret_unique_id’, we can submit special syntax and receive all items. Like: SELECT * FROM items WHERE itemname = 'secret_unique_id' OR 'a'='a';
  • 27. SQL Injection - Not very common in the new projects - Exists because user input is not validated and for some reason raw SQL queries are still used. - Easier to search in the source code rather than blackbox
  • 28. SQL Injection hints - Easily avoided if ORM/parameterized queries are used - Some ORM-parameters can be still exploited, read specs! - Check stored procedures! - Even if you think everybody is writing in a secure manner, someone probably have used raw SQL to execute a complex query
  • 29. OS Command Injection - Accepting user input inside OS command invocation - Can be easily found in the source code by keywords Cases: - Proto and video modification (imagemagic, ffmpeg) - Operations with files, folders, systems (e.g. some deploy platforms)
  • 31. Example 2: Modern world www.cute-images.com/image/cute_puppy.png?width=100&height=100 www.cute- images.com/image/save/resize/cute_puppy.png?width=100&height=100 ….what if? www.cute- images.com/image/cute_puppy.png?width=2147483647&height=2147483647 www.cute- images.com/image/save/resize/cute_puppy.png?width=2147483647&height=21 47483647 DOS via application logic errors
  • 32. Open redirect. Case: 1. User tries to reach URL, but he is not logged in. 2. For better UX, user should be redirected to login page and after — back to the page he requested Example: User tries to reach http://example.com/page12134 User is redirected to http://example.com/login?redirect=/page1234 But what if we make user to follow link like this: http://example.com/login?redirect=http://exampIe.com
  • 33.
  • 34. Path traversal Usually happens when user input is feeded directly in file path parameter e.g. f = open(“FOLDER_NAME” + user_input_file, “r”)
  • 35. Basic “How to test” BlackBox: - Check how application handles unexpected data (single/double quotes, <>, %0a%0d%00, etc.) - Simple XSS test: '';!--"<XSS>=&{()} - Simple SQLi test: 1' or '1' = '1 - Path traversal ../../../../../../../etc/passwd (or other known file) - directory browsing and open folders DIRBUSTER (careful, can DOS the server) - CSRF: check if anti-csrf token is present AND it’s required - OS command injection: if something looks like shell command - try to insert another Desired result: unpredicted behavior or errors.
  • 36. WhiteBox (access to source code) Easy: 1. Find OWASP Code review guide 2. Find desired language and search for keywords, review them. 3. For frontend - search for .innerHTML, eval(), $.html (there is more. Search for your framework)
  • 37. Automation doesn’t work (as good as expected) because CONTEXT MATTERS. Automated solutions find - hundreds of false-positives - Can’t find not obvious vulnerabilities But: - Better than nothing - Can work better for some projects - Detects misconfiguration - Can be tweaked and proxied to perform better for you
  • 38. Info and literature: 1. GOOGLE 2. Our appsec knowledge checklist: link a. Some playgrounds: p.5-10 3. OWASP ASVS (standard), OWASP Testing Guide at https://owasp.org 4. Web Application hacker’s handbook
  • 39. Thank you! Any questions? FB: Andrii Kudiurov