DANGEROUS Python Flask Debug Mode Vulnerabilities

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Snyk is the sponsor for this video and deserves some love, try it out to find vulnerabilities in your own applications! j-h.io/snyk
    Help the channel grow with a Like, Comment, & Subscribe!
    ❤️ Support ➡ j-h.io/patreon ↔ j-h.io/paypal ↔ j-h.io/buymeac...
    Check out the affiliates below for more free or discounted learning!
    🖥️ Zero-Point Security ➡ Certified Red Team Operator j-h.io/crto
    💻Zero-Point Security ➡ C2 Development with C# j-h.io/c2dev
    🐜Zero2Automated ➡ Ultimate Malware Reverse Engineering j-h.io/zero2auto
    🐜Zero2Automated ➡ MISP & Malware Sandbox j-h.io/zero2au...
    ⛳Point3 ESCALATE ➡ Top-Notch Capture the Flag Training j-h.io/escalate
    👨🏻‍💻7aSecurity ➡ Hacking Courses & Pentesting j-h.io/7asecurity
    📗Humble Bundle ➡ j-h.io/humbleb...
    🐶Snyk ➡ j-h.io/snyk
    🤹‍♀️SkillShare ➡ j-h.io/skillshare
    🌎Follow me! ➡ j-h.io/discord ↔ j-h.io/twitter ↔ j-h.io/linkedin ↔ j-h.io/instagram ↔ j-h.io/tiktok
    📧Contact me! (I may be very slow to respond or completely unable to)
    🤝Sponsorship Inquiries ➡ j-h.io/sponsor...
    🚩 CTF Hosting Requests ➡ j-h.io/ctf
    🎤 Speaking Requests ➡ j-h.io/speaking
    💥 Malware Submission ➡ j-h.io/malware
    ❓ Everything Else ➡ j-h.io/etc

