SlideShare a Scribd company logo
1 of 20
~ Aditya Kamat
BMS College of Engineering
WEB HACKING SERIES PART-5
TOPICS LEARNT TILL NOW :-
• Basics of web and a little about networks.
• HTML injection.
• SQL injection to bypass authentication.
• Buffer overflow attack.
• XSS
CONT…
• Bypass Authentication Via Authentication Token
Manipulation.
• Session hijacking.
• Brute forcing login pages using burp.
• HTTP parameter pollution.
• SQL injection.
TOPICS FOR TODAY:
• CSRF.
• IDOR.
• Unrestricted file upload.
• We will also have a small competition involving XSS
and SQLi at the end.
CROSS SITE REQUEST FORGERY(CSRF):
• It is a type of website exploit carried out by issuing
unauthorized commands from a trusted website user.
• Unlike XSS, which exploits the users trust for a
website, CSRF exploits website’s trust for a particular
user’s browser.
MORE ABOUT CSRF:
• It uses the “GET” parameter as the exploit point.
• HTML tags are used to inject commands into a specific
webpage.
• It is a target specific attack, i.e. the commands to be
injected usually change for different victims.
REQUIREMENTS FOR CSRF:
• Website should not check for referrer header or a plugin bug
which helps in spoofing referrer headers.
• The attacker must locate a form to update some content on the
target website.
• All the values in the form must be correct in order to execute the
attack.
• The attacker must inject malicious code into the webpage while
the victim is logged in to the website.
DEMO :
• Application used: DVWA
• Steps to reproduce the POC:
• Find out if the request generated is GET or POST.
• Find out all the necessary parameters to be passed.
• We will be using a sample html page with the same
form, with our values for the new password.
PREVENTION:
• Append random challenge tokens to each
request.
• This token has to be associated with the user
session.
• Keep a short expiry time for these tokens.
References: http://www.cgisecurity.com/csrf-faq.html
More techniques:
https://www.owasp.org/index.php/CrossSite_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet
IDOR:
• This vulnerability occurs when a reference to an
internal implementation object such as files, database
key, URLs are exposed to external entities.
• Attackers can manipulate or use these references to
access unauthorized data.
• Open Redirects and Directory Traversal are two classic
examples of an insecure direct object reference
vulnerability.
WHAT IS AN OPEN REDIRECT?
• This is a feature where the web application has a
parameter that allows the website to redirect the user
somewhere else.
• If this parameter is not implemented properly using a white
list, attackers can use this in a phishing attack to lure
potential victims to a site of their choosing.
• Example: www.example.com/a?goto=example.com/user1
• The parameter passed to “goto” is said to be the redirect
URL.
WHAT IS DIRECTORY TRAVERSAL?
• This is a feature which allows for a file present on the server
to be rendered by a user.
• The web application should be verifying the files being
accessed by the user.
• If not, an attacker can request other files on the file system
and those will also be displayed.
• Example: www.example.com/file.jsp?file=report.txt
• An attacker can pass the file which has to be read as a
parameter to “file”.
DEMO:
• Application used: Mutillidae
• Steps to reproduce the POC:
• Find the point leaking file information/ URLs
• Try modifying the HTTP headers to obtain other possible
information.
• Search for database config files to obtain database login
credentials.
PREVENTION:
• Use only one user or session for indirect object references.
• Do not allow object references to untrusted sources.
• In the directory traversal example, determine what files the
user should access and only grant them privileges to those
files.
• If direct objects must be used, then the developers should
ensure thorough validation that the user is authorized to view
what they are attempting to access.
References for IDOR
• https://www.owasp.org/index.php/Top_10_2013-A4-
Insecure_Direct_Object_References
• http://www.tutorialspoint.com/security_testing/insecure_
direct_object_reference.htm
• http://bretthard.in/post/insecure-direct-object-reference
UNRESTRICTED FILE UPLOAD
• Many web application may ask a user to upload his/her
photo or documents of some kind.
• An attacker can take advantage of this and try
uploading a shell.
• The developer needs to carefully validate the type of
file being uploaded by the user.
DEMO:
• Application used: bWAPP
• Steps to reproduce POC:
• Search for a file upload page.
• Try uploading a php shell on the site.
• If the website is validating the extension, try uploading it as
phP or php3 etc.
• Also try .php.jpeg or .php.png
• Use exif tool to add the shell as a comment in the image.
SOME ADVANCE BYPASS TECHNIQUES:
• http://hackers2devnull.blogspot.in/2013/05/how-to-
shell-server-via-image-upload.html
• https://www.idontplaydarts.com/2012/06/encoding-web-
shells-in-png-idat-chunks/
• http://securityidiots.com/Web-Pentest/hacking-website-
by-shell-uploading.html
REFERENCES:
• https://www.owasp.org/index.php/Unrestricted_File_Upl
oad
• http://www.hackingarticles.in/file-upload-exploitation-
bwapp-bypass-security/
THANK YOU

