SlideShare a Scribd company logo
Vulnerabilities in Web – difficulties (masterclass)
Greetings
Questions to discuss HTTP Verb Tampering Fragmented SQL Injections HTTP Parameter Pollution Reversed encryption
HTTP Verb Tampering HTTP Verb Tampering is an error in access control for HTTP methods. Administration error Particular case  –  vendor’s error
HTTP Verb Tampering What’s the method ?
HTTP Verb Tampering Why ?
HTTP Verb Tampering Exploitation Real-live example  ( Jboss Auth Bypass )
HTTP Verb Tampering Exploitation Practical task   http://stat.local/ .htaccess file  Result of GET request Result of HACK request
Fragmented SQL Injections SQL injection is an vulnerability caused by incorrect input data application processing .  User data transferred via web applications are changed to modify SQL request used for exploitation . Insufficient data filtering
Fragmented SQL Injections What’s the method ? Do not forget correct filtering ! Structure of a valid request  ( MySQL database ) INSERT INTO table1 (c1,c2) VALUES  (‘value1’ , ’value2’ ); Here is a valid request with injected SQL commands INSERT INTO table1 (c1,c2) VALUES  (‘a\’ , ’ ,  user() ); -- 1’);
Fragmented SQL Injections Why ? If there is no filtering for back slash  ( “\” ) , an attacker can screen the next symbol by a single or double quote in database request ,  that do not allow to interpret it   as a line termination symbol . The following is required for vulnerability exploitation : the request should include more than one string variable . Remember: it’s necessary to filter not only user data,  but also data received from databases .
Fragmented SQL Injections Exploitation Real-life example  ( Coppermine Photo Gallery <= 1.4.19 ) GET,POST,REQUEST – “\” symbol is not filtered . You can specify “\” in email parameter. Exploitation is possible via a child request to database when you try to access system features after authorization .
Fragmented SQL Injections Exploitation Practical task http://tracker.local/index.php « Bug tracking system for source code ».
Fragmented SQL Injections Exploitation Practical task http://tracker.local/add.php Vulnerable code  ( add.php file ) : if (isset($_POST['code']) && isset($_POST['fix'])) { $code=htmlspecialchars($_POST['code']); $fix=htmlspecialchars($_POST['fix']); … . mysql_query(&quot;INSERT INTO track (bug,fix) VALUES ('&quot;.$code.&quot;','&quot;.$fix.&quot;')&quot;); } Database request  looks as follows : INSERT INTO track (bug,fix) VALUES (‘ value1 ’,’ value2 ’);
Fragmented SQL Injections Exploitation Practical task http://tracker.local/add.php Vulnerable code  ( add.php file ) : if (isset($_POST['code']) && isset($_POST['fix'])) { $code=htmlspecialchars($_POST['code']); $fix=htmlspecialchars($_POST['fix']); … . mysql_query(&quot;INSERT INTO track (bug,fix) VALUES ('&quot;.$code.&quot;','&quot;.$fix.&quot;')&quot;); } Database request  looks as follows : INSERT INTO track (bug,fix) VALUES (‘ value1 \ ’,  ’,  user() ) – 1’);
Fragmented SQL Injections Exploitation Practical task http://tracker.local/view.php Vulnerable code  ( add.php file ) : if (isset($_POST['code']) && isset($_POST['fix'])) { $code=htmlspecialchars($_POST['code']); $fix=htmlspecialchars($_POST['fix']); … . mysql_query(&quot;INSERT INTO track (bug,fix) VALUES ('&quot;.$code.&quot;','&quot;.$fix.&quot;')&quot;); } As a result, fix column in track table contents a value that is user() function result.
HTTP Parameter Pollution HTTP Parameter Pollution is a vulnerability caused by a situation that different platforms  ( web server and web application language )  process sequence of HTTP request parameters with the same names differently .
HTTP Parameter Pollution Technology/Environment Interpretation of parameters Example ASP.NET/IIS Binding via comma par1=val1,val2 ASP/IIS Binding via comma par1=val1,val2 PHP/APACHE Последний параметр результирующий par1=val2 PHP/Zeus Last parameter includes result par1=val2 JSP, Servlet/Apache Tomcat First parameter includes result par1=val1 JSP,Servlet/Oracle Application Server 10g First parameter includes result par1=val1 JSP,Servlet/Jetty First parameter includes result par1=val1 IBM Lotus Domino Первый параметр результирующий par1=val1 IBM HTTP Server Last parameter includes result par1=val2 mod_perl,libapeq2/Apache First parameter includes result par1=val1 Perl CGI/Apache First parameter includes result par1=val1 mod_perl/Apache First parameter includes result par1=val1 mod_wsgi (Python)/Apache Returns an array ARRAY(0x8b9058c) Pythin/Zope First parameter includes result par1=val1 IceWarp Returns an array ['val1','val2'] AXIS 2400 Last parameter includes result par1=val2 Linksys Wireless-G PTZ Internet Camera Binding via comma par1=val1,val2 Ricoh Aficio 1022 Printer  Last parameter includes result par1=val2 webcamXP Pro First parameter includes result par1=val1 DBMan Binding via 2 tildes par1=val1~~val2
HTTP Parameter Pollution According to PHP web application language . An interesting variable variables_order   in php.ini configuration file ( establishes variable processing ) . Why is it interesting ? GET /? id=1 Cookie:  id=2 В итоге: $_GET[‘id’]= 1 $_REQUEST[‘id’]= 2 The frequent error in request processing: $_GET is checked ,  but the value is assigned to from $_REQUEST.
HTTP Parameter Pollution Exploitation Real-life example  ( www.blogger.com  blog service ) Vulnerability as a part of  « Rewarding web application security research »  program Error in input setting processing  –  the first suitable value is checked but result includes the last one .  Supposedly, vulnerability is in QUERY_STRING check and then in variable declaration made via array data received in the request .
HTTP Parameter Pollution Exploitation Practical task http://blogger.local/index.php
HTTP Parameter Pollution Exploitation Practical task http://blogger.local/register.php
HTTP Parameter Pollution Exploitation Practical task http://blogger.local/invite.php
HTTP Parameter Pollution Exploitation Practical task http://blogger.local/invite.php
HTTP Parameter Pollution Exploitation Practical task http://blogger.local/invite.php gpc_order (php.ini) – “GPC”
HTTP Parameter Pollution Exploitation Practical task http://blogger.local/add.php
Reversible Encryption Reversible encryption in web applications is possibly insecure as it can be used by attackers in : Exploitation of SQL Injection vulnerability ; Information disclosure  ( database dump ); Arbitrary file reading ; and so on .
Reversible Encryption Exploitation Practical task http://portal.local
Reversible Encryption Exploitation Practical task http://portal.local
Reversible Encryption Exploitation Practical task http://portal.local
Reversible Encryption Exploitation Practical task http://portal.local/news.php
Reversible Encryption Exploitation Practical task http://portal.local/news.php
Reversible Encryption Exploitation Practical task http://portal.local/news.php
Reversible Encryption Exploitation Practical task http://portal.local/
Reversible Encryption Exploitation Practical task http://portal.local/ http://portal.local/xor_tool/
Reversible Encryption Exploitation Practical task http://portal.local/ FAILED.
Reversible Encryption Exploitation Practical task http://portal.local/ “ test” user with “ 123456789 1 0 qwerty” password 2.  test : UFBQR1FQRk9cQ0QIFgcRBx0=
Reversible Encryption Exploitation Practical task http://portal.local/ http://portal.local/xor_tool/
Instead of conclusions What’s next? Try to do practical tasks Take part in competitions
Thank you for your attention ! Questions? [email_address]

