Cross-Site Request Forgery (CSRF) Explained

Sdílet
Vložit
  • čas přidán 31. 05. 2024
  • #WebSecurity #CSRF
    A video explaining CSRF and some different types of attacks.
    🔗 CSRF to RCE : github.com/zadam/trilium/issu...
    SPONSORED BY INTIGRITI - intigriti.com
    Sorry for the late upload, was busy with other stuff.
    🎵 Track: Warriyo - Mortals (feat. Laura Brehm)
    NCS link: • Warriyo - Mortals (fea...

Komentáře • 258

  • @hydr0nium_
    @hydr0nium_ Před 5 lety +312

    Seriously cant say it enough. I freaking love your videos

    • @kvenk001
      @kvenk001 Před 2 lety +2

      I second that notion

  • @forceboxed
    @forceboxed Před rokem +52

    @4:53
    one of the important things to mention here is that the csrf token is good only as long as it is mapped to the user's session ID in the backend. Otherwise, the attacker might simply obtain a valid CSRF token by visiting the main website themself and inject it into the malicious requests.
    Tying the token to the user's session and validating that on the backend for each request is very important.

  • @dragonballZbigBang
    @dragonballZbigBang Před 5 lety +106

    There's tens of thousands of videos on Csrf but you easily beat all of them. Yet the number of views you got aren't nearly as close as theirs. Niche youtubers like you are ahead of the time. I hope people like you are revered in coming 5 years

    • @PwnFunction
      @PwnFunction  Před 5 lety +34

      Yeah, late in the game, but it's totally fine, I'm just trying to give somethin back to the community.

    • @OviDB
      @OviDB Před 2 lety

      Look at it now ;)

    • @gerolori
      @gerolori Před 9 měsíci +2

      Damn, dude really planted the seed and let it grow

  • @Mei-rs7ys
    @Mei-rs7ys Před 3 lety +58

    "Cat-Site Request Forgery"

  • @jammincoder
    @jammincoder Před 2 lety +11

    Man, I tried researching how CSRF attacks worked last year and I never got a solid grasp of it.
    This video changed that.
    As a cybersecurity enthusiast and web developer, this is super helpful!

  • @justforyoutube1319
    @justforyoutube1319 Před 5 lety +69

    i came from LiveOverflow channel , i so glad to be here !
    your channel is interesting , love it . keep up the good work

  • @yasirhussain1875
    @yasirhussain1875 Před 2 lety +9

    No words to describe how much informational these videos are.
    Thank you.

  • @mitchelline
    @mitchelline Před 5 lety +5

    Incredibly amazing video as always. Very great explanation, and I love your color choices and how you draw/write everything

  • @miguelnunez1435
    @miguelnunez1435 Před 5 lety +3

    Just came by from watching LiveOverflow's video. I subbed and put on the bell notification on. This channel looks so cool

  • @berakoc8556
    @berakoc8556 Před rokem

    You put lots of effort into your videos. Transitions are amazing. Wonderful production.

  • @aayushkubitkar4827
    @aayushkubitkar4827 Před 4 lety

    Came from Stök's channel. Absolutely loving it now! Subscribed and belled👏

  • @joshuz101
    @joshuz101 Před rokem

    I often find it hard to focus on educational videos like this, but somehow your videos have all of my attention. Not sure what voodoo you're using but it's working!

  • @subhashsarangi
    @subhashsarangi Před 5 lety

    You are just awesome man. Why doesn't CZcams show such search results at the top. I couldn't find you when I needed but now I am happy. Thanks bro..

  • @nullpwn
    @nullpwn Před 3 lety +13

    Wow , I love the graphical explanatory video, really easy to follow and understand in concordance with explication

  • @farzadsole3784
    @farzadsole3784 Před 2 lety +1

    Amazing content as always, big fan of your videos and tutorials, thank you so much ;D

  • @JoshuaKisb
    @JoshuaKisb Před 4 lety +2

    was curious if tokens really work since you could just make a GET and read the token then post. glad you answered that question very quickly. awesome video. i will subscribe

  • @CYB3Rsynth
    @CYB3Rsynth Před rokem

    Third video of yours that came up, and perfectly described the concept. Subscribed

  • @sathvikmalgikar2842
    @sathvikmalgikar2842 Před rokem +6

    we need more of these.
    literally a free service to everyone genuinely interested

  • @danialabsolute688
    @danialabsolute688 Před 2 lety

    I really enjoyed your theme of explanation and the background music. sounded adventurous

  • @sleepydev4700
    @sleepydev4700 Před 2 lety +1

    the music and naration in the intro made me feel like I'm discovering a mistery in another new world, lol. great video

  • @krantisatyam
    @krantisatyam Před 2 lety

    This is one of the best channel I have encountered 😍

  • @zb2747
    @zb2747 Před 2 lety

    Great video, to the point and thoroughly explained the main concept.

  • @mosesegboh
    @mosesegboh Před 3 lety

    you concept and style of teaching is lovely!..keep it up

  • @rajeshkishore7119
    @rajeshkishore7119 Před 4 lety +4

    This is very well explained, appreciated

  • @nivelis91
    @nivelis91 Před 5 lety +15

    You definitely deserve more subs ;)

  • @itsfarseen
    @itsfarseen Před 3 lety +2

    Love the style of explanation!

  • @MrVinaybhandari
    @MrVinaybhandari Před 4 lety

    Videos are so interesting and clear with basic to advance. Keep going 😀

  • @yashdeephinge
    @yashdeephinge Před rokem

    Great Video and your drawing is amazing bro that google logo and the adobe logo was so perfect.

  • @theawless
    @theawless Před 2 lety +1

    Great content. I can't believe this is free!
    PS: I love your colour scheme

  • @kid_kulafu_1727
    @kid_kulafu_1727 Před 3 lety

    Bruh you need to create more content like this. Also you give example are to fast but over all your the best. 11/10.

  • @zTech300
    @zTech300 Před 4 lety

    Great explanation bro, Keep up the good work.
    Wish ya da best.

  • @aminvogue
    @aminvogue Před 3 lety

    Wunderbar...................U r one awsme teacher. Hats off to the effort you put in, for us mere novices.

  • @eshaan7_
    @eshaan7_ Před 4 lety +4

    Thankyou for your videos. I would very much like to see a video on Insecure CORS and ways to escalate it :)

  • @rasikagayangunarathna
    @rasikagayangunarathna Před 3 lety +23

    I genuinely don't understand why you stop creating videos. Your style is so cool.

  • @hopnikhil12
    @hopnikhil12 Před rokem

    You need more likes. Your work is needed for every developer.

  • @stanpeng5931
    @stanpeng5931 Před 2 lety

    Such a good video. I love the voice as well: cute and reliable

  • @venkaraj
    @venkaraj Před rokem

    Crystal clear explanation. Thanks a ton

  • @soufianeabbad887
    @soufianeabbad887 Před 5 lety +3

    Awesome video. I hope that you explain some bugs like vulnerable flash files, JSONP and email spoofing

  • @MinusFourmn
    @MinusFourmn Před 2 lety +4

    As I understand it, fetch and XHR require `useCredentials` to send the cookies along with the request which needs to be explicitly stated on the CORS header Access-Control-Allow-Credentials. Otherwise cookies are not being sent and the CSRF fails.

  • @yuvalozeri3142
    @yuvalozeri3142 Před 4 lety

    Amazing video, so clear!
    thank you

  • @a.yashwanth
    @a.yashwanth Před 4 lety +14

    I watched around 15 videos regarding csrf and you are the only one who explained it clearly. Also not everyone stressed on "the browser automatically sends the cookies".

    • @shreyanshdesai3152
      @shreyanshdesai3152 Před 3 lety

      truuu

    • @kornelijekovac9793
      @kornelijekovac9793 Před 3 lety +1

      I still don't understand it. What does it mean? What cookies? All the cookies from all the tabs opened in the browser are sent with all POST requests that are being made on whichever tab?

    • @bsmldy8681
      @bsmldy8681 Před 3 lety

      @@kornelijekovac9793 All the cookies from one website will be sent to the server of that website on each request (with website I mean domain, not origin). The most important cookie is the one with the session id (SID), which identifies the user. More about this can be found if you search for "session management".

    • @kornelijekovac9793
      @kornelijekovac9793 Před 3 lety +1

      @@bsmldy8681 But how can cookies from two different tabs intermingle?

    • @bsmldy8681
      @bsmldy8681 Před 3 lety

      not sure what you mean by that

  • @fairchild9able
    @fairchild9able Před 2 lety

    Thanks for making this. Really nice!

  • @dougthefiddler
    @dougthefiddler Před 2 lety

    Very clear explanation. Thanks!

  • @darklord1750
    @darklord1750 Před rokem

    the best channel, thanks brother for the knowledge

  • @susovangarai6731
    @susovangarai6731 Před 4 lety

    your channel is a gold mine !!

  • @nakolenke
    @nakolenke Před 2 lety

    Thank you for the great explanation! How did you made that animated slides, what tool is it?

  • @ekaterinazakharenkova5826
    @ekaterinazakharenkova5826 Před 11 měsíci

    Best explanation I've ever heard!

  • @behnkenj
    @behnkenj Před 3 lety

    Well done sir, keep them coming! :)

  • @kds-2049
    @kds-2049 Před 3 lety

    Explained well, props to you

  • @mahirmolai3834
    @mahirmolai3834 Před 3 lety +2

    Was watching live overflows vid a month ago, and look at me now, watching each video of yours everyday

  • @ph0sgene967
    @ph0sgene967 Před 2 měsíci

    As someone who pioneered csrf in 2007 this is a great video

  • @princepatwari365
    @princepatwari365 Před 3 lety

    Great videos.........Thank you for posting them

  • @king998100
    @king998100 Před 8 měsíci

    probably the best explanation out there

  • @MohaDou
    @MohaDou Před 4 lety

    That's crazy explanation, Thanks a lot

  • @jenniferwood4916
    @jenniferwood4916 Před 5 lety +1

    Love your videos! Please make more :3

  • @ghost91827
    @ghost91827 Před 3 lety

    Just amazing content!

  • @raulherbert
    @raulherbert Před rokem

    Awesome explanation! Tks!

  • @gamingwolf3385
    @gamingwolf3385 Před 11 měsíci

    Amazing 😅 , i learn a lot of new concepts in one video , but i think i will re-watch it later , some of them seem confusing !

  • @kurogaming3205
    @kurogaming3205 Před 3 lety +1

    I love your videos there amazing , professional ! but I guess slow down a little bit for new people,
    other than that your the best I have ever being taught

  • @realdotty5356
    @realdotty5356 Před 2 lety

    Do you buy the domains for the video? Is do you have some sort of local domain stuff

  • @mk9834
    @mk9834 Před 4 lety

    love your videos this is a god's work

  • @thomaseaso
    @thomaseaso Před 5 lety

    Excellent Explanation

  • @Meleeman011
    @Meleeman011 Před 3 lety

    this made me rethink my web security holy shit.

  • @chimithras4746
    @chimithras4746 Před rokem

    Great Explanation ✅

  • @AW-gd6uz
    @AW-gd6uz Před 3 lety

    You explained this better than the skillsoft guys, that's for sure

  • @sarahabdulaal2029
    @sarahabdulaal2029 Před 4 lety

    Thank you very much!

  • @Odys42
    @Odys42 Před 3 lety

    Awesome ! Thank you !

  • @harshitjoshi3082
    @harshitjoshi3082 Před rokem

    This is awesome !

  • @johnwick-yo7ov
    @johnwick-yo7ov Před 2 lety

    Which software do you use for animation?

  • @re43p3raod3
    @re43p3raod3 Před 2 lety

    you should make more cyber security videos i LOVE them!!!

  • @atharvakadlag1937
    @atharvakadlag1937 Před 3 lety

    You're videos are awesome

  • @MygenteTV
    @MygenteTV Před 4 lety

    since im new to this and just learning.. let me see if i got this straight. in order for me to make this work all i have to do is write a js file using the code here, host it in a server and when a person click it, it will delete their account?

  • @Gigolas88
    @Gigolas88 Před 5 lety +2

    wtf you deserve way more likes on this

  • @nolongeravailable111
    @nolongeravailable111 Před 2 lety

    Nice video thanks for the amazing content

  • @HarujiCat
    @HarujiCat Před 2 měsíci

    You saved me. Thank you so much

  • @brian_mckenzie8317
    @brian_mckenzie8317 Před 4 lety

    I have a question pwn ... I already have the knowledge on IDOR, CSRF vulnerabilities but I need to practice .. like chess ... I am happy there are softwares I can practice on relating to chess ... because I can test out ..reaarange..apply...try out anything I have learnt ... so saying that ..
    are there any websites or softwares I can buy that has like 100's of IDOR vulnerabilities that I can use Burp on and practice all night?? Thanks.

  • @playboicartihey
    @playboicartihey Před 2 lety

    this is the best. freaking cool

  • @ayushchauhan9046
    @ayushchauhan9046 Před 4 lety

    Come on more video , u r just awesome !!!

  • @zwetschgaderdle4433
    @zwetschgaderdle4433 Před 4 lety

    What about this: the malicious site has an that sends a GET request, gets the token, then sends it back and deletes the account?

  • @kivuosark2088
    @kivuosark2088 Před 3 lety

    Yes! We cannot access external website within but what about window.postMessage() ?

  • @zainabedin9842
    @zainabedin9842 Před 3 lety

    Best explanation

  • @dalewatson3978
    @dalewatson3978 Před 4 lety

    sorry im still not clear even after rewatching the video.
    how cat.com knows what we were browsign before so they can abuse the cookies system in our browser ? do they also accessing our history browser ?
    if I opening in incognito/private, can cat.com still abuse this method

  • @oussamasethoum1665
    @oussamasethoum1665 Před 16 dny

    Can cors prevent this request when credentials are included and the cookie is http only?

  • @artemislwof9264
    @artemislwof9264 Před 4 lety

    Fucking A . i had to do couple of days of deep research to understand some of those concepts in order to have some idea about where the exploits would be . you just explained it PERFECTLY in simple terms and visuals and confirmed some of my thoughts :D . u did share some valuable and accurate information despite supid youtube terms n policies. Thank you sir for the clues XD

  • @585ghz
    @585ghz Před rokem

    nice video! thanks a lot!!!

  • @shivamyadav1283
    @shivamyadav1283 Před 2 lety +1

    Is it true that SOP allows to send request cross domain but not read the responses? Why would even a request be even triggered by the browser if there is a SOP?

  • @khoroshoigra8388
    @khoroshoigra8388 Před rokem

    most of the cases of being bypassed by other domains for a kind of request is by using */wildcard in CORS

  • @chaosknight3175
    @chaosknight3175 Před 11 měsíci

    Ok, good stuff. Subscribed.

  • @krishgarg2806
    @krishgarg2806 Před 2 lety

    Great video, can you please shed a bit more light on how a csrf token actually protect against a csrf attack?

  • @vikrammaiya003
    @vikrammaiya003 Před 3 lety

    Awesome Video

  • @miss-sw3qu
    @miss-sw3qu Před 4 lety

    Your videos are amazing. Clean, informational, and perfect. I should have found your channel earlier.

  • @jimmyliu2982
    @jimmyliu2982 Před 2 lety

    But how is it possible to post json via html form, where entry is urlencoded?

  • @mitchelline
    @mitchelline Před 5 lety

    I found a CSRF on a large website with > 500k members, so it's more common than you think! It allowed me to send their coins to my account, and those coins were bought with real money, so it was a decently critical flaw

  • @tekken-pakistan2718
    @tekken-pakistan2718 Před 5 lety

    Awesome as always

    • @tekken-pakistan2718
      @tekken-pakistan2718 Před 5 lety

      ++ Could you please tell the shell you're using in the end?

    • @PwnFunction
      @PwnFunction  Před 4 lety +1

      @@tekken-pakistan2718 Sorry for the super late reply, it's Terminus - eugeny.github.io/terminus/

    • @tekken-pakistan2718
      @tekken-pakistan2718 Před 3 lety

      @@PwnFunction thanks

    • @tekken-pakistan2718
      @tekken-pakistan2718 Před 3 lety

      Welp, sorry to ask xD but you can you tell the theme too? Also, theme of visual studio, also theme of your own distro, would love to see the rice.

  • @kvsec1337
    @kvsec1337 Před 2 lety

    Nice man!

  • @superboring7990
    @superboring7990 Před rokem

    Thanks alot

  • @a.yashwanth
    @a.yashwanth Před 4 lety

    I get this as response headers but I still get the chrome cross origin error.
    access-control-allow-headers: Content-Type
    access-control-allow-origin: localhost
    content-length: 0
    content-type: text/html; charset=UTF-8
    date: Mon, 16 Mar 2020 15:52:28 GMT
    server: Apache
    status: 200

  • @staynjohnson4221
    @staynjohnson4221 Před 4 lety +4

    12:47
    I dont understand why the json data + the content type header are first passed through a redirect(?) then to the vulnerable site?

    • @peterfarhat5767
      @peterfarhat5767 Před 4 lety +2

      Because simply flash will forward the request as string and then the site will convert it into header and “ key = value “ type so that it would be readable by the API of vuln.com!

  • @tapank415
    @tapank415 Před 5 lety

    Ooooooh new video!

  • @paulcalinovici8808
    @paulcalinovici8808 Před 3 lety +11

    Before sending the delete request, isn't the browser sending a preflight OPTIONS request to the server which will return an error and the delete request won't happen anymore ?

    • @aakashthakur1415
      @aakashthakur1415 Před 2 lety +2

      I was thinking the same. Ideally CORS would have stopped this.

    • @aakash18in
      @aakash18in Před 2 lety

      yes. In case of Ajax request , SOP will stop the request as the preflight will return error

    • @ororabrian7106
      @ororabrian7106 Před 2 lety

      yeah. Just as a note, It seems that you can actually send a simple request to the server and the request will go through but you won't be able to read the response due to cors. namely if you don't have any headers on your request but then again that means you won't have any cookies and won't be carrying any state so pretty useless all in all.

    • @SunPodder
      @SunPodder Před rokem

      As cors is just client sided, for a hacker this isn't difficult to bypass it

    • @spicybaguette7706
      @spicybaguette7706 Před rokem

      @Orora Brian You can still do CSRF for non-authenticated requests, such as an anonymous message on a blog post or something, which is not entirely harmless