JSON Web Token Hacking

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024

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

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

    Do you prefer Tom or Jerry?

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

      Full disclosure: I know little to nothing about hacking.
      Using these hacks on sites (also your other video on JSON), wouldn't they be able to find you once you try to send a product bought on a site and send it to yourself? Hopefully you aren't sending it to your house.

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

      Hi 'Loi Liang Yang' Please You Can Do a Help For Me Please Please

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

      Hi hacker loi sir,kindly make a video on kon boot please

    • @DurgaPrasad-we1yn
      @DurgaPrasad-we1yn 3 ปีที่แล้ว

      Tom

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

      I prefer myself 🤔

  • @redmatrice4709
    @redmatrice4709 ปีที่แล้ว +20

    Correct me if i'm wrong! but the main reason for using the JWT is to verify the user without the need to connect a database and compare the values? and also changing the values of the payload misses completely the signature , which already encrypted with secret key and should be rejected in the first place, if someone uses the JWT without verifying it somehow in their website he shouldn't use JWT at all, it's like giving access to everyone and trusting blindly every user!!
    Steps as far as i know :
    1 - get the JWT
    2 - verify the signature by decrypting it using the secret key (the most important), exp ...
    3 - proceed to the next step (perform any action you need)
    if 1 fails, reject everything
    if 1 doesn't fail and 2 fails reject everything
    if 1 and 2 doesn't fail now you can go to the step three and perform the action

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

    Interesting technique, another scenario to add to my vuln checking, thanks for sharing

  • @COLMANRYAN62
    @COLMANRYAN62 11 หลายเดือนก่อน +2

    Brother, I love all your videos. They are concise, quick, no bullshit, no music and you could not have done a better job.

  • @rainfallen1064
    @rainfallen1064 2 ปีที่แล้ว +17

    I'm a bit confused. I thought the whole purpose of the JWT being secure is that the token CAN'T be manipulated (without knowing the private key). When the KID property, EXP property, etc. was changed, I would assume the the server will immediately reject it because the signature would no longer match. Or is the JWT token being used differently in this example?

    • @aquaman8870
      @aquaman8870 2 ปีที่แล้ว +7

      yea this wont happen why would you ever run or check something against the database if the Token isn't even verified. The first step is to always check the token signature and if that's invalid you just return. Why would you trust a token that isn't even verified?

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

      The signature check just never happened, it swallowed the SQL injection while looking up the key id, before it even got to verifying it. However, I'm skeptical that this reflects the order of those operations in real-world implementations, as others have noted.

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

      The point is that in order to check the signature is valid, you must handle and process the supplied header and payload. If that processing code isn’t written securely, you leave open the risk of an injection attack.

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

      @@flymoracer because the ones listening to him are beginners and don’t know actual details?

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

      @@rainfallen1064 not sure I understand you’re point here. The difference is subtle, but the important thing to realise is that there’s nothing to prevent a JWT being changed, the security comes from being able to detect that it’s changed.

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

    how did key-id with sql query from some table that gives you no useful information, give you the authorization to delete user?
    server side key id targets nothing and server does not throw an error so then it authenticates you?

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

    While this is good one, it very much depends on dal layer which is by default prevented by dal fw.
    Also someone using jwt must be using some sort of lib, and not.directly doing jwt implementation. So might not be taht much practical in real world....
    Not sure if there is some one that idiot in real world.who queries SQL directly.

  • @abura1han
    @abura1han 9 หลายเดือนก่อน +2

    Is it possible to hack if MongoDB is being used?

  • @md.riyasathossain590
    @md.riyasathossain590 2 ปีที่แล้ว +3

    Sir Loi, it was a great hacking tutorial! But now the thing is, how can "we" secure our JWT tokens and the websites using JWT?

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

    how did you know which table you needed to insert into ?

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

    Did you really read those books thoroughly ?

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

    from a developers perspective
    highly unlikely to happen that someone will query a set of keys to just verify a token
    usually, the public keys are stored in some form of cache for a lower response time,
    and the "unsafe headers" are not usually passed down directly to any query.
    if the key is not found in the cache the authentication fails

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

      From an Application security Enginer pespective. It happens a lot in the wild, devs make mistakes, even when they are not aware. I saw tokens being only decoded(not verified at all), I saw exploits that occure when the Algorithm changes, heck I even saw sqlinjection from a jwt key(the actual key, not the value).
      You don't always have to actually reach full authentication to exploit a web server.

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

      me who was just thinking to save the secure key of the tokens in the database :🙄🙄🙄

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

    But the jwt tokens are created using a secret key in server . So if we change the payload then the server will not verify the token. Because the secret will be changed..So will this method work?

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

      He forgot to mention that the jwt token from his example are unsigned. I'm not sure why is he not mentioning this important part with jwt.

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

      @@lighty262 not a serious hack just for video sake

    • @oentrepreneur
      @oentrepreneur 2 หลายเดือนก่อน +1

      Ok but what if the secret key is exposed in the JSON web token? Will that make this hack possible?

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

    Good brief, Loi. Thanks. I touch on this subject for the PenTest+ class I teach. Useful content here.

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

    I didn't understand how you knew the key?

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

    Hey how did you learn to hack , like any courses or like college ?

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

    Hello, Thanks for the video. How can we prevent this ?

  • @mr.RAND5584
    @mr.RAND5584 28 วันที่ผ่านมา

    We must have a long random key. Am I right?

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

    how yo get a m3u8 link with only the token data which expire in 10 second interval and a new token data arrives ?

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

    is it mean you have to know the server containing the key first?

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

    How would you protect against this attack?

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

    Woooww Loi Liang Please, please friend activate the subtitles (es) to be able to follow you more clearly.

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

    How did you know the location? Usually I’ve had to run sql multiple times to escalate ad find location names.

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

      He's familiar with the database scheme/ structure via writeup or earlier challenges. What you can do is route the request via sqlmap with a tamper script that would decode the token, change a parameter to the sqlmap payload, and sign the payload token to the website. that way you can use sqlmap and fuzz the server. try it with every parameter. and you'd cover a lot of potential entry points.

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

      @@SirAppSec I’m not familiar with fuzzing, but I have some man pages I can read on my kali distro.
      If I can get a grasp, I’ll give it a shot.
      Thanks for the advice. Seems like it would make things easier

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

    I've also done this once in a CTF by setting the algorithm to none :D

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

    Thank you Teacher Loi liang for the educative tutorials 🤝🏾.

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

    U always have good vids! 👏 Keep going!

  • @MuhammadAli-zg2nw
    @MuhammadAli-zg2nw 3 ปีที่แล้ว

    every website encrypt token different with different algorithms. I tried that website and it didnt tell me token information.

  • @bestbrawlersintheworld2123
    @bestbrawlersintheworld2123 2 หลายเดือนก่อน

    wait how did he know the name of the table?

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

    So how can i protect my jwt from being hacked ?

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

    Sir, How do i watch member only content?

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

    So How can we use JWT safely?

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

    I run linux but i can’t use anything because it’s telling me to remove Kali-menu when i try i get an error can anyone help me please?? 🙏🏻🙏🏻

  • @НиколайКол-е2и
    @НиколайКол-е2и 3 ปีที่แล้ว +2

    yah, no properly encrypted tokens and no csrf... what could go wrong?

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

      same question
      I don't know jwt too much
      But are'nt they supposed to be encrypted based on some algorithms and secret key's 🤔🤔
      Can someone explain to a noob please how this is possible...

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

      And what is the purpose of jwt anyway
      If anyone could miss around with it 😓🤔🤔

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

    Not all accounts have a delete button, they do have a encrypted password, or Gmail handles the password handling

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

    Where telegram group for basic hacking step by step thanks you so much🤔

  • @mohan___0704___
    @mohan___0704___ 10 หลายเดือนก่อน

    Bro ...Any Other Possible to find signature (Key)...Explain Bro

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

    Loi, I swear you're stalking me. I've just been doing labs all weekend on JWT and it was exploding my brain. Now you come along and make videos about this topic? Don't know if a coincidence or if you've hacked me

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

    How do you prevent this type of hack?

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

      I assume using a verify signature.

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

      @@dotnet9830 yes, however after doing research. JSON is not a good tokenization protocol. Example: The token does not expire instantly, hence when you log out, you really don’t log out. The server has no clue about the factual state of the token. Therefore JSON token is not safe. Security protocol is non-binary it is either safe or not safe, not both or in between. Good security is my preferred implementation, therefore using Redis cookies/tokenization is much faster and safer. However setting up Redis is much more tricky.

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

    1 comment ur good men ❤️

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

    What if pub or pvt key in place..? 😒

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

    1:18 - "We're trying to remove the cats account"... That sounds so wrong lmao

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

    Love all your videos dude... instead of hijacking an account I used it to turn my accounts into paid sub....

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

    Hi hacker loi sir,kindly make a video on kon boot please

  • @jasonc6241992
    @jasonc6241992 6 หลายเดือนก่อน

    Holy crap.. my app depends entirely on the claims in the jwt :')

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

    How to creat apk like open slot?

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

    Really good and informative vid!

  • @ramlal-kq1qr
    @ramlal-kq1qr 3 ปีที่แล้ว +3

    Make a video in sql injection

  • @erenyt-f7y
    @erenyt-f7y 3 ปีที่แล้ว +1

    Sir pls can you tell me how to join your telegram

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

    Hi, here's a quick question if I may. New Formatted Win 10 system, install a few applications, suddenly I seen the mouse move and one of the desktop icon has been duplicated. I quickly shut down my machine, and rebooted it. Is that a way to try to steal the login id and access to an account? Should I reformat the computer again? thank you

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

    Hello,
    How can I join your TH-cam channel from Pakistan?
    Warm Regards.

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

    Yehe , Exact , so how i can safe this in my web ?

  • @SonidoScoobyDoo
    @SonidoScoobyDoo 8 หลายเดือนก่อน

    there's tons of videos about this, but none about PREVENTION

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

      Just use orm, or sanitize ur query before sending to db

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

    Bro you scared me to death, my entire career is messed up because i use jwt token auth for users all the time

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

    That's why I add en encryption layer. To make it "harder"

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

    HI can anyone know how to watch video protected with pass word video master app

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

    Everything on TH-cam about hacking is already exploited and patched

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

    Is adguard DNS safe

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

    Ur awesome, thank you for sharing😊😊

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

    Yeah man, thanks for your vids!

  • @natzen770
    @natzen770 11 หลายเดือนก่อน

    you can help me for hack token?

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

    Sir can you me how to hack random android password ?

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

    How to hack RS256 Json web token?
    Can u please make a video on that

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

    Thanks for the informative video!

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

    Keep Going 😇👌

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

    i want my playstation account back i have nto been able to log in in years and stupid sony wont give me it back sense i dont got a 4 year old payment option i have no access to even thought ihave proof on bank statements and i have no access to a old email it might be on that or my account for sony got hacked .

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

    Love your videos

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

    Is hacking a sin?

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

      You can use your power for good or you can use your power for bad. The choice is yours but don't forget consequences are real.

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

    Tnx what u did. Pls can u upload video how to hack wifi pass with termux app??

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

      Termux ضعيف و تحتاج الى بطاقة ويفي تسمح بالحقن تربطها مع مخرج usbو تطبق نفس الخطوات في كالي aircrack n-g moon-Wlan0
      من الافضل استعمل كالي لأن الهاتف سيسخن بسرعة و البطارية تنفد و الهاتف يضيع

  • @mohammedalimedo5632
    @mohammedalimedo5632 6 หลายเดือนก่อน

    There is no translation available into Arabic

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

    Yes.

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

    You making it looks like a toy.

  • @SonaliSingh-ri6jq
    @SonaliSingh-ri6jq 7 หลายเดือนก่อน

    Amazing

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

    Bro create video your roadmap in hacking

  • @HamidHamid-ds9uy
    @HamidHamid-ds9uy 3 ปีที่แล้ว

    Keep up bro

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

    Can you do a tutorial about what involves in a online game hacking?

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

    Now that's i call real hacking

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

    How to shutdown other peoples computer?

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

      start with reading your name

    • @mr.smartech
      @mr.smartech 3 ปีที่แล้ว

      @@bahahamdi503 🤣

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

      @@bahahamdi503 lmao i had no other name

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

      @@bahahamdi503 baha ha hahahahha

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

      go to their home/office and click shutdown

  • @darwinmanalo5436
    @darwinmanalo5436 3 หลายเดือนก่อน +1

    This is bullshit. Just for contents sake.

  • @tekklov2646
    @tekklov2646 2 หลายเดือนก่อน

    I prefer Jerry

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

    Super cool

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

    Hi 'Loi Liang Yang' Please You Can Do a Help For Me Please Please

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

    I think all technique on youtube block soon

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

    Can you provide a video on how to install Kali Linux on PC 64bit

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

    i love hacker loi to death but he’s starting to become a script kiddie

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

    ❤️

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

    Can you play a game Grey Hack

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

    Pink panther

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

    Huh

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

    Jesus Saves, John 14:6 amen 🙏🏾

  • @Dahlah.FightMe
    @Dahlah.FightMe 3 ปีที่แล้ว

    OMG

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

    sir do video on mitmf installing in new kali release 2021 we are getting many errors while installing pls do a video of installing mitmf without getting any errors pls pls pls sir

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

    1st view

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

      I don't remember asking tho.

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

      @@jonttan03 easy bro 😂

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

    Hi, may I ask what kind of token is this? And how to decode and encode this kind of token. FYAmWWi2cCtjIqwYtCllSGz-ZV3mZ5yRWQ_PK4RQR3A