Transcript for:
Overview of Netcat and Its Uses

This episode of Hack Tip is brought to you by GoToAssist. Welcome to Hack Tip, the show where we break down concepts, tools, and techniques for hackers, gurus, and IT ninjas. I'm Shannon Morse, and today I'm checking out Netcat. But what is Netcat? Well, it first surfaced in 1995, and it is one of the most popular and very lightweight network security tools to date.

Netcat lets two computers transfer data with each other via TCP and UDP protocols. and via the Network Layer Protocol IP. The name may have derived from cat, which is a common command that we previously covered in Hack Tips, with additional networking capabilities thrown in.

Netcat runs as a client to initiate connections with other computers. It can also operate as a server or a listener in some specific settings. Common uses for Netcat include using it as a chat or messaging server, File transfers, you can do banner grabbing, which basically means you can collect information about a computer such as the operating system, services, versions, etc. to find weaknesses in a service.

You can also do port scanning and even more. NetCamp can be used in Mac, Linux, and Windows operating systems as well. Now, other than the minor differences between each operating system version of NetCamp, Netcat, there are also two distinct differences in Linux itself.

Now after downloading and installing Netcat, which I will also get to, you should have many options at your fingertips, including creating and launching a shell. Now if this isn't available to you, you may have a recompiled version of Netcat. Your Linux or Unix operating system may have recompiled the original Netcat without the ability to perform certain tasks. Consider the de-gaping security hole option. Now this option allows the user to execute commands using the extra options under the TAC-E switch, including launching that shell.

Now while it is considered safer if you don't have that, it doesn't give you as many options if your recompiled version doesn't include the TAC-E switch. So what version of Netcat are you running? Well, it's very easy to find out. If you go over to your machine that you already have it installed in, type NC to open Netcat, TAC-H, and this will give you all of your different options. And you'll notice if you do not have it that your TAC-E is missing.

But if you do have it, it if you go down the list you'll see tacky exact equals program program to execute after connect haha so we do have it we're good to go and we can show you everything that net cat can do now after the break I'll go over installing net cat and all of the available options we'll be right back Working in IT means constantly jumping from one program to the next. Each issue needs to be solved really fast and every minute counts. So don't waste your time juggling different tools and duplicating data entry.

Use GoToAssist from Citrix, the leader in remote support. So you'll have the tools that you need integrated into one easy-to-use platform so you can work faster and much more efficiently. Now how does this thing work? Well, GoToAssist includes three essential support tools that you can customize for your needs. There's GoToAssist Service Desk, which allows you to log incidents and track the resolutions.

GoToAssist Monitoring, proactively identify issues to fix before they become bigger problems. And you can also do remote support, providing live or unattended support to any PC, Mac, or mobile device from anywhere. I would totally use that while I'm sitting on the beach during my vacation to resolve any issues super quick.

They don't even know I'm out of there. Now you have to work with a bunch of different programs at your company. You don't want to have to copy and paste between a bunch of systems that don't actually talk to each other. And the monitoring is super great about being proactive and letting you know when your server really needs a patch.

So head over to gotoassist.com. Sign up for your special 30-day free trial today. Visit gotoassist.com, click on the Try It Free button, and use the promo code HAK.

That's gotoassist.com, promo code HAK. Welcome back! Now we're going on to downloading and installing Netcat.

Now this part is really a breeze. There are several sources available for Netcat on Windows machines, and many Linux distros already have it pre-installed for you. Now in Linux, if you want to get the version with Netcat with execution commands, first remove any original version installed on your operating system, especially if it's one of those missing the TAC-E.

Now to do this, you want to use the sudo apt-get remove command. Specifically, you would type it in like this. sudo apt-get remove tk-tk-purge netcat tk-open bsd Now you can install Netcat for Linux after you've done that in the traditional sense.

It is available via the command line or straight through the software manager. It's a breeze. Now once you've got Netcat installed on your Windows and Linux boxes, run nc-h like I showed you previously to make sure that you received the correct information back.

So to remind you, it should look like this. nc-h. And that opens up Netcat and all of its awesome commands. Now you can also compile the GNU version of Netcat using the following commands in your terminal.

Now first off, you do need to go to netcat.sourceforge.net. which specifically looks like this, and type into your terminal this command. Now I'm going to find out which download link I should get, and I chose to download the tar.gz version from the SourceForge page. I'm going to copy that and put it into my terminal.

So the total command would be wget and then the tar.gz link. Once you enter that, it's going to start downloading the whole file for you, and then you can install this GNU version of Linux. Downloading! So while that is downloading on my machine, I want to go ahead and mention also that you can change your directory and then LS to find the exact listing for your new Netcat download.

So for example, on my machine, I found it under here. So it's under my home directory, LS, and you can see Netcat. I actually have two versions of it installed or downloaded on here.

So now I can type in tar. X Z F net cat and I'll just complete that like there dot tar dot gz and then I want to change my directory to net cat and I want to configure this all right great once it is finished you simply type make That makes the file and then you type in sudo make install to install the new netcat file. It'll ask you for your password.

Simply type it in and we're done. So now you can type nc-h to make sure that your new GNU version of Netcat has installed correctly. Now last but not least, I should mention Nmap Security Scanner, which is a utility that integrates NCAT into their implementation.

You can simply go over to nmap.org to download that. Now we won't go into Nmap during this series of hack tips, but we may delve into it in the future. Now next week we're going to cover the basics of how to use Netcat and how to get you guys started.

So do you use Netcat? Send me a comment below or email us, tips at hack5.org. And be sure to check out our sister show, Hack 5, for more great stuff just like this.

I'll be there reminding you to trust your Technolest.