Advanced PHP Deserialization - Phar Files

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

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

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

    I love when you do videos that go into specific subjects like this. 👍

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

    Can I get a IppSec-Tshirt with the quote: "I expected code execution...#sadface" ?? xD That tone of voice was just perfect. ;D

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

    Thank you for including a way to eliminate this vulnerability!

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

    Amazing video.. i would like if you could continue this series..

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

    Great content 👍. All your videos are awsome. And really thanks for your support 👍

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

    You're My Inspiration ♥ :)

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

    Thank you, your last video are really cool ! I hope you will do more like that !
    I just have a question : in a black box testing, is there a way to know that there is a vulnerability or do you just try it and see if it works ?

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

      The HackTheBox videos sometimes show that -- You can normally identify it by ways applications error or don't error. But yes sometimes you just have to try it.

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

      @@ippsec phar deserialization is identified by errors usually then ? Thanks

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

      @@khneo Probably through the user of other streamwrappers on LFI like the php filter to base64 encode and the ability to upload files... With knowing those two things, that's enough for me to know to try this.

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

      @@ippsec oh ok ! Yes it makes sense, thanks again for your amazing content :) Happy holidays/Christmas !

  • @0xc0ffee_
    @0xc0ffee_ 4 ปีที่แล้ว

    You can't do this if you don't know the name of the class that's already present on the server, right?

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

      Yes, you need the source code to perform any de-serialization attacks.

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

    Can you teach me step by step for ethical hacking or pentesting

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

    Thanks heaps for this, very interesting.
    I am just wondering, how are the methods "unlink", "md5sum" triggering the destruct magic method of the object you're creating? Is is apart of the phar:// read processing? When is the object unset?
    When is it possible to use phar://, only with methods that involve reading data?

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

      Any file operation. Think of the PHAR as a ZIP File. When it goes into the ZIP File it has to unpack it and during the unpack is when the unserialize comes about. That's why i was surprised when i had code execution with unlink(phar://uploads/pharfile) -- Thought i would of had to do like phar://uploads/pharfile/test.txt to tell unlink to go inside the phar.

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

      @@ippsec Thanks for your answer!
      So in the process of unpacking the phar it unserialises the injected object, then later unsets it, triggering the destruct method?

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

      ​@@supercoolgames8218 I believe you are correct -- The object is destructed when the script completes as part of cleanup. The unlink() has nothing to do with the destruct. There's ways to trigger a fast destruct to force the object to destruct in memory before continuing in the script. I cover that slightly in the introduction video.

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

    What application do you use to edit phar file

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

    Hi. Would be great to have a little bit more volume on the audio. Otherwise, really great.

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

    when will you do smasher2? is there going to be unintended routes in the video

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

      @ippsec I was wondering the same thing

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

      I’ve said it on Twitter a bit and i think in the last videos comments - I am off work a few days after Christmas. I’ll probably do it then.

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

      @@ippsec okay thanks for responding

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

      @@ippsec Bless you man. Hope you have a good Christmas.

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

    Its been 2yrs of this video,learned a lot from it. But it somehow doesn't work with php 8.1,it works good with php 7.4 . I think they changed something in new update so it doesn't work. I spend to find why it is not working (I was working with php8.1),then ran it with php7.4 and voila,magic happened. Thanks for such quality learning meterial...