XML External Entities (XXE) Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.ค. 2024
  • #WebSecurity #XXE
    A video on Exploiting XML parsers, specifically on XML External Entity attacks.
    🔗 Links
    John's channel : / rootofthenull
    Stok's video on OOB XXE via file uploads : • A $7.500 BUG BOUNTY Bu...
    Ippsec's Fulcrum walkthrough : • HackTheBox - Fulcrum
    Nicolas Grégoire's works : www.agarri.fr/en/
    Exploiting XXE with local DTD files : mohemiv.com/all/exploiting-xx...
    SPONSORED BY INTIGRITI - intigriti.com
    🎵 Track: Warriyo - Mortals (feat. Laura Brehm)
    NCS link: • Warriyo - Mortals (fea...
    #WebSecurity #XXE #CTF

ความคิดเห็น • 144

  • @iamwaseem99
    @iamwaseem99 4 ปีที่แล้ว +144

    4:12 "S" in XML stands for "Security"....LOL

    • @ari_archer
      @ari_archer 3 ปีที่แล้ว +2

      that's the point hah

    • @ShawSumma
      @ShawSumma 3 ปีที่แล้ว

      SGML?

    • @cyberpro151
      @cyberpro151 2 ปีที่แล้ว

      are you a bug bounty hunter?

  • @TryX10
    @TryX10 5 ปีที่แล้ว +19

    Even though most of the time I don't completely understand every bit, I really like your editing and presentation of these (for me) 'complex' topics! Keep it up! You're doing great man!

  • @InfiniteLogins
    @InfiniteLogins 3 ปีที่แล้ว +3

    I really appreciate your video editing techniques. Make the content easy to follow and engaging.

  • @youssefighzane1668
    @youssefighzane1668 5 ปีที่แล้ว +68

    Well, well, well !! That's more than AMAAAAAAAAAAAZING !!!
    I was unable to understand XML and XXE as well until I watch your video.
    Thank you so much !!
    RECOMMENDED FOR ALL #BUG_BOUNTY_HUNTERS

  • @aniceguy2577
    @aniceguy2577 4 ปีที่แล้ว +9

    This is pure gold. Thx for the great content

  • @thedude8503
    @thedude8503 3 ปีที่แล้ว +2

    I love this channel, the people in it and the people subscribed to it. Thank you for making it simple

  • @reema6306
    @reema6306 ปีที่แล้ว +13

    I've spent a week learning XML and XXE, and your video just summarized 80% of what I learned. Great job!

  • @dxsp1d3r
    @dxsp1d3r 5 ปีที่แล้ว +7

    Why didnt i find this before
    Awesome stuff man
    Thank you
    I came to know about this channel from stoks tweets xD

  • @Yaxqb
    @Yaxqb 2 ปีที่แล้ว +9

    The framework for explaining stuff is amazing. About every other video has a ncat -l 1337 command in it, and it has become a standard practice for me in my own work to use that command. The pwnfunction toolbox feels very versatile👍 Really really nice!

  • @abdelrhmanali2955
    @abdelrhmanali2955 3 ปีที่แล้ว

    Your explanation is really AWESOME bro

  • @domss1174
    @domss1174 5 ปีที่แล้ว

    Loving your channel man, keep up the good work!

  • @zanidd
    @zanidd 5 ปีที่แล้ว +13

    I really like the style of your vids! Keep em coming

  • @seewhatseeabc
    @seewhatseeabc 4 ปีที่แล้ว

    Wow love this style. By the way thanks for the super clear explanation. Especially with the examples, super good clear cut examples.

  • @fmattia99
    @fmattia99 5 ปีที่แล้ว +55

    John's voice is equal to IppSec's voice, this blew my mind :D

  • @petervsjim
    @petervsjim ปีที่แล้ว

    THanks for the awesome video and slides! Very clear and knowledgeable

  • @sakyb7
    @sakyb7 5 ปีที่แล้ว +4

    xxe is just a beginning this line with the background... goosebumps

  • @P4cm4n0x
    @P4cm4n0x 2 ปีที่แล้ว +1

    Best explanation ever. Very very to the point. Thank you :)

  • @TheZethera
    @TheZethera 3 ปีที่แล้ว +1

    I just have to say your opening and music are perfect 👌

  • @HyderAli-hl8mw
    @HyderAli-hl8mw 3 ปีที่แล้ว

    Very informational for beginners. Thank you so much

  • @venkaraj
    @venkaraj 2 ปีที่แล้ว

    Such an insightful video. Thanks a ton

  • @rhenaldodelfinugraha9694
    @rhenaldodelfinugraha9694 4 ปีที่แล้ว

    Awesome explanation. It's easy to understand, Thankyou. Please make another cool videos

  • @joshaprior3699
    @joshaprior3699 5 ปีที่แล้ว +3

    first
    GREAT CHANNEL

    • @tapank415
      @tapank415 5 ปีที่แล้ว

      @// Anuj ó_ó

  • @Hope-kf1nl
    @Hope-kf1nl 4 ปีที่แล้ว

    You're a hero! Thanks my man.

  • @rahulnair1923
    @rahulnair1923 ปีที่แล้ว

    Loved the explanation !!!!!!!!!!🤩

  • @pwndumb2903
    @pwndumb2903 4 ปีที่แล้ว

    Great Video. Thx for share your knowledge.

  • @mikekittelberger7947
    @mikekittelberger7947 ปีที่แล้ว

    omg, thank you. This video is so godd :)

  • @janithmalinga5765
    @janithmalinga5765 2 ปีที่แล้ว

    Superb explanation

  • @FriedMonkey362
    @FriedMonkey362 8 วันที่ผ่านมา

    I have litterly never heard about this before, this is so cool, i almost tought it was an April fool's video for a second

  • @carloszavaleta
    @carloszavaleta 5 ปีที่แล้ว

    Awesome content!

  • @anonymouseye4892
    @anonymouseye4892 3 ปีที่แล้ว

    Nice explanation 🔥

  • @hydr0nium_
    @hydr0nium_ 5 ปีที่แล้ว

    Never heared of that attack before the video. Soo wow amazing. If you think about it its quite simple actually. Btw is there a way of secure it easiely?

  • @iDontProgramInCpp
    @iDontProgramInCpp 3 ปีที่แล้ว +12

    3:56 diReRectly

    • @synthdog2819
      @synthdog2819 3 ปีที่แล้ว +3

      17:06 willbewillbe

  • @shrirangdiwakar
    @shrirangdiwakar 3 ปีที่แล้ว

    Great Explanation !

  • @kinjalsangale1225
    @kinjalsangale1225 3 ปีที่แล้ว

    Please make more videos on different vulnerabilities... explainions are 👌

  • @faizannehal1
    @faizannehal1 3 ปีที่แล้ว

    This is the best video on XXE

  • @medjassertoubib4467
    @medjassertoubib4467 2 ปีที่แล้ว

    great video . we look forward to new videos

  • @nuridincersaygili
    @nuridincersaygili ปีที่แล้ว

    This is pure gold..

  • @AkashRaj-ui1pj
    @AkashRaj-ui1pj 5 ปีที่แล้ว

    Your videos are a aaaaaaaaaamaaaaaazinggggg

  • @devsingh6041
    @devsingh6041 4 ปีที่แล้ว

    this video is sufficient to understand XXE. Thanks Pwn You Func well ;-)

  • @tanishqsachdev8388
    @tanishqsachdev8388 4 ปีที่แล้ว

    Amazing video.

  • @huntit4578
    @huntit4578 2 ปีที่แล้ว

    What software do u use to make these slideshow or animation (Whatever) to explain these attacks in such a interesting way?

  • @muhammadadel9537
    @muhammadadel9537 4 ปีที่แล้ว

    Super AWESOME!!

  • @CosmoCopulates1
    @CosmoCopulates1 5 ปีที่แล้ว

    Dude, your videos are great! What do you use to create the animations?

  • @SatsJava
    @SatsJava 5 ปีที่แล้ว

    You deserved million subscriber
    Keep make more videos mate

    • @PwnFunction
      @PwnFunction  5 ปีที่แล้ว +2

      Well that's a longgggggggggg way. Don't think I could ever hit such crazy numbers, If I hit 10k then I feel like I've accomplished something :) but thanks.

    • @0xExploitXpErtz
      @0xExploitXpErtz ปีที่แล้ว

      @@PwnFunction u will surely achieve it IA

  • @jasonmikinskiwallet4308
    @jasonmikinskiwallet4308 3 ปีที่แล้ว

    I love the Intro

  • @ashleypursell9702
    @ashleypursell9702 3 ปีที่แล้ว

    great video thanks so much

  • @patrickslomian7423
    @patrickslomian7423 3 ปีที่แล้ว

    Love your channel Bro !!
    So I ran into a failure with Dvwa in the section "file upload",I"ve tried to upload an file with the payload.
    It seems to me that the server (using docker) wont phrase an xml file, can that be true ?
    Im getting this error :" This XML file does not appear to have any style information associated with it. The document tree is shown below.
    "
    Or should I converte that to an html file ?

  • @neadlead2621
    @neadlead2621 9 หลายเดือนก่อน

    thanks bro , I've one question at 18:05 why we need %start and %end why not changing them directely to the value

  • @emmanuelafolabi6847
    @emmanuelafolabi6847 5 ปีที่แล้ว +2

    Great videom your videos has been educative, can you make a video on based XSS?

  • @heycherry100
    @heycherry100 5 ปีที่แล้ว +1

    very nice video.

  • @eshaan7_
    @eshaan7_ 5 ปีที่แล้ว +1

    What theme for VScode and terminal are u using? BTW Great video, thanks!

    • @PwnFunction
      @PwnFunction  5 ปีที่แล้ว +2

      Monokai Pro
      Terminus - eugeny.github.io/terminus/

  • @aidenrhama9147
    @aidenrhama9147 5 ปีที่แล้ว

    what software did you use to make this content ?

  • @tekken-pakistan2718
    @tekken-pakistan2718 4 ปีที่แล้ว

    damn boi, that outro tho!

  • @giospadaccini119
    @giospadaccini119 5 ปีที่แล้ว +1

    In Italy xml is use to send invoices to the IRS, and after few day it sand that to you client .... So this video reassuring me..

  • @Manabender
    @Manabender 2 ปีที่แล้ว

    So how does one defend against this? Say I was running the server you were attacking and *didn't* want you reading /etc/passwd, but still wanted to retain as much (safe) functionality of the XML parser as possible. What would I do?

  • @tapank415
    @tapank415 5 ปีที่แล้ว

    :) Amazing!

  • @Pcpiee
    @Pcpiee 5 ปีที่แล้ว

    What terminal do you use for the examples? it looks very nice. guessing its cygwin based by the looks of it

    • @PwnFunction
      @PwnFunction  4 ปีที่แล้ว +2

      Terminus - eugeny.github.io/terminus/

  • @r4nd0m25
    @r4nd0m25 3 ปีที่แล้ว

    god level videos

  • @itizazadil9369
    @itizazadil9369 5 ปีที่แล้ว

    Thanks for the Vedio

  • @prudhvidanyamraju8017
    @prudhvidanyamraju8017 5 ปีที่แล้ว

    On a certain java server I’m able to retrieve the data of /sys/power/image_size (basically an number) using OOB xxe but I’m unable to retrieve contents of etc/passwd ; any thoughts?

  • @helloguy1179
    @helloguy1179 2 ปีที่แล้ว

    What should I do if I have to configure a http request to get a file's information, but its content contains special character? We cannot use CDATA in a URL, right?

  • @user-tz5rd3rt2s
    @user-tz5rd3rt2s 5 ปีที่แล้ว

    Nice Stuff

  • @SatriaAdyPradana
    @SatriaAdyPradana 3 ปีที่แล้ว

    do you have git repo which collect the scripts and XML files used here?

  • @BALAKRISHNAN-pf1ol
    @BALAKRISHNAN-pf1ol ปีที่แล้ว +1

    Can you attatch a link to the xml parser you used in the video

  • @asjidkalam
    @asjidkalam 4 ปีที่แล้ว

    is stok's video on OOB XXE private?

  • @aleksandar5323
    @aleksandar5323 2 ปีที่แล้ว

    How can I disable XML parser resources referencing on say an Apache Server? I don't want XML to be making any requests at all, either internal or God forbid accessing a 3rd party URL! I just want hard-coded data from it...

  • @Wikkido5000
    @Wikkido5000 2 ปีที่แล้ว

    do you have a similar video for JSON?

  • @Sparkette
    @Sparkette 3 ปีที่แล้ว

    Is it okay to use a '

  • @anatolyrapoport2216
    @anatolyrapoport2216 3 ปีที่แล้ว

    Nice tutorial!

  • @yeasirarafat4261
    @yeasirarafat4261 5 ปีที่แล้ว

    awesome

  • @erdosamangeldin3105
    @erdosamangeldin3105 2 ปีที่แล้ว

    & sign showing error while referencing an entity. I tried in ascii or hex too, it is not working. Is there any other ways to reference it?

  • @vijaykumar-hc6jz
    @vijaykumar-hc6jz 4 ปีที่แล้ว

    Why DTD is so called ? It could have also been called Entity Defintition or something like that ? Any answer to this is appeciated.

  • @patricksteinmuller8084
    @patricksteinmuller8084 ปีที่แล้ว

    Tbh. I wonder why anyone would use DTD anyhow? The reason I am so fond of XML is the existence of XSD and XSLTs. A well defined XML is both human readible and machine readible. Can be validated against an XSD, can be transformed against an XSLT and have XSD, XSLT and both XML input and XML ouput validated against respective XSDs. This is not something that we have for json or yaml. I was to lazy to look ... I somehow suspect that we have similar attack vectors in the X* Suite.

  • @annomy1493
    @annomy1493 3 ปีที่แล้ว

    voice seems to be known. Is it john harmmond ???

  • @tekken-pakistan2718
    @tekken-pakistan2718 4 ปีที่แล้ว

    nice as always!
    Can you please share your terminal's configuration/name etc.? is it zsh with custom config? Thanks mch!

    • @PwnFunction
      @PwnFunction  4 ปีที่แล้ว +1

      Terminal : eugeny.github.io/terminus/
      Yes i'm using ohmyzsh (default theme : robbyrussell)

  • @laurinneff4304
    @laurinneff4304 2 ปีที่แล้ว

    It would've been great if you had included a segment on how to protect against these attacks

    • @Morgan_iv
      @Morgan_iv ปีที่แล้ว

      Just don't use XML

  • @xf4229
    @xf4229 3 ปีที่แล้ว

    I am having issue accessing id_rsa in .ssh file. Is there any way to bypass it? The current issue is I/O warning: fail to load external entity.

  • @aymanrbati531
    @aymanrbati531 2 ปีที่แล้ว

    why cant u declare the "send" entity directly in the external DTD ? why put it inside 'wrapper' ?

  • @overgrowncarrot1
    @overgrowncarrot1 3 ปีที่แล้ว

    I like how John hammond says I have a small youtube channel lol

  • @user-xb9zg3fv9j
    @user-xb9zg3fv9j 8 หลายเดือนก่อน

    hey hey hey sir please tell this theme of zsh. I tried searching all of them but i didn't find anyone like this please do tell.

  • @generalinformation3194
    @generalinformation3194 2 ปีที่แล้ว

    hello can i get the xmlsax_parser tool you use it in the video plz

  • @alexanderwu
    @alexanderwu 3 หลายเดือนก่อน

    So... How do you defend against it?

  • @stefaunholland6642
    @stefaunholland6642 ปีที่แล้ว

    The way you say "parameter" makes me think of a parking meter with a parachute falling out the sky - an American

  • @d86123
    @d86123 3 ปีที่แล้ว

    那麼...問題是,如何防止XXE注入攻擊呢?

  • @ca7986
    @ca7986 4 ปีที่แล้ว

    ♥️

  • @coastaldemigod
    @coastaldemigod 2 ปีที่แล้ว

    my engineering professor taught the first 10 mins. of this video in 1 month

  • @eduardoandrescastilloperer4810
    @eduardoandrescastilloperer4810 5 หลายเดือนก่อน

    OMG why was that even encoded into the standard!!!

  • @tuttifrutti4184
    @tuttifrutti4184 4 หลายเดือนก่อน +1

    holy shit this is so hard to understand, but I suppose it's supposed to be this way unless you actually practise using XML for quite some time

  • @IBMboy
    @IBMboy 5 ปีที่แล้ว +5

    9:47 My name is jeff. Nice meme

  • @lexibigcheese
    @lexibigcheese 2 ปีที่แล้ว

    so that's why there's a doctype html. that's what it's for!

  • @puravida012
    @puravida012 5 ปีที่แล้ว

    this is soo old, HTB show something like this almost a year ago

    • @PwnFunction
      @PwnFunction  5 ปีที่แล้ว

      Yeah it's very old, you can even find stuff about it, way back in 2002.
      www.securityfocus.com/archive/1/297714/2002-10-27/2002-11-02/0

  • @acunsumageka3949
    @acunsumageka3949 3 ปีที่แล้ว

    tools for xml parser ?

  • @zxuiji
    @zxuiji 2 ปีที่แล้ว

    2:42, already think of JSON as easier, just use a string and escape the quote characters
    **Edit:** I also prefer lua when I need more than just data capabilities

  • @arenddejong6609
    @arenddejong6609 5 ปีที่แล้ว

    LiveOverflow JohnHammond 2.0

  • @JD-mz1rl
    @JD-mz1rl 3 ปีที่แล้ว

    I don't get it. Unless the web server is running with root permissions, what useful files are you going to get out of it?

    • @Aidiakapi
      @Aidiakapi 3 ปีที่แล้ว

      It's not just for web servers, it can compromise clients too. Getting someone to open a document and extract information.
      As for what useful files, plenty of web servers will have access to many useful files. Configuration files, uploaded artifacts, etc.

    • @ctfs09
      @ctfs09 2 ปีที่แล้ว

      there is something you need to explore more! You don't have to be root, its not about editing , it is just exfiltrating and you don't have to be root! Try cat /etc/passwd without being root and even you can see that.

  • @uplink-on-yt
    @uplink-on-yt 2 ปีที่แล้ว

    My reaction (comment, not video): eyes open wide, mouth covered with hand, deep breath - AKA "Surprised Pikachu". This is possibly one ofvthe most evil things I've ever seen (yeah... I'm pretty innocent)

  • @hellb0y794
    @hellb0y794 2 ปีที่แล้ว +1

    your sound like @liveoverflow, are you his brother? 😆

  • @jagc2206
    @jagc2206 5 ปีที่แล้ว

    Xml is so stupid, but maybe it's just that everything using xml is old and "legacy" and thus has a bad structure (or just one for internal us only) and it thus extremely frustrating.
    I am currently working on a 50k line xml, I don't use the dtds or any other of the extanal information in the document, but I clicked on some links and most of them are 404s at this point................
    But hey its better than csv with sometimes quotes, sometimes not containing ~ seperated arrays, with inconsequent formating and id values

  • @0xgodson119
    @0xgodson119 2 ปีที่แล้ว +1

    John mama 😂😂😂

  • @mylyf6684
    @mylyf6684 4 ปีที่แล้ว +1

    Hai bro will you please share that python script for parsing XML. please...

    • @PwnFunction
      @PwnFunction  4 ปีที่แล้ว

      I don't have the code, but it was a simple sax xml parser written in python - docs.python.org/3/library/xml.sax.reader.html

    • @kallikantzaros
      @kallikantzaros 2 ปีที่แล้ว +1

      from lxml import etree
      parser = etree.XMLParser(load_dtd=True,
      no_network=False)
      tree = etree.parse("main_attack.xml", parser=parser)
      etree.dump(tree.getroot())