More Related Content

PPTX
QA Lab: тестирование ПО. Владимир Гарбуз: "Application Security 101"
PDF
HTTP Parameter Pollution (HPP) - SEaCURE.it edition
PDF
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
PPT
Red5 - PHUG Workshops
PPTX
PDF
Http Parameter Pollution, a new category of web attacks
PDF
Python tools for testing web services over HTTP
PDF
Brief introduction into SQL injection attack scenarios
QA Lab: тестирование ПО. Владимир Гарбуз: "Application Security 101"
HTTP Parameter Pollution (HPP) - SEaCURE.it edition
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
Red5 - PHUG Workshops
Http Parameter Pollution, a new category of web attacks
Python tools for testing web services over HTTP
Brief introduction into SQL injection attack scenarios

What's hot (20)

PPT
Securing Your Web Server
PDF
Input validation slides of web application workshop
PPTX
Spring Boot and REST API
ODP
REST API Laravel
PPT
A RESTful Interface for Erlang Code using Webmachine
PPTX
Build restful ap is with python and flask
PPT
Defending against Injections
PPT
Data Access with JDBC
PPTX
ASP.NET Routing & MVC
PPTX
Laravel 5
PPTX
REST APIs in Laravel 101
PDF
Making Sense of APEX Security by Christoph Ruepprich
PPTX
Sql Injection attacks and prevention
PDF
C sharp and asp.net interview questions
PDF
REST API Basics
PDF
Using OTP and gen_server Effectively
PPTX
SPFx Webinar Loading SharePoint data in a SPFx Webpart
KEY
CakePHP REST Plugin
PPTX
Designing CakePHP plugins for consuming APIs
PDF
Brief introduction into Padding Oracle attack vector
Securing Your Web Server
Input validation slides of web application workshop
Spring Boot and REST API
REST API Laravel
A RESTful Interface for Erlang Code using Webmachine
Build restful ap is with python and flask
Defending against Injections
Data Access with JDBC
ASP.NET Routing & MVC
Laravel 5
REST APIs in Laravel 101
Making Sense of APEX Security by Christoph Ruepprich
Sql Injection attacks and prevention
C sharp and asp.net interview questions
REST API Basics
Using OTP and gen_server Effectively
SPFx Webinar Loading SharePoint data in a SPFx Webpart
CakePHP REST Plugin
Designing CakePHP plugins for consuming APIs
Brief introduction into Padding Oracle attack vector

