SlideShare a Scribd company logo
1 of 27
Download to read offline
Basic Web Application
Security Testing in QA
Denis
Kolegov
Sr. Security Test
Engineer, PhD
F5 Networks,
Tomsk State University
Who Am I?
• Sr. Security Test Engineer at F5 Networks
• PhD, associate professor at TSU’s Information Security and
Cryptography Department
• Speaker
– Positive Hack Days, Zero Nights, SibeCrypt
• OWASP SCG, BeEF, Metasploit contributor
Introduction
• BSIMM security testing (Gary McGraw)
– Enhance QA beyond functional perspective
– Integrate the attacker perspective into test plans
– Deliver risk-based security testing
• Hack yourself first (Troy Hunt)
– This approach advocates building up our cyber-offense skills, and
focusing these skills inward at ourselves, to find and fix security issues
before the bad guys find and exploit them
Causes and Consequences
Checklist
1. Information disclosure
2. SSL/TLS
3. Slow HTTP DoS attacks
4. HTTP host header attacks
5. Login page over HTTPS
6. Same site scripting
7. Secure headers
8. Cross domain policy
9. Session management
10. URL validation
Information Disclosure
• Scope
– Web management interfaces
– Web application reverse proxies
– Error pages
• Services
– Goggle Search Engine
– Shodan
• Weaknesses
– Indexing by search engines
– Hardcoded keywords on error pages
– Keywords in HTTP response headers
Information Disclosure
• Shodan
– cisco
– bitrix
– VMware
• Google
– intitle: "VMware Horizon View Administrator"
– inurl:"portal/webclient/views/mainUI.html"
– intitle:"Welcome to VMware ESX"
Information Disclosure
• Test robots.txt
User-agent: *
Disallow: /
• Test meta tag
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
• Test that it is possible to delete or change default keywords via
customization tool
SSL/TLS Testing
• Testing with OpenSSL
– Trustworthy checks
– Old versions (0.9.8k)
• Qualys SSL Labs
– SSL Server Test
– SSL Client Test
– SSL/TLS Best Practices
– API
• Tools
– sslscan
– sslyze
– ssllabs-scan
Client-Initiated Renegotiation DoS Test
• Testing with OpenSSL
openssl s_client –connect test.com:443
GET / HTTP/1.1
Host: test.com
R
…
R
CRLF
• Proof of concept with exploit
thc-ssl-dos --accept test.com 443
Slow HTTP DoS Testing
• Attacks
– Slowloris (slow headers)
– Slow HTTP POST (slow body)
– Slow Read
• Apache is generally the most vulnerable server
• Nginx, IIS, lighthttpd are also can be vulnerable to these attacks
• Tools
– https://code.google.com/p/slowhttptest/
– slowloris.pl
Slow HTTP DoS Testing
• Slowloris
slowhttptest -u "https://test.com/" -c 8000 -l 400 -r 4000 -i 15 -x 400
• Slow HTTP Post
slowhttptest -u https://test.com/ -B -c 8000 -l 400 -r 4000 -i 15 -x 400
• Slow Read
slowhttptest -u "https://test.com/js/bigfile" -X -c 5000 -r 4000 -l 400 -k 5
-n 10 -w 10 -y 300 -z 1
Same Site Scripting
• DNS misconfiguration
– xyz.target.com with A-record to 127.0.0.1
– xyz.target.com with A-record to private address (RFC 1918)
• In multi-users system an attacker can run network service on loopback
and then eavesdrops users’ cookies
1. Run "nc –lv 10024"
2. Send email with <img src=“http://xyz.target.com:10024”>
• An attacker can connect to public network with the same network address
and publish resource link to xyz.target.com. All users in the same public
network who accessed this resource send cookies to an attacker
Same Site Scripting
• Testing
– nslookup localhost.target.com
– DNS enumeration
• Examples
– https://hackerone.com/reports/1509
– https://hackerone.com/reports/7949
Login Page over HTTPS
• The initial login page must be served over TLS
• The login page and all subsequent authenticated pages must be
exclusively accessed over TLS
Troy Hunt©. OWASP Top 10 for .NET developers part 9: Insufficient Transport Layer Protection
HTTP Secure Headers
• X-Frame-Options
• X-XSS-Protection
• X-Content-Type-Options
• Strict-Transport-Security
• Access-Control-Allow-Origin
• Content-Security-Policy
X-Frame-Options
• All about Clickjacking?
• What an attacker can do
– Bypass some XSS filters
– Bypass XSS length restrictions
– Bypass CSP via browser vulnerabilities
• X-Frame-Options is an additional layer of defense
Access-Control-Allow-Origin
• Access-Control-Allow-Origin is apart of the CORS specification
• Access-Control-Allow-Origin: * means that the resource can be
accessed by any domain in a cross-site manner
• Examples
– https://hackerone.com/reports/13551
– https://hackerone.com/reports/6268
Secure Headers Testing
• X-Content-Type-Options: nosniff
• X-Frame-Option: DENY | SAMEORIGIN
• Strict-Transport-Security: max-age=31536000;
includeSubDomains
• X-XSS-Filter: 1; mode=block
Host Header Attacks
• Weakness: a web server handles HTTP requests with arbitrary
or invalid Host header
• Attacks
– DNS rebinding
– Stored XSS
– Password reset poisoning
– Web-cache poisoning
• Examples
– https://hackerone.com/reports/13286
– https://hackerone.com/reports/487
Cross Domain Policy
• A cross-domain policy file specifies the permissions that a web client such as Java,
Adobe Flash, etc. use to access data across different domains
• Files
– crossdomain.xml
– clientaccesspolicy.xml
• Example of configuration weakness
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
• Example
– https://hackerone.com/reports/43070
Session Management
• Test that session is invalidated when user logs out
• Session ID is sent in HTTP cookie or header and never disclosed in URLs
• Test that session ID is changed when user performs critical action
– Login, logout
– Password changing
– Session expiration, reauthentication
OWASP ASVS project
URL Validation
• Weakness: insufficient input validation for URL data
• Test vectors (http://test.com/foo/bar?param=value)
– GET /3fb5e7a4f814d790'"<>/%2e%2e/foo/bar?param=value HTTP/1.1
– GET /foo/3fb5e7a4f814d790'"<>/%2e%2e/bar?param=value HTTP/1.1
– GET /foo/bar/3fb5e7a4f814d790'"<>/%2e%2e/?param=value HTTP/1.1
– GET /foo/bar.baz/3fb5e7a4f814d790'"<>?param=value HTTP/1.1
• Attacks
– XSS
– CRLF-injection (HTTP Response Splitting)
– Open Redirect
– Secret token leakage
Sergey Bobrov©. http://habrahabr.ru/company/pt/blog/247709
URI Validation
Sergey Bobrov©. http://habrahabr.ru/company/pt/blog/247709
Bibliography
1. Vladimir Kochetkov. How to Develop a Secure Web Application and Stay in Mind?
2. OWASP Testing Guide v4
3. The Building Security In Maturity Model
4. Qualys SSL LABS
5. SSL/TLS Checklist for Pentesters
6. Sergey Shekyan. Testing Web Servers for Slow HTTP Attacks
7. Troy Hunt. OWASP Top 10 for .NET developers part 9: Insufficient Transport Layer Protection
8. Sergey Belov. Show Me Impact
9. Frederik Braun and Mario Heiderich. X-Frame-Options: All about Clickjacking?
10.Guidelines for Setting Security Headers
11.Sergey Bobrov. Yet Another Vulnerability in Facebook
@dnkolegov
Denis
Kolegov
Sr. Security Test
Engineer, PhD
F5 Networks,
Tomsk State University
Questions?
dnkolegov@gmail.com
QA: Базовое тестирование защищенности веб-приложений в рамках QA

More Related Content

What's hot

Security Bootcamp 2013 - Timing info-leak made easy - Quan Minh Tâm
Security Bootcamp 2013 - Timing info-leak made easy - Quan Minh TâmSecurity Bootcamp 2013 - Timing info-leak made easy - Quan Minh Tâm
Security Bootcamp 2013 - Timing info-leak made easy - Quan Minh Tâm
Security Bootcamp
 
Owasp Indy Q2 2012 Cheat Sheet Overview
Owasp Indy Q2 2012 Cheat Sheet OverviewOwasp Indy Q2 2012 Cheat Sheet Overview
Owasp Indy Q2 2012 Cheat Sheet Overview
owaspindy
 
Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...
Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...
Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...
Severalnines
 
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
David Timothy Strauss
 
Slides of ARPCON (File upload vulnerability by Raju Kumar)
Slides of ARPCON (File upload vulnerability by Raju Kumar)Slides of ARPCON (File upload vulnerability by Raju Kumar)
Slides of ARPCON (File upload vulnerability by Raju Kumar)
RAJUKUMAR396
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
bryan_call
 
Design and Implementation of a High- Performance Distributed Web Crawler
Design and Implementation of a High- Performance Distributed Web CrawlerDesign and Implementation of a High- Performance Distributed Web Crawler
Design and Implementation of a High- Performance Distributed Web Crawler
George Ang
 

What's hot (20)

Security Bootcamp 2013 - Timing info-leak made easy - Quan Minh Tâm
Security Bootcamp 2013 - Timing info-leak made easy - Quan Minh TâmSecurity Bootcamp 2013 - Timing info-leak made easy - Quan Minh Tâm
Security Bootcamp 2013 - Timing info-leak made easy - Quan Minh Tâm
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
 
Owasp Indy Q2 2012 Cheat Sheet Overview
Owasp Indy Q2 2012 Cheat Sheet OverviewOwasp Indy Q2 2012 Cheat Sheet Overview
Owasp Indy Q2 2012 Cheat Sheet Overview
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web Performance
 
Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...
Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...
Webinar slides: MySQL & MariaDB load balancing with ProxySQL & ClusterControl...
 
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
Don't Build "Death Star" Security - O'Reilly Software Architecture Conference...
 
CNIT 124: Ch 7: Capturing Traffic
CNIT 124: Ch 7: Capturing TrafficCNIT 124: Ch 7: Capturing Traffic
CNIT 124: Ch 7: Capturing Traffic
 
Slides of ARPCON (File upload vulnerability by Raju Kumar)
Slides of ARPCON (File upload vulnerability by Raju Kumar)Slides of ARPCON (File upload vulnerability by Raju Kumar)
Slides of ARPCON (File upload vulnerability by Raju Kumar)
 
Cached and Confused: Web Cache Deception in the Wild
Cached and Confused: Web Cache Deception in the WildCached and Confused: Web Cache Deception in the Wild
Cached and Confused: Web Cache Deception in the Wild
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
 
Cached and Confused: Web Cache Deception in the Wild
Cached and Confused: Web Cache Deception in the WildCached and Confused: Web Cache Deception in the Wild
Cached and Confused: Web Cache Deception in the Wild
 
Building Client-Side Attacks with HTML5 Features
Building Client-Side Attacks with HTML5 FeaturesBuilding Client-Side Attacks with HTML5 Features
Building Client-Side Attacks with HTML5 Features
 
Using NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content CacheUsing NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content Cache
 
Rest services caching
Rest services cachingRest services caching
Rest services caching
 
Achieving Pci Compliace
Achieving Pci CompliaceAchieving Pci Compliace
Achieving Pci Compliace
 
Nginx dhruba mandal
Nginx dhruba mandalNginx dhruba mandal
Nginx dhruba mandal
 
Analysis of HTTP Security Headers in Turkey
Analysis of HTTP Security Headers in TurkeyAnalysis of HTTP Security Headers in Turkey
Analysis of HTTP Security Headers in Turkey
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
Design and Implementation of a High- Performance Distributed Web Crawler
Design and Implementation of a High- Performance Distributed Web CrawlerDesign and Implementation of a High- Performance Distributed Web Crawler
Design and Implementation of a High- Performance Distributed Web Crawler
 
Content Security Policy
Content Security PolicyContent Security Policy
Content Security Policy
 

Viewers also liked

7 кашкута
7 кашкута7 кашкута
7 кашкута
CodeFest
 
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest
 
CodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не только
CodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не толькоCodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не только
CodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не только
CodeFest
 
CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...
CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...
CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...
CodeFest
 

Viewers also liked (20)

Графика средствами PHP
Графика средствами PHPГрафика средствами PHP
Графика средствами PHP
 
Лучший frontend-фреймворк, и почему вы его не хотите
Лучший frontend-фреймворк, и почему вы его не хотитеЛучший frontend-фреймворк, и почему вы его не хотите
Лучший frontend-фреймворк, и почему вы его не хотите
 
Приемы, затрудняющие обнаружение и анализ вредоносного кода в PHP скриптах
Приемы, затрудняющие обнаружение и анализ вредоносного кода в PHP скриптахПриемы, затрудняющие обнаружение и анализ вредоносного кода в PHP скриптах
Приемы, затрудняющие обнаружение и анализ вредоносного кода в PHP скриптах
 
Php intro rus
Php intro rusPhp intro rus
Php intro rus
 
7 кашкута
7 кашкута7 кашкута
7 кашкута
 
Эффективная, вовлеченная команда энтузиастов. А ты готов к этому?
Эффективная, вовлеченная команда энтузиастов. А ты готов к этому?Эффективная, вовлеченная команда энтузиастов. А ты готов к этому?
Эффективная, вовлеченная команда энтузиастов. А ты готов к этому?
 
Денис Иванов
Денис ИвановДенис Иванов
Денис Иванов
 
Мониторинг приложений ASP.NET на основе сервиса Application Insights
Мониторинг приложений ASP.NET на основе сервиса Application InsightsМониторинг приложений ASP.NET на основе сервиса Application Insights
Мониторинг приложений ASP.NET на основе сервиса Application Insights
 
Антон Турецкий
Антон ТурецкийАнтон Турецкий
Антон Турецкий
 
Base php 1
Base php 1Base php 1
Base php 1
 
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
CodeFest 2014. Axel Rauschmayer — JavaScript’s variables: scopes, environment...
 
CodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не только
CodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не толькоCodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не только
CodeFest 2011. Галако О. — О Scala и Lift для тех, кому мало Java, и не только
 
CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...
CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...
CodeFest 2014. Коновалов А., Шкурко Д. — Разработка и оптимизация приложений ...
 
Социальный граф Одноклассников в Target Mail.Ru
Социальный граф Одноклассников в Target Mail.RuСоциальный граф Одноклассников в Target Mail.Ru
Социальный граф Одноклассников в Target Mail.Ru
 
Мультиплатформенная синхронизация структурированных данных
Мультиплатформенная синхронизация структурированных данныхМультиплатформенная синхронизация структурированных данных
Мультиплатформенная синхронизация структурированных данных
 
Иван Величко
Иван ВеличкоИван Величко
Иван Величко
 
Развитие управления проектами и критериев качества в ИТ
Развитие управления проектами и критериев качества в ИТРазвитие управления проектами и критериев качества в ИТ
Развитие управления проектами и критериев качества в ИТ
 
Qubell — Component Model
Qubell — Component ModelQubell — Component Model
Qubell — Component Model
 
Backend: Полнотекстовый поиск в Почте Mail.Ru
Backend: Полнотекстовый поиск в Почте Mail.RuBackend: Полнотекстовый поиск в Почте Mail.Ru
Backend: Полнотекстовый поиск в Почте Mail.Ru
 
Здравый смысл, брендинг, веб и как всё это связано
Здравый смысл, брендинг, веб и как всё это связаноЗдравый смысл, брендинг, веб и как всё это связано
Здравый смысл, брендинг, веб и как всё это связано
 

Similar to QA: Базовое тестирование защищенности веб-приложений в рамках QA

Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration Testing
NetSPI
 
Attack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration TestingAttack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration Testing
NetSPI
 
Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)
Krzysztof Kotowicz
 
