SlideShare una empresa de Scribd logo
1 de 18
Hackazon
Hackazon is a free, vulnerable test site that is an online storefront built with
the same technologies used in today’s rich client and mobile applications.
Hackazon has an AJAX interface, strict workflows and RESTful API’s used by a
companion mobile app providing uniquely-effective training and testing
ground for IT security professionals. And, it’s full of your favorite vulnerabilities
like SQL Injection, cross-site scripting and so on.
Links
• Internet: http://hackazon.webscantest.com
• Info:
• http://cybersecology.com/hackazon-review/
• https://github.com/rapid7/hackazon
• Installation: https://appspider.help.rapid7.com/docs/hackazon-installation-guide
• Testing:
• https://github.com/rapid7/hackazon/blob/master/VULNERABILITIES.md
• https://appspider.help.rapid7.com/docs/conducting-a-basic-test-manually-
against-hackazon
• https://blog.securityevaluators.com/hacking-hackazon-2bda9830ccf0
Tools
• BurpSuite
• OwaspZap
• Nexpose
Registration verification via email
Don’t Save passwords to browser
To prevent the browser from saving passwords (and usernames), you need to:
•copy username and password to hidden form fields before submitting the login form
•clear the visible username and password fields
•set autocomplete=off for good measure
This makes the browser attempt to save empty credentials, or not save at all.
A login form might look like this:
COPY
<form action='/login' class='login-form' autocomplete='off'>
Email: <input type='email' name='email-entry'> <input type='hidden' name='email'>
Password: <input type='password' name='password-entry'> <input type='hidden'
name='password'>
</form>
<script> $('.login-form').on('submit', function() {
$('[name="email"]').val($('[name="email-entry"]').val()); $('[name="email-entry"]').val('');
$('[name="password"]').val($('[name="password-entry"]').val()); $('[name="password-
entry"]').val(''); }); </script>
https://makandracards.com/makandra/34245-
how-to-disable-auto-complete-on-login-forms
Captcha on registration
Integrate Google reCAPTCHA in your website
To integrate it into your website you need to put it in the client side as well as
in Server side. In client HTML page you need to integrate this line before the
tag.
<script src="https://www.google.com/recaptcha/api.js?render=put your
site key here"></script>
Google reCAPTCHA v3 is invisible. You won’t see a captcha form of any sort
on your web page. You need to capture the google captcha response in your
JavaScript code. Here is a small snippet.
<script src="https://www.google.com/recaptcha/api.js?render=put your site
key here"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('put your site key
here', {action:'homepage'}).then(function(token) {
// pass the token to the backend script for verification
});
});
</script>
https://codeforgeek.com/google-recaptcha-v3-tutorial/
Session Fixation
Update session after:
• Registration
• Authorization
• Password change
• Logout
User Enumeration
Prevent any information
about user existence
Password guessing
Use Burp Intruder to guess password for previously enumerated users
SQL Injections
$name = $_POST['name']; // $_POST['name'] == "a'='a' OR 1=1 #"
$query = "SELECT name, password FROM user WHERE name='" .
$name . "' AND role = 'user'";
Blind injection identified by Sleep command
Prevention:
• Prepared Statements (with Parameterized Queries)
• Use of Stored Procedures
• Whitelist Input Validation
• Escaping All User Supplied Input
• Enforcing Least Privilege
• Performing Whitelist Input Validation
https://github.com/OWASP/CheatSheetSeries/blob/master/
cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.md
Unsafe:
String query = "SELECT account_balance FROM us
er_data WHERE user_name = "
+ request.getParameter("customerName"); try {
Statement statement = connection.createStatement(
... );
ResultSet results = statement.executeQuery( query )
; }
Remote File Include
RFI Injection allows to use an app
logic where the app includes some file
based on user input. In our app it's
implemented in the Help Articles
section:
http://hackazon.webscantest.com/accoun
t/help_articles?page=/etc/passwd%00
XSS
Implement test cases based on https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
File Input (XXE, XSS Persistent)
http://hackazon.webscantest.com/user_pictures/e8/PersistFileXSS.html
<html>
<script>
alert(document.cookie);
</script>
</html>
Potential XXE
https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [
<!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "file:///etc/passwd"
>]><foo>&xxe;</foo>
CSRF
•Write wrappers (that would auto add tokens when used) around default form
tags/ajax calls and educate your developers to use those wrappers instead of
standard tags. Though this approach is better than depending purely on
developers to add tokens, it still is vulnerable to the issue of human tendency to
forget things. Spring Security uses this technique to add CSRF tokens by default
when a custom <form:form> tag is used, you can opt to use after verifying that its
enabled and properly configured in the Spring Security version you are using.
•Write a hook (that would capture the traffic and add tokens to CSRF vulnerable
resources before rendering to customers) in your organizational web rendering
frameworks. Because it is hard to analyze when a particular response is doing
any state change (and thus needing a token), you might want to include tokens
in all CSRF vulnerable resources (ex: include tokens in all POST responses).
This is one recommended approach, but you need to consider the performance
costs it might incur.
•Get the tokens automatically added on the client side when the page is being
rendered in user’s browser, with help of a client side script (this approach is
used by CSRF Guard). You need to consider any possible JavaScript hijacking
attacks.
https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Cross-
Site_Request_Forgery_Prevention_Cheat_Sheet.md
Open Redirect
• Link to authorization:
hackazon.webscantest.com/user/login?return_url=https://hack.me
IDOR
“id”, “user_id”, “value”, “pid”, “post_id”
https://www.bugcrowd.com/blog/how-
to-find-idor-insecure-direct-object-
reference-vulnerabilities-for-large-bounty-
rewards/
INSECURE
DIRECT
OBJECT
REFERENCE
101 Web Hacking
https://darkweblinks.org/files/hacking/scribd-
download.com_web-hacking-101.pdf