Similar to Positive Hack Days. Goltsev. Web Vulnerabilities: Difficult Cases (20)

PDF
Web注入+http漏洞等描述
PDF
Attques web
PDF
Intro to Php Security
PPT
Php Security By Mugdha And Anish
PPTX
Interpolique
PPTX
Interpolique
PDF
DEFCON 23 - Lance buttars Nemus - sql injection on lamp
PPTX
Secure programming with php
PDF
Php Security
PDF
My app is secure... I think
PDF
Ch 10: Attacking Back-End Components
PDF
Ch 13: Attacking Other Users: Other Techniques (Part 1)
PPTX
Owasp Top 10 A1: Injection
PPTX
07 application security fundamentals - part 2 - security mechanisms - data ...
PPTX
Real-World WebAppSec Flaws - Examples and Countermeasues
PPTX
Application and Website Security -- Fundamental Edition
PDF
20111204 web security_livshits_lecture01
PPT
PHPUG Presentation
PDF
CNIT 129S: 10: Attacking Back-End Components
PDF
Sql Injection Myths and Fallacies
Web注入+http漏洞等描述
Attques web
Intro to Php Security
Php Security By Mugdha And Anish
Interpolique
Interpolique
DEFCON 23 - Lance buttars Nemus - sql injection on lamp
Secure programming with php
Php Security
My app is secure... I think
Ch 10: Attacking Back-End Components
Ch 13: Attacking Other Users: Other Techniques (Part 1)
Owasp Top 10 A1: Injection
07 application security fundamentals - part 2 - security mechanisms - data ...
Real-World WebAppSec Flaws - Examples and Countermeasues
Application and Website Security -- Fundamental Edition
20111204 web security_livshits_lecture01
PHPUG Presentation
CNIT 129S: 10: Attacking Back-End Components
Sql Injection Myths and Fallacies

More from Positive Hack Days (20)

PPTX
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
PPTX
Как мы собираем проекты в выделенном окружении в Windows Docker
PPTX
Типовая сборка и деплой продуктов в Positive Technologies
PPTX
Аналитика в проектах: TFS + Qlik
PPTX
Использование анализатора кода SonarQube
PPTX
Развитие сообщества Open DevOps Community
PPTX
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
PPTX
Автоматизация построения правил для Approof
PDF
Мастер-класс «Трущобы Application Security»
PDF
Формальные методы защиты приложений
PDF
Эвристические методы защиты приложений
PDF
Теоретические основы Application Security
PPTX
От экспериментального программирования к промышленному: путь длиной в 10 лет
PDF
Уязвимое Android-приложение: N проверенных способов наступить на грабли
PPTX
Требования по безопасности в архитектуре ПО
PDF
Формальная верификация кода на языке Си
PPTX
Механизмы предотвращения атак в ASP.NET Core
PDF
SOC для КИИ: израильский опыт
PDF
Honeywell Industrial Cyber Security Lab & Services Center
PDF
Credential stuffing и брутфорс-атаки
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Как мы собираем проекты в выделенном окружении в Windows Docker
Типовая сборка и деплой продуктов в Positive Technologies
Аналитика в проектах: TFS + Qlik
Использование анализатора кода SonarQube
Развитие сообщества Open DevOps Community
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Автоматизация построения правил для Approof
Мастер-класс «Трущобы Application Security»
Формальные методы защиты приложений
Эвристические методы защиты приложений
Теоретические основы Application Security
От экспериментального программирования к промышленному: путь длиной в 10 лет
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Требования по безопасности в архитектуре ПО
Формальная верификация кода на языке Си
Механизмы предотвращения атак в ASP.NET Core
SOC для КИИ: израильский опыт
Honeywell Industrial Cyber Security Lab & Services Center
Credential stuffing и брутфорс-атаки

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf
sap open course for s4hana steps from ECC to s4
Chapter 3 Spatial Domain Image Processing.pdf
Big Data Technologies - Introduction.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity

Positive Hack Days. Goltsev. Web Vulnerabilities: Difficult Cases

  • 1. Vulnerabilities in Web – difficulties (masterclass)
  • 3. Questions to discuss HTTP Verb Tampering Fragmented SQL Injections HTTP Parameter Pollution Reversed encryption
  • 4. HTTP Verb Tampering HTTP Verb Tampering is an error in access control for HTTP methods. Administration error Particular case – vendor’s error
  • 5. HTTP Verb Tampering What’s the method ?
  • 7. HTTP Verb Tampering Exploitation Real-live example ( Jboss Auth Bypass )
  • 8. HTTP Verb Tampering Exploitation Practical task http://stat.local/ .htaccess file Result of GET request Result of HACK request
  • 9. Fragmented SQL Injections SQL injection is an vulnerability caused by incorrect input data application processing . User data transferred via web applications are changed to modify SQL request used for exploitation . Insufficient data filtering
  • 10. Fragmented SQL Injections What’s the method ? Do not forget correct filtering ! Structure of a valid request ( MySQL database ) INSERT INTO table1 (c1,c2) VALUES (‘value1’ , ’value2’ ); Here is a valid request with injected SQL commands INSERT INTO table1 (c1,c2) VALUES (‘a\’ , ’ , user() ); -- 1’);
  • 11. Fragmented SQL Injections Why ? If there is no filtering for back slash ( “\” ) , an attacker can screen the next symbol by a single or double quote in database request , that do not allow to interpret it as a line termination symbol . The following is required for vulnerability exploitation : the request should include more than one string variable . Remember: it’s necessary to filter not only user data, but also data received from databases .
  • 12. Fragmented SQL Injections Exploitation Real-life example ( Coppermine Photo Gallery <= 1.4.19 ) GET,POST,REQUEST – “\” symbol is not filtered . You can specify “\” in email parameter. Exploitation is possible via a child request to database when you try to access system features after authorization .
  • 13. Fragmented SQL Injections Exploitation Practical task http://tracker.local/index.php « Bug tracking system for source code ».
  • 14. Fragmented SQL Injections Exploitation Practical task http://tracker.local/add.php Vulnerable code ( add.php file ) : if (isset($_POST['code']) && isset($_POST['fix'])) { $code=htmlspecialchars($_POST['code']); $fix=htmlspecialchars($_POST['fix']); … . mysql_query(&quot;INSERT INTO track (bug,fix) VALUES ('&quot;.$code.&quot;','&quot;.$fix.&quot;')&quot;); } Database request looks as follows : INSERT INTO track (bug,fix) VALUES (‘ value1 ’,’ value2 ’);
  • 15. Fragmented SQL Injections Exploitation Practical task http://tracker.local/add.php Vulnerable code ( add.php file ) : if (isset($_POST['code']) && isset($_POST['fix'])) { $code=htmlspecialchars($_POST['code']); $fix=htmlspecialchars($_POST['fix']); … . mysql_query(&quot;INSERT INTO track (bug,fix) VALUES ('&quot;.$code.&quot;','&quot;.$fix.&quot;')&quot;); } Database request looks as follows : INSERT INTO track (bug,fix) VALUES (‘ value1 \ ’, ’, user() ) – 1’);
  • 16. Fragmented SQL Injections Exploitation Practical task http://tracker.local/view.php Vulnerable code ( add.php file ) : if (isset($_POST['code']) && isset($_POST['fix'])) { $code=htmlspecialchars($_POST['code']); $fix=htmlspecialchars($_POST['fix']); … . mysql_query(&quot;INSERT INTO track (bug,fix) VALUES ('&quot;.$code.&quot;','&quot;.$fix.&quot;')&quot;); } As a result, fix column in track table contents a value that is user() function result.
  • 17. HTTP Parameter Pollution HTTP Parameter Pollution is a vulnerability caused by a situation that different platforms ( web server and web application language ) process sequence of HTTP request parameters with the same names differently .
  • 18. HTTP Parameter Pollution Technology/Environment Interpretation of parameters Example ASP.NET/IIS Binding via comma par1=val1,val2 ASP/IIS Binding via comma par1=val1,val2 PHP/APACHE Последний параметр результирующий par1=val2 PHP/Zeus Last parameter includes result par1=val2 JSP, Servlet/Apache Tomcat First parameter includes result par1=val1 JSP,Servlet/Oracle Application Server 10g First parameter includes result par1=val1 JSP,Servlet/Jetty First parameter includes result par1=val1 IBM Lotus Domino Первый параметр результирующий par1=val1 IBM HTTP Server Last parameter includes result par1=val2 mod_perl,libapeq2/Apache First parameter includes result par1=val1 Perl CGI/Apache First parameter includes result par1=val1 mod_perl/Apache First parameter includes result par1=val1 mod_wsgi (Python)/Apache Returns an array ARRAY(0x8b9058c) Pythin/Zope First parameter includes result par1=val1 IceWarp Returns an array ['val1','val2'] AXIS 2400 Last parameter includes result par1=val2 Linksys Wireless-G PTZ Internet Camera Binding via comma par1=val1,val2 Ricoh Aficio 1022 Printer Last parameter includes result par1=val2 webcamXP Pro First parameter includes result par1=val1 DBMan Binding via 2 tildes par1=val1~~val2
  • 19. HTTP Parameter Pollution According to PHP web application language . An interesting variable variables_order in php.ini configuration file ( establishes variable processing ) . Why is it interesting ? GET /? id=1 Cookie: id=2 В итоге: $_GET[‘id’]= 1 $_REQUEST[‘id’]= 2 The frequent error in request processing: $_GET is checked , but the value is assigned to from $_REQUEST.
  • 20. HTTP Parameter Pollution Exploitation Real-life example ( www.blogger.com blog service ) Vulnerability as a part of « Rewarding web application security research » program Error in input setting processing – the first suitable value is checked but result includes the last one . Supposedly, vulnerability is in QUERY_STRING check and then in variable declaration made via array data received in the request .
  • 21. HTTP Parameter Pollution Exploitation Practical task http://blogger.local/index.php
  • 22. HTTP Parameter Pollution Exploitation Practical task http://blogger.local/register.php
  • 23. HTTP Parameter Pollution Exploitation Practical task http://blogger.local/invite.php
  • 24. HTTP Parameter Pollution Exploitation Practical task http://blogger.local/invite.php
  • 25. HTTP Parameter Pollution Exploitation Practical task http://blogger.local/invite.php gpc_order (php.ini) – “GPC”
  • 26. HTTP Parameter Pollution Exploitation Practical task http://blogger.local/add.php
  • 27. Reversible Encryption Reversible encryption in web applications is possibly insecure as it can be used by attackers in : Exploitation of SQL Injection vulnerability ; Information disclosure ( database dump ); Arbitrary file reading ; and so on .
  • 28. Reversible Encryption Exploitation Practical task http://portal.local
  • 29. Reversible Encryption Exploitation Practical task http://portal.local
  • 30. Reversible Encryption Exploitation Practical task http://portal.local
  • 31. Reversible Encryption Exploitation Practical task http://portal.local/news.php
  • 32. Reversible Encryption Exploitation Practical task http://portal.local/news.php
  • 33. Reversible Encryption Exploitation Practical task http://portal.local/news.php
  • 34. Reversible Encryption Exploitation Practical task http://portal.local/
  • 35. Reversible Encryption Exploitation Practical task http://portal.local/ http://portal.local/xor_tool/
  • 36. Reversible Encryption Exploitation Practical task http://portal.local/ FAILED.
  • 37. Reversible Encryption Exploitation Practical task http://portal.local/ “ test” user with “ 123456789 1 0 qwerty” password 2. test : UFBQR1FQRk9cQ0QIFgcRBx0=
  • 38. Reversible Encryption Exploitation Practical task http://portal.local/ http://portal.local/xor_tool/
  • 39. Instead of conclusions What’s next? Try to do practical tasks Take part in competitions
  • 40. Thank you for your attention ! Questions? [email_address]

Editor's Notes

  • #15: Картинку просить у автора
  • #26: Request header name Value