[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
OWASP
 
Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5
DefconRussia
 
Lesson 6 web based attacks
Lesson 6 web based attacksLesson 6 web based attacks
Lesson 6 web based attacks
Frank Victory
 

Similar to QA: Базовое тестирование защищенности веб-приложений в рамках QA (20)

Security vulnerabilities - 2018
Security vulnerabilities - 2018Security vulnerabilities - 2018
Security vulnerabilities - 2018
 
Flashack
FlashackFlashack
Flashack
 
Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881
 
Java EE 6 Security in practice with GlassFish
Java EE 6 Security in practice with GlassFishJava EE 6 Security in practice with GlassFish
Java EE 6 Security in practice with GlassFish
 
Protecting Against Web App Attacks
Protecting Against Web App AttacksProtecting Against Web App Attacks
Protecting Against Web App Attacks
 
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration Testing
 
Attack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration TestingAttack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration Testing
 
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)
 
Introduction to Mod security session April 2016
Introduction to Mod security session April 2016Introduction to Mod security session April 2016
Introduction to Mod security session April 2016
 
Anatomy of a Cloud Hack
Anatomy of a Cloud HackAnatomy of a Cloud Hack
Anatomy of a Cloud Hack
 
Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)
 
SOHOpelessly Broken
SOHOpelessly BrokenSOHOpelessly Broken
SOHOpelessly Broken
 
