Linux Terminal 101: How to Use Netcat To Chat

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • Hak5 -- Cyber Security Education, Inspiration, News & Community since 2005:
    ____________________________________________
    This week we are getting into using Netcat to setup an instant chat network.
    ~-~~-~~~-~~-~
    Please watch: "Bash Bunny Primer - Hak5 2225"
    • Bash Bunny Primer - Ha...
    ~-~~-~~~-~~-~
    ____________________________________________
    Founded in 2005, Hak5's mission is to advance the InfoSec industry. We do this through our award winning educational podcasts, leading pentest gear, and inclusive community - where all hackers belong.

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

  • @msven
    @msven 11 лет назад +60

    It's the modern way to 'pass notes' during class. :)

  • @anupamdey4893
    @anupamdey4893 5 лет назад +32

    Video starts from 3:03

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

      Xt3rminator why lose the sight of her marvellous RACK?

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

      @@danilodistefanis5990 my bad ,😂😂. I was too focused on netcat at the time of watching the video.

    • @baphomet9435
      @baphomet9435 5 месяцев назад

      You're a heroe without cape

  • @FlameHashiraAries
    @FlameHashiraAries 9 лет назад +4

    that moment when you get it to I felt like a kid aging a had this huge burst of joy! I love hak5

  • @paulerapedreira
    @paulerapedreira 7 лет назад +8

    Great video, thanks for that! Some versions of netcat don't require the "-p" so commands would be only
    nc -l 31337
    nc 10.73.31.145 31337
    If in "man nc" it says for the "-p"option: "It is an error to use this option in conjunction with the -l option.", that's your case!

    • @lillllliiill-r3e
      @lillllliiill-r3e 6 лет назад

      You are not talking about GNU netcat right? because I am pretty sure BSD-netcat has that "It is an error to use this option in conjunction with the -l option." phrase in their man page.

  • @TaiiwoLlort
    @TaiiwoLlort 11 лет назад +5

    There seems to be a little confusion in the comments. What netcat does, is transmit data over network sockets from the stdin of the terminal, and writes anything we get back to stdout. Every net protocol uses this method. Sometimes the data is encrypted (Like SSH), sometimes you're talking to a program (Like FTP), and sometimes you're talking to people (Like IRC). Homework: Try netcatting some servers, and see what you get back (FTP is usually user friendly from netcat).

  • @pithikoulis
    @pithikoulis 10 лет назад +3

    Netcat is a good way to copy/paste between different machines.

  • @dev_navdeep
    @dev_navdeep 7 лет назад +1

    i used it on my own computer and it is awesome. it worked perfectly

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

    You can pipe commands into the chat terminal so you can send text files, other command outputs and kind of play command line based games.

  • @lanceseidman
    @lanceseidman 11 лет назад +1

    I love you Shannon. Ok, I do use NC, I actually have a small script that will base64 encode your outgoing message but then use crypt to encrypt w/Hash using the MM/DD/YY & on the other machine when received with the date timestamp before the message it'll decrypt the message using that TS as the Hash to decode the Msg. But now you're stuck with a base64 message so that's where the Node.JS comes in w/jQuery & auto-loads the var to an IMG tag from the WebSocket and display the message within an image, no actual text.

    • @ChunkyChest
      @ChunkyChest 11 лет назад

      nice, that would be what a png? plz share..

    • @lanceseidman
      @lanceseidman 11 лет назад

      I am using PNG because it's super light-weight. But you can encode it to any image format you'd like.
      My project is done via Browser (this way it can be cross-platform compatible & literally P2P) using PHP. I am also using BLOWFISH.
      So, chop(mcrypt_ecb(MCRYPT_BLOWFISH,$curKEY,base64_decode($incomingSocket),MCRYPT_DECRYPT));
      Obviously more to it but that's the gest of it. I once thought about making it public as a service (free) or as open source but I figured I would be laughed at.

  • @abinaygangireddygari7859
    @abinaygangireddygari7859 6 лет назад

    Highest port number you could listen is 65535 and the lowest number would be somewhere around 100.All the ports that are less than 100 are for the superuser(for os).

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

    stilll loving it that netcat command

  • @surrealchemist
    @surrealchemist 9 лет назад +3

    I've used netcat with a tar pipe to get a large amount of files over the network

    • @confuded
      @confuded 9 лет назад

      +Joshua Kleiner As an example:
      On the receiving end do:
      # netcat -l -p 7000 | tar xAnd on the sending end do:
      # tar cf - * | netcat otherhost 7000tar cf - * is copy everything in the current working directory.
      (from toast.djw.org.uk/tarpipe.html)

  • @evolve101
    @evolve101 10 лет назад

    Thnx. Actually did not know you could chat on netcat. But i use other software for that ;) Thanks for the video thou. Netcat is really a swiss army knife.

  • @varshinichowdary9254
    @varshinichowdary9254 8 лет назад +1

    I have a question Hak5 please do answer!!!!! I want to send a file from one computer to another, and the computer which receives the file always listens for the file of that specific name f0r days( like 7 days) can you tell me if it is possible to act as a server for a week's time without getting disturbed by others except that computer which sends me a file( I know the name of file and also the ip address of the sender)

  • @riverfox88
    @riverfox88 11 лет назад

    Maybe can be used in communication between distributed processes across various platforms?

  • @muffemod
    @muffemod 11 лет назад

    The cat command copies standard input to standard output.

  • @DaeOh
    @DaeOh 11 лет назад

    I recently used netcat to answer http requests with the output of curl... proxying an authenticated API call.

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

    Is it only possible if the two devices connected to a same network or wifi ?
    I have been trying to connect my two pc which is connected to my mobile hotspot , but the connection is not getting established.
    could anyone help me?

  • @theclasherguy6926
    @theclasherguy6926 7 лет назад +1

    how can i chat in android tab with netcat in termux terminal please tell me

    • @cldream
      @cldream 6 лет назад

      Use the builtin package manager to install netcat, then use a keyboard (physical or software) and chat away.

  • @eagleeye8069
    @eagleeye8069 8 лет назад +1

    How would you spell the "-" key? "tack", "teck", "takey", "tab key" ??? Is it correct to call it like that? not dash?

    • @hak5
      @hak5  8 лет назад +5

      +김세진 It originates as a navy term for flag signalling which has seen cross over into other parts of the navy (e.g. marines):"In addition to the 68 flags in the bag, you have a tackline. A tackline is a length of halyard approximately 6 feet long; the exact length depends upon the size of flags in use. The tackline is transmitted and spoken as tack and is written as a dash (hyphen) "-". It is used to avoid ambiguity. It separates signals or groups of numerals that, if not separated, could convey a different meaning from that intended.Example: If the signal SL2 means “Prepare to receive personnel casualties,” TACK would be inserted between the digit 2 and the given number of casualties: SL2 TACK 27.TACK also is used to separate range and bearing figures. If C3 means “Investigate possible sighting,” the signal might be C3 TACK 345 TACK 20, indicating the sighting at a bearing of 345 and a distance of 20 miles."

  • @Bac2hack
    @Bac2hack 4 года назад

    If we want to chat between to out of network terminal
    Can we solve this via port forward ?
    If no so what to do ?

  • @norahalmubairik7567
    @norahalmubairik7567 7 лет назад

    interesting! It is worth a try ;)

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

    Just use the talk command. It's been in Linux since the 1990s.

  • @pdsmanu
    @pdsmanu 11 лет назад

    Which version of linux mint is she using ?

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

    imagine being able to look at something except the doubld d'zz

  • @chottepandit6082
    @chottepandit6082 6 лет назад

    Although, I got one question Hak5...
    Can we chat over WAN? Like, I am in San Francisco and my friend is in Barcelona, can we establish a connection and communicate??

    • @cldream
      @cldream 6 лет назад +1

      As long as the person that's running the listener/server has the port open, you should be good. Do note that chatting over ncat is unencrypted.

  • @antonantochi8498
    @antonantochi8498 8 лет назад

    using netcat for transferring between virtualized systems

  • @vinaychary6185
    @vinaychary6185 6 лет назад

    What if we went to chat in 2 different networks

  • @adithyabolar3965
    @adithyabolar3965 8 лет назад

    cool. works on android too : )

  • @iseethroughtheliesofthejed4506
    @iseethroughtheliesofthejed4506 9 лет назад

    This might be a dumb question, but does this command work for Mac OS X too? since OS X also uses a UNIX based system?

    • @cldream
      @cldream 6 лет назад

      As long as there's someone building macOS binaries for netcat (if it's not already available), then it would work.

  • @KevboKing
    @KevboKing 9 лет назад

    pretty decent for making pranks and plans.

  • @Kaze6129
    @Kaze6129 9 лет назад

    Day 3000... still cant get it to work on windows :(

  • @oneprogramacao629
    @oneprogramacao629 4 года назад

    Thanks

  • @НикитаПупкин-х5щ
    @НикитаПупкин-х5щ 4 года назад

    I tried and it doesn't work, what can be a problem?

    • @SK-me9by
      @SK-me9by 3 года назад

      the government s watching you

  • @opensourceftw3282
    @opensourceftw3282 8 лет назад +3

    netchat?

  • @seliosxxx
    @seliosxxx 11 лет назад

    the smiling languaje is the way we always expect being happy in that moment we found alone and together. the smiling languaje is hard to learm ,just becouse if it need a kiss would be whith a hug

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

      bish how do ya get dis weed i want sum

  • @bibekdhakal5353
    @bibekdhakal5353 6 лет назад

    how can we use this over LAN

  • @anakin1337
    @anakin1337 10 лет назад

    can you chat with more than 2 people?

    • @SK-me9by
      @SK-me9by 3 года назад

      only if I'm in the mood....

  • @stealth99Z
    @stealth99Z 11 лет назад

    Thanks you (from Ukraine)

    • @stealth99Z
      @stealth99Z 11 лет назад

      Уже началась, наша власть невинных людей бъет

    • @stealth99Z
      @stealth99Z 11 лет назад

      Если ты с России то знай, Ваше телевиденье врет что люди нападали на "Беркут"... Люди пели гимн Украины а их били...

  • @martinarganaraz6793
    @martinarganaraz6793 6 лет назад

    muy buenos sus videos...estaria bueno que puedan hacer subtitulos para español...saludos

  • @AdamJonesay
    @AdamJonesay 11 лет назад

    Awesome :)

  • @nuclearfootball1943
    @nuclearfootball1943 7 лет назад

    netcat is flagged by all av .including defender. use meterpreter instead.

  • @pe5erbarnes
    @pe5erbarnes 11 лет назад +1

    Why don't you update to Windows 8.1? Its free and they bring the start button back

    • @TheYoshiPC
      @TheYoshiPC 11 лет назад +7

      Its just a button to take you to start screen, people are still spreading this misinformation

    • @DrewSwenson
      @DrewSwenson 11 лет назад +1

      HackedTech Yes, that is true but right clicking adds a nice list of "Power User" options... Simply adding that functionality into the system was well worth the upgrade to me. Prior to 8.1 I despised the whole Metro interface, but now I have a hybrid system that uses the best parts of both experiences on a desktop.

    • @pe5erbarnes
      @pe5erbarnes 11 лет назад

      It also improves performance, especially at start up

    • @pe5erbarnes
      @pe5erbarnes 11 лет назад

      Better performance, ability to boot to desktop and more customization. And its a free upgrade so there's nothing to lose

    • @pe5erbarnes
      @pe5erbarnes 11 лет назад

      ***** why?

  • @jesavius
    @jesavius 7 лет назад +4

    Haha! 31337 = elite in 1337 speak ;)

    • @ridrugo182
      @ridrugo182 7 лет назад

      I thought i was the only one who caught that

  • @NxCmp
    @NxCmp 11 лет назад +1

    Please don't use port 31337, a lot of software and hardware protection tools deny port 31337, if you don't know why, please fell free to look it up.

    • @omgwtfbbqalekx
      @omgwtfbbqalekx 8 лет назад

      NMAP uses port 31337 for ssh ncat-chat.
      Go ahead and run a scan on scanme.nmap.org - it's perfectly legal and you'll see that even they have it open/running. I have a hard time believing professionals the likes of nmap devs and their domain admins would give the same advice you did.

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

      Thanks for the permission to look it up!

  • @mihainicolae8796
    @mihainicolae8796 8 лет назад

    Run its working atlast!

  • @RaveYoda
    @RaveYoda 11 лет назад

    I'm guessing you could tunnel this through ssh for security? I'd think it'd work...? Anyone- Yes, no, maybe?

    • @TaiiwoLlort
      @TaiiwoLlort 11 лет назад

      Technically, this is all SSH is, except the 'messages' are encrypted, and the listener mimics bash. You could write a nice little program to generate a private key, share a public key, and then chat securely using any encryption method you want.

    • @RaveYoda
      @RaveYoda 11 лет назад

      Taiiwo Llort Mmmmmm...but ssh has more functionality than netcat?

    • @TaiiwoLlort
      @TaiiwoLlort 11 лет назад

      You don't understand. Netcat sends data over network sockets, and shows the data it receives. SSH also uses network sockets by transmitting your commands over to a program waiting to execute them, and sending back the response. This is the same for all network protocols such as FTP and HTTP.

    • @RaveYoda
      @RaveYoda 11 лет назад

      Taiiwo Llort Aaahhhhh...ok.

    • @DaeOh
      @DaeOh 11 лет назад

      You could use gpg on the netcat input/output streams, that's kinda the same.
      Here's an example I found of encrypting a file transfer with nc and gpg.
      mishotips.blogspot.com/2013/05/redirecting-standard-input-and-output.html

  • @EAGEEYE321
    @EAGEEYE321 4 года назад

    so many love bites

  • @whitepaperkat67
    @whitepaperkat67 8 лет назад

    i think you can steal peoples banners with dat :)

  • @ShamsTarek
    @ShamsTarek 11 лет назад +3

    Windows :/
    Fail

    • @ChunkyChest
      @ChunkyChest 11 лет назад

      if u run putty and connect to a server it works.

  • @ereal2
    @ereal2 11 лет назад +3

    you Know what i find funny is snubs running servers jesus christ! lol oh boy.

  • @MegaHyperGame
    @MegaHyperGame 7 лет назад

    YAV AMMA TALKİNG

  • @paulsharkman1240
    @paulsharkman1240 9 лет назад

    31337

  • @Jenalgo
    @Jenalgo 9 лет назад +12

    We don't need to 'take a break' as you put it, after 1 minute and 27 seconds because a) we are not in America where you are used to bombarding each other with ads every 15 seconds - we are on the Internet. b) your show isn't that interesting that I want to sit through any adverts. So drop your ridiculous 'take a break' approach and grow a brain. Here's me pausing your show, writing this comment, and then switching off. Blip.

    • @patchdale
      @patchdale 9 лет назад +6

      Jenalgo Please provide an example more interesting netcat tutorial series. If you're not interested in the subject matter of the show, why are you watching? It's amazing to see they can earn some money for helping us sysadmins. It's youtube too, if you hate the ad so much just fast forward through it.

    • @KyleHarrisonRedacted
      @KyleHarrisonRedacted 8 лет назад +7

      +Jenalgo it's called sponsorships, it's how they can afford to keep their series going without relying entirely on adsense revenue, which isn't much.

    • @kamausydnor4197
      @kamausydnor4197 7 лет назад

      the break isn't for you it for them they do everything live

    • @coltonkerns9237
      @coltonkerns9237 7 лет назад

      Jenalgo Repling to your comment. I'd say it's Understandable... But ask yourself this. Would you rather have malicious Google AdSense? How about Ads that are irrelevant, or those crappy 30sec Ads you can't skip??? I will just assume you wouldn't.
      ALSO..
      We all love the crew at Hak5 and they put out content that's extremely valuable to some viewers. I myself am thankful for this because I'm thirsty for knowledge and I hate reading... Making my point. I don't mind seeing sponsor advertising becuase all I got to do is click on the right side of RUclips video and it will fast forward as far as I'd like, Anytime I desire. The sponsors are tech related and I find the spons.. worth it. Ive gotten so many deals and free trials all because I waited 15 sec.

    • @redstoneisawesome9336
      @redstoneisawesome9336 6 лет назад +1

      Don't watch this show then, instead of demanding her to stop doing things.

  • @bwn8864
    @bwn8864 6 лет назад

    Terrible example. Very bad. I can do better!!