SlideShare a Scribd company logo
APPSEC 101
BREAK STUFF LIKE A PRO!
WELL, ALSMOST… 
Vladimir Garbuz
Contents
 AppSec testing tools
 Testing stages
 Mapping application’s content
 Input-based vulnerabilities
 Denial of Service
 Client-side controls
AppSec testing tools
 the Swiss Army Knife of AppSec – Fiddler
 not just a proxy
 inspect HTTP and HTTPS! (best served in RAW)
 modify and replay
 intercept mid-air
 setup reverse proxy mode
 get request stats
 set filters
 do text encoding
 scripting in C#
AppSec testing tools
 WireShark – when Fiddler doesn’t cut it
 only passive traffic monitoring
 sees everything!
 your browser’s developer console
 socket programming in any language, e.g.
Python 
 hacker’s mindset
Mapping application’s content
 read the feature specs
 monitor HTTP traffic for all user data entry points
 look at interface differences for different user
roles
 record a request such controls send for users who
can use them and replay them with user sessions
that can’t
 discover hidden content
 ViewDocument.jsp  Delete, Upload, Edit, Create,
etc.
 lookout for direct server file access (filename
Input vulnerabilities
Input vulnerabilities: basic
checks
 check if server correctly handles unexpected
data
 negative indexes and values
 overly large integers
 zero-bytes
 look for differences in processing of directly
submitted values AND when parsed from a user
uploaded or controlled file
 relates to ALL input-based vulnerabilities!
Input vulnerabilities: SQL
injections
 use DB server management software and
profiler
 submit ‘ or “ in request, not only “Edit”
operations!
 SQLi can be anywhere where DB is accessed
based on user data, in any way!
 monitor for server errors AND the DB
log/profiler!
 broken SQL query in DB log, error, etc?..
REPORT!
Input vulnerabilities: XSS
injections
 general principle – lack of input encoding
 user submitted data is unmodified in HTML page
 from Google XSS guide: "A good test string is
 >'>"><img src=x onerror=alert(0)
 generally, raise an ALARM for any of the
following 5:
 < > & " ‘
 within HTML actions and JavaScript code,
additionally
 n r ’ ”  uXXXX
 sometimes escaping won’t help
Input vulnerabilities: XSS
injections
 reflected XSS
 when a part of URL is reflected back in HTML page
 DON’T forget to URL encode special characters!
e.g.:
 http://url.com/1.jsp?param=%3E%3Cscript%3Ealert
(1)%3C%2Fscript%3E
 stored XSS
 a malicious string is added to the server once and
displayed as a part of a page to everyone viewing it
 from POST body, HTTP header, uploaded file,
HTML based server log, etc… MANY vectors!
Input vulnerabilities: XSS
injections
 DOM XSS
 caused by unsafe JS during runtime inside the
browser
 same principles apply (at this low level)
 monitor for special chars appearing in resulting
HTML!
 example:
http://url.com/page.jsp?param=value#section1%3E
%3Cscript%3Ealert(1)%3C%2Fscript%3E
OK, that’s enough, I’m leaving!
Input vulns: HTTP header
injection
 for each response header where user data appears
 try inserting carriage-return and line-feed symbols
 the actual symbols! “0d” and “0a” in hex
 if they are returned in server response header
unmodified
 ALARM! malicious server headers can be forged or HTTP
split!
 Example evil URL:
http://url.com/page.jsp?contentType=text/html%0d%0aE
vilHeader%3A%20blabla
 Example vulnerable server response:
HTTP/1.1 200 OK
Content-Type: text/html
EvilHeader: blabla
Input vulns: XML injections -
XXE
 XML External Entities
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
<!ELEMENT foo ANY >
<!ENTITY xxe SYSTEM "file:///etc/shadow" > ] >
<username>&xxe;</username><password>…………
…
 if no error or file is retruned by server – ALARM!
 if gives an error, but it disappears after you
remove embedded entity and leave only
declaration, ALARM!
Input vulnerabilities
Input vulns: Open redirection
 if the URL data specifies a redirection target
 try modifying or adding the redirection domain, e.g.
in
 http://url.com/qcbin/authentication-point/web-ui-
login.jsp?redirect-url=%2Fui%2F
 after that, trigger an event that causes redirection,
e.g. login
 if it redirects to a different domain, ALARM!
