Beginners Guide to Telnet 07-15-2013, 06:03 AM
#1
Telnet
- What is Telnet?
Telnet is a Network Protocol and the tool which uses that protocol (i.e Telnet) is also known as Telnet.
- What is its usage?
Well Telnet is used to connect to an External or a Remote Computer via Port 23. You'll need to enter the Login and Password in order to connect to that remote PC. After connecting to your remote PC you can carry out commands to preform your task on your Remote PC for example you want to create a text file or you want to check how your system is working or you want to check the directory of your remote PC.
- What's in it for Hackers?
Using Telnet we can preform Banner Grabbing,, it's infact a method to get a hint or some information about the Host computer like What's it actually running. Telnet can be used to preform banner grabbing on insecure PC and Servers but we are going to discuss it after discussing it's usage.
- Telnet Commands
Telnet offers a bunch of commands, here are some:
- Connecting using Telnet
There are two ways to connect using telnet, one is the direct way and the other is using Telnet commands.
Direct Way:
Telnet Way:
First type telnet in console then you'll enter the Telnet session, type
The first way is rather easier and I recommend using it, The syntax for Telnet usage is:
- Banner Grabbing
To get the banner of a Server or a Remote PC, we will use telnet to connect to it, so the syntax is same as before:
Now lets create a sample senario, I want to get a banner of a site I'm trying to exploit but First I want to know something about it, either it uses Apache, NGINX or a FTP etc which might be weak towards my exploit so we'll try some ports.
Test for Server Banner:
I get
so it's a fail
Second is I test for FTP
And my luck just kicked in, I get this:
![[Image: tjWYxxt.png]](http://i.imgur.com/tjWYxxt.png)
But this is not success because still we didn't get to know the version of that FTP that we can know the exploit about, lets try another host to see if we get a good and clear banner:
Now we try the second host, Lets do the same thing again but I want to check for SSH too this time.
Test For Server:
-> Failed
Test For FTP:
-> Got the same result as before
Test For SSH:
And We got:
![[Image: 2evb8n5.png]](http://i42.tinypic.com/2evb8n5.png)
We've successfully got the Banner and we know the SSH version of that site/server is using:
We shall add this to our Information Gathering list about that host
as banner grabbing is a part of Information Gathering
Security on Linux and Windows:
Most users recommend disabling Telnet on Linux and Windos to avoid hackers skipping in to your system or getting information. Disabling Telnet can be a bonus to security. This is where your programming skills come in, Learn Network Programming, and make a tool alternative to Telnet to do the stuff you want.
This is my last tutorial for Linux because I have migrated to Windows again
Regards,
Ex094
- What is Telnet?
Telnet is a Network Protocol and the tool which uses that protocol (i.e Telnet) is also known as Telnet.
- What is its usage?
Well Telnet is used to connect to an External or a Remote Computer via Port 23. You'll need to enter the Login and Password in order to connect to that remote PC. After connecting to your remote PC you can carry out commands to preform your task on your Remote PC for example you want to create a text file or you want to check how your system is working or you want to check the directory of your remote PC.
- What's in it for Hackers?
Using Telnet we can preform Banner Grabbing,, it's infact a method to get a hint or some information about the Host computer like What's it actually running. Telnet can be used to preform banner grabbing on insecure PC and Servers but we are going to discuss it after discussing it's usage.
- Telnet Commands
Telnet offers a bunch of commands, here are some:
Code:
close close current connection
logout forcibly logout remote user and close the connection
display display operating parameters
mode try to enter line or character mode ('mode ?' for more)
open connect to a site
quit exit telnet
send transmit special characters ('send ?' for more)
set set operating parameters ('set ?' for more)
unset unset operating parameters ('unset ?' for more)
status print status information
toggle toggle operating parameters ('toggle ?' for more)
slc set treatment of special characters
z suspend telnet- Connecting using Telnet
There are two ways to connect using telnet, one is the direct way and the other is using Telnet commands.
Direct Way:
Code:
telnet 192.168.1.1 23Telnet Way:
First type telnet in console then you'll enter the Telnet session, type
Code:
open 192.168.1.1The first way is rather easier and I recommend using it, The syntax for Telnet usage is:
Code:
telnet IP_ADDRESS PORTNote: The commands mentioned at the top of this topic are to be used only when using the Telnet way!
- Banner Grabbing
To get the banner of a Server or a Remote PC, we will use telnet to connect to it, so the syntax is same as before:
Code:
telnet IP_ADDRESS PORTNow lets create a sample senario, I want to get a banner of a site I'm trying to exploit but First I want to know something about it, either it uses Apache, NGINX or a FTP etc which might be weak towards my exploit so we'll try some ports.
Test for Server Banner:
Code:
telnet HOST 80I get
Code:
Connection closed by foreign hostSecond is I test for FTP
Code:
telnet HOST 21And my luck just kicked in, I get this:
![[Image: tjWYxxt.png]](http://i.imgur.com/tjWYxxt.png)
But this is not success because still we didn't get to know the version of that FTP that we can know the exploit about, lets try another host to see if we get a good and clear banner:
Now we try the second host, Lets do the same thing again but I want to check for SSH too this time.
Test For Server:
Code:
telnet HOST 80Test For FTP:
Code:
telnet HOST 21Test For SSH:
Code:
telnet HOST 22And We got:
![[Image: 2evb8n5.png]](http://i42.tinypic.com/2evb8n5.png)
We've successfully got the Banner and we know the SSH version of that site/server is using:
Code:
SSH-2.0-OpenSSH_4.3We shall add this to our Information Gathering list about that host
as banner grabbing is a part of Information GatheringSecurity on Linux and Windows:
Most users recommend disabling Telnet on Linux and Windos to avoid hackers skipping in to your system or getting information. Disabling Telnet can be a bonus to security. This is where your programming skills come in, Learn Network Programming, and make a tool alternative to Telnet to do the stuff you want.
This is my last tutorial for Linux because I have migrated to Windows again
Regards,
Ex094


![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)