Más contenido relacionado

La actualidad más candente

Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
Zhentian Wan
 

La actualidad más candente (20)

Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Implementing security requirements for banking API system using Open Source ...
 Implementing security requirements for banking API system using Open Source ... Implementing security requirements for banking API system using Open Source ...
Implementing security requirements for banking API system using Open Source ...
 
How to Convert a Component Design into an MUI React Code
How to Convert a Component Design into an MUI React CodeHow to Convert a Component Design into an MUI React Code
How to Convert a Component Design into an MUI React Code
 
Wireshark
WiresharkWireshark
Wireshark
 
Web application framework
Web application frameworkWeb application framework
Web application framework
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
Web portal final report
Web portal final reportWeb portal final report
Web portal final report
 
Web Content Accessibility Guidelines
Web Content Accessibility GuidelinesWeb Content Accessibility Guidelines
Web Content Accessibility Guidelines
 
Information architecture unit i
Information architecture unit iInformation architecture unit i
Information architecture unit i
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?
 
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATIONE-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
SEO Robots txt FILE
SEO Robots txt FILESEO Robots txt FILE
SEO Robots txt FILE
 
API Security in a Microservice Architecture
API Security in a Microservice ArchitectureAPI Security in a Microservice Architecture
API Security in a Microservice Architecture
 
SRS of software project lab 1
SRS of software project lab 1SRS of software project lab 1
SRS of software project lab 1
 
Secure by Design - Security Design Principles for the Rest of Us
Secure by Design - Security Design Principles for the Rest of UsSecure by Design - Security Design Principles for the Rest of Us
Secure by Design - Security Design Principles for the Rest of Us
 
Application development and emerging technologies.pptx
Application development and emerging technologies.pptxApplication development and emerging technologies.pptx
Application development and emerging technologies.pptx
 
ADA Compliance & Website Accessibility
ADA Compliance & Website AccessibilityADA Compliance & Website Accessibility
ADA Compliance & Website Accessibility
 