More Related Content

What's hot

CNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationCNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationSam Bowne
 
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicCNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicSam Bowne
 
CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management Sam Bowne
 
CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2Sam Bowne
 
CNIT 129S: 8: Attacking Access Controls
CNIT 129S: 8: Attacking Access ControlsCNIT 129S: 8: Attacking Access Controls
CNIT 129S: 8: Attacking Access ControlsSam Bowne
 
AppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services HackingAppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services HackingShreeraj Shah
 
Web application vulnerability assessment
Web application vulnerability assessmentWeb application vulnerability assessment
Web application vulnerability assessmentRavikumar Paghdal
 
CNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side ControlsCNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side ControlsSam Bowne
 
Web application attacks
Web application attacksWeb application attacks
Web application attackshruth
 
Beyond API Authorization
Beyond API AuthorizationBeyond API Authorization
Beyond API AuthorizationJared Hanson
 
How to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET WebsiteHow to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET WebsiteDNN
 
InsecureDirectObjectReferences
InsecureDirectObjectReferencesInsecureDirectObjectReferences
InsecureDirectObjectReferencesmacanazon
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesSam Bowne
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Jay Nagar
 
Assessment methodology and approach
Assessment methodology and approachAssessment methodology and approach
Assessment methodology and approachBlueinfy Solutions
 
Preventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
Preventing Security Leaks in SharePoint with Joel Oleson & Christian BuckleyPreventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
Preventing Security Leaks in SharePoint with Joel Oleson & Christian BuckleyJoel Oleson
 
Web application security: Threats & Countermeasures
Web application security: Threats & CountermeasuresWeb application security: Threats & Countermeasures
Web application security: Threats & CountermeasuresAung Thu Rha Hein
 
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationCNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationSam Bowne
 

What's hot (20)

CNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationCNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the Application
 
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicCNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application Logic
 
Broken access controls
Broken access controlsBroken access controls
Broken access controls
 
CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management
 
CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2
 
CNIT 129S: 8: Attacking Access Controls
CNIT 129S: 8: Attacking Access ControlsCNIT 129S: 8: Attacking Access Controls
CNIT 129S: 8: Attacking Access Controls
 
AppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services HackingAppSec 2007 - .NET Web Services Hacking
AppSec 2007 - .NET Web Services Hacking
 
Web application vulnerability assessment
Web application vulnerability assessmentWeb application vulnerability assessment
Web application vulnerability assessment
 
CNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side ControlsCNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side Controls
 
Web application attacks
Web application attacksWeb application attacks
Web application attacks
 
Beyond API Authorization
Beyond API AuthorizationBeyond API Authorization
Beyond API Authorization
 
How to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET WebsiteHow to Harden the Security of Your .NET Website
How to Harden the Security of Your .NET Website
 
