Guest User

csrf

a guest
Feb 11th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. Cross site request Forgery
  2. Missing Function Level Access Control
  3. ----------------------------------------
  4. Cross site request Forgery.
  5. In this attack the hacker creates a forged http request and tricks victim into submitting that request via images tabs or xss
  6. The application allows a user to submit a state changing request that does not include anything secret.
  7.  
  8. For example:
  9. http://anywebsite.com/app/transferFunds?amount=1500&destinationAccount=4673243243
  10. this all done by making the victim click on a link or on a certain appealing image
  11. ________
  12. DEMO DVWA
  13.  
  14.  
  15. Steps
  16.  
  17. Step 1 Open XAMPP start mysql and apache server
  18.  
  19. step 2 go to your browser in the 'url field' type 127.0.0.1/dvwa
  20.  
  21. step 3 login in to dvwa with username="admin" and password="password"
  22.  
  23. step 4 goto to dvwa security change the security level to "low"
  24.  
  25. step 5 goto click on "CSRF" tab on the left side
  26.  
  27. step 6 inspect element
  28.  
  29. step 7 select the form with the cursor
  30.  
  31. step 8 right click on "<form action= '#' " click on "Edit as HTML"
  32.  
  33. step 9 copy the code and open up a notepad file.
  34.  
  35. step 10 replace the '#' in action= to "127.0.0.1/dvwa/vulnerabilities/csrf"
  36.  
  37. step 11 save the file as html
  38.  
  39. step 12 open the saved file in the new tab note-> your old tab should also be open and change the password in the newly created file.(change your password to admin)
  40.  
  41. step 13 after practice reverse the password to password.
  42.  
  43. #For LVS
  44.  
  45. step 1 open 127.0.0.1/lvs111
  46.  
  47. step 2 click on csrf >Gmail logout options
  48.  
  49. step 3 open a gmail in a new tab
  50.  
  51. step 4 open the lvs tab and click on submit querry
  52.  
  53. and your gmail account would be logged out.
  54.  
  55.  
  56. LVS-2 comment box
  57. step 1 open 127.0.0.1/lvs111
  58.  
  59. step 2 click on csrf > csrf in comment box
  60.  
  61. step 3 type a comment if you want to
  62.  
  63. step 4 click on the iphone photo
  64.  
  65. step 5 Click on back button
  66.  
  67. and a comment would be posted that was not earlier there.
  68.  
  69. ________________________________________________
  70.  
  71. Missing Function Level Access Control
  72. ---------------------------------------------
  73. It is an attack in which a hacker or an anonymous person is able to access an application interface that it would otherwise never been able to access.
  74.  
  75. eg if a hacker open up
  76.  
  77. www.anywebsite.com/user
  78. and logs in with credentials after that get redirected to
  79. www.anywebsite.com/admin
  80.  
  81. Now if a hacker is able to type www.anywebsite.com/admin and is able to enter without using credentials that is case of Missing Function Level Access Control.
  82.  
  83. ---
  84.  
  85. steps
  86.  
  87. Step1 goto 127.0.0.1/lvs111
  88.  
  89. step 2 Click on Missing Function Level Access control "unauthenticate user access to admin"
  90.  
  91. step 3 login with credentials admin and password
  92.  
  93. step 4 copy url
  94.  
  95. step 5 click on logout and paste the url
  96.  
  97. try to do the same with "Authenticated user access to admin"
Add Comment
Please, Sign In to add comment