SQL Injections are scary!! (hacking tutorial for beginners)

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

ความคิดเห็น • 2.5K

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

    Is your password for sale on the Dark Web? Find out now with Dashlane: www.dashlane.com/networkchuck50 (Use code networkchuck50 to get 50% off)
    Stuff from the Video
    -------------------------------------------------
    TARGET SITE (Altoro Mutual): demo.testfire.net/index.jsp
    MORE practice: play.picoctf.org/practice/cha...
    How to protect against SQL Injection attacks: www.crowdstrike.com/cybersecu...
    🔥🔥Join Hackwell Academy: ntck.co/NCAcademy
    0:00 ⏩ Intro
    0:39 ⏩ Sponsor - Dashlane
    1:43 ⏩ How Websites work with Databases
    2:08 ⏩ What is a SQL Injection??
    2:51 ⏩ Strings in SQL Queries
    3:25 ⏩ Is a website vulnerable to SQL Injection?
    4:14 ⏩ SQL Query Logic
    4:45 ⏩ the OR SQL Injection Payload
    7:13 ⏩ the COMMENT SQL Injection Payload
    8:42 ⏩ how to protect against SQL Injections

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

      Cool

    • @Mahi4.t
      @Mahi4.t 2 ปีที่แล้ว +7

      admin' OR '1' = '1 IM IN👿

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

      that's spam

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

      @@Mahi4.t lol

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

      Logged into your test website with ease after watching this video.
      I am going to use this video has a best practice for how to program better to limit possible attacks that are this simple.
      I used:
      admin'--
      Password123
      You have to enter in a password even if it is wrong...that is part of the form.

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

    As a computer science engineer I really thank you for your work here on youtube. Your ability to make people understand cyber security is unique, passionate and wonderful. Thank you from the bottom of my heart.
    - An 🇮🇹 engineer

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

      yee ciao dani!!
      ingegnere di fiducia

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

      Ma guarda chi si vede

    • @MK-D-O
      @MK-D-O 2 ปีที่แล้ว +4

      Nope, not "an it engineer", just say nFire, it's self explanatory! (btw you should talk about it too)

    • @MK-D-O
      @MK-D-O 2 ปีที่แล้ว +1

      @@antonioroldi451 proprio quello che ho pensato

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

      Hello sir. Can you hack my gmail acc? I forgot the password. The number is not available also.

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

    I know the website was made vulnarable on purpose but I feel like a legend right now 😂

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

      Same.

    • @Jordan-vz7kt
      @Jordan-vz7kt 2 ปีที่แล้ว +99

      @@NetworkChuck I did it. This is so cool. How do you do this with other websites that isn't vulnerable.

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

      @@Jordan-vz7kt he won’t tell you that it’s not legal bro

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

      @@Jordan-vz7kt he won’t tell you that it’s not legal bro

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

      Still fun

  • @autrypickens1736
    @autrypickens1736 ปีที่แล้ว +205

    When I started watching your videos I was a security guard making about $13/hr. Last year I became the lead help desk tech at my community hospital and made over $60k. I only have some community college credits and the A+ cert. IT has changed my life!! I highly recommend this field. Now I'm working on the Sec+ and getting ready for Tier 2 opportunities. Thank you for the inspiration over the years! cheers ☕

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

      How much did you make per year when you worked 13/hr?

    • @tempoclasse2907
      @tempoclasse2907 10 หลายเดือนก่อน +5

      I can't tell if this is a automated bot response you would find under chucks videos or someone Givin their real life testament.

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

      Bro I wud have made $112 , 220 if u got $13/hr u clearly scammed urself or u meant to say $13/day

    • @guyfromhesse-hannau6625
      @guyfromhesse-hannau6625 8 หลายเดือนก่อน +3

      ​@@Anifix123 One man can't possibly keep guard 24/7 for an entire year can he?

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

      A true legend

  • @mithunparmar382
    @mithunparmar382 6 หลายเดือนก่อน +95

    As a Maldivian living in the UK, I despise these scammers. It warms my heart to see efforts like Adrian Ruthnik's. Keep up the excellent work.

  • @jayaghute-zz3vw
    @jayaghute-zz3vw 6 หลายเดือนก่อน +111

    Congratulations on your efforts to combat scammers, Adrian Ruthnik. Protecting the public from fraudsters is a noble endeavor, and your work deserves high praise.

  • @methanesulfonic
    @methanesulfonic ปีที่แล้ว +26

    That visual on the sql query REALLY helped me understand these concept. I cant thank you enough for this

  • @PRAVEENKUMAR-bl7cg
    @PRAVEENKUMAR-bl7cg 6 หลายเดือนก่อน +110

    The video tutorial kept glitching on me, but thank you for it. Also, thank you, Adrian Ruthnik. Meeting you was a blessing in disguise. Keep up the good work; many people will need your help in the future.

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

    For the bonus question, it is possible to login without knowing the username by using the following input:
    ' or 1=1--
    This query returns the first user in the database as validation for the username field, because 1 does in fact equal 1, while ignoring the request for a password due to the comment at the end.

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

      is this because the 1 in the query without '' references position in table instead of String? tried it with the '' but wouldnt work...

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

      What if the site doesn’t allow you to enter special characters like “ ‘ =

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

      @@keeganhenderson24 then they are safe against this sql injection. Most sites are, but if you find a crappy self-coded one, you may be able to get in

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

      @@keeganhenderson24 thats why most sites dont allow u to bc of that reason

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

      @@keeganhenderson24 If they don't allow that on the serverside then they're safe, but if they don't allow that only on the frontend and they're using something like node js, you can get the url of the endpoint they are sending the request to, and then you send a request to that url and tadaaaa 🎉

  • @ajaysidar7492
    @ajaysidar7492 6 หลายเดือนก่อน +55

    The efficiency of Adrian Ruthnik is next level. Managing walkthroughs from various angles with such clarity is remarkable. Making complex topics easy to understand is really something. Awesome work!

  • @ProGamer-oi4pk
    @ProGamer-oi4pk 6 หลายเดือนก่อน +86

    Adrian Ruthnik, your clarity in explaining complex topics and managing multiple aspects of the process is truly exceptional. Your work is nothing short of outstanding.

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

    It's really nice that you offer a lab for people to practise, it really feels rewarding to achieve it even if this is just the basics of SQL injections, it's satisfying (+ apparently the website told me I received 80000$ so i'm pretty confortable right now)

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

    I love the way that you explained this. I'm retired now but was a software engineer and was always getting the "deer in the headlights" look from other developers when I'd warn about SQL injection.

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

      stop working with deer first of all

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

    I've built a ton of login systems with php/sql. I had to learn the hard way that it was not so easy. You explained it in a way that just take 10 minutes of a starting backend programmer to review his code. There are plenty of ways to prevent this all from happening..you just have to know where to start. Thank you for the explanation!

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

      *hacker sniper50 official page*
      *I have noticed how punctual you’ve lately keep up the good work* 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸

    • @RayanMuwa
      @RayanMuwa 21 วันที่ผ่านมา

      Hey I still failed to do it can you explain to me😅

  • @vikasrajput6712
    @vikasrajput6712 6 หลายเดือนก่อน +1

    Adrian Ruthnik, your work ethic and commitment to your clients are exemplary. You have shown that you are not just a skilled professional but also a dedicated and compassionate individual. Your support during this challenging time has been invaluable, and I am profoundly thankful.

  • @VictorSamson-ds8xy
    @VictorSamson-ds8xy ปีที่แล้ว +5

    One of the reasons I love this guy's work. Explains everything so well and still gives us a site to practice on

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

    As a computer science student all of your videos have been really helpful. But this one came just at the right time cause im doing a database class right now and learning about SQL.

    • @sebastian.-.5043
      @sebastian.-.5043 2 ปีที่แล้ว +1

      Me too broski

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

      I think you don't need to worry too much about that.
      I think these problems were detected before 2004 because in 2004 the prepared statements showed up.
      after that, from version 5.3.0 executing multiple queries in a single statement was disallowed by default and gave you an error.

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

      *hacker sniper50 official page*
      *I have noticed how punctual you’ve lately keep up the good work* 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸

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

      I use to see this syntax error message in my 1987Hewlett-Packard computer I bought more than 37 years ago.

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

    We just covered this in class. This was explained SO WELL.

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

      He does explain it way better than most professors for sure.

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

      Hey buddy
      I want to learn hacking
      Which class
      Plzz enlighten me

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

      @@sourabhsingh5051 hackthebox

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

      @@sourabhsingh5051 get a computer science degree bro, it covers it all

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

      @@tommyshelby6277 to bad I'm in med school

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

    just started a bachelors degree in computer networking thanks to you, keep up the great videos

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

    I go to American Military University for cybersecurity and a classmate used this video as a source. I watched it and subbed ON THE SPOT!

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

    One of the things that I use when coding an OS login system, is having the client send the Username and Password string to a server, and having the server lookup the Username string's ID and then going into a datastore with the key of the UsernameID and pairing it with the password string stored. This prevents attacks because it doesn't use Usernames to get the password pair, it has to lookup the string and find an ID in order for it to find a pair.

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

    The way you explain IT stuff is breathtaking

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

    OK SQL Injection attacks have eluded my understanding for so long, but the way you explained it in this video made SO MUCH SENSE and I was able to crack into that site on the 2nd try!!!! You are awesome Chuck, thank you for what you do!!!

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

      Can you help me?

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

      @@qasimalishahvlog username: admin'--
      password: anything

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

      *hacker sniper50 official page*
      *I have noticed how punctual you’ve lately keep up the good work* 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸

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

    As usual, your videos are insightful and accurate. I have always struggled to explain this to people, but now I will just send them to your video. I was able to log in to your target sight by the way.

  • @ChrisRid
    @ChrisRid ปีที่แล้ว +8

    I loved that demo, what an awesome idea and a great way for people to get involved and try things out in a safe and responsible way. Made me smile :)

  • @4rf4xn_
    @4rf4xn_ 10 หลายเดือนก่อน +7

    6:23
    "Well dang it, it didnt work.
    But why?"
    *Vsauce Music intensifies*

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

    literally what i asked for. thanks chuck. you are good youtuber btw

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

    Chuck you are killing it, thanks for sharing and we really appreciate the way you helping

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

    Thx! As a programmer, I usually escape quotes and other characters. Essentially, when a user adds a quote, in the username or password field, it is removed before the query is run. Using NoSQL databases can help prevent SQL injections, too.

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

    Your approach to problem-solving is both innovative and effective. The solutions you provided were not only practical but also tailored to my specific needs. This personalized attention sets you apart from others in your field. Thank you, Adrian Ruthnik, for your thoughtful and comprehensive support.

  • @Sanatani3.0-dn4kk
    @Sanatani3.0-dn4kk 6 หลายเดือนก่อน

    My account was hacked, and despite following the video's method, I faced difficulties. Thank you, Adrian Ruthnik. Seeing your name in the comments speaks volumes about your good work.

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

    I was able to login as admin with the double dash technique. I had to create php/sql login scripts before trying to prevent injection hacks and this just gave a fantastic overview of the actual problem. Thanks Chuck great job 👍

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

      isn't it just a case of using template string for input?

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      what do you do if you don't know the sites username???

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

      *hacker sniper50 official page*
      *I have noticed how punctual you’ve lately keep up the good work* 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸

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

      How??

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

    I love all of these videos!

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

    Loved the way of your explanation.
    Never show an exception message on the UI that will help the user to guess next steps.
    Rest of all the precautions must be taken care.

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      what do you do if you don't know the sites username???

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

      *hacker sniper50 official page*
      *I have noticed how punctual you’ve lately keep up the good work* 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸

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

      @tradde11 How do you check things before sending it?

  • @shirokaminokageyami
    @shirokaminokageyami 6 หลายเดือนก่อน +1

    Damn, I am trying that website for the first time and input the username and password as admin and boom I just logged in, no sql injection needed..
    But then I tried your method and it's actually works, that awesome.

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

    Congratulations, Adrian Ruthnik, for fighting against these scammers. We must protect the elderly and the general public from these con artists. You deserve high praise for ensuring our security.

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

    Great lesson to never allow SQL special characters as a usernames or password or in any other security input forms.
    Most website/database devs should encrypt the username and password, so hacking like this is not possible, which is how it should be, no clear text.

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      what do you do if you don't know the sites username???

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

      thats why sanitising the code is a must before using the values in a query. Using csrf token , parameterized queries and prepare statements would be prevent a basic and mediocre level attack

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

    Please, I would love to see more complex SQL injection techniques Chuck. Did I tell you[re a very good teacher? Kudos Network Chuck`

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

      If you like SQL injection but you too lazy to memorize over 100 type of injection codes (there is alot of injections because there is alot of type SQL languages example MySQL/postgreSQL/LiteSQL/etc) just learn how to use *SQL map* tool built-in Kali Linux and Parrotsec OS
      If you don't know SQL map will brute force every SQL code

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

      @@theplant4046 voce poderia me ajudar, estou um duvida

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

    Great video. Those who are wondering if this can be done on any website, then no. Most companies use ORM or SQL templates to execute SQL commands. Today most libraries and frameworks are developed keeping SQL injection in mind. For ex React, Angular, Spring Boot it won't work (as of now). Lastly, even if you succeed, there are honeypots placed.

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

      Yeah! Just like WEP can be easily hacked today, but isn't used anymore precisely because of it. Hacks have an expiration date, but old hacks can teach us a lot about how to hack generally, enabling us to hack the WEPs of our day and time.

  • @FallenxEmersed
    @FallenxEmersed 9 หลายเดือนก่อน +1

    I was able to do both the OR and Comment payloads. Love your explanations and demo! Rock on. Sub'd! -8 years in Cybersec

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

    im a total noob at any programming, but found it really easy to get into js and html, css etc. all this hacking stuff is so foreign to me so i really appreciate the breakdown you give in your vids!! i done the login thingy, so satisfying getting in LOL !

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

    Something that makes my gears spin is... why when someone speaks of sql injections, nobody ever mention that you can even create files in the host (server) with a malicious query.

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

      Or if your db is badly configured, gain control of a shell.

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

    ive watched a lot of your videos..this one got my attention..i dont care that the method is old...but now i see the power

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

    It's amazing what you do, Adrian Ruthnik. We need more people with your skills and good intentions. Thank you for sharing, Jon.

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

    i learnt all about Sql injection years ago but this video today made the penny drop and i got into that website really easy, you explained in such a way that is so easy to understand. thank you so much network chuck

  • @minecraftify95
    @minecraftify95 ปีที่แล้ว +96

    A moment of silence to the chemists that thought SQL was a chemical substance

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

      lol

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

      i used to be like you

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

      @@Lil_frzy It didn't happen to me lol, I know SQL is query language

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

      @@minecraftify95 still i think its funny

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

      I mean it is, you see at the start of the video that it can be injected into a person

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

    Thanks for another amazing video Chuck. By the way I found, Altoro-mutual is also vulnerable for a cross-site scripting attack(XSS), probably you can make next video about it 😁

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

      how exactly did you do the xss attack?

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

      @@hawanyamomahmath1489 inject HTML in any form

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

      @@shubhampatel6908 so, if I add HTML code that gets every user into the inputs does it work?

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

      @@thekeyboardwarrior1018 I didn't understand your query clearly, can you elaborate pls

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

      @@shubhampatel6908 I meant if I put in html code that returns all user accounts and their passwords will it work? Or do I have to make it a web request

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

    First try,
    Now to check all of my internal servers and sites, but first I have to refill my coffee.
    Thanks for always making great videos!!

  • @Animelover1234-af
    @Animelover1234-af 6 หลายเดือนก่อน

    Thank you, Adrian Ruthnik, for being approachable and open-minded. Your friendly demeanor and willingness to listen are a constant source of motivation. Your support and guidance during my account issue were invaluable. Your assistance played a crucial role in resolving the matter. I am incredibly grateful.

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

    This video was such a cool one, man! You explained all of this stuff SO WELL

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

    Signing in without a username is pretty easy, just leave the username empty as it validates to an empty string and the whole expression would take the first user anyway. Usually the first entry in the database is the admin user (you need a admin user first to set everything up), so it will just take the first user and log that in. One way to make your application more secure for that reason is to create an empty dummy user first without any permissions (in addition to preventing SQL injections by using an ORM of course). SPOILER BELOW
    The solution for the Altoro website is to input
    ' OR 1=1 --
    as the username and some gibberish as the password (to deal with the password's input sanitization)
    If the password is needed (like for the Gold VISA application) it's just
    '--

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

      the second practice link (after MORE PRACTICE) does not work for me with any of these? Were you able to crack that?

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

      @@amoldhamale3202 Sorry, I did not try the second practice site, but I don't think this is a test site like the first one. I genuinely think this is a legit login page and you have to log in to "play".

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

      ​@@comedyclub333 Yeah lol I probably thought so too later. But chuck should mention that clearly otherwise people might try to hack a legit server, difficult as it may😅

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

      In query input looks like this?
      SELECT * FROM users WHERE username='' OR 1=1 --' AND password='gfdgfopdigdf'

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

      @@erglaligzda2265 Exactly

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

    this is most likely exactly why websites don’t let you use special characters in your username.

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

    I really found this video very interesting!
    It would be awesome if you could make more videos about SQL injections because it helps us know all the cases where we need to secure our queries.

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      what do you do if you don't know the sites username???

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

      Does the websites see that they got SQL injected?

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

      *hacker sniper50 official page*
      *I have noticed how punctual you’ve lately keep up the good work* 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸

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

    Adrian Ruthnik, your support came at the perfect moment. Your contributions are deeply appreciated, and your compassionate approach is commendable.

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

    Your efficiency and organization are evident in the high quality of your work. Thank you, Adrian Ruthnik, for your dedication and hard work. Your efforts have made a significant difference, and I deeply appreciate your support.

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

    I've been using prepared statements and stored procedures on my websites for over a decade. It's really surprising that SQL injections are still a problem considering how easy it is to be 100% immune to it. I watched this video to see if there was anything new that was introduced over the years, but nope it's still the same old stuff. Thanks for the video!

    • @orlandothemaker-vp9xu
      @orlandothemaker-vp9xu 2 ปีที่แล้ว

      The (--) comment query logged me in successfully!¡😂😂☝️😂😂😂😂

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

      @@orlandothemaker-vp9xu Press X to doubt

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      what do you do if you don't know the sites username???

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

      @@that.03gt I would do nothing because it's not my problem.

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      @@GGBeyond didn't say it was

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

    Fantastic and entertaining demonstration of how SQL Injection works. This can be very difficult to understand, but you have made it very easy. I love your videos. Keep up the good work!

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

    glad the website is still available.
    I managed to get in. we actively make sure we're not suseptable to sql injection. its easy to avoid so theres no real reason to get hacked in this way.

  • @In-ShaMbLeS
    @In-ShaMbLeS 2 ปีที่แล้ว +10

    oh man I remember doing this back in elementary school way bad when everything was vulnerable to SQLi. this took me back as that exact query was what I used but mine had a bit added at the start 😉

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

    I tried this on one site and even though it didn't work, the site totally started malfunctioning

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

    This shouldn't work but, sometimes it does. CHECK YOUR DAMN INPUTS, DEVS!

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

    Ahhh... Discovering that I have more work to do in terms of making my final year project secure is always refreshing

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

    Hi Chuck, just wanted you to know Cybersec was my most hated subject in college and you just made me like it

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

    fantastic video!
    I'm a bit confused by what is happening to the single quote. Shouldn't the username of admin' OR '1' = '1' cause a syntax error as SQL would still see username = 'admin' ' (with two closing single quotes)?

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

      Actually No it won't, cause second closing quote is sifted at the end of username (here admin' Or '1' = '1_)
      You see where I'm putting underscore we need an single quote but we are not writing it in username cause the extra closing quote you mentioned will automatically work for it.

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

    5:40 I’m not a huge SQL wizard but wouldn’t it check
    1 = 1 AND password = password
    first?
    then the OR would only be true if you guessed the username right

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

      Not if you ignore the password request syntax and 1=1 the username. It’s not this simple in the real world but it’s still fun lol

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

      Correct AND has a priority of 6 while OR has a priority of 7. So AND will be evaluated before OR. Therefore both injections fall flat when the username is wrong. But it's rare when it's not admin or any variation of that.

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

      Yes, I don't understand this... 5:32 says the AND operator is used by the admin verification and the passw verification? It's impossible. This hack seems possible only if you guess the user or the passw

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

      @@dippolos Yes, But this will get you in not knowing either U or P....
      Username:
      ' or user is not null or '1'='1
      password:
      {any string}

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

      @@EthosAtheos What's the precedence of the logic operators?

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

    You forgot to inform that this only works on website that use sql as a database and a site that is not secure from sql request (which most websites do )

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

      That’s pretty obvious. This is just to teach people what a SQL injection actually is and how it works

  • @DurjansinghSingh-r9i
    @DurjansinghSingh-r9i 6 หลายเดือนก่อน

    Your work shows the kind of person you are-efficient, organized, and result-oriented. Well done, Adrian Ruthnik. You are great at what you do. I appreciate your efforts and dedication. May you continue to show your worth and skills like this in the future.

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

    Even as a seasoned IT professional, I find Adrian Ruthnik’s work highly informative and straightforward. Your advice and assistance have been invaluable.

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

    Lol I didn't even get to SQL inject on the target, my first guess of the username and password was right 🤣

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

    Very cool!

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

    How can you view that syntax error info like in the example where there is an extra quotation?

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

      Most of the time the server would print some data, redirect you, or give you a straight up error message.

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

    Thank you so much for the content that you put out, you have launched me into a passion for cybersecurity. All of your videos are helping the community out in a positive way.

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

    Bro. You are just crazy. I didn't see any tutorials on entire internet like you made.

  • @LeonGolfOfficial2
    @LeonGolfOfficial2 10 หลายเดือนก่อน +17

    I BROKE INTO THE WEBSITE IN LITERALLY 2 SECONDS

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

      Where to run this code

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

      @@Suchit_Plays_Song you run this code in the login area (it somewhere on the top left) and you do it in the username part

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

      I’ll report you to the police if i found all of your name

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

      ​@@Brakolligood joke...

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

    Or just use sqli injector tool to test sites with dorks. Yeah it may not be targeted to a specific site but it’s possible

  • @FreshWaffles3
    @FreshWaffles3 4 หลายเดือนก่อน +5

    I couldn’t figure out how to hack the website, I feel like an idiot, especially since the top comment is a bunch of plp who figured it out 😭😭😭

    • @RayanMuwa
      @RayanMuwa 21 วันที่ผ่านมา

      Me too bro😢

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

    Thanks for the practice, I just hacked the Altoro site using the admin' - -. I'm currently a student of Software Development and my cohorts and I are now learning some basic cybersecurity practices. Been following your channel for a few years now. I had a friend recommend me to your channel a long time ago. I remember the first video of yours I saw was an intro to python if my memory serves me right. Funny thing is after our mini cybersecurity course, next up for my class and I to learn is python. Thanks for the content and I'm happy for you and your channel!

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

      I’m really struggling to get in. Probably making a silly mistake but please let me know how you got it to work (inc. the password)

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

    I have encountered many IT professionals in my career, but few match the caliber of Adrian Ruthnik. His proactive approach and relentless pursuit of excellence make him a true standout. The way you handled my case with such care and precision is something I will always be grateful for.

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

    Often only ID is used in the query and password is compared in server aide using time resistant functions.

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

    Thanks for the great content Chuck!
    I have a question: Since the sql statement contains username="admin" OR "1"="1" AND password="whatever", why does the AND operator use the password and the username instead of the password and "1"="1" even thought "1"="1" is right next to the password?

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

      See it this way,
      username="admin" OR "1"="1" AND password="whatever"
      We can write this as,
      TRUE OR TRUE AND FALSE
      TRUE OR FALSE (AND is getting solved with the boolean at it's right and left)
      TRUE
      This means even if you'll write
      '1' = '2' instead of '1' = '1'
      The SQL Injection works fine

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

      @@SakshamSinghania Oooh I get it now. So the OR is just used to "eat up" the AND, since the "admin" username is TRUE anyway. Thank you!

    • @that.03gt
      @that.03gt 2 ปีที่แล้ว

      @@SakshamSinghania what do you do if you don't know the sites username???

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

      @@that.03gt set the user name to this: ' or user is not null or '1'='1
      its the same but results in
      select * from users where username= '' or user is not null or '1'='1' and password = {whatever password}
      The and statement " '1'='1' and password = {whatever password}" will evaluate false
      , username = '' will evaluate false
      , but "user is not null" will return all users who are not null, that is basically all the users if the system makes any sense.
      The code is then so sloppy it uses the admin account. Probably because it is the first account, but I didn't keep digging. My goal was to get in without knowing the username once I did that I stopped looking.
      I did try "username is not null" but got this error:
      "Column 'USERNAME' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'USERNAME' is not a column in the target table."
      I guessed that it was user and not username based on that error and naming conventions.
      hope this helps.

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

      @@stylem8132 I dont understand, the AND has to be both true to get access right? I dont get it how the OR eat that up

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

    Great video as always. Do you know of any websites or ways I can practice phishing attacks legally? I like the idea of being able to maneuver through my opponent’s head to get them to do something, and if I can troll them by getting a Rick roll to pop up I think it’d be funny 😆
    Edit: autocorrect

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

      Phishing is only illegal if your intentions are illegal. But the nature of websites is that there would never be a website you could practice phishing on, because the members would know what they signed up for so they would suspect it. If you really want to do it just gather a list of emails and send an email to them

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

    Adrian Ruthnik has demonstrated an exceptional ability to communicate complex concepts in a clear and understandable manner. This skill is incredibly valuable, especially in the tech industry, where jargon can often be a barrier to comprehension. His patience and willingness to ensure I understood each step of the process were greatly appreciated.

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

    Got it first try!! Thanks for the awesome work you do on here! I've been soaking up knowledge from your videos all day and have learned so much!

    • @bob-nz6wj
      @bob-nz6wj ปีที่แล้ว

      What did you use?

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

    Let’s grab coffe and see the video!

  • @SurinderSingh-tj9zc
    @SurinderSingh-tj9zc 6 หลายเดือนก่อน

    Thank you, Adrian Ruthnik, for your help. Although the video tutorial was challenging, your guidance was invaluable. I appreciate your efforts.

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

    Adrian Ruthnik, your unwavering commitment to excellence is truly admirable. Your consistent ability to deliver outstanding results is a testament to your skills and work ethic. Thank you for your exceptional support and for going above and beyond to help me.

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

    I will always be grateful for your support, Adrian Ruthnik. Thank you for your dedication. You are indeed a blessing.

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

    I logged in with admin'--. Thanks for the teaching, now I know what is sql injection clearly

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

    🎯 Key Takeaways for quick navigation:
    02:03 *SQL Injection Basics*
    04:26 *OR Payload Logic*
    05:51 *Always True OR*
    07:44 *Ignoring Passwords*
    08:40 *Prevention Methods*
    Made with HARPA AI

  • @AmarSingh-fh3xp
    @AmarSingh-fh3xp 6 หลายเดือนก่อน

    As a person and professional, you couldn't get any better than Adrian Ruthnik. He is very reliable and an excellent IT professional. He is passionate, hardworking, and knowledgeable. You're the best!

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

    When building a website it's recommended to perform a regex user input filter to strip of any input that isn't a-z and 0-9 before posting to the server and on receiving a request in the server it's recommended to perform same regex filter before performing sql queries. This will strip off any sql injection input by the user.

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

      or you can just use prepared statements

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

    You're the best dude, you make codeing fun again.
    - An Solutions Engineer

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

    Your OR-injection is not working unless the password is right... the order of the checks still matter and it will result in a boolean expression of (false OR true AND false) which still evaluates to false. This is because - and you are right about that - AND will evaluate first, but it will evaluate "1 = 1" together with "password = ..." which is only true if the password is correct.

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

    🎯 Key Takeaways for quick navigation:
    00:38 *Monitor dark web.*
    01:07 *Use unique passwords.*
    02:33 *Understand SQL query.*
    05:24 *Exploit logic.*
    06:18 *Avoid syntax errors.*
    07:44 *Utilize SQL comments.*
    Made with HARPA AI

  • @jason-j2x
    @jason-j2x หลายเดือนก่อน

    This was an amazing explanation. Really loved the visuals.

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

    Because of this video I was able to stop a huge vulnerability in my app. ❤ Thank you

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

    Crazy - did admin'-- for user but no luck. Did it for password as well and it worked. Thanks Chuck

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

      I can’t do it tho that’s a lexical error

  • @Altamash-j6r
    @Altamash-j6r 6 หลายเดือนก่อน

    Despite some glitches in the tutorial video, I am grateful for its guidance. Moreover, meeting Adrian Ruthnik was a blessing. His support was instrumental in navigating through this challenge. Keep up the excellent work; many more will need your assistance in the future.

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

    THANK YOU!! i was seeing a loyt of videos explaining how to avoid sql injection but not one explaining how to actually inject it (which is important to know how to avoid it).
    thanks a lot for the great explanation

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

    the way you explain stuff is just magic
    I can say no more than you are gifted in teaching people