InsecureDirectObjectReferences
InsecureDirectObjectReferencesInsecureDirectObjectReferences
InsecureDirectObjectReferences
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
Owasp Top 10 A1: Injection
Owasp Top 10 A1: InjectionOwasp Top 10 A1: Injection
Owasp Top 10 A1: Injection
 
Assessment methodology and approach
Assessment methodology and approachAssessment methodology and approach
Assessment methodology and approach
 
Preventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
Preventing Security Leaks in SharePoint with Joel Oleson & Christian BuckleyPreventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
Preventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
 
Web application security: Threats & Countermeasures
Web application security: Threats & CountermeasuresWeb application security: Threats & Countermeasures
Web application security: Threats & Countermeasures
 
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationCNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking Authentication
 

Similar to Web Hacking Series Part 5

Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01G Prachi
 
Lesson 6 web based attacks
Lesson 6 web based attacksLesson 6 web based attacks
Lesson 6 web based attacksFrank Victory
 
Secure Coding BSSN Semarang Material.pdf
Secure Coding BSSN Semarang Material.pdfSecure Coding BSSN Semarang Material.pdf
Secure Coding BSSN Semarang Material.pdfnanangAris1
 
Secure Form Processing and Protection - Sunshine PHP 2015
Secure Form Processing and Protection - Sunshine PHP 2015Secure Form Processing and Protection - Sunshine PHP 2015
Secure Form Processing and Protection - Sunshine PHP 2015Joe Ferguson
 
OWASP TOP 10 by Team xbios
OWASP TOP 10  by Team xbiosOWASP TOP 10  by Team xbios
OWASP TOP 10 by Team xbiosVi Vek
 
Detailed Developer Report.pdf
Detailed Developer Report.pdfDetailed Developer Report.pdf
Detailed Developer Report.pdfnalla14
 
CNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the ApplicationCNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the ApplicationSam Bowne
 
CNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesSam Bowne
 
Application Security Tools
Application Security ToolsApplication Security Tools
Application Security ToolsLalit Kale
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the ApplicationSam Bowne
 
Force.com security
Force.com securityForce.com security
Force.com securityVijay Naik
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFBrian Huff
 
Ch 13: Attacking Users: Other Techniques (Part 2)
Ch 13: Attacking Users: Other Techniques (Part 2)Ch 13: Attacking Users: Other Techniques (Part 2)
Ch 13: Attacking Users: Other Techniques (Part 2)Sam Bowne
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsSam Bowne
 
Ruby on Rails Security Guide
Ruby on Rails Security GuideRuby on Rails Security Guide
Ruby on Rails Security Guideihji
 

Similar to Web Hacking Series Part 5 (20)

Web application security part 01
Web application security part 01Web application security part 01
Web application security part 01
 
Lesson 6 web based attacks
Lesson 6 web based attacksLesson 6 web based attacks
Lesson 6 web based attacks
 
Secure Coding BSSN Semarang Material.pdf
Secure Coding BSSN Semarang Material.pdfSecure Coding BSSN Semarang Material.pdf
Secure Coding BSSN Semarang Material.pdf
 
Secure Form Processing and Protection - Sunshine PHP 2015
Secure Form Processing and Protection - Sunshine PHP 2015Secure Form Processing and Protection - Sunshine PHP 2015
Secure Form Processing and Protection - Sunshine PHP 2015
 
OWASP TOP 10 by Team xbios
OWASP TOP 10  by Team xbiosOWASP TOP 10  by Team xbios
OWASP TOP 10 by Team xbios
 
Detailed Developer Report.pdf
Detailed Developer Report.pdfDetailed Developer Report.pdf
Detailed Developer Report.pdf
 
Csrf final
Csrf finalCsrf final
Csrf final
 
CNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the ApplicationCNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the Application
 
CNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application Technologies
 
Lets Make our Web Applications Secure
Lets Make our Web Applications SecureLets Make our Web Applications Secure
Lets Make our Web Applications Secure
 
Vulnerabilities in Web Applications
Vulnerabilities in Web ApplicationsVulnerabilities in Web Applications
Vulnerabilities in Web Applications
 