[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
 
Protecting Against Web Attacks
Protecting Against Web AttacksProtecting Against Web Attacks
Protecting Against Web Attacks
 
Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5
 
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) HackableCollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
 
Lesson 6 web based attacks
Lesson 6 web based attacksLesson 6 web based attacks
Lesson 6 web based attacks
 
Spa Secure Coding Guide
Spa Secure Coding GuideSpa Secure Coding Guide
Spa Secure Coding Guide
 
Realities of Security in the Cloud
Realities of Security in the CloudRealities of Security in the Cloud
Realities of Security in the Cloud
 
Multi-Layer DDoS Mitigation Strategies
Multi-Layer DDoS Mitigation StrategiesMulti-Layer DDoS Mitigation Strategies
Multi-Layer DDoS Mitigation Strategies
 

More from CodeFest

More from CodeFest (20)

Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
 
Никита Прокопов
Никита ПрокоповНикита Прокопов
Никита Прокопов
 
Денис Баталов
Денис БаталовДенис Баталов
Денис Баталов
 
Елена Гальцина
Елена ГальцинаЕлена Гальцина
Елена Гальцина
 
Александр Калашников
Александр КалашниковАлександр Калашников
Александр Калашников
 
Ирина Иванова
Ирина ИвановаИрина Иванова
Ирина Иванова
 
