how hackers bypass file upload restrictions!

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • // Membership //
    Want to learn all about cyber-security and become an ethical hacker? Join this channel now to gain access into exclusive ethical hacking videos by clicking this link: / @loiliangyang
    // Courses //
    Full Ethical Hacking Course: www.udemy.com/...
    Full Web Ethical Hacking Course: www.udemy.com/...
    Full Mobile Hacking Course: www.udemy.com/...
    // Books //
    Kali Linux Hacking: amzn.to/3IUXaJv
    Linux Basics for Hackers: amzn.to/3EzRPV6
    The Ultimate Kali Linux Book: amzn.to/3m7cutD
    // Social Links //
    Website: www.loiliangya...
    Facebook: / loiliangyang
    Instagram: / loiliangyang
    LinkedIn: / loiliangyang
    // Disclaimer //
    Hacking without permission is illegal. This channel is strictly educational for learning about cyber-security in the areas of ethical hacking and penetration testing so that we can protect ourselves against the real hackers.

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

  • @LoiLiangYang
    @LoiLiangYang  3 года назад +42

    An even better approach is to upload the target file with docx.pdf and then change the content type to application/docx and filename during the interception by burp suite. This would improve precision in the upload process.

    • @_timestamp
      @_timestamp 3 года назад

      Hi Loi, you should pin this comment

    • @merlinwarage
      @merlinwarage 3 года назад

      @@_timestamp I like your showcases, but you should represent the solutions too, like the backend validations for this case, etc. Hacking methods without solutions seems like you only helping on the malicious people. I mean most of the pros know these stuff, your audience is the unexperienced community, and i'm sure they want to know how to prevent the stuff what you show them.

    • @jamieeccleston2988
      @jamieeccleston2988 3 года назад

      @@merlinwarage Whatever you say, don't kid yourself that Loi is only helping malicious people.

    • @merlinwarage
      @merlinwarage 3 года назад

      @@jamieeccleston2988 I'm happy, you did understand my comment.

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

      How do I know the file path after uploading it?

  • @alexjr977
    @alexjr977 3 года назад +124

    Awesome line "i am fixing the website" lol

  • @wingsdesire1
    @wingsdesire1 3 года назад +70

    This method seems more efficient than exporting to PDF. I might adopt it.

  • @torrikusu
    @torrikusu 3 года назад +52

    Finally I can send my homework on a different file format

  • @mikefromwa
    @mikefromwa 3 года назад +18

    Any developer worth his salt will check the file that's been uploaded instead of blindly accepting whatever the network sends.

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

      @MoDavid yup automatically keeping all other bu***it files in the spam folder

  • @gauravdabholkar7631
    @gauravdabholkar7631 3 года назад +8

    Yeah! Just click the file and open it in print ---> save file as required format(PDF, zip, xml,etc).......done.
    Btw, nice tutorial we can try it when we don't want to get ourselves a job😁😂

  • @lesliezhou8307
    @lesliezhou8307 3 года назад +40

    I wonder if I'm able to upload a resume in different format, would it stand out to the recruiter? awesome tutorial btw

    • @BasketballChamp
      @BasketballChamp 3 года назад

      😂😂😂😂😂😂😂 this guy

    • @jamesdickson3631
      @jamesdickson3631 3 года назад

      I use candypdf to change the format. Takes a min to do that.

  • @harrisonproductions5005
    @harrisonproductions5005 3 года назад +13

    Other methods:
    1. Zip the docx file.
    2. Export as pdf.

  • @younesmohssen8158
    @younesmohssen8158 3 года назад +3

    To the people saying he could’ve just exported the docx file to pdf. In here he’s not showing how to bypass it for the purpose of uploading your stuff, what this video basically means is that if a website is restricting you from uploading for example a php reverse shell, then you can do this exact method to get around that and bypass the file extension
    Cheers everybody

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @pqsk
    @pqsk 3 года назад +3

    In a real website I would hope that the serverside does checks, but the content-length was unchanged also. So the upload would hang waiting for the rest of the content.

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!! {W...H...A...T...S...A...P...P}+16282596917

  • @coltzi
    @coltzi 3 года назад +3

    Where's the disclaimer that this will only work if there's no server side validation in place for file types?

    • @PetsOvernight
      @PetsOvernight 3 года назад +1

      This guy never adds any disclaimers. That would ruin the clickbait.

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @ilyasayusuf5447
    @ilyasayusuf5447 3 года назад +4

    doesn't the server will check the file type again and send an error message ?

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

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

    This is quite useful if you know where the server uploads the files, and if it renames them or not. Once you know that, you can get a reverse shell by uploading say a php shell, or a simple webshell if file size is limited. Access the file in your browser and the web app will run the payload, giving you a shell on netcat. Assuming you did it all correctly anyways.

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

    • @ColonelPuttu
      @ColonelPuttu 3 года назад +1

      @@pinnedloiliangyang364 hacker don't believe

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

      How do I know the file path after uploading it?

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

      If you get lucky you can sometimes find the location by using tools like dirbuster and a dictionary of common directories. Once you find a directory of interest, dig around in it and see if you can view the contents or not. If not, try the directory/yourfile.extension and you mght get lucky again and have found the upload directory. Then just upload your payload and try to access it and the backend, if vulnerable, will execute your webshell and give access.

  • @pranaybwm
    @pranaybwm 3 года назад +1

    Mr. Loi - Hacking is illegal
    My Mind- Let's try this on realtime websites

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

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

    Much faster than adding the file to a .zip folder :)

  • @nagarathnagopal6898
    @nagarathnagopal6898 3 года назад +4

    How can we hide payloads in a image file like php payloads for reverse shell connection from a social media website

  • @budove58
    @budove58 3 года назад +1

    This will work fine if the file check security is coded on the front-end, but as a developer I would never trust the front-end for that. My Web service would refuse that request and probably try to log your IP address as well. In all honesty, if that is coded on the front end there's an easier way to get around it, just modify the client-side code. No need for an interceptor in that case. For that matter, use Postman if you already have the endpoint.

  • @kenan2386
    @kenan2386 3 года назад +1

    Teacher: Where is your homework???
    Me: Ahh its the exe file
    Teacher: haha *how*

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @smokyskullgaming5239
    @smokyskullgaming5239 3 года назад +1

    i just love this man "i am fixing website " (:

  • @CameronNoakes
    @CameronNoakes 3 года назад +5

    But surely changing everything about the request in the burp repeater tab would just make the submission fail, as you changed it all to docx, which is the same request that made it not work first time? Wouldnt it be better or more likely to work if you changed the file format exptension and file type in repeater tab but kept the actual content to upload, to evade and bypass checks? :>

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

    I love the way he talks 🤩

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

    Normal Person: Fix their resume
    Loi: Fix someone else website

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

    Pretty nice tutorial, Loiliangyang is the best !

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @mahirfr
    @mahirfr 3 года назад +1

    can you please show how to do this with the upload limit (For Facebook specially, they don't allow file size bigger than 25 MB).

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

    Love u from Bangladesh 😍😍

  • @hariesmawan5906
    @hariesmawan5906 3 года назад +1

    it doesnt work if the file check in the server side...

  • @BasketballChamp
    @BasketballChamp 3 года назад +1

    Friendly videos and knowledgeable. Keep it up Captain

  • @nikhat6884
    @nikhat6884 3 года назад +5

    But the question is that of we upload the type of file which the webiste doesn't allow me to using burpsuite then is the server even gonna process my resume or will it won't even do anything.

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

      Often, there are a lot of form validation, file validation ..etc all types of validation processes that run on the backend server to validate the input before persisting it into a db or forwarding it somewhere else. That's best practice when developing backends for web apps and sites, in case things like this occur. So your chances are pretty slim for you to succeed with such exploits on popular sites. However, most backend developers have surface knowledge of such exploits so executing these vulnerabilities often works with low-medium tier websites where security isn't the top priority.

    • @nikhat6884
      @nikhat6884 3 года назад

      @@zeallavacube6357 yes that's what I was thinking, exploits like this would be pretty useless

  • @hahahahaha525
    @hahahahaha525 3 года назад

    Proxychains sir.
    When a video of that?

  • @simplifiedtech12
    @simplifiedtech12 3 года назад +1

    You are awesome, just keep the path, we're learning with you

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @Mrjtk
    @Mrjtk 3 года назад +1

    Thanks sir for free and best Tortorials.

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

    There is no doubt Mr LOI is one of the best professional security experts. I sincerely applaud him with sharing his knowledge.
    I only hope he will consider or remember that most people watching him are learners not experts. He should please explain things to us like we learners

  • @𰽚𰽚𰽚
    @𰽚𰽚𰽚 3 года назад +1

    Thanks Loi, now I can use websites as cloud :D

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @sanfann16
    @sanfann16 3 года назад +1

    how to add USB wifi adapter to KALI,i can't do it. I plugged it in but it ain't shown the wlan. PLS HELP!

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @iliyam
    @iliyam 3 года назад +1

    Hi mester loi, I have a question, in content type for a php file what should I write?

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @enricogolfen
    @enricogolfen 3 года назад

    "You will accept my file, if you want to or not!"

  • @PravinRavi
    @PravinRavi 3 года назад

    I Used this Method to Create backlinks

  • @KAPILKUMAR-pq9ue
    @KAPILKUMAR-pq9ue 3 года назад

    Please make a tut on uploading shells and invoking it through burp

    • @younesmohssen8158
      @younesmohssen8158 3 года назад

      Whaaaaaaaaaaaaa ? Invoking it thru burp isn’t sophisticated at all, in fact why would you even want to invoke it thru burp? Why don’t you just navigate to where your shell is uploaded on the filesystem and just execute it

    • @KAPILKUMAR-pq9ue
      @KAPILKUMAR-pq9ue 3 года назад

      @@younesmohssen8158 I think you didn't get what I meant to say

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

    good job thank you

  • @SecurityTalent
    @SecurityTalent 3 года назад

    Thanks

  • @ihsan9407
    @ihsan9407 3 года назад +1

    Is this applicable on all websites

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!! {W...H...A...T...S...A...P...P}+16282596917

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

    i wonder how you could automate this. is there a way to automate burp or a proxy for python?

  • @young-ceo
    @young-ceo 3 года назад

    Thank you

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

    Hello Loi, i have an issue on this OWASP. When i try to capture cookies (expecially referring to your "how a hackerer breaks into any accounts" video) with Burpsuite it doesn't actually catch cookies, it gives me "Cookie: language=en; welcomebanner_status=dismiss", and i don't know why it doesn't give me the token. My burpsuite proxy seems to be correctly configured. Anyone can help?

    • @pqsk
      @pqsk 3 года назад

      I've never used that suite, but do you see that cookie with the token on the dev tools of the browser?

    • @GreenProStyle95
      @GreenProStyle95 3 года назад

      @@pqsk I tried that as well but it actually didn't show the token sadly

    • @pqsk
      @pqsk 3 года назад

      @@GreenProStyle95 so then that page doesn't have a token then. Those pages from owasp are for learning and not all of them have the same cookies

    • @GreenProStyle95
      @GreenProStyle95 3 года назад

      @@pqsk hmm alright thanks, i will try some other stuff and see if it makes a difference

    • @pqsk
      @pqsk 3 года назад +1

      @@GreenProStyle95 you could also make a local site. It's easier to start off like that when you have full control of the site locally on your machine. Well if you know how to do that. That would be another starting point too. Nothing fancy, just basic site with login and cookies/tokens and then you can play with it easily

  • @hamahawlery7194
    @hamahawlery7194 11 месяцев назад

    It's only to bypass the client side filter what about the server side?

  • @MsSoldadoRaso
    @MsSoldadoRaso 3 года назад +1

    Haha as fullstack dev I laugh of this 🤣😂

  • @ziyaddossri1821
    @ziyaddossri1821 3 года назад +1

    or you can literally click the docx file and export it into a pdf

  • @hf-xb2wy
    @hf-xb2wy 3 года назад +1

    Including this WOW private servers I have in mind?

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @smoka6887
    @smoka6887 3 года назад

    Great tutorials, keep the good work

  • @raghavareddychilakala657
    @raghavareddychilakala657 3 года назад

    Hai loi I seen all your playlist of android hacking. Sir but I have an issue in that process that, I am not able to get into the ADB shell on non rooted Android.
    One more thing is it possible to hack android without using ADB in any way I mean through app's that are using ADB commands are not included.

  • @edimaryoutube488
    @edimaryoutube488 3 года назад +1

    File upload vulnerability

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @manishkashyap2032
    @manishkashyap2032 3 года назад

    Sir if I take the hacking course membership then your member video is working

  • @hackingismylife2167
    @hackingismylife2167 3 года назад +1

    I need a help

  • @ghassenbarkache1676
    @ghassenbarkache1676 10 месяцев назад

    Hey
    What if the web application does not check the file content type or the code in it; but the server side filter the file extensions ; and also when you upload a picture anything before .jpeg or .png is given a random name
    Even if it is pic.php%00.png => randomname.png so it will not be executed
    Even if I changed the content type to application/x-php nothing is executed
    What do you suggest ?

  • @firenhell02
    @firenhell02 3 года назад

    Is there a video on how cookies are vulnerable to hackers?

  • @Soull-f3y
    @Soull-f3y 3 года назад +3

    😊👍

  • @darkshadow6962
    @darkshadow6962 3 года назад

    Game over

  • @macbook6507
    @macbook6507 3 года назад

    Educative tutorial 🤝🏾

  • @defyteryt2452
    @defyteryt2452 3 года назад

    Beautiful

  • @Amar-lv1yw
    @Amar-lv1yw 3 года назад

    Hey i have watched a few of your videos now and i really like them. But i have to say that they are a bit hard to understand for a beginner (what i am) so i wanted to ask you if you could make a tutorial on how to get started with hacking, techniques etc.

    • @lev2590
      @lev2590 3 года назад

      Bro, this was already a simple example. But here a list how to get started.
      Step 1. Learn programming a Website
      Step 2. Learn how to protect a Website
      Step 3. Learn how to hack websites

    • @agadaFrancisLouis
      @agadaFrancisLouis 3 года назад

      @@lev2590 wonderful piece. Please do you know all of this?

    • @lev2590
      @lev2590 3 года назад

      @@agadaFrancisLouis i would say yes. I learnt the basics like html, css and js. After that i started learning php in combination with sql for server side calculations. Then i started researching how to protect the website from known attacks like sql injection and so on. And now I do research how to hack my own Websites, so that i get even better in protecting them against bad people 😉

    • @agadaFrancisLouis
      @agadaFrancisLouis 3 года назад

      @@lev2590 I'm done with your step 1. It's the step 2 and 3 I don't know. Can you please help me, Lev?

    • @lev2590
      @lev2590 3 года назад

      @@agadaFrancisLouis what have you already learned?

  • @johnwayne8059
    @johnwayne8059 3 года назад

    That's a great Thing! Thank you!👍👍👍🤟😎

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

    is there any alternative for CAT command.

  • @auxiliabruno939
    @auxiliabruno939 3 года назад +1

    How to Kali Linux Security update Android my Android Vivo v15pro Kali Linux update

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @adebayokehinde1580
    @adebayokehinde1580 3 года назад +1

    What OS is that?

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @hahah3173
    @hahah3173 3 года назад +1

    Fixing the website 🤣🤣🤣🤣🤣🤣🤟🔥🔥🔥🔥🔥🔥

  • @footballfever134
    @footballfever134 3 года назад +1

    How can I get ur premium membership?

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!!! {W...H...A...T...S...A...P...P}+16282596917

  • @TechnicalVivekPathak
    @TechnicalVivekPathak 3 года назад

    Very helpful ❤️

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

    hey i have some file i need to make copy

  • @nothinimposible6344
    @nothinimposible6344 3 года назад

    Sudo said hello

  • @mikeellam6365
    @mikeellam6365 3 года назад

    how to join your youtube team I'm noob

  • @AmalRaj-kc9ow
    @AmalRaj-kc9ow 2 года назад

    Site please sir

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

    What is uploder

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

    Best for non-discord nitro users.

  • @ShivanshTalwar
    @ShivanshTalwar 3 года назад +3

    I would rather convert docx file to pdf and upload it like a normal person ✌️

  • @sciencekhuong
    @sciencekhuong 3 года назад

    Hacking is LEGAL there are a lot of company pay hacker for hack to there site

  • @mr.inastin8790
    @mr.inastin8790 Год назад

    Wow ❤🎉

  • @Talas99
    @Talas99 3 года назад

    is there any way to know where the file is saved on the server ?

    • @MsSoldadoRaso
      @MsSoldadoRaso 3 года назад

      In the database lol

    • @Talas99
      @Talas99 3 года назад

      @@MsSoldadoRaso no really like the full path of the file (on the server)?

  • @masterelahee9917
    @masterelahee9917 3 года назад

    legend

  • @JasonWynn
    @JasonWynn 3 года назад

    But will it pass the server side checks for the website?

    • @lev2590
      @lev2590 3 года назад

      Probably not 😂

    • @JasonWynn
      @JasonWynn 3 года назад

      Which illustrates a lesson every website developer should know. While providing client side checks/feedback often results in a good user experience, ALWAYS do server side checking.

    • @MsSoldadoRaso
      @MsSoldadoRaso 3 года назад +1

      @@JasonWynn The server always has to validate absolutely all requests, from the body to the headers, you should not trust anything.

    • @pinnedloiliangyang364
      @pinnedloiliangyang364 3 года назад

      Thanks for watching and commenting.
      For further interaction and guidance!! {W...H...A...T...S...A...P...P}+16282596917

  • @ChrisLocke1969
    @ChrisLocke1969 3 года назад

    Zzzzzzzz... and???

  • @nothinimposible6344
    @nothinimposible6344 3 года назад

    To be honest in my opinion, without offending anyone or being condescending, and without triggering anyone, i just wanna say i got nothing to say