Комментарии • 74

  • @_JohnHammond
    @_JohnHammond  2 года назад +13

    Snyk is the sponsor for this video and deserves some love, try it out to find vulnerabilities in your own applications! j-h.io/snyk

    • @octagear
      @octagear 2 года назад

      sneak hm...snük

  • @Jayme
    @Jayme 2 года назад +6

    This one really hits home because I use flask for most my projects.

  • @seanvinsick5271
    @seanvinsick5271 2 года назад +21

    # in a url is a page anchor. Like for a long webpage, clicking the link will jump to a specific section of the webpage. It's ignore for the actual file retrieval portion of the request

    • @rebane2001
      @rebane2001 2 года назад +3

      Fun fact, it's client-side only. This is how sites like Mega and Wormhole can include encryption keys in links that never get sent to the server (provided the JavaScript on the page is safe).

    • @allyouracid
      @allyouracid Год назад

      Yeah this is extremely DANGEROUS - by the way, doors are very unsafe, too. If you leave them open, any burglar can simply walk right into your house. Scandal!

  • @3N18AKPzmGOsBgWKH
    @3N18AKPzmGOsBgWKH 2 года назад +5

    Yes! The Legend!! :D Interesting with the debug mode.. Heard of it in Flask but never encountered it :)

  • @TheJobCompany
    @TheJobCompany 2 года назад +31

    I'm actually curious; if we have arbitrary file read, can't we read the stdout or stderr of the flask server and get the PIN from /proc/self/fd/{1,2} instead?
    Update: we probably cannot do that because the process is still running and the stdout stream is not terminated by an eof, which means the when the file is being read, it's likely gonna wait for the eof, but that will never happen until the process terminates, so the request hangs.

    • @seanvinsick5271
      @seanvinsick5271 2 года назад +1

      Depends on of and when the program flushes the buffer. Take tail -f for example.

    • @TheJobCompany
      @TheJobCompany 2 года назад

      @@seanvinsick5271 true, someone should patch the `flask run` command to flush stderr after it prints the pin..

  • @motbus3
    @motbus3 2 года назад +2

    Your videos improved a lot. I like that you are straightforward on what's really going on.
    Thanks !

  • @Yotanido
    @Yotanido 2 года назад +4

    The bit after # in an URL is called a fragment

  • @_ku1tur3
    @_ku1tur3 2 года назад +8

    Hey John, just wanted to say one thing that the snake in the thumbnail is not python but a bush viper.

  • @TheH2OWeb
    @TheH2OWeb 2 года назад

    Thanks John ! Just realized I miss your old outro music so I went to some previous video and enjoyed 😛

  • @twinsdzn1836
    @twinsdzn1836 Год назад

    Qardden token and amazon signed a partnership. It will blow up once it hits mainstream.

  • @ThapeloPilusaThePoet
    @ThapeloPilusaThePoet 2 года назад

    by any ans, but I can make what I envision, and that's the greatest gift to . You are, without a doubt, an expert teacher. You may

  • @MeMyselfAndBob
    @MeMyselfAndBob 2 года назад

    That was very cool John!! I am working on a Flask for Python web app. This video gave me great insight in some security issues! Thanks!

    • @justinboss4131
      @justinboss4131 2 года назад

      cool.. what web app are you building

  • @justinboss4131
    @justinboss4131 2 года назад

    Awesome... enjoyed this.... starting to understand more of your hacks as I learn about building web apps

  • @marveII0us
    @marveII0us 2 года назад +3

    Interesting

  • @mrsttechno5974
    @mrsttechno5974 2 года назад

    big fan from NetworkChuck

  • @Lampe2020
    @Lampe2020 Год назад +1

    12:58 You could try if the console is already usable while just hidden behind the PIN because it's rendered, so maybe if you just remove the pin input popup from the DOM you could use the console?

    • @EpicNoobx
      @EpicNoobx Год назад +1

      tried it and it for some reason just shows the 404 error thing whenever you try something
      and when you have a page called console it'll show what you made that do

  • @kiwiwelch3620
    @kiwiwelch3620 2 года назад

    Love love love the clear video quality and content

  • @solpex
    @solpex Год назад

    Your next level bro

  • @HTWwpzIuqaObMt
    @HTWwpzIuqaObMt 2 года назад

    Awesome video. I am making a flask app exploitation tool and I will add that for sure.

  • @pitachu_s
    @pitachu_s 2 года назад +1

    Nice learning some new python tricks :D

  • @mrmonday2000
    @mrmonday2000 2 года назад +1

    I honestly only use flask as the python equivalent to express, make rest api's or websocket servers, backend stuff, but always turn off debug mode in prod

  • @massylii
    @massylii 2 года назад +1

    How can I find the docker image please 💜

  • @dom1310df
    @dom1310df 2 года назад +2

    Why isn't the debug pin just a random number? Trying to be too clever?

  • @NetworkGamerBoy
    @NetworkGamerBoy 2 года назад

    Nice one John and thank you for this content.

  • @apendibachtiar8500
    @apendibachtiar8500 Год назад

    Short and easy thank you

  • @jpsl5281
    @jpsl5281 Год назад

    there are more than 10 users in my machine, how can I see which run the script ?

  • @henrym5034
    @henrym5034 2 года назад

    the /proc and /sys folders almost look like magic

  • @aakashadhikari3752
    @aakashadhikari3752 2 года назад +1

    Why dont u shorten the URL (valid SSL as it will use that shortener s SSL) and put your payload in the shorter??? how's that gonna work out

    • @aakashadhikari3752
      @aakashadhikari3752 2 года назад

      @@priyapepsi It will redirect it immediately to the local service ,try it.

  • @sandra8139
    @sandra8139 2 года назад

    Thank you John Hammond I will have checked out my python in learning this and have I got the right hack the Box I can't get it to Lead the first time and when it does it doesn't look right

  • @glockford
    @glockford 2 года назад

    'John... John!! I can't get Jurassic Park back online without Dennis Nedry."💻🖥🚨⚡⚡🦎🦕🦖

  • @alodostum4027
    @alodostum4027 Год назад

    I believe qardden token will go 100x after launch on Binance

  • @thelambdafunction
    @thelambdafunction 2 года назад

    Vulnerabilites? In debug mode? Who would have thought of that... SAID NO ONE!!!!

  • @jill-jung-jug
    @jill-jung-jug Год назад

    I'm confused about a day. with this encoding stuffs and keys.
    I'm stuck on htb agile in this part😮

  • @cankral1636
    @cankral1636 Год назад

    Any thoughts about Qardden Token? I myself think it's the best thing since sliced bread.

  • @M_IZAN
    @M_IZAN 2 года назад

    💜Jhon Hammond 💙

  • @thomsoncardozo9637
    @thomsoncardozo9637 2 года назад +1

    Big fan sir

  • @logiciananimal
    @logiciananimal 2 года назад

    John Hammond: Do you have any idea why people found your challenge hard? I for one don't know much about all those things about the /proc file system, for example.

  • @robmorgan1214
    @robmorgan1214 2 года назад

    Great video!

  • @hishmathdeen8988
    @hishmathdeen8988 2 года назад

    From which website i can download this wokerbee docker file??

  • @MILEQQQ
    @MILEQQQ Год назад

    that video is sooo cool :)

  • @50_Pence
    @50_Pence 2 года назад

    Can you search for this with shodan?

  • @LucasWuzTaken
    @LucasWuzTaken Год назад

    Walmart and Qardden token just signed a collaboration??

  • @danieltavares9860
    @danieltavares9860 2 года назад

    Hey John, please, reduce the brightness of your screen! It will damage your eyes.

  • @Asdayasman
    @Asdayasman 2 года назад

    "tack tack SSL"
    ... Did you happen to play EVE online at some point?

  • @guilherme5094
    @guilherme5094 2 года назад

    👍👍John!

  • @cipherguard
    @cipherguard Год назад

    😍

  • @muhammettangal5284
    @muhammettangal5284 Год назад

    Qardden token will moonshoot after CEX listing..

  • @lancemarchetti8673
    @lancemarchetti8673 Год назад

    This will almost never happen with Blazor...Because C# leaves less open doors to vulnerabilities in the code.
    ..my opinion of course...lol

  • @ahr0cdovlzk3my1lahqtbmftdw7
    @ahr0cdovlzk3my1lahqtbmftdw7 2 года назад +1

    I exploited this miss configuration months ago lol. has this "vulnerability" only now been officially discovered? Because if that's the case, I discovered them months ago first

    • @WashingtonFernandes
      @WashingtonFernandes 2 года назад +2

      He said in the begging that this is from a CTF he made a while ago.

    • @ahr0cdovlzk3my1lahqtbmftdw7
      @ahr0cdovlzk3my1lahqtbmftdw7 2 года назад

      @@WashingtonFernandes oh True

    • @fannah24
      @fannah24 2 года назад

      There's a few blog demonstrating this dating back from 2020, cool how this can be done.

  • @Kimanxo
    @Kimanxo 2 года назад

    I think this is already patched in python 3.9 and the new flask version, the pin reverse engineering script is not working

    • @adityagaikwad1467
      @adityagaikwad1467 2 года назад +1

      lmao yeah makes sense that the flask people wont just let a vulnerability hang in there for too long

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Sabari inn more information on this video

  • @zac2577
    @zac2577 2 года назад

    Whats updog?

  • @whamer100
    @whamer100 2 года назад

    wow this looked like a really fun challenge! I should get into doing more ctf stuff, i did picoCTF back in 2019 at my highschool, and it was an absolute blast! (i had the highest score out of my entire school with im proud of, binary exploitation, web exploitation, and the stenography challenges were my favorite)

  • @dbzanudroid2467
    @dbzanudroid2467 2 года назад

    Just telling u went to tor to search but everything is all on the open web

  • @kamalchan9756
    @kamalchan9756 2 года назад +1

    105 iam

  • @Tahmid425
    @Tahmid425 Год назад

    I believe qardden Token will change E-commerce forever. Thank me later!

  • @dashnet137
    @dashnet137 2 года назад +1

    first

    • @NobFella
      @NobFella 2 года назад +2

      Literally doesn't care.

  • @emrenazl9377
    @emrenazl9377 Год назад

    qardden Token is launching, 1000x gains. Thank me later...

  • @jpsl5281
    @jpsl5281 Год назад

    Im getting 2 different machine ids
    machine-id = 43c2ab1e-6cbd-4642-a70b-cbcfe418d38a # /proc/sys/kernel/random/boot_id
    machine-id2 = ed5b159560f54721827644bc9b220d00 #/etc/machine-id

  • @yamashita8822
    @yamashita8822 2 года назад +1

    I dont even have 2 months learning to hack but after learning XSS I realized that if python can be build a website then it can definitely come with so many more bugs.... this is a confirmation for me that I am on the right path on Hacking....CURIOCITY_IS_THE_LEADER_IN_HACKING