Marko Berković
Marko BerkovićMarko Berković
Marko Berković
 
Денис Кортунов
Денис КортуновДенис Кортунов
Денис Кортунов
 
Александр Зимин
Александр ЗиминАлександр Зимин
Александр Зимин
 
Сергей Крапивенский
Сергей КрапивенскийСергей Крапивенский
Сергей Крапивенский
 
Сергей Игнатов
Сергей ИгнатовСергей Игнатов
Сергей Игнатов
 
Николай Крапивный
Николай КрапивныйНиколай Крапивный
Николай Крапивный
 
Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
 
Вадим Смирнов
Вадим СмирновВадим Смирнов
Вадим Смирнов
 
Константин Осипов
Константин ОсиповКонстантин Осипов
Константин Осипов
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
Максим Пугачев
Максим ПугачевМаксим Пугачев
Максим Пугачев
 
Rene Groeschke
Rene GroeschkeRene Groeschke
Rene Groeschke
 
Иван Бондаренко
Иван БондаренкоИван Бондаренко
Иван Бондаренко
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
 

Recently uploaded

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 

QA: Базовое тестирование защищенности веб-приложений в рамках QA

  • 1. Basic Web Application Security Testing in QA Denis Kolegov Sr. Security Test Engineer, PhD F5 Networks, Tomsk State University
  • 2. Who Am I? • Sr. Security Test Engineer at F5 Networks • PhD, associate professor at TSU’s Information Security and Cryptography Department • Speaker – Positive Hack Days, Zero Nights, SibeCrypt • OWASP SCG, BeEF, Metasploit contributor
  • 3. Introduction • BSIMM security testing (Gary McGraw) – Enhance QA beyond functional perspective – Integrate the attacker perspective into test plans – Deliver risk-based security testing • Hack yourself first (Troy Hunt) – This approach advocates building up our cyber-offense skills, and focusing these skills inward at ourselves, to find and fix security issues before the bad guys find and exploit them
  • 5. Checklist 1. Information disclosure 2. SSL/TLS 3. Slow HTTP DoS attacks 4. HTTP host header attacks 5. Login page over HTTPS 6. Same site scripting 7. Secure headers 8. Cross domain policy 9. Session management 10. URL validation
  • 6. Information Disclosure • Scope – Web management interfaces – Web application reverse proxies – Error pages • Services – Goggle Search Engine – Shodan • Weaknesses – Indexing by search engines – Hardcoded keywords on error pages – Keywords in HTTP response headers
  • 7. Information Disclosure • Shodan – cisco – bitrix – VMware • Google – intitle: "VMware Horizon View Administrator" – inurl:"portal/webclient/views/mainUI.html" – intitle:"Welcome to VMware ESX"
  • 8. Information Disclosure • Test robots.txt User-agent: * Disallow: / • Test meta tag <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> • Test that it is possible to delete or change default keywords via customization tool
  • 9. SSL/TLS Testing • Testing with OpenSSL – Trustworthy checks – Old versions (0.9.8k) • Qualys SSL Labs – SSL Server Test – SSL Client Test – SSL/TLS Best Practices – API • Tools – sslscan – sslyze – ssllabs-scan
  • 10. Client-Initiated Renegotiation DoS Test • Testing with OpenSSL openssl s_client –connect test.com:443 GET / HTTP/1.1 Host: test.com R … R CRLF • Proof of concept with exploit thc-ssl-dos --accept test.com 443
  • 11. Slow HTTP DoS Testing • Attacks – Slowloris (slow headers) – Slow HTTP POST (slow body) – Slow Read • Apache is generally the most vulnerable server • Nginx, IIS, lighthttpd are also can be vulnerable to these attacks • Tools – https://code.google.com/p/slowhttptest/ – slowloris.pl
  • 12. Slow HTTP DoS Testing • Slowloris slowhttptest -u "https://test.com/" -c 8000 -l 400 -r 4000 -i 15 -x 400 • Slow HTTP Post slowhttptest -u https://test.com/ -B -c 8000 -l 400 -r 4000 -i 15 -x 400 • Slow Read slowhttptest -u "https://test.com/js/bigfile" -X -c 5000 -r 4000 -l 400 -k 5 -n 10 -w 10 -y 300 -z 1
  • 13. Same Site Scripting • DNS misconfiguration – xyz.target.com with A-record to 127.0.0.1 – xyz.target.com with A-record to private address (RFC 1918) • In multi-users system an attacker can run network service on loopback and then eavesdrops users’ cookies 1. Run "nc –lv 10024" 2. Send email with <img src=“http://xyz.target.com:10024”> • An attacker can connect to public network with the same network address and publish resource link to xyz.target.com. All users in the same public network who accessed this resource send cookies to an attacker
  • 14. Same Site Scripting • Testing – nslookup localhost.target.com – DNS enumeration • Examples – https://hackerone.com/reports/1509 – https://hackerone.com/reports/7949
  • 15. Login Page over HTTPS • The initial login page must be served over TLS • The login page and all subsequent authenticated pages must be exclusively accessed over TLS Troy Hunt©. OWASP Top 10 for .NET developers part 9: Insufficient Transport Layer Protection
  • 16. HTTP Secure Headers • X-Frame-Options • X-XSS-Protection • X-Content-Type-Options • Strict-Transport-Security • Access-Control-Allow-Origin • Content-Security-Policy
  • 17. X-Frame-Options • All about Clickjacking? • What an attacker can do – Bypass some XSS filters – Bypass XSS length restrictions – Bypass CSP via browser vulnerabilities • X-Frame-Options is an additional layer of defense
  • 18. Access-Control-Allow-Origin • Access-Control-Allow-Origin is apart of the CORS specification • Access-Control-Allow-Origin: * means that the resource can be accessed by any domain in a cross-site manner • Examples – https://hackerone.com/reports/13551 – https://hackerone.com/reports/6268
  • 19. Secure Headers Testing • X-Content-Type-Options: nosniff • X-Frame-Option: DENY | SAMEORIGIN • Strict-Transport-Security: max-age=31536000; includeSubDomains • X-XSS-Filter: 1; mode=block
  • 20. Host Header Attacks • Weakness: a web server handles HTTP requests with arbitrary or invalid Host header • Attacks – DNS rebinding – Stored XSS – Password reset poisoning – Web-cache poisoning • Examples – https://hackerone.com/reports/13286 – https://hackerone.com/reports/487
  • 21. Cross Domain Policy • A cross-domain policy file specifies the permissions that a web client such as Java, Adobe Flash, etc. use to access data across different domains • Files – crossdomain.xml – clientaccesspolicy.xml • Example of configuration weakness <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy> • Example – https://hackerone.com/reports/43070
  • 22. Session Management • Test that session is invalidated when user logs out • Session ID is sent in HTTP cookie or header and never disclosed in URLs • Test that session ID is changed when user performs critical action – Login, logout – Password changing – Session expiration, reauthentication OWASP ASVS project
  • 23. URL Validation • Weakness: insufficient input validation for URL data • Test vectors (http://test.com/foo/bar?param=value) – GET /3fb5e7a4f814d790'"<>/%2e%2e/foo/bar?param=value HTTP/1.1 – GET /foo/3fb5e7a4f814d790'"<>/%2e%2e/bar?param=value HTTP/1.1 – GET /foo/bar/3fb5e7a4f814d790'"<>/%2e%2e/?param=value HTTP/1.1 – GET /foo/bar.baz/3fb5e7a4f814d790'"<>?param=value HTTP/1.1 • Attacks – XSS – CRLF-injection (HTTP Response Splitting) – Open Redirect – Secret token leakage Sergey Bobrov©. http://habrahabr.ru/company/pt/blog/247709
  • 24. URI Validation Sergey Bobrov©. http://habrahabr.ru/company/pt/blog/247709
  • 25. Bibliography 1. Vladimir Kochetkov. How to Develop a Secure Web Application and Stay in Mind? 2. OWASP Testing Guide v4 3. The Building Security In Maturity Model 4. Qualys SSL LABS 5. SSL/TLS Checklist for Pentesters 6. Sergey Shekyan. Testing Web Servers for Slow HTTP Attacks 7. Troy Hunt. OWASP Top 10 for .NET developers part 9: Insufficient Transport Layer Protection 8. Sergey Belov. Show Me Impact 9. Frederik Braun and Mario Heiderich. X-Frame-Options: All about Clickjacking? 10.Guidelines for Setting Security Headers 11.Sergey Bobrov. Yet Another Vulnerability in Facebook
  • 26. @dnkolegov Denis Kolegov Sr. Security Test Engineer, PhD F5 Networks, Tomsk State University Questions? dnkolegov@gmail.com