7 - SQL Injection (low/med/high) - Damn Vulnerable Web Application (DVWA)

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

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

  • @olegvorobiov4075
    @olegvorobiov4075 3 месяца назад +2

    Thank you very much for this tutorial! You made everything so clear and understandable

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

    I've never gotten SQL injection to work with DVWA. It just comes up with a blank page. Can't figure out why. Any Ideas?

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

      ermmm you mean blank page when you access the SQLi section or blank page when you attempt SQLi attack? is it the same for blind SQLi section? have you tried changing difficulties? resetting apache2/mysql services? tried more than one browser/OS? you'll probably find more troubleshooting steps here as well: github.com/digininja/DVWA/issues?q=is%3Aissue+is%3Aclosed+sql+injection

    • @mohankumar-uo6zx
      @mohankumar-uo6zx Год назад

      Same here getting blank page when I enter a injection . There is no error message ?
      any help is appreciated !

  • @Susu16243
    @Susu16243 10 месяцев назад +2

    How would you know that there is two columns in the database with The names user and password if the page that told you that was not exist

    • @_CryptoCat
      @_CryptoCat  10 месяцев назад +1

      You can retrieve the column names using SQL injection! user/username and pass/password are pretty common though 🙂

    • @Cashvib-f4w
      @Cashvib-f4w 10 месяцев назад +1

      ​​​​@@_CryptoCatso they can change name of user/username and pass/password name to others name like for example house as user or something?
      Sorry im still beginner

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

      @@Cashvib-f4w Yes the column names will be whatever the developers chose, it doesn't have to be "username" and "password" but devs normally use standardised, logical naming conventions (so it's likely to be something guessable). That said, if it's not guessable - you can use SQLi to recover the column names.

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

    when I press " ' " and submit it, it just reloads the page without returning a result like 2:53. What does that mean???

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

      hey do you have it set to the correct difficulty level (low)? have you tried multiple browsers (chrome/firefox)? let me know how it goes 🙂

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

      @@_CryptoCat sorry for reply a bit late, my problem has been resolved, thank you very much, your vid helped me a lot

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

      @@mio_sora no problem, great to hear! 😃

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

      It´s true. Excelent

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

      ​@@mio_sorawhen I press " ' " and submit it, it just reloads the page without returning the result like 2:53. I don't understand why this happens even though I've tried many different browsers.@_CryptoCat

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

    Sir , thanks a lot. Well explained ( crystal clear )

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

    Great Video bro! just two question, why the sentence " ' ORDER BY 3#" does not send me the error text? just throw me a blank page and what means #? i have googled it but it is not clear at all what does. Thanks beforehand

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

      Thanks! The "#" will comment out the rest of the SQL statement so if you have a statement like:
      "SELECT FROM users;"
      and you enter " ' ORDER BY 3#", it's only executing "SELECT ' ORDER BY 3" because the bit where it specifies the table "users" is now commented out.

  • @Cashvib-f4w
    @Cashvib-f4w 10 месяцев назад +1

    How do you know the colum is user and password? Or is that because everyone's database uses user and password columns?
    Sorry i am still beginner...

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

      You could make an educated guess, but it's also possible to use SQLi to retrieve database names, column names etc. You should see some of that in the next ep IIRC.

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

    Great content!

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

    I have one question. Why do you sometimes use the character '#' at the end of the sentence?

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

      Hey, good question! The '#' can be used to comment out the rest of the SQL statement. If you inject some SQL you might want (or need) to comment out the rest of the code. Check this out for some more info and examples: www.sqlinjection.net/comments/

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

      @@_CryptoCat Thx!

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

      that's exactly what i want to ask... thx for the answer

  • @gawthami5956
    @gawthami5956 Год назад +3

    brilliant!!!

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

    Great video using this for CRT practice as i have it upcoming

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

      awesome, good luck!! 😀

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

    Hi! my dvwa don't have any internet access, its totally isolated. Do i really need to give it an internet access in NAT?

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

      No, no you can use local only network; DVWA doesn't need internet access

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

    Great video, can you tell me why you use + characters around the or on medium difficulty, I.e 1 +or+ 1=1

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

      Thanks mate! The + is just a URL encoded space. If you type a space in the address bar it will be automatically converted to a "+", but if you are using burp you'll need to take care of URL encoding yourself 🙂

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

      @@_CryptoCat amazing! Thankyou so much for your help!

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

    Hi, i'm actually new to cybersecurity so I just have one question. Let's say you have downloaded DVWA in a win 10 VM and you wish to attack it through a Kali VM, how do you go about doing so? And also, after you have attacked from the kali VM, is there anyway to defend against the attack ? (Ex, like installing software such as webknight)
    Any reply is much appreciated !!

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

      In VMWare/VirtualBox, I would recommend using NAT or NAT Network. This way the VMs will be able to communicate with each other and the internet, without exposing your home network.
      There will be many different ways to defend and will vary from attack to attack. Obviously, securing the code is the best defence; if there is no XSS or SQLi vulnerability, the attackers won't be able to exploit it. Keeping software up to date is equally important. Vulnerability scanners could help with that but assuming there is still some vulnerability, a WAF may provide protection. Good logging processes help etc. Defence in depth as they say!

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

      @@_CryptoCat ohh I see, nice !
      Thank you for your video and your help man !! Really appreciate it🙏

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

      @@ahmedfa2654 thanks mate 🙏🥰

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

      @@_CryptoCat I find it easier to use Bridged for everything. It's a little more vulnerable for the VM but if the VM gets attacked I highly doubt the hacker would have the capabilities to perform VM escaping.

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

      @@mrwhosmynameagain You're probably right but you never know! VM escapes feature regularly as challenges in CTFs these days 😐

  • @AlejandroMatas-l9c
    @AlejandroMatas-l9c Год назад +1

    when it comes to the repeater I don't see the id to modify it, do you know what problem I have?

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

      Make sure you are sending the correct request to the repeater, and that you supplied a value as the ID

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

    Great video, thanks for the content

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

    from medium to high we must use burp suite to support exploit?

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

      You could accomplish in many ways! Maybe try a python script 🙂

  • @Carcks_io
    @Carcks_io 10 месяцев назад +1

    4:55 , those two columns from which table?

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

      From the users table in this case, but maybe you'd enumerate the whole DB..

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

    tbh medium was a lot easier than hard lol i thought hard would add anything more than just another web app

  • @daelonvondavis6802
    @daelonvondavis6802 Год назад +4

    ' UNION SELECT user, password FROM users#

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

    is it wrong if I just used Sqlmap on all 3 difficulties? :(

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

      haha! as long as you understand the concept and how to exploit manually, its all good 😉

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

    U kinda sounded like Dream at the beginning

  • @200eiod
    @200eiod 3 года назад +1

    When I click on the link I do not fall on the right page could you help me please

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

      hey which link are you talking about?

    • @200eiod
      @200eiod 3 года назад +1

      @@_CryptoCat The one in the DVWA description

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

      @@200eiod the dvwa.co.uk link? all the links in description still working for me but if you are just trying to download DVWA you can get directly from the github: github.com/digininja/DVWA/archive/master.zip

    • @200eiod
      @200eiod 3 года назад +1

      @@_CryptoCat You have to download DVWA to be able to access the page where you can hack?

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

      @@200eiod yes very true you have to download and install DVWA, if you check the first video in this series i go through how to download and install step by step 😉

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

    Wow

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

    thanks bro

  • @devaparihar1997
    @devaparihar1997 7 месяцев назад +1

    How can i get db version?

    • @_CryptoCat
      @_CryptoCat  7 месяцев назад

      Should be "@@version" IIRC

    • @devaparihar1997
      @devaparihar1997 7 месяцев назад +1

      That's for MySQL database. What about mariadb??

    • @_CryptoCat
      @_CryptoCat  7 месяцев назад

      ​@@devaparihar1997 Are you testing against DVWA or something else? The command I gave you is for the DVWA DB (which is MariaDB) - if you continue the series, you will see this in action 😉

    • @devaparihar1997
      @devaparihar1997 7 месяцев назад +1

      @@_CryptoCat yes

    • @devaparihar1997
      @devaparihar1997 7 месяцев назад +1

      dvwa

  • @XD-zi2bj
    @XD-zi2bj 11 месяцев назад

    Am i the only one who's confused?.. what to type and where did the hashid come from..

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

      It's been a while, can you timestamp the video? The lab might have updated too..

    • @XD-zi2bj
      @XD-zi2bj 10 месяцев назад +1

      @@_CryptoCat The submission time is over bro aint no need for that hahahahahaha unless i fail......

    • @_CryptoCat
      @_CryptoCat  10 месяцев назад +1

      @@XD-zi2bj haha good luck! 🙏

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

    So is the "impossible" one literally impossible? Because you didn't even attempt it. Just looked at it and said "anyway so lets do a bonus exercise" LOL

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

      Yeh haha the "impossible" level is to show you how developers *should* secure against the attacks, so they shouldn't be solveable. Just check the source code to see how it's been secured and verify that you're attacks no longer work 😊

  • @RobertRalap-s2n
    @RobertRalap-s2n 2 месяца назад

    Lesch Crossroad

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

    please can you give me your telegram emergency

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

      I don't have a telegram sorry. What's up?

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

    great video, thanks for the content