Application Security Tools
Application Security ToolsApplication Security Tools
Application Security Tools
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
Force.com security
Force.com securityForce.com security
Force.com security
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADFOWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
OWASP Top 10 Security Vulnerabilities, and Securing them with Oracle ADF
 
Ch 13: Attacking Users: Other Techniques (Part 2)
Ch 13: Attacking Users: Other Techniques (Part 2)Ch 13: Attacking Users: Other Techniques (Part 2)
Ch 13: Attacking Users: Other Techniques (Part 2)
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End Components
 
Ruby on Rails Security Guide
Ruby on Rails Security GuideRuby on Rails Security Guide
Ruby on Rails Security Guide
 
Owasp top 10 2017
Owasp top 10 2017Owasp top 10 2017
Owasp top 10 2017
 

More from Aditya Kamat

Load Balancing Algorithms - Which one to choose?
Load Balancing Algorithms - Which one to choose?Load Balancing Algorithms - Which one to choose?
Load Balancing Algorithms - Which one to choose?Aditya Kamat
 
Spectre and meltdown
Spectre and meltdownSpectre and meltdown
Spectre and meltdownAditya Kamat
 
Web Hacking Series Part 4
Web Hacking Series Part 4Web Hacking Series Part 4
Web Hacking Series Part 4Aditya Kamat
 
Web hacking series part 3
Web hacking series part 3Web hacking series part 3
Web hacking series part 3Aditya Kamat
 
Web Hacking series part 2
Web Hacking series part 2Web Hacking series part 2
Web Hacking series part 2Aditya Kamat
 
Web Hacking Series Part 1
Web Hacking Series Part 1Web Hacking Series Part 1
Web Hacking Series Part 1Aditya Kamat
 
Exploiting a vulnerability to gain a shell
Exploiting a vulnerability to gain a shellExploiting a vulnerability to gain a shell
Exploiting a vulnerability to gain a shellAditya Kamat
 

More from Aditya Kamat (9)

Load Balancing Algorithms - Which one to choose?
Load Balancing Algorithms - Which one to choose?Load Balancing Algorithms - Which one to choose?
Load Balancing Algorithms - Which one to choose?
 
Spectre and meltdown
Spectre and meltdownSpectre and meltdown
Spectre and meltdown
 
Cryptography 101
Cryptography 101Cryptography 101
Cryptography 101
 
Web Hacking Series Part 4
Web Hacking Series Part 4Web Hacking Series Part 4
Web Hacking Series Part 4
 
Web hacking series part 3
Web hacking series part 3Web hacking series part 3
Web hacking series part 3
 
Web Hacking series part 2
Web Hacking series part 2Web Hacking series part 2
Web Hacking series part 2
 
Web Hacking Series Part 1
Web Hacking Series Part 1Web Hacking Series Part 1
Web Hacking Series Part 1
 
Web Hacking Intro
Web Hacking IntroWeb Hacking Intro
Web Hacking Intro
 
Exploiting a vulnerability to gain a shell
Exploiting a vulnerability to gain a shellExploiting a vulnerability to gain a shell
Exploiting a vulnerability to gain a shell
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

