3. What is TELNET?
Standard TCP/IP protocol that runs at application
layer of a network
The TELNET protocol provides a standardized
interface, through which a program on one host
(the TELNET client) may access the resources of
another host (the TELNET server) as though the
client were a local terminal connected to the server.
Protocol for Remote login
The TELNET client uses an ephemeral port
number while server uses port number 23 of TCP.
4. Checking TELNET?
Every major computer operating system,
including Unix, Linux, Mac OS and
Windows, has Telnet capabilities and may
even have Telnet built into them.
To find out, open the command box in your
system and enter the command: TELNET
HOST, with HOST being the name of the
remote host computer with which you would
like to connect.
5. Windows:
Telnet is in built in Windows but is turned off
In order to use it, it must be turned on first.
6. Red Hat / Fedora Linux
The configuration file for telnet is
/etc/xinetd.d/telnet.
To enable telnet server you need to open
this file and make sure disable = no read as
disable = yes
7. Exiting TELNET
Windows uses LOGOFF. It closes the
session on server as well as client.
In case the command doesn’t work, use
ABORT but only as your last resort.
8. Processes in TELNET:
Each Telnet command console session
consists of two processes:
1. Tlntsess.exe
2. Cmd.exe.
Tlntsess.exe is responsible for managing
the Telnet session.
Cmd.exe is the command interpreter, or
shell program, that runs commands,
programs, or scripts on the host.
9. How does TELNET work?
A user is logged in to the local system, and
invokes a TELNET program (the TELNET
client) by typing
telnet xxx.xxx.xxx
where xxx.xxx.xxx is either a host name or an IP
address.
The TELNET client is started on the local
machine That client establishes a TCP
connection with the TELNET server on the
destination system.
Once the connection has been established, the
client program accepts keystrokes from the
user and relays them, generally one character
at a time, to the TELNET server.
10. In general, a TELNET server is
implemented as a master server with some
number of slave servers.
The master server listens for service
requests from clients. When it hears one, it
spawns a slave server to handle that
specific request, while the master goes
back to listening for more requests.
11. The NVT!!
The biggest difficulty is the heterogeneity of
the terminals and operating systems that
must be supported.
All do not use the same control characters
for the same purposes.
To accommodate this heterogeneity,
Network Virtual Terminal (NVT) was
introduced.
Any user TELNETting in to a remote site is
deemed to be on an NVT, regardless of the
actual terminal type being used
12.
13.
14. User logs in
User sends key stokes to terminal driver.
Local OS accepts them but does not interpret.
Characters sent to TELNET client
TELNET client transforms them into NVT
characters and delivers them to local TCP/IP
stack
Commands or text in NVT form travel through
Internet.
Received by operating system on the remote
machine
Transferred to TELNET server.
TELNET server changes NVT characters into
corresponding characters readable by remote
machine.
Passed to operating system and application
programs via pseudo terminal.
15. NVT character set:
Is made up of 8 bits
Has two sets of characters:
1. for data
2. for control
16. Data characters:
Uses NVT ASCII
Seven lowest order bits are same as
US ASCII codes
Hisghets order bit is set to 0
Control characters:
Highest order bit is set to 1 and other
represent the binary code for the
control characters
17.
18. TELNET Command Structure
The communication between client and server is
handled with internal commands, which are not
accessible by users.
All internal TELNET commands consist of 2 or 3-byte
sequences, depending on the command type.
The Interpret As Command (IAC) character is followed
by a command code. If this command deals with option
negotiation, the command will have a third byte to show
the code for the referenced option.
19. Disadvantages of TELNET:
You cannot run GUI tools over a Telnet
connection
Telnet is a character-based communication
protocol. It is not designed to transmit cursor
movements or graphical user interface information.
Because of this, you can only run command line
programs, shell commands, scripts, and batch files
over a Telnet connection.
It is not a secure protocol.
21. THE NEED FOR SSH
•With the evolution of the internet, services such as file transfers,
remote logins, and remote command executions became possible.
•Existing implementations of protocols that supported these
services included FTP, RCP, TELNET, RLOGIN, and RSH.
•Problem existed with these protocols:
They lacked security ! (r-commands)
Possible for an intruder to intercept and read data.
•Telnet was especially risky:
Plaintext user name and password was easily intercepted
over the network.
•A new protocol was needed to fix these security problems.
22. HISTORY OF SSH
•Event & Result:
•1995 Finland University network compromised via a password-
sniffing attack.
•Tatu Ylönen, a researcher at the university develops the SSH1
product for himself to improve security.
•SSH1 quickly grew popular and its use increased:
•SSH1 released with a free license
• Ylönen founded a company (SSH Communications
Security/SCS).
• He submits the SSH-1 protocol to the IETF.
•Problems were discovered that were not fixable without losing
backwards compatibility.
•In 1996, a new version of the protocol was released:
•New Protocol named SSH 2.0 or SSH-2.
•It improved both security and features of SSH-1.
•Multiple shell sessions over a single SSH connection was made
possible and improved security with (D-H) key exchange.
•IETF formed the SECSH group to standardize the protocol and the
group submitted the protocol SSH-2 in 1997.
23. CONTINUATION OF HISTORY……
•SCS released SSH2, a s/w product based on the SSH-2 protocol, in
1998.
•It had restrictive licenses & hence had lesser usage.
•Till then use of SSH1 was still large as it had an unrestricted
license for users
•2000, SCS eased their restrictive licenses:
•Allowed several operating systems to implement them including
Linux, NetBSD, FreeBSD, and OpenBSD.
•OpenBSD developed OpenSSH, another SSH implementation
•Freely available under the OpenBSD license
•Presently used in several operating systems.
•In 2006, SSH-2 protocol became the proposed internet standard by
the IETF. Today, SSH is supported by several operating systems
including Linux, Mac, and Windows.
24. What is ssh ??
•SSH is both a program and a protocol:
•Allows users to securely log into another computer over an
insecure network, executes commands and transfers files
•Created as a replacement for TELNET, ftp, and rlogin, rsh, and
rcp.
• Uses TCP and provides authentication, confidentiality (both
data and command), integrity, authorization, data compression,
and with SSH-2,multiplexing .
•Has transparent client/server communication over encrypted
network connections
•Can be implemented on most Operating Systems Win, Mac,
Unix/Linux etc.
•What it’s Not ?
•It is not a shell / Command Interpreter in the sense of Unix
Bourne shell and C shell but provides a channel to run shell on a
remote computer.
25. SSH FEATURES
1. Authentication
Proof of identity of users and servers, typically password and
public key signature.
2. Privacy
Via strong standard encryption algorithms
3. Integrity
Cryptographic integrity checking via MD5 and SHA-1 keyed hash
algorithms
4. Authorization / Access
Server configurable access
5. Forwarding or Tunnelling
Encrypt other TCP/IP-based sessions
6. Data Compression
26. ADVANTAGES
•SSH is available on most platform
•Clients are available for many platforms (besides major Operating System –
OS/2, BeOS, Java, etc.)
•Free for noncommercial use
•The open source version has gone through many improvements with patches,
bug fixes, and addition of functionalities.
•lsh is the General Public License (GPL) version of SSH-2 – currently being
standardized by the IETF SECSH working group.
•SSH can multiplex services over the same connection
•One of the most powerful function of multiplexing is port forwarding or
tunneling
•SSH can securely tunnel insecure applications like POP3, SMTP, IMAP, and
CVS.
27. PROTECTION
Perhaps, the most important advantage of SSH is its
protection against packet spoofing, IP/host spoofing,
password sniffing, and eavesdropping.
•SSH uses user and host key rather than IP address.
SSH is less susceptible to packet spoofing and IP/host spoofing.
•SSH implements cryptography for both authentication and
communication.
Strong encryption make password sniffing and eavesdropping
virtually impossible.
28. DISADVANTAGES
•Only support known port number
•Dynamic port not supported
•Port Number can be exploited.
•SSH cannot fix all TCP’s problems since TCP run below SSH
•Can minimize attack types with authentication and security
•Network hijacking – SSH is vulnerable to DoS
•SSH cannot protect users from attack made through other protocols.
•E.g. NFS mounting can allow malicious access to root on
UNIX/LINUX systems
•SSH provides no protection against Trojan horses or viruses
29. SSH 2 PROTOCOL ARCHITECTURE
SSH is a proposed application layer protocol with four
components as shown in the diagram:
30. SSH-2 is separated into modules and consists of four components
three of which are protocols working together and one is SSH
Application
1.SSH Transport Layer Protocol (SSH-TRANS)
• server authentication, confidentiality, and integrity.
• runs over a TCP/IP connection or some other reliable
data stream.
2.SSH Authentication Protocol (SSH-AUTH)
• authenticates the client-side user to the server.
• runs over the transport layer protocol.
3.SSH Connection Protocol (SSH-CONN)
• multiplexes the encrypted tunnel into several logical
channels.
• runs over the user authentication protocol.
4. SSH Application
• After connection phase completion, it allows several
application programs to use the connection where
31. Port forwarding or tunneling
One of the services provided by SSH protocol is to provide port
forwarding. We can use the secured channels available in SSH to
access an application program such as TELNET that does not
provide security services.
32. •Port forwarding, also called tunneling, reroutes a TCP/IP connection to
pass through an SSH connection.
• client side splicing is called local port forwarding (-L option) i.e.
connections from the SSH client are forwarded via the SSH server, then to
a destination server.
•server side splicing is called remote port forwarding (-R option) i.e.
connections from the SSH server are forwarded via the SSH client, then to
a destination server
•It is called tunneling because it creates a tunnel through which the
messages belonging to other protocol can travel.
•With the help of this we can change a direct, but insecure, connection
between the TELNET client and TELNET server
•It is not completely transparent, occurs at the application level, not the
network .
•Connect to servers such as SMTP, IMAP, POP, and LDAP across a
firewall that does not allow direct access while encrypting those
33. Ssh packet format
Length: 4-byte field defines length of packet including the type
,data and CRC fields.
Padding: 1-8 bytes field, its added to the packet to make the attack
on security provision more difficult.
Type: 1 byte field defines the type of packet used by SSH protocols.
Data: This is of variable length. Its length can be found by deducting
5 bytes from the value of the length field.
CRC: The cyclic redundancy check field is used for error detection.
37. NIS is a network naming and administration
system for smaller networks that was
developed by Sun Microsystems.
It was initially called Yellow Pages , in
reference to the famous US directory.
Sun changed the name of its system to NIS,
though all the commands and functions still
start with “yp”.
NIS+ is a later version that provides
additional security and other facilities.
38. Using NIS, each host client or server
computer in the system has knowledge
about the entire system.
A user at any host can get access to files or
applications on any host in the network with
a single user identification and password.
A NIS/YP system maintains and distributes
a central directory of user and group
information, hostnames, e-mail aliases and
other text-based tables of information in a
computer network.
39. Types of hosts:
There are three types of hosts in an NIS:
1. NIS master server
2. NIS slave servers
3. NIS clients
40. NIS Master Server:
A central repository for host configuration
information and maintains the authoritative
copy of the files used by all of the NIS clients.
The passwd, group, and other various files used
by NIS clients are stored on the master server.
41. NIS slave servers
NIS slave servers maintain copies of
the NIS master's data files in order to
provide redundancy.
Slave servers also help to balance the load
of the master server as NIS clients always
attach to the NIS server which responds
first.
42. NIS clients
NIS clients authenticate against
the NIS server during log on.
44. BASIC INFORMATION
Original author : Michael Sweet (Easy
Software Products)
Developer : Apple Inc.
Initial release : June 9, 1999
Stable release : 2.1 / August 31, 2015[1]
Preview release : 2.1RC1
Written in : C
Operating system : Unix-like, Windows
Type :Print server
License : GNU General Public
License,
GNU Lesser General Public
License
45. introduction
CUPS Common Unix Printing System) is a modular
printing system for Unix-like computer operating systems
which allows a computer to act as a print server. A
computer running CUPS is a host that can accept print
jobs from client computers, process them, and send
them to the appropriate printer.
CUPS consists of a print spooler and scheduler, a filter
system that converts the print data to a format that the
printer will understand, and a backend system that
sends this data to the print device.
46. CUPS uses the Internet Printing Protocol
(IPP) as the basis for managing print jobs and
queues.
There are a number of user interfaces for
different platforms that can configure CUPS,
and it has a built-in web-based interface.
CUPS is free software, provided under the
GNU General Public License and GNU
Lesser General Public License, Version 2.
47. working
•CUPS provides a mechanism that allows print jobs to be
sent to printers in a standard fashion.
•The print-data goes to a scheduler which sends jobs to
a filter system that converts the print job into a format the
printer will understand.
•The filter system then passes the data on to a
backend—a special filter that sends print data to a device
or network connection.
•The system makes extensive use of PostScript and
rasterization of data to convert the data into a format
suitable for the destination printer.
50. SCHEDULER :
•The CUPS scheduler implements Internet
Printing Protocol (IPP) over HTTP/1.1.
•The scheduler provides a web-based
interface for managing print jobs, the
configuration of the server, and for
documentation about CUPS itself.
51. FILTER SYSTEM:
•CUPS can process a variety of data formats on
the print server. It converts the print-job data
into the final language/format of the printer via a
series of filters.
•The filtering process works by taking input data
pre-formatted with six arguments i.e. the job ID
of the print job, the user-name, the job-name,
the number of copies to print, any print options
& the filename.
52. BACKEND:
•The backends are the ways in which CUPS
sends data to printers.
•There are several backends available for CUPS
like parallel, serial, and USB ports, cups-pdf[28]
PDF Virtual Printing, as well as network backends
that operate via the IPP.
Alternately,root@techinx# chkconfig telnet onTo start telnet server type command:root@techinx# /etc/init.d/xinetd restart
If none of the commands work, you can try ABORThowever, this command serves only to end Telnet on your end, sometimes leaving it running on the remote host computer, so use ABORT only as your last option.
Characters cannot be directly passed to OS, not designed in that way to receive char from Telnet server, can receive from terminal driver.
The key point is that, in order for any byte to be accepted as a command, it must be preceded by a byte with value 255 - "Interpret as Command" (IAC). Otherwise, the server program assumes that that byte is simply data that will be understood by the application program.
This command proposes negotiation about terminal type.
Option Negotiation
Using internal commands, TELNET in each host is able to negotiate options.
The starting base of negotiation is the NVT capability: each host to be connected must agree to this minimum.
Every option can be negotiated by the use of the four command codes WILL, WON'T, DO, DON'T described above.
In addition, some options have sub-options: if both parties agree to the option, they use the SB and SE commands to manage the sub-negotiation.
Here is a simplified example of how option negotiation works.
Some editing programs, such as vi and Edit, can be run over a Telnet connection; however, these interactive programs are not true GUI programs because cursor movement is controlled by the keyboard, not the mouse.
When you log into a remote host using Telnet, your username and password are sent “in the clear” – meaning, in plain text and not encrypted in any way.
That means your credentials can be (relatively) easily intercepted and used to gain access to that device. For this reason (and many others) Telnet has been largely replaced by the more secure SSH protocol.
NIS is similar to the Internet's domain name system (DNS) but somewhat simpler and designed for a smaller network. It's intended for use on local area networks.