How We Hacked a TP-Link Router and Took Home $55,000 in Pwn2Own

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 371

  • @coreyfournier3345
    @coreyfournier3345 2 роки тому +92

    As a software developer I would have liked to hear what could have been done to prevent this. Obviously not running everything as root to start with.

    • @FlashbackTeam
      @FlashbackTeam  2 роки тому +145

      Several mistakes were committed:
      - running everything as root
      - mounting the root file system as read-write
      - hardcoding the encryption key
      - enabling a network service when it's not necessary (we hadn't configured this feature, it is enabled by default)
      But most importantly, input wasn't sanitised. Notice that it expects a MAC address, which has a very strict and well known format: aa:bb:cc:dd:ee:ff
      After copying to an intermediate buffer with a limited size (as they did correctly), they should have validated the MAC address before proceeding. This could have easily been done with a regex, such as: ^[a-fA-F0-9]{2}(:[a-fA-F0-9]{2}){5}$
      In addition, they could have introduced additional security controls, such as a properly configured firewall, sandboxing, etc.

    • @supermaster2012
      @supermaster2012 2 роки тому +2

      @Ralph Reilly there's a reason for this, it saves manufacturing costs as they can just flash the same exact image over and over and let the device bootstrap when it's booted up for the first time.

    • @itzurabhi
      @itzurabhi 2 роки тому +3

      for the C, C++ devs : -Wall -Wextra -Wconversion -Werror

    • @TonyLee_windsurf
      @TonyLee_windsurf 2 роки тому +1

      @@supermaster2012 One can use public key encryption, at lease hide the private key. Harder for hacker to create diff encrypted pkt.

    • @thoriumbr
      @thoriumbr Рік тому +7

      @@TonyLee_windsurf You can't "hide" the private key, as the software will need it to decrypt the packet. Hard coding the key is terrible because every single router using the same firmware uses the same key. If the key was saved on a file, and checked and generated if the file was missing, it would not be possible to hack every router without physical access to it first.

  • @HritikV
    @HritikV 3 роки тому +138

    It wasn't rushed at all. A perfect explanation at a perfect pace.

    • @jaimedpcaus1
      @jaimedpcaus1 2 роки тому

      What was "connected pin to line" what was that? What did he say?

  • @logicalness
    @logicalness 3 роки тому +154

    Great work guys! Pedro’s explanation of the team’s process of auditing system calls is exceptional. This kind of breakdown is something I rarely see covered in detail.

  • @myname-mz3lo
    @myname-mz3lo Рік тому +4

    the way you created a file one character at a time is so smart . i would have felt so stuck with the 13 characters .

  • @ryanduke6784
    @ryanduke6784 6 місяців тому +3

    My god. I think this is the best channel ive seen so far. These dudes are legit

  • @TheGrimSniper14
    @TheGrimSniper14 3 роки тому +27

    We absolutely love these kinds of detailed breakdown of your thought process while looking at a target. Definitely continue doing these types of videos

  • @VladimirJog
    @VladimirJog Місяць тому

    I went from trying to find a work around to remove ISP limitation to Getting full control of the device. Your videos were a big help.

  • @ProfessorRainman
    @ProfessorRainman 5 місяців тому +1

    This is my new favorite UA-cam channel full stop. Excellent work guys!

  • @Raintiger88
    @Raintiger88 2 роки тому +3

    I just found your channel yesterday and I'm really enjoying your videos. The information and quality is unmatched!

  • @paramatus3531
    @paramatus3531 2 роки тому +1

    I like what you have done there. Very straight forward explenation, and I have to slightly disagree with you saying it was rushed. It was perfect. Longer videos are harder to follow and the amount you put in and the little backstories like being in Laos spiced it up a little. I am looking forward to more of your exploits.

  • @kshitijnalawade8554
    @kshitijnalawade8554 3 роки тому +3

    idk what I should comment now.. Everything I wanted to say like 'this is awesome' and stuff has been said by everyone.. But I'm still commenting to let you guys know that we really need more of this great content from you guys!! Really appreciate it!!

  • @DursunX
    @DursunX 2 роки тому +1

    non-programmer here
    i love this breakdown. i get to witness the mindset of successfully exploiting a vulnerability (within a 13 character limitation).
    i actually got it. most of it made sense even to an 'illiterate' bystander like myself.
    pwn bounty well deserved!

  • @Barqi
    @Barqi 3 роки тому +7

    You guys did an amazing job in explaining the exploitation process. For a next video I would love to see more on how you reverse engineer/decrypt the code and the process of analyzing it. Thanks for giving back to the community! You rock!

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому +4

      Thanks for the feedback!
      We will show that in detail in future videos. Bear in mind there was a serious reverse engineering effort behind all of this. Most functions in the binary were not even defined, and all symbols are our names (the binary had few symbols).

    • @Barqi
      @Barqi 3 роки тому +4

      @@FlashbackTeam I understand. But what for me personally would be super interesting to see, is how to start turning that binary code into code. I think that there are not that many videos on hardware > code > recognising exploitable functions.
      Again, thanks for giving back to the community!

    • @RafaelKarosuo
      @RafaelKarosuo Рік тому +1

      @@FlashbackTeam I was thinking "how on earth you got all those symbols if the code wasn't compiled for debugging", thanks for the clarification, a lot of effort indeed.

  • @kltr007
    @kltr007 2 роки тому +1

    Thank for sharing this. I like the no-nonsense style. For your first video this is a great piece of work. Like your graphics - a picture says more than thousand words. Must have been a lot of work but it pays back.

  • @ninoivanov
    @ninoivanov 2 роки тому +1

    ... fiiiiinally an actually GOOD channel on such topics...

  • @danielmonzon7396
    @danielmonzon7396 3 роки тому +21

    Wow, impressive work guys, learnt so much in a single video. As feedback I would say that it would be cool to have a quick look on the exploiting writing process ;)

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому +8

      Thank you for your feedback! We will go into depth on that in the next videos!

    • @danielmonzon7396
      @danielmonzon7396 3 роки тому +2

      @@FlashbackTeam u are welcome, can't wait to watch them :P

    • @KaleshwarVhKaleshwarVh
      @KaleshwarVhKaleshwarVh 3 роки тому +3

      @@FlashbackTeam yes, I guess, the length of the video doesn't matter for people who will wanna learn. So go for it.

  • @tehnics-optics4560
    @tehnics-optics4560 5 місяців тому +1

    Hi ,
    Great work guys!!!!!! I just found your channel yesterday and I'm really enjoying your videos !!!!!!!! Everything I wanted to say like 'this is awesome' !!!!!!! Please make longer video about setup your environment and witch program use for exploit for router !

  • @Harshitshukla88
    @Harshitshukla88 2 роки тому +2

    You guys rocked🔥 lot of learning in a single video from hardware to binary, reverse engineering to maintaining access .....😃

  • @ui4lh
    @ui4lh 2 роки тому +2

    Pure genius the writing to a shell script and then executing lol

  • @JK-pb3vj
    @JK-pb3vj 3 роки тому +2

    Blyat, this is the best router exploit video on UA-cam by a long way! More of this guys ✌️

  • @jacoblpeterson
    @jacoblpeterson 2 роки тому +3

    Excellent video. I couldn't stop laughing at the `echo urmom>d` hahaha

  • @neroux712
    @neroux712 2 роки тому +2

    From a developer sight of view, it makes me now think twice about validation of strings from not trust able sources, as the exploit would break if any function in the call chain would check the input values fully also for injection. Very interesting how "easy" it is to gain access when you reach a specific level of knowledge, very nice video and remote Injection method of the remote shell!

  • @wowimoldaf
    @wowimoldaf 2 роки тому +1

    This is very, very well graphiced exploit explanation. Huge thanks, there are million exploit explanations but i never seen like this one.

  • @anitsh
    @anitsh 3 роки тому +6

    Loved the experience watching the video. As a n00b, I'm thankful for the details presented and would request that even more videos with even more details would be much appreciated. And wish both of you the very best.Cheers,

  • @MagicPlants
    @MagicPlants 2 роки тому +3

    Printing one char at a time to a file due to the charlimit then executing the file was genius!

  • @surferbum618
    @surferbum618 3 роки тому +6

    This was awesome, and thanks for showing your thought process when discovering this vuln. Hope to learn more from you guys in the future

  • @prox5784
    @prox5784 3 роки тому +7

    That was fantastic and very well put together. Very educational. So excited to see more of this!

  • @rdarkmind
    @rdarkmind 2 роки тому +4

    Money well deserved! This was just beautiful. Thanks for sharing guys. I'd have to re-watch the reverse engineering part of the system calls a few times to understand what's happening though 😅

  • @thefastjojo
    @thefastjojo 3 роки тому +1

    explanation in the state of art! Brilliant, and waiting for more, congratulations!

  • @brotatobrosaurus5411
    @brotatobrosaurus5411 Рік тому +1

    Nice exploit, even better explanation! Great work.

  • @sombramurk793
    @sombramurk793 2 роки тому +3

    Awesome guys! What a video... very clear and objective. The exploit sending one char at a time was really dope

  • @iikon69
    @iikon69 2 роки тому +3

    Great work, love the thought behind constructing the final final in chunks due to the character limitation.

  • @NetworkITguy
    @NetworkITguy 2 роки тому +1

    I never get tired of your voice ;)

  • @kevinnyawakira4600
    @kevinnyawakira4600 3 роки тому +1

    That was pretty cool. I will like to see more videos like this one. Also a video of how someone can get started in hardware hacking, tools required will be appreciated

  • @flinkiklug6666
    @flinkiklug6666 2 роки тому +2

    Verry nice job. I don’t understand what you exactly does but it is so a nice idea. I want to learn this. Sooo nice

  • @pincombe
    @pincombe 2 роки тому +1

    Great video, first time I've been aware of a reverse shell before really interesting stuff!

  • @EJohnson688
    @EJohnson688 3 роки тому +3

    Nice work, thanks for the great deep dive! Keep up the great work on developing that specialty education platform :)

  • @karolinajoachimczyk3168
    @karolinajoachimczyk3168 2 роки тому +1

    Panowie, super robota, jako początkujący embeddeddev bardzo dziękuję za content!

  • @HK-sw3vi
    @HK-sw3vi 3 роки тому +4

    mad respect for you guys, what's better than learning from the bests.

  • @gauravhksharma5760
    @gauravhksharma5760 3 роки тому +2

    Congratulations guys. Looking forward to learning more. Thank you for starting this channel 👍🏼👌🏽

  • @localman9341
    @localman9341 3 роки тому +2

    Amazing content guys. Waiting for more🙃

  • @geraldamasi1559
    @geraldamasi1559 3 роки тому +1

    The explanation is quite good and making it seem easy. Good guys

  • @AtreidaeChibiko
    @AtreidaeChibiko 2 роки тому +1

    Didn't expect to see Dashie in this video. But I'll take it!

  • @saketsrv9068
    @saketsrv9068 2 роки тому +1

    You guy's are insane, please release nore videos. Highly appreciated

  • @alanavella8640
    @alanavella8640 2 роки тому +1

    Great job guys! Does that mean that us, the users, are vulnerable through the network just by having one of these at home?. Or would I be in trouble just if I invite you for a cup of coffee?🤣🤣🤣 Keep it up!

    • @FlashbackTeam
      @FlashbackTeam  2 роки тому

      If you use it at home, you would only be vulnerable if you invited us for a cup of coffee... but it's not that simple, let us explain!
      Routers like these are used in small businesses to provide Internet service to the business' customers, which would be connected to the LAN interfaces (Wi-Fi or Ethernet).
      As a small business customer (let's say in a cafe, hotel or hospital), you could abuse this vulnerability, take control of the router, and attack the other customers.
      LAN style attacks are also relevant in large businesses, where for example you connect to a segregated Wi-Fi network, but are still connected to the LAN-side of a router, and could then execute similar attacks.
      In the same competition we actually hacked the same router over the WAN interface (where the router connects to the Internet), we will put a video up describing the attack in the future.
      This last phrase means that if you use this router, you are still vulnerable from the outside of your local network (outside of the coffee cup zone), NOT due to this specific vulnerability, but due to others we found in the same competition :D

  • @thebrotherhood1675
    @thebrotherhood1675 3 роки тому +5

    brilliant waiting for more!

  • @JBarszczu
    @JBarszczu 2 роки тому +2

    This is the best hardware hacking video I have seen in my life. Thank you!

  • @davidraber-radakovits1572
    @davidraber-radakovits1572 2 роки тому

    GND pins are usually easy to find by eye since they're most often connected to a GND plane instead of a line.

  • @smitcher
    @smitcher 27 днів тому

    Not checking the format of the payload basically. If you are expecting a Mac address then at least check that the payload is a valid Mac address before you append it to a string and execute it (as root too duh!)... Great work guys, this is genius, the tracing of where the data came in, the print 'x'>>a to built up the file was clever and the script to send that over as TPDP packets was great. Then you have the paperclip! A great masterclass...
    Lots of examples of hacking embedded devices that are online involve getting a firmware update, using binwalk to break it down and look for vulnerabilities in software or hardcoded passwords and that's about it. Actual "hardware" hacking though is a very different beast.

  • @nsknyc
    @nsknyc 3 роки тому +1

    ah so late for this, but absolutely worth the watch. Congrats guys on this fantastic job. "Looks juicy" my new favorite phrase :p

  • @davidbristoll195
    @davidbristoll195 2 роки тому +2

    Very cleverly done. I really enjoyed watching 👍

  • @corneliusb2695
    @corneliusb2695 3 роки тому +1

    Great vid can't wait to see more! Which plugins are you using on Ghidra?

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому +1

      We only use the Ghidra Hues plugin to have a dark theme. The original author deleted it, but here is a copy in Pedro's github repo:
      github.com/pedrib/ghidra.hues

  • @th3p1tbulll
    @th3p1tbulll 2 роки тому +2

    Very nice job! Congratulations boys!!!

  • @somsiri9319
    @somsiri9319 3 роки тому +1

    Great work! Looking forward to the next video.

  • @rizkvn
    @rizkvn 2 роки тому +1

    even this video is more than 10 minutes, I'm take a break from my workload to watch this video
    nice education video bro, from me who interest on vulnerability hardware

  • @loocatme6779
    @loocatme6779 2 роки тому +1

    You, Sir, are a scholar and a certified badass.

  • @jesseopjescherm
    @jesseopjescherm 2 роки тому

    Awesome video! Great pace and explanation. The file buildup within the 13 char limit is genius haha. Well done!

  • @DefconUnicorn
    @DefconUnicorn 2 роки тому +1

    Really nice work dudes, love the idea of building it one char at a time.

  • @thatguyinelnorte
    @thatguyinelnorte 3 роки тому +1

    Well done Flashback Team!

  • @13DarkWolf
    @13DarkWolf 3 роки тому +1

    Really nice and clear breakdown guys and congrats on the bounty!

  • @0xbitbybit
    @0xbitbybit 2 роки тому +1

    Loved it, great explanation with the reversing, thanks guys!

  • @1337BR3AK
    @1337BR3AK 2 роки тому +2

    Great video and explanation!

  • @leonvolq6179
    @leonvolq6179 2 роки тому +1

    Perfect explanation, I'm going to copy the part where you go in motorcycles 😄

  • @Ragekillen
    @Ragekillen 2 роки тому +1

    Your getting a sub from me I love how you go into full detail although I wish you told us what disassembler you used

  • @anonimanonimowy950
    @anonimanonimowy950 2 роки тому +2

    kurrrrrwa Pedro, we have to do it

  • @murrij
    @murrij 2 роки тому +1

    Wow! Thank you so much for your work on this video. Explanations are great for someone starting out like me.

  • @cq_YT
    @cq_YT 3 роки тому +1

    Awesome work! Wait for more and learn from you.

  • @neuronwave
    @neuronwave 2 роки тому +1

    Absolutely fantastic explanation. Really enjoyed it and understood it!

  • @andyklavins
    @andyklavins 3 роки тому +1

    Beautiful! Are there vulnerabilities in later TP-Link routers?

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому

      Absolutely, many of them, just google it!

  • @pedroguillenoficial
    @pedroguillenoficial 9 місяців тому

    Great video guay! Where do you get the arm articulated for connect the pins?

  • @outsiderlost
    @outsiderlost 2 роки тому +2

    Someone help me with a little "slap" on how to get the online interface login once I'm in it. 🤔 (I know the basics and the location of the hash required for encryption. But it has nothing to do with the online superficial passw)
    I had a lot of fun with the video anyway! Anyway, I had a great time with the video, let there be more of these tplink stuff..! ✔ 😎

  • @sven5666
    @sven5666 2 роки тому +1

    Thank you guys. Absolutely awesome video! Really well structured and presented.

  • @aaryanbhagat4852
    @aaryanbhagat4852 3 роки тому +1

    Excellent explanation, super cool method of exploit!

  • @ogiogi2714
    @ogiogi2714 3 роки тому +1

    Got damn it congrats flashback team !!!!

  • @ViK36bankai
    @ViK36bankai 3 роки тому +1

    Hii! Nice video.
    Could you please explain in more detail about the logistics of sending the packet carrying the payloads?
    I want to know exactly what steps are taken to create the desired packet, what does it look like, how is it crafted, how it is sent, and how the target is made to receive it - is there no preceding functions the target must execute to prepare for handling this onemesh request? What would it look like if it were TCP?
    Sorry if the answers are obvious, I am out of my depth at this level of exploitation and would love to learn.

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому +2

      Thanks for the comments! You'll find full details in our advisories:
      github.com/pedrib/PoC/blob/master/advisories/Pwn2Own/Tokyo_2019/lao_bomb/lao_bomb.md
      github.com/rdomanski/Exploits_and_Advisories/blob/master/advisories/Pwn2Own/Tokyo2020/minesweeper.md

  • @machazard009
    @machazard009 2 роки тому

    Nice work guys. Congratulations on the win. Have you always come across routers with root? What about routers with embedded microcontrollers.

  • @MisterWallopy
    @MisterWallopy 2 роки тому +3

    I already didn't buy TP-Link for other reasons. This is just the final nail in the coffin. Sadly, alot of even reputable brands do similar things. Would love to see if Asus, Netgear, Eero and others have the same flaws. Makes you understand why Cyclops Blink was so effective in spreading.

  • @akashsxo
    @akashsxo 3 роки тому +1

    Now i am going to try this on my own router.Amazing Amazing Amazing !

  • @NCMilVet
    @NCMilVet Рік тому +1

    Great job guys. And great video.

  • @JoshDavidLevy
    @JoshDavidLevy 3 роки тому +1

    Really enjoyed this explanation. Great job guys

  • @saidinesh5
    @saidinesh5 2 роки тому +1

    Really enjoyed the video.. especially the 13 character limit part..
    Out of curiosity, is there any reason tp link left the uart open or was it something they just overlooked?
    P.S extra kudos to the subtle humor you injected into this video.

    • @FlashbackTeam
      @FlashbackTeam  2 роки тому +1

      I think they assumed physically removing a Rx line would be enough. We see a lot of devices with enabled UART.

    • @saidinesh5
      @saidinesh5 2 роки тому

      @@FlashbackTeam I see.. Yeah it was odd to see the uart still being there because it seemed like such an obvious security hole. Good job still!

    • @grayfox2600
      @grayfox2600 2 роки тому

      @@FlashbackTeam is that why you bridged it with a paperclip?

    • @runed0s86
      @runed0s86 2 роки тому +1

      UART can usually be used to recover softbricked systems.

  • @markooo4429
    @markooo4429 3 роки тому +1

    Amazing, cant wait for next video

  • @florianmaetschke9054
    @florianmaetschke9054 2 роки тому +1

    Great Job! Super good video! keep on

  • @mirhat9330
    @mirhat9330 3 роки тому +1

    Thanks for the awesome video, Can you make more video on router hacking and what is the ghidra theme you guys are using :)

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому +1

      We will definitely do more videos on embedded device hacking. We will use routers as an example, but actually many devices are similar to routers, such as firewalls, network devices and embedded devices in general.
      The Ghidra theme is Ghidra.Hues: github.com/pedrib/ghidra.hues

    • @mohamedazaiez7109
      @mohamedazaiez7109 3 роки тому +1

      Great video,it's the first exploit that I actually understood,but i hope you cover more about the initial reversing process and how you managed to find the exploitable function upon the thousands of other stuff or just like some general tips for simplying the undreadable code into a simpler one(I would understand if you want to keep like the scripts you used for your own)

  • @gearboxworks
    @gearboxworks Рік тому

    Not rushed at all, excellent!
    What was the disassembler/IDE Radek was using?

    • @FlashbackTeam
      @FlashbackTeam  Рік тому +1

      Thank you! I think you are asking about Ghidra? It's a tool for reverse engineering of binaries.

    • @gearboxworks
      @gearboxworks Рік тому

      @@FlashbackTeam Yes, that's what I was asking for, thanks.
      But holy crap, developed by the US NSA?!? 😲
      And too bad they chose Java. Ugh.

    • @FlashbackTeam
      @FlashbackTeam  Рік тому +1

      @@gearboxworks it's open source tho. There are commercial alternatives like IDA Pro or binary ninja.

    • @gearboxworks
      @gearboxworks Рік тому

      @@FlashbackTeam Yes, of course, as it is on GitHub with an O/S license.
      I'm just surprised that the NSA open-sourced it. That's like something Snowden would do, but without it being official!

  • @okar1
    @okar1 3 роки тому +1

    Great video! Is there an STL for the articulated arms?

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому

      Hi. Thanks!
      I didn't print the arms myself but bought it directly from Giuseppe. But I think he links the files under CC license. Take a look here: www.thingiverse.com/thing:2427726
      I saw similar product from sensepeek.com/ but didn't use them myself yet.

  • @orenishay4175
    @orenishay4175 3 роки тому +2

    This video was amazing! Right to the point and I understood everything! thank you!

  • @mamborambo
    @mamborambo 2 роки тому +1

    The best type of learning ... by peeking over the shoulder of a master

  • @bonk1463
    @bonk1463 2 роки тому +2

    "urmom" LOL, love how they the used the word in every part of the exploit

  • @ruslanshuster9124
    @ruslanshuster9124 2 роки тому +1

    Great video, enjoyed a lot! Clever exploit:)

  • @MysterPotato70
    @MysterPotato70 2 роки тому +1

    does this still work if the router was flashed with something like openwrt? or is this specific to the stock os? Anyways great job explaining!

  • @renify_
    @renify_ 2 роки тому +1

    wow pretty straight forward explaination

  • @shibbyshaggy
    @shibbyshaggy 3 роки тому +2

    Really good video guys. But this only worked because you were on the same network as the router. How to exploit it if you are not on the LAN?

    • @FlashbackTeam
      @FlashbackTeam  3 роки тому

      The vulnerabilities demonstrated in this video are only exploitable over the LAN. It is impossible to exploit them over the WAN in the default router configuration.
      We used it to win the Pwn2Own Tokyo 2019 TP-Link LAN category.

  • @romankolesnikov4373
    @romankolesnikov4373 2 роки тому

    only after this vid i understood purpose for all those exercises with "draw piramid with numbers using C lang")))))))))
    thanks a lot!

  • @depth5322
    @depth5322 Рік тому +1

    It’s awesome guys. It’s very interesting. Thank you for explanation

  • @alreadyputitup
    @alreadyputitup 2 роки тому +1

    great presentation, very clearly communicated

  • @hanshansli2238
    @hanshansli2238 Рік тому +1

    thank you guys, great video!

  • @DrewMarold
    @DrewMarold Рік тому +1

    Very cool, nice job, guys.

  • @crazyhacker2437
    @crazyhacker2437 2 роки тому +1

    you guys are awesome. Love from India 😍🙏🏻

  • @teslastellar
    @teslastellar 2 роки тому +1

    Thank you so much for explaining the process.