Web Hacking Series Part 5

  • 1. ~ Aditya Kamat BMS College of Engineering WEB HACKING SERIES PART-5
  • 2. TOPICS LEARNT TILL NOW :- • Basics of web and a little about networks. • HTML injection. • SQL injection to bypass authentication. • Buffer overflow attack. • XSS
  • 3. CONT… • Bypass Authentication Via Authentication Token Manipulation. • Session hijacking. • Brute forcing login pages using burp. • HTTP parameter pollution. • SQL injection.
  • 4. TOPICS FOR TODAY: • CSRF. • IDOR. • Unrestricted file upload. • We will also have a small competition involving XSS and SQLi at the end.
  • 5. CROSS SITE REQUEST FORGERY(CSRF): • It is a type of website exploit carried out by issuing unauthorized commands from a trusted website user. • Unlike XSS, which exploits the users trust for a website, CSRF exploits website’s trust for a particular user’s browser.
  • 6. MORE ABOUT CSRF: • It uses the “GET” parameter as the exploit point. • HTML tags are used to inject commands into a specific webpage. • It is a target specific attack, i.e. the commands to be injected usually change for different victims.
  • 7. REQUIREMENTS FOR CSRF: • Website should not check for referrer header or a plugin bug which helps in spoofing referrer headers. • The attacker must locate a form to update some content on the target website. • All the values in the form must be correct in order to execute the attack. • The attacker must inject malicious code into the webpage while the victim is logged in to the website.
  • 8. DEMO : • Application used: DVWA • Steps to reproduce the POC: • Find out if the request generated is GET or POST. • Find out all the necessary parameters to be passed. • We will be using a sample html page with the same form, with our values for the new password.
  • 9. PREVENTION: • Append random challenge tokens to each request. • This token has to be associated with the user session. • Keep a short expiry time for these tokens. References: http://www.cgisecurity.com/csrf-faq.html More techniques: https://www.owasp.org/index.php/CrossSite_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet
  • 10. IDOR: • This vulnerability occurs when a reference to an internal implementation object such as files, database key, URLs are exposed to external entities. • Attackers can manipulate or use these references to access unauthorized data. • Open Redirects and Directory Traversal are two classic examples of an insecure direct object reference vulnerability.
  • 11. WHAT IS AN OPEN REDIRECT? • This is a feature where the web application has a parameter that allows the website to redirect the user somewhere else. • If this parameter is not implemented properly using a white list, attackers can use this in a phishing attack to lure potential victims to a site of their choosing. • Example: www.example.com/a?goto=example.com/user1 • The parameter passed to “goto” is said to be the redirect URL.
  • 12. WHAT IS DIRECTORY TRAVERSAL? • This is a feature which allows for a file present on the server to be rendered by a user. • The web application should be verifying the files being accessed by the user. • If not, an attacker can request other files on the file system and those will also be displayed. • Example: www.example.com/file.jsp?file=report.txt • An attacker can pass the file which has to be read as a parameter to “file”.
  • 13. DEMO: • Application used: Mutillidae • Steps to reproduce the POC: • Find the point leaking file information/ URLs • Try modifying the HTTP headers to obtain other possible information. • Search for database config files to obtain database login credentials.
  • 14. PREVENTION: • Use only one user or session for indirect object references. • Do not allow object references to untrusted sources. • In the directory traversal example, determine what files the user should access and only grant them privileges to those files. • If direct objects must be used, then the developers should ensure thorough validation that the user is authorized to view what they are attempting to access.
  • 15. References for IDOR • https://www.owasp.org/index.php/Top_10_2013-A4- Insecure_Direct_Object_References • http://www.tutorialspoint.com/security_testing/insecure_ direct_object_reference.htm • http://bretthard.in/post/insecure-direct-object-reference
  • 16. UNRESTRICTED FILE UPLOAD • Many web application may ask a user to upload his/her photo or documents of some kind. • An attacker can take advantage of this and try uploading a shell. • The developer needs to carefully validate the type of file being uploaded by the user.
  • 17. DEMO: • Application used: bWAPP • Steps to reproduce POC: • Search for a file upload page. • Try uploading a php shell on the site. • If the website is validating the extension, try uploading it as phP or php3 etc. • Also try .php.jpeg or .php.png • Use exif tool to add the shell as a comment in the image.
  • 18. SOME ADVANCE BYPASS TECHNIQUES: • http://hackers2devnull.blogspot.in/2013/05/how-to- shell-server-via-image-upload.html • https://www.idontplaydarts.com/2012/06/encoding-web- shells-in-png-idat-chunks/ • http://securityidiots.com/Web-Pentest/hacking-website- by-shell-uploading.html