Denial of Service
Denial of Service
 check if server correctly handles unexpected
data
 zero-bytes in input
 XML “billion laughs” attack or XXE of a huge file
(/dev/random or c:pagefile)
 unpacking large low entropy data
 regex, globbing and other text processing
functionality
 asynchronous/heavy functionality invocation
 API request flooding
 slow HTTP - thread/socket exhaustion
XML Billion laughs attack - DoS
 Recursive “billion laughs” attack
<?xml version="1.0"?>
<!DOCTYPE lolz [
<!ENTITY lol "lol">
<!ELEMENT lolz (#PCDATA)>
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
<!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;">
<!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;">
<!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;">
<!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;">
<!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;">
<!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;">
]>
<username>&lol9;</username><password>……………
Questions and Discussion
Email: vladimir.garbuz@owasp.org
Skype: vigarbuz

More Related Content

PPTX
Selenium web driver
PPT
Hacking web applications
PPTX
Selenium ide made easy
PPTX
Secure Code Warrior - Local file inclusion
PPT
ASP.NET 05 - Exception Handling And Validation Controls
PDF
PPTX
Automation Testing by Selenium Web Driver
DOC
Attackers Vs Programmers
Selenium web driver
Hacking web applications
Selenium ide made easy
Secure Code Warrior - Local file inclusion
ASP.NET 05 - Exception Handling And Validation Controls
Automation Testing by Selenium Web Driver
Attackers Vs Programmers

What's hot (20)

PDF
Pentesting RESTful webservices
PDF
Session9-File Upload Security
PPTX
Selenium ide1
PDF
Sql Injection and XSS
PPTX
Top security threats to Flash/Flex applications and how to avoid them
PDF
Selenium IDE LOCATORS
PPTX
Secure Code Warrior - Os command injection
PPT
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
PPTX
Asp.net web api
PDF
Building custom APIs
PPTX
Selenium IDE and Extensions
PPT
Online Bank Hack
PDF
User hook implemantation sample example
PDF
Selenium WebDriver: Tips and Tricks
PDF
Designing keyword and Data Driven Automation framework with Selenium
PDF
API Check Overview - Rigor Monitoring
PDF
Selenium Ide Tutorial
PPT
Selenium
PPT
Selenium
Pentesting RESTful webservices
Session9-File Upload Security
Selenium ide1
Sql Injection and XSS
Top security threats to Flash/Flex applications and how to avoid them
Selenium IDE LOCATORS
Secure Code Warrior - Os command injection
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Asp.net web api
Building custom APIs
Selenium IDE and Extensions
Online Bank Hack
User hook implemantation sample example
Selenium WebDriver: Tips and Tricks
Designing keyword and Data Driven Automation framework with Selenium
API Check Overview - Rigor Monitoring
Selenium Ide Tutorial
Selenium
Selenium
Ad

Similar to QA Lab: тестирование ПО. Владимир Гарбуз: "Application Security 101" (20)

PDF
Application security 101
PPTX
Web application attacks
PPT
PPT
Joomla security nuggets
PPS
Manindra kishore _incident_handling_n_log_analysis - ClubHack2009
PPTX
04. xss and encoding
ODP
Web Security
PDF
4 andrii kudiurov - web application security 101
PPTX
Sql Injection and Entity Frameworks
PPTX
Best practices of web app security (samvel gevorgyan)
PDF
2013 OWASP Top 10
PPTX
Secure Coding
PDF
Top 10 Security Vulnerabilities (2006)
PDF
Attques web
PPTX
Hack ASP.NET website
PPTX
Secure coding | XSS Attacks on current Web Applications
PPTX
C#Web Sec Oct27 2010 Final
PPTX
TO Hack an ASP .NET website?
PPTX
Ethical hacking Chapter 10 - Exploiting Web Servers - Eric Vanderburg
PPT
Securing Java EE Web Apps
Application security 101
Web application attacks
Joomla security nuggets
Manindra kishore _incident_handling_n_log_analysis - ClubHack2009
04. xss and encoding
Web Security
4 andrii kudiurov - web application security 101
Sql Injection and Entity Frameworks
Best practices of web app security (samvel gevorgyan)
2013 OWASP Top 10
Secure Coding
Top 10 Security Vulnerabilities (2006)
Attques web
Hack ASP.NET website
Secure coding | XSS Attacks on current Web Applications
C#Web Sec Oct27 2010 Final
TO Hack an ASP .NET website?
Ethical hacking Chapter 10 - Exploiting Web Servers - Eric Vanderburg
Securing Java EE Web Apps
Ad

More from GeeksLab Odessa (20)

PDF
DataScience Lab2017_Коррекция геометрических искажений оптических спутниковых...
PDF
DataScience Lab 2017_Kappa Architecture: How to implement a real-time streami...
PDF
DataScience Lab 2017_Блиц-доклад_Турский Виктор
PDF
DataScience Lab 2017_Обзор методов детекции лиц на изображение
PDF
DataScienceLab2017_Сходство пациентов: вычистка дубликатов и предсказание про...
PDF
DataScienceLab2017_Блиц-доклад
PDF
DataScienceLab2017_Блиц-доклад
PDF
DataScienceLab2017_Блиц-доклад
PDF
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
PDF
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
PDF
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
PDF
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
PDF
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
PDF
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
PDF
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
PDF
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
PDF
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
PDF
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
PDF
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
PPTX
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js
DataScience Lab2017_Коррекция геометрических искажений оптических спутниковых...
DataScience Lab 2017_Kappa Architecture: How to implement a real-time streami...
DataScience Lab 2017_Блиц-доклад_Турский Виктор
DataScience Lab 2017_Обзор методов детекции лиц на изображение
DataScienceLab2017_Сходство пациентов: вычистка дубликатов и предсказание про...
DataScienceLab2017_Блиц-доклад
DataScienceLab2017_Блиц-доклад
DataScienceLab2017_Блиц-доклад
DataScienceLab2017_Cервинг моделей, построенных на больших данных с помощью A...
DataScienceLab2017_BioVec: Word2Vec в задачах анализа геномных данных и биоин...
DataScienceLab2017_Data Sciences и Big Data в Телекоме_Александр Саенко
DataScienceLab2017_Высокопроизводительные вычислительные возможности для сист...
DataScience Lab 2017_Мониторинг модных трендов с помощью глубокого обучения и...
DataScience Lab 2017_Кто здесь? Автоматическая разметка спикеров на телефонны...
DataScience Lab 2017_From bag of texts to bag of clusters_Терпиль Евгений / П...
DataScience Lab 2017_Графические вероятностные модели для принятия решений в ...
DataScienceLab2017_Оптимизация гиперпараметров машинного обучения при помощи ...
DataScienceLab2017_Как знать всё о покупателях (или почти всё)?_Дарина Перемот
JS Lab 2017_Mapbox GL: как работают современные интерактивные карты_Владимир ...
JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js

Recently uploaded (20)

PPTX
Digital Literacy And Online Safety on internet
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPT
tcp ip networks nd ip layering assotred slides
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
E -tech empowerment technologies PowerPoint
PDF
Introduction to the IoT system, how the IoT system works
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
Introduction to Information and Communication Technology
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
Digital Literacy And Online Safety on internet
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Module 1 - Cyber Law and Ethics 101.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Decoding a Decade: 10 Years of Applied CTI Discipline
tcp ip networks nd ip layering assotred slides
international classification of diseases ICD-10 review PPT.pptx
E -tech empowerment technologies PowerPoint
Introduction to the IoT system, how the IoT system works
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
522797556-Unit-2-Temperature-measurement-1-1.pptx
The New Creative Director: How AI Tools for Social Media Content Creation Are...
RPKI Status Update, presented by Makito Lay at IDNOG 10
Paper PDF World Game (s) Great Redesign.pdf
WebRTC in SignalWire - troubleshooting media negotiation
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Cloud-Scale Log Monitoring _ Datadog.pdf
Introduction to Information and Communication Technology
introduction about ICD -10 & ICD-11 ppt.pptx

QA Lab: тестирование ПО. Владимир Гарбуз: "Application Security 101"

  • 1. APPSEC 101 BREAK STUFF LIKE A PRO! WELL, ALSMOST…  Vladimir Garbuz
  • 2. Contents  AppSec testing tools  Testing stages  Mapping application’s content  Input-based vulnerabilities  Denial of Service  Client-side controls
  • 3. AppSec testing tools  the Swiss Army Knife of AppSec – Fiddler  not just a proxy  inspect HTTP and HTTPS! (best served in RAW)  modify and replay  intercept mid-air  setup reverse proxy mode  get request stats  set filters  do text encoding  scripting in C#
  • 4. AppSec testing tools  WireShark – when Fiddler doesn’t cut it  only passive traffic monitoring  sees everything!  your browser’s developer console  socket programming in any language, e.g. Python   hacker’s mindset
  • 5. Mapping application’s content  read the feature specs  monitor HTTP traffic for all user data entry points  look at interface differences for different user roles  record a request such controls send for users who can use them and replay them with user sessions that can’t  discover hidden content  ViewDocument.jsp  Delete, Upload, Edit, Create, etc.  lookout for direct server file access (filename
  • 7. Input vulnerabilities: basic checks  check if server correctly handles unexpected data  negative indexes and values  overly large integers  zero-bytes  look for differences in processing of directly submitted values AND when parsed from a user uploaded or controlled file  relates to ALL input-based vulnerabilities!
  • 8. Input vulnerabilities: SQL injections  use DB server management software and profiler  submit ‘ or “ in request, not only “Edit” operations!  SQLi can be anywhere where DB is accessed based on user data, in any way!  monitor for server errors AND the DB log/profiler!  broken SQL query in DB log, error, etc?.. REPORT!
  • 9. Input vulnerabilities: XSS injections  general principle – lack of input encoding  user submitted data is unmodified in HTML page  from Google XSS guide: "A good test string is  >'>"><img src=x onerror=alert(0)  generally, raise an ALARM for any of the following 5:  < > & " ‘  within HTML actions and JavaScript code, additionally  n r ’ ” uXXXX  sometimes escaping won’t help
  • 10. Input vulnerabilities: XSS injections  reflected XSS  when a part of URL is reflected back in HTML page  DON’T forget to URL encode special characters! e.g.:  http://url.com/1.jsp?param=%3E%3Cscript%3Ealert (1)%3C%2Fscript%3E  stored XSS  a malicious string is added to the server once and displayed as a part of a page to everyone viewing it  from POST body, HTTP header, uploaded file, HTML based server log, etc… MANY vectors!
  • 11. Input vulnerabilities: XSS injections  DOM XSS  caused by unsafe JS during runtime inside the browser  same principles apply (at this low level)  monitor for special chars appearing in resulting HTML!  example: http://url.com/page.jsp?param=value#section1%3E %3Cscript%3Ealert(1)%3C%2Fscript%3E
  • 12. OK, that’s enough, I’m leaving!
  • 13. Input vulns: HTTP header injection  for each response header where user data appears  try inserting carriage-return and line-feed symbols  the actual symbols! “0d” and “0a” in hex  if they are returned in server response header unmodified  ALARM! malicious server headers can be forged or HTTP split!  Example evil URL: http://url.com/page.jsp?contentType=text/html%0d%0aE vilHeader%3A%20blabla  Example vulnerable server response: HTTP/1.1 200 OK Content-Type: text/html EvilHeader: blabla
  • 14. Input vulns: XML injections - XXE  XML External Entities <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "file:///etc/shadow" > ] > <username>&xxe;</username><password>………… …  if no error or file is retruned by server – ALARM!  if gives an error, but it disappears after you remove embedded entity and leave only declaration, ALARM!
  • 16. Input vulns: Open redirection  if the URL data specifies a redirection target  try modifying or adding the redirection domain, e.g. in  http://url.com/qcbin/authentication-point/web-ui- login.jsp?redirect-url=%2Fui%2F  after that, trigger an event that causes redirection, e.g. login  if it redirects to a different domain, ALARM!
  • 18. Denial of Service  check if server correctly handles unexpected data  zero-bytes in input  XML “billion laughs” attack or XXE of a huge file (/dev/random or c:pagefile)  unpacking large low entropy data  regex, globbing and other text processing functionality  asynchronous/heavy functionality invocation  API request flooding  slow HTTP - thread/socket exhaustion
  • 19. XML Billion laughs attack - DoS  Recursive “billion laughs” attack <?xml version="1.0"?> <!DOCTYPE lolz [ <!ENTITY lol "lol"> <!ELEMENT lolz (#PCDATA)> <!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;"> <!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;"> <!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;"> <!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;"> <!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;"> <!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;"> <!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;"> <!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;"> <!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;"> ]> <username>&lol9;</username><password>……………
  • 20. Questions and Discussion Email: vladimir.garbuz@owasp.org Skype: vigarbuz