Similar a Hackazon realistic e-commerce Hack platform

Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
gbud7
 
XAJA - Reverse AJAX framework
XAJA - Reverse AJAX frameworkXAJA - Reverse AJAX framework
XAJA - Reverse AJAX framework
Sri Prasanna
 

Similar a Hackazon realistic e-commerce Hack platform (20)

Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 
JavaScript - Chapter 3 - Introduction
 JavaScript - Chapter 3 - Introduction JavaScript - Chapter 3 - Introduction
JavaScript - Chapter 3 - Introduction
 
Panmind at Ruby Social Club Milano
Panmind at Ruby Social Club MilanoPanmind at Ruby Social Club Milano
Panmind at Ruby Social Club Milano
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
 
How to Use Stormpath in angular js
How to Use Stormpath in angular jsHow to Use Stormpath in angular js
How to Use Stormpath in angular js
 
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
RightScale API: How To Build Your Own IT Vending Machine - RightScale Compute...
 
XAJA - Reverse AJAX framework
XAJA - Reverse AJAX frameworkXAJA - Reverse AJAX framework
XAJA - Reverse AJAX framework
 
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
(WEB301) Operational Web Log Analysis | AWS re:Invent 2014
 
Hacker, you shall not pass!
Hacker, you shall not pass!Hacker, you shall not pass!
Hacker, you shall not pass!
 
Input validation slides of web application workshop
Input validation slides of web application workshopInput validation slides of web application workshop
Input validation slides of web application workshop
 
WebAppSec Updates from W3C
WebAppSec Updates from W3CWebAppSec Updates from W3C
WebAppSec Updates from W3C
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realities
 
Ajax
AjaxAjax
Ajax
 
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
AppSec Tel Aviv - OWASP Top 10 For JavaScript Developers
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptx
 
Node.js and Parse
Node.js and ParseNode.js and Parse
Node.js and Parse
 
Testing Ajax Web Applications
Testing Ajax Web ApplicationsTesting Ajax Web Applications
Testing Ajax Web Applications
 

Último

%+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
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+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...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
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...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%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
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

