How Hackers Could Brute-Force SSH Credentials to Gain Access to Servers

Sdílet
Vložit
  • čas přidán 20. 07. 2024
  • Earn $$. Learn What You Need to Get Certified (90% Off): nulb.app/cwlshop
    Three Ways Hackers Can Hack into SSH Servers
    Full Tutorial: nulb.app/z4ikd
    Subscribe to Null Byte: goo.gl/J6wEnH
    Kody's Twitter: / kodykinzie
    Cyber Weapons Lab, Episode 181
    The Secure Shell, or SSH, is a common way to access remote hosts. However, it's not as secure as the name would imply. In this episode of Cyber Weapons Lab, we are going to show three different ways to brute force username and password combinations on open SSH ports. Big thanks goes to Null Byte writer drd_ who wrote the article we're basing the video on.
    To learn more, check out the article: nulb.app/z4ikd
    Follow Null Byte on:
    Twitter: / nullbyte
    Flipboard: flip.it/3.Gf_0
    Website: null-byte.com
    Weekly newsletter: eepurl.com/dE3Ovb
    Vimeo: vimeo.com/channels/nullbyte
  • Jak na to + styl

Komentáře • 195

  • @Aleksandar0100
    @Aleksandar0100 Před 4 lety +127

    Finally, my boy is back.

  • @brendanwebb5489
    @brendanwebb5489 Před 3 lety

    Thank you, this really helped me understand ssh servers and how they work, I’ve been having trouble understanding it for a while and this really helped me out

  • @j_owatson
    @j_owatson Před 3 lety +30

    He blinks, you just blink at the same time as him.

    • @natediaz7447
      @natediaz7447 Před 3 lety

      brilliant

    • @k.3004
      @k.3004 Před 3 lety

      I blink often but I stared long enough to see him blink 😂

  • @socat9311
    @socat9311 Před 3 lety +4

    Could you do a video on discovering what file types a server allows? I have done boxes where for example php might not have been allowed but php5 was allowed. So would be useful to have a strategy of checking such things (other than trying multiple versions I guess)

  • @UNGETABLE7
    @UNGETABLE7 Před 3 lety

    Glad to see you’re back again mate.

  • @moligoli3628
    @moligoli3628 Před 2 lety

    Great sir amazing yesterday only I found your chennal and website
    I trying to learn basics in this field I watched your 3-4 videos yesterday and visit at website also amazing contents very helpful .
    Follower from India 🇮🇳

  • @mathiasskukker5948
    @mathiasskukker5948 Před 3 lety +5

    You're the best teacher I've had. respect for your work.

  • @Akilasgood
    @Akilasgood Před 3 lety +1

    I was expecting for this video for quite long time.... 🙏🏻

    • @uniquechannelnames
      @uniquechannelnames Před 3 lety +1

      I was expecting *this video for quite *a long time.
      Just a correction in case you're learning English as a second language.

  • @realm2090
    @realm2090 Před 4 lety +56

    Why's the account that you're on your laptop called "boob" lol.

  • @pianochannel100
    @pianochannel100 Před 3 lety +4

    This man has optimized his life down to the intervals in which he blinks.

  • @ganeshshukla584
    @ganeshshukla584 Před rokem

    Thanks for the video man, it was really good. I tried all 3 methods but it doesn't work can you suggest alternate method?

  • @sefo31337
    @sefo31337 Před 3 lety

    Finaly the creator of the best channel on yt is back

  • @brijesh1809
    @brijesh1809 Před 4 lety +1

    Great videos, keep it going null byte

  • @shortsentral
    @shortsentral Před 4 lety

    Please help. I am attempting to get in to mobile pen testing too. I am planning on getting a OnePlus 8. But I have no idea if it can be put in to Promiscuous/Monitor mode when I run Kali Linux on it.
    If it can’t, is there any other decent phone that can? Thank you in advance

  • @pebrialkautsar8692
    @pebrialkautsar8692 Před 3 lety

    Hello I have a question. How can weh port forwarding but keep the original ip address? I tried using iptables (DNA, SNAT) but it was translating the ip address. Helppp :'(

  • @knighttemplars259
    @knighttemplars259 Před 3 lety

    Who is best for offline attacks, hydra, john or hashcat? Maybe something else? What about online attacks, hydra?

  • @chiragramoliya2580
    @chiragramoliya2580 Před 3 lety

    Hey bro...
    I have questions about brute force attacked stopped after some password check?

  • @DiNaMiCNitro
    @DiNaMiCNitro Před 4 lety

    Excellent video!! What's the background music? Greetings.

  • @thegamerguy56
    @thegamerguy56 Před 3 lety +3

    Not planning on hacking any SSH, just looking to see what Im up against as a server operator. Don't know why though. I already use public keys with password and root auth disabled, custom port, and fail2ban.

  • @enos5192
    @enos5192 Před 3 lety

    Kody my Dudy is Back on track... luv U man

  • @survivalextreme8270
    @survivalextreme8270 Před 3 lety

    Tried to ssh the router, but it says port 22 refused .. Tried telnet aswell but port 23 refused .. What can i do about this ?? Connect bot is not working ..

  • @lyonfiurextechsupport3133

    Dude. Where you can find the (userdb) to create the files and the (passdb)?

  • @venuvohra94
    @venuvohra94 Před 3 lety

    Can I get something related to windows, or if not can you recommend anyone just like you pleaseee

  • @TarunKumar-de1ej
    @TarunKumar-de1ej Před 2 lety

    what if ssh is configured on different ports then how I can use hydra for attacking ssh

  • @mrunplugged5080
    @mrunplugged5080 Před 3 lety +2

    Cant, you just determine the range of the subnet by looking at the subnet mask?

  • @temisanebireri4294
    @temisanebireri4294 Před rokem +2

    Thank you for this tutorial. After setting the user file and pass file and attempting to run the command. It brought an error message and I realized I didn't have the user.txt and password.txt files. Please how can I create those files?

  • @user-fj4gf4ui8n
    @user-fj4gf4ui8n Před 4 měsíci

    Please can i get help on SSH scanner on port 1222? I am a novice, i will appreciate any guide to getting the program and using it.

  • @shahinmadani184
    @shahinmadani184 Před 2 lety

    could please show us how the metasploit session can be exploited ?in a video please!

  • @jasjotsingh9879
    @jasjotsingh9879 Před 2 lety

    where do these users.txt and passwords.txt files need to be saved. Which directory

  • @boredguy_0137
    @boredguy_0137 Před 3 lety

    Woah! Thanks mate, I've been looking for ssh brute forcing stuff for a long time!

  • @TheExsi
    @TheExsi Před 3 lety +2

    Damn. I love his stickers!

  • @ravagex2179
    @ravagex2179 Před 3 lety

    Hey, I just wanted to ask. What is the best WiFi adapter that support monitor mode and packet injection, which works with Kali Linux?

    • @dumbneek6237
      @dumbneek6237 Před 3 lety

      i personally use this one: Alfa AWUS036ACH

    • @Nitidus
      @Nitidus Před 3 lety

      The actual aircrack-ng FAQ suggests the following - please keep in mind that the model suggested by the comment above might crash your kernel!
      • Alfa AWUS036ACH (a/b/g/n/ac) is the best performing card, but the driver can be unstable enough to crash your kernel.
      • Alfa AWUS036ACM (a/b/g/n/ac) is the highest performing of the STABLE devices, but it requires kernel 4.19.5 or higher, and the driver doesn't work on the Raspberry Pi 3 yet; it works on the Raspberry Pi 4.

  • @bensomeah6337
    @bensomeah6337 Před 2 lety

    what if you have a confirmed working pair of credentials?

  • @dr.siddharthojha3642
    @dr.siddharthojha3642 Před 3 lety

    Wow amazing video sir ♥️♥️

  • @hanselchristopher534
    @hanselchristopher534 Před 3 lety

    Basically this all methods will work when there's a system connected to your network right or same network?

    • @realitycheck_
      @realitycheck_ Před 3 lety

      I think that as long as you have the IP of the target. You have their IP, you scan for open port 22 and just brute force it. Give me your IP and I will try if it works lol

  • @boondocks8091
    @boondocks8091 Před 3 lety

    How do I change my wifi icon on the top panel to make it like yours?

    • @abbasfaizy4769
      @abbasfaizy4769 Před 3 lety +1

      You can't. Coz you use Windows and he uses Linux! Lol

  • @Ultra289
    @Ultra289 Před rokem +1

    postgresql? but does it work with mysql??

  • @zpelleti
    @zpelleti Před 2 lety

    I keep getting 'cred can't be blank', can anyone tell me why?

  • @sigill_fx1
    @sigill_fx1 Před rokem

    Great Vídeo man! Thanks.

  • @KeithGriffiths
    @KeithGriffiths Před 3 lety

    Your videos are really good. 🐱‍👤

  • @salsaamaliaputri-saphire-u7764

    is it possible to brute force my server from other network and region?

  • @bertil0424
    @bertil0424 Před 3 lety

    Will work on a Mac?

  • @JahMusicTube
    @JahMusicTube Před 3 lety +11

    Another easy way to protect against this, besides using public keys, is to block IPs after a set number of failed ssh logins in your firewall config.

    • @jonathanjohn9643
      @jonathanjohn9643 Před 10 měsíci

      what if they use vpn?

    • @pie5233
      @pie5233 Před 7 měsíci +1

      you can easily allow to access only in a range of ip addresses

    • @GustavAgar
      @GustavAgar Před 6 měsíci

      @@pie5233 i do that, only allow ssh connection from the ip that i usually connect

  • @amantudu4233
    @amantudu4233 Před 3 lety +1

    Welcome back

  • @cvegas7823
    @cvegas7823 Před 3 lety

    How can I use Linux or termux to bypass the pattern lock screen of android devices?

    • @l0_0l45
      @l0_0l45 Před 3 lety

      I don't think termux can do any of it, considering the fact that termux does not support rooting.

  • @legochewbacca2214
    @legochewbacca2214 Před 3 lety

    yay kody is back

  • @LucasAKempe
    @LucasAKempe Před 4 lety

    Plot twist we all weren't blinking and he was

  • @Rob_III
    @Rob_III Před 3 lety +1

    Any decent SSH install has: 1) Disabled root login, 2) Disabled password login in favor of public key, 3) A method of stopping the 'attack'; usually by blocking the IP for at least 24 hours or something.

    • @Rob_III
      @Rob_III Před 3 lety

      @Losko Meh, that's more a "Security through obscurity" thing. It does next to nothing for a determined "hacker"

    • @Rob_III
      @Rob_III Před 3 lety

      @Losko That's where we disagree: Step #4 doesn't CONSIDERABLY reduce the "impact surface". It MARGINALLY, if at all, reduces the "impact surface". With tools like nmap you can scan all ports in a matter of seconds and if your system is connected to the public internet then tools like Shodan make it so easy even kids can find your "hidden" SSH service. (See security.stackexchange.com/a/189738/3992 )

    • @Sythorize
      @Sythorize Před 2 lety

      any half decent hacker will just use a botnet to bruteforce the credentials so banning IP does nothing really. Especially when someone has hundreds of thousands of telnet devices on their net.

    • @Rob_III
      @Rob_III Před 2 lety +1

      @@Sythorize Ofcourse it does, it limits the number of attempts to X for each and every IP. Yes, your banned IP list will grow big, but it's still better than keep allowing each IP to try again and again and again.

    • @Sythorize
      @Sythorize Před 2 lety

      @@Rob_III yeah but it’s useless

  • @yousufkhan6654
    @yousufkhan6654 Před 3 lety

    I think tps is trial per second. Anyways, good to see you sir.

  • @user-vn7ce5ig1z
    @user-vn7ce5ig1z Před 4 lety +2

    Great, so how do we defend against this aside from using a stronger [*nix account] password? Is there a way to time-throttle login attempts? The *MaxAuthTries* and ** settings are barely a minor speedbump for a script and *LoginGraceTime* setting won't help at all (it's essentially useless ¬_¬). A quick search seems to indicate that you'll have to use iptables to set up a time limit. Why isn't there a built-in option in sshd? 😕

    • @dingokidneys
      @dingokidneys Před 3 lety +2

      To defend against this, as Kody said, you can use an obscure username (disable root/admin ssh logins), use a different port and use a strong password or - even better - use a private key. You can also set fire wall rules that either limit how many login attempts are allowed per minute or deny access to the source IP after a certain number of failed attempts within a time period.
      On my box, I only allow ssh access for a named user using a private key and that's successfully defended me for years. Recently I added a firewall rule (3 lines actually) to boot people after 4 failed attempts within a minute 'cause my logs were filling up with failed login attempts.

    • @lmaoroflcopter
      @lmaoroflcopter Před 3 lety +2

      Commercially: Certificate based auth, but that requires you to set up a PKI infrastructure which is a bit beyond the personal use so...
      Personally: switch to Public Key auth, disable root login, use ip tables to limit connections, install and configure 2fa (Google authenticator is free).
      You can still brute force public keys (if you have a collection of them - say HDMoore's collection of Debian weak prng generated keys) using something like crowbar but it's not likely that your key generated by a modern operating system is going to be in that collection.
      Password auth itself needs to die in a fire.

    • @christopherirving7685
      @christopherirving7685 Před 3 lety +1

      @@lmaoroflcopter agreed but without Google if you change phone or worst lose it, your screwed. Lost access to several places for a few days. Cloud based authentication is the way to go imo

    • @lmaoroflcopter
      @lmaoroflcopter Před 3 lety +1

      @@christopherirving7685 that's why you back up your backup codes to something that isn't your phone, and Google Auth, is just an open source implementation of TOTP. Use a yubikey to store the seed and it isn't even linked to a phone. You've also almost always got some access via a providers ILO or serial console system, or in the case of home hosted - physical access to the device, too in order to recover from.any derps.
      But cloud based Auth is interesting, though I'd argue that's a bit beyond the individual and more a corporate solution, but along the same lines Netflix also publish their own solution for certificate based auth, that runs in aws lambda.

    • @christopherirving7685
      @christopherirving7685 Před 3 lety +1

      @@lmaoroflcopter I backed up to something that was stolen I'm just pointing out a flaw many don't take into account. Lost access to coinbase and wallets. But yes I now backup to more than one location :) thanks for the comment

  • @oussamaouerfelli2234
    @oussamaouerfelli2234 Před 3 lety

    @Null BYte please a tutorial of formjacking injecting script and give us the script thanks

  • @thelitbroz1615
    @thelitbroz1615 Před 3 lety

    why isnt my ssh connecting to the host

  • @chiranjeevinaidu3660
    @chiranjeevinaidu3660 Před 2 lety

    Bro is there a way to bruteforce ssh passwords like how we bruteforce wifi

  • @mitujangra4908
    @mitujangra4908 Před 3 lety +1

    Bro please make a video on how to access the database of an android apps??

    • @NullByteWHT
      @NullByteWHT  Před 3 lety +1

      Good idea Mitu Jangra, I've added it to the list of video ideas.

  • @patrickren7395
    @patrickren7395 Před 3 lety

    cat /var/log/auth.log | grep Failed | wc -l
    if the number is more than 2 digits, you should probably pay attention. Change ssh port to at least 4 digits and turn off root user login

  • @TheRealZamFit
    @TheRealZamFit Před 3 lety +4

    The moral of the story: SSH is f***ing hard to hack. Especially if you do not use a default username.

    • @uniquechannelnames
      @uniquechannelnames Před 3 lety

      Does using an SSH .rsa key instead of a password make it harder or easier? If you gained like a meterpreter shell into one computer, couldn't you theoretically just find the .rsa SSH credentials?

    • @TheRealZamFit
      @TheRealZamFit Před 3 lety +1

      @@uniquechannelnames Attacking a remote system with passwords can be done by anyone anywhere. To hack a system protected with key based security, you must actually find the private key which is something that even the secured machine will not possess. This means the attacker must first successfully hack the admin’s machine to get the key. This is also why you should protect your private keys with a supplemental security layer. A keychain, password manager, or even simple password can make this impractical for all but the most dedicated hackers.

  • @mujeebishola7778
    @mujeebishola7778 Před 3 lety

    Hi bro please I want to start and learn hacker please help

  • @communist_demon4177
    @communist_demon4177 Před 3 lety +1

    Yey he is back

  • @t.designer5540
    @t.designer5540 Před 3 lety

    Null byte help me. I m learnin from live kali linux on laptop. When i try hacking wifi my wifi will be disconnected. My linux not scan wifi. If i click restart button it will be fine. I dont know what would i do. If wifi working but not scaning any targets. Help me. I am from Uzbekistan. I don't know English very well. Sorry if have any mistake in my letter.

    • @l0_0l45
      @l0_0l45 Před 3 lety

      Network services are disabled by default in Kali. To enable them, try "sudo systemctl network.service start". It is disabled by default as a computer looking for a wifi is exposed, so it gives out its location. Also you may need a wifi dongle if your laptop does not support it. Hope this helps.
      (P.S. Don't do anything *illegal or criminal,* and if you are scanning ports, use proxychains to hide your ip and prevent dns leaks.)

    • @t.designer5540
      @t.designer5540 Před 3 lety

      @@l0_0l45 thank you friend

  • @mercenary8360
    @mercenary8360 Před 4 lety

    Do you hack a online games

  • @ahmedakikazim7865
    @ahmedakikazim7865 Před 2 lety

    Please is there any exploitation?

  • @RobinCawthorne
    @RobinCawthorne Před 3 lety

    Would this still work if the server had fail2ban configured?

    • @misfitsman805
      @misfitsman805 Před 3 lety +1

      It shouldn't. iptables should kick in and make the attacking computer think that the server is now offline and wont respond to pings. But I could be wrong. I run fail2ban on all my servers though! Currently at 37678 Blocked IP addresses :D

    • @RobinCawthorne
      @RobinCawthorne Před 3 lety

      @@misfitsman805 hectic!
      Would be cool to build a dmz in front and drop a honeypot in there. See what these bots/peeps are up to. I also block with fail2ban but have a static IP at home so could just whitelist. Instead though, there's this port knocking tool, can't recall the name but it works like a dream.

  • @amybucio8859
    @amybucio8859 Před 2 lety

    It said ssh could not be reached :(

  • @spacedoutmercy9741
    @spacedoutmercy9741 Před 3 lety

    Is the wifi network's name boob.? 😅

  • @TheJoker-ql1xp
    @TheJoker-ql1xp Před 3 lety +6

    Me: *Running a Minecraft server* wait what?

    • @godfather7339
      @godfather7339 Před 3 lety

      can you ssh into a Minecraft server? would people keep a ssh port open?

  • @elieellouk8454
    @elieellouk8454 Před 3 lety

    You have to make a video on hacking a electric scooter via Bluetooth packets !!

  • @sayYes2019
    @sayYes2019 Před 4 lety

    Love this

  • @iluvass2
    @iluvass2 Před 4 lety

    very interesting cool content!

  • @lamontwilliams1843
    @lamontwilliams1843 Před 2 lety

    Thank you!!!!!!!!!!!!!!!

  • @tahagaming885
    @tahagaming885 Před 3 lety

    Plz help I want to learn hacking.

  • @THORNORDLAND
    @THORNORDLAND Před 3 lety

    well comeback

  • @kapoork4129
    @kapoork4129 Před 4 lety

    Yay kode 🎉

  • @vsivakrishna9647
    @vsivakrishna9647 Před 3 lety

    Did you notice the wifi name is boob😂

  • @kcireorenom8430
    @kcireorenom8430 Před 3 lety

    wow man... yujuuuu

  • @HKAcademy1
    @HKAcademy1 Před 3 lety

    Nice SSID

  • @abdurrafay7059
    @abdurrafay7059 Před 3 lety

    plzzz make more kali linux ethical hacking videos

  • @danzappleseed6881
    @danzappleseed6881 Před 2 lety

    How easy u can see all those passwords.

  • @danielolortegui8422
    @danielolortegui8422 Před 2 lety

    Anyone with that many stickers on their laptop has got to be evil

  • @PashaDefragzor
    @PashaDefragzor Před 3 lety

    Nobody hacking like that anymore, they just looking for a cable and then get into the room

  • @amybuciomorton7599
    @amybuciomorton7599 Před 2 lety

    SSH could not be reached

  • @danzappleseed6881
    @danzappleseed6881 Před 2 lety

    When ping all the packets lost'... It goes there's.. !!

  • @deanlhouston
    @deanlhouston Před rokem

    Nobody should be using SSH1 nowdays, so not sure how useful it will be trying to hack into SSH systems using v1 when practically nobody is (should be) using it.

  • @Elisei36
    @Elisei36 Před rokem

    Nobody talking about his wifi name

  • @randomupload6469
    @randomupload6469 Před 3 lety

    Ye hes cool
    I want him to be my teacher

  • @Fvoiys
    @Fvoiys Před rokem

    Let's not talk about the wifi's name 💀

  • @Toxichead1989
    @Toxichead1989 Před 3 lety

    Hey man im trying to learn python what is the most important things to know? //Batman

  • @netbin
    @netbin Před 3 lety +1

    Heh finally i can see someone i got used to watch!

  • @Zknosk
    @Zknosk Před 4 lety

    Heroi back to us, after working for hack5? lol

  • @abhineetkarn8633
    @abhineetkarn8633 Před 4 lety

    Hydra FTW

  • @dakata2416
    @dakata2416 Před 4 lety +2

    Fix your audio for god sake

    • @Rob_III
      @Rob_III Před 3 lety +1

      Came here to say this - it sounds like it's recorded under water with a muffler over the potato microphone.

  • @Rickety3263
    @Rickety3263 Před 4 lety +2

    Cant brute force me. Certificate access only ;-)

    • @dingokidneys
      @dingokidneys Před 3 lety +1

      Same here, but I also tarpitted ssh access 'cause my logs were filling up with scans and hack attempts. Three lines in iptables and my logs are much cleaner.

    • @RakshithPrakash
      @RakshithPrakash Před 3 lety

      @@dingokidneys where can I find the logs on whose trying to loging and scans?

    • @dingokidneys
      @dingokidneys Před 3 lety

      @@RakshithPrakash The Linux logs are either in /var/log or accessible by 'journalctl' if you have a systemd distro.
      To check what's happening on ssh you can do either:
      $ grep sshd /var/log/auth.log
      or
      $ journalctl -u ssh

  • @extrem2497
    @extrem2497 Před 3 lety

    Laptop of Doom

  • @Sythorize
    @Sythorize Před 2 lety +1

    Do you think zenmap is a good program? I have found its a lot more useful than doing it all by yourself.

  • @blackbangali4067
    @blackbangali4067 Před 3 lety

    ?

  • @sidiqbhaseer8536
    @sidiqbhaseer8536 Před 3 lety

    Hai sir

  • @misfitsman805
    @misfitsman805 Před 3 lety

    Fail2ban

  • @Mr.Equinox
    @Mr.Equinox Před 3 lety +3

    17:16 when u r fooled twice 😂
    Read more

  • @itsme7570
    @itsme7570 Před 3 lety

    Kody, answer my dm bro

  • @user-qe6rh2qq9z
    @user-qe6rh2qq9z Před 3 lety

    Man, never ever show your MAC address.

  • @JarppaGuru
    @JarppaGuru Před rokem

    ss-gopy your public key to server and login xD oh wait you need password..but what if...
    you cant brute force if server would my design you get blocked after couple password try LOL
    and shh has open port...