Hackazon realistic e-commerce Hack platform

  • 1.
  • 2. Hackazon Hackazon is a free, vulnerable test site that is an online storefront built with the same technologies used in today’s rich client and mobile applications. Hackazon has an AJAX interface, strict workflows and RESTful API’s used by a companion mobile app providing uniquely-effective training and testing ground for IT security professionals. And, it’s full of your favorite vulnerabilities like SQL Injection, cross-site scripting and so on.
  • 3. Links • Internet: http://hackazon.webscantest.com • Info: • http://cybersecology.com/hackazon-review/ • https://github.com/rapid7/hackazon • Installation: https://appspider.help.rapid7.com/docs/hackazon-installation-guide • Testing: • https://github.com/rapid7/hackazon/blob/master/VULNERABILITIES.md • https://appspider.help.rapid7.com/docs/conducting-a-basic-test-manually- against-hackazon • https://blog.securityevaluators.com/hacking-hackazon-2bda9830ccf0
  • 6. Don’t Save passwords to browser To prevent the browser from saving passwords (and usernames), you need to: •copy username and password to hidden form fields before submitting the login form •clear the visible username and password fields •set autocomplete=off for good measure This makes the browser attempt to save empty credentials, or not save at all. A login form might look like this: COPY <form action='/login' class='login-form' autocomplete='off'> Email: <input type='email' name='email-entry'> <input type='hidden' name='email'> Password: <input type='password' name='password-entry'> <input type='hidden' name='password'> </form> <script> $('.login-form').on('submit', function() { $('[name="email"]').val($('[name="email-entry"]').val()); $('[name="email-entry"]').val(''); $('[name="password"]').val($('[name="password-entry"]').val()); $('[name="password- entry"]').val(''); }); </script> https://makandracards.com/makandra/34245- how-to-disable-auto-complete-on-login-forms
  • 7. Captcha on registration Integrate Google reCAPTCHA in your website To integrate it into your website you need to put it in the client side as well as in Server side. In client HTML page you need to integrate this line before the tag. <script src="https://www.google.com/recaptcha/api.js?render=put your site key here"></script> Google reCAPTCHA v3 is invisible. You won’t see a captcha form of any sort on your web page. You need to capture the google captcha response in your JavaScript code. Here is a small snippet. <script src="https://www.google.com/recaptcha/api.js?render=put your site key here"></script> <script> grecaptcha.ready(function() { grecaptcha.execute('put your site key here', {action:'homepage'}).then(function(token) { // pass the token to the backend script for verification }); }); </script> https://codeforgeek.com/google-recaptcha-v3-tutorial/
  • 8. Session Fixation Update session after: • Registration • Authorization • Password change • Logout
  • 9. User Enumeration Prevent any information about user existence
  • 10. Password guessing Use Burp Intruder to guess password for previously enumerated users
  • 11. SQL Injections $name = $_POST['name']; // $_POST['name'] == "a'='a' OR 1=1 #" $query = "SELECT name, password FROM user WHERE name='" . $name . "' AND role = 'user'"; Blind injection identified by Sleep command Prevention: • Prepared Statements (with Parameterized Queries) • Use of Stored Procedures • Whitelist Input Validation • Escaping All User Supplied Input • Enforcing Least Privilege • Performing Whitelist Input Validation https://github.com/OWASP/CheatSheetSeries/blob/master/ cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.md Unsafe: String query = "SELECT account_balance FROM us er_data WHERE user_name = " + request.getParameter("customerName"); try { Statement statement = connection.createStatement( ... ); ResultSet results = statement.executeQuery( query ) ; }
  • 12. Remote File Include RFI Injection allows to use an app logic where the app includes some file based on user input. In our app it's implemented in the Help Articles section: http://hackazon.webscantest.com/accoun t/help_articles?page=/etc/passwd%00
  • 13. XSS Implement test cases based on https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
  • 14. File Input (XXE, XSS Persistent) http://hackazon.webscantest.com/user_pictures/e8/PersistFileXSS.html <html> <script> alert(document.cookie); </script> </html> Potential XXE https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "file:///etc/passwd" >]><foo>&xxe;</foo>
  • 15. CSRF •Write wrappers (that would auto add tokens when used) around default form tags/ajax calls and educate your developers to use those wrappers instead of standard tags. Though this approach is better than depending purely on developers to add tokens, it still is vulnerable to the issue of human tendency to forget things. Spring Security uses this technique to add CSRF tokens by default when a custom <form:form> tag is used, you can opt to use after verifying that its enabled and properly configured in the Spring Security version you are using. •Write a hook (that would capture the traffic and add tokens to CSRF vulnerable resources before rendering to customers) in your organizational web rendering frameworks. Because it is hard to analyze when a particular response is doing any state change (and thus needing a token), you might want to include tokens in all CSRF vulnerable resources (ex: include tokens in all POST responses). This is one recommended approach, but you need to consider the performance costs it might incur. •Get the tokens automatically added on the client side when the page is being rendered in user’s browser, with help of a client side script (this approach is used by CSRF Guard). You need to consider any possible JavaScript hijacking attacks. https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Cross- Site_Request_Forgery_Prevention_Cheat_Sheet.md
  • 16. Open Redirect • Link to authorization: hackazon.webscantest.com/user/login?return_url=https://hack.me
  • 17. IDOR “id”, “user_id”, “value”, “pid”, “post_id” https://www.bugcrowd.com/blog/how- to-find-idor-insecure-direct-object- reference-vulnerabilities-for-large-bounty- rewards/ INSECURE DIRECT OBJECT REFERENCE