Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Lezione 2
LEZIONE 2
IL PROTOCOLLO TELNET
< i c n e r a l i t
ty < T e l n e t ( t e l e c o m m u n i c a t i o n s n e t w o r k ) stata u n o d e i p r i m i s t r u m e n t i d i s p o n i b i l i s u
e r a e t e p e r m e t t e agli u t e n t i a u t o r i z z a t i d i c o l l e g a r s i a d a l t r i c o m p u t e r e d eseguire i p r o g r a m m i
s < n t i su d i essi.
stanza f o r n i s c e a l l ' u t e n t e l a p o s s i b i l i t d i e f f e t t u a r e u n l o g i n r e m o t o a l l ' i n t e r n o d i u n a r e t e
n o t e login).
r r o t o c o l l o s t a t a assegnata l a p o r t a 23 e si basa s u u n a c o n n e s s i o n e T C P p e r i n v i a r e d a t i e
andi i n f o r m a t o A S C I I codificati a 8 b i t : permette semplicemente d i instaurare u n sistema d i
cunicazione bidirezionale (half-duplex).
H p r o t o c o l l o T e l n e t d e f i n i t o n e l l a RFC 354 e a n c h ' e s s o u n p r o t o c o l l o d e l l i v e l l o a p p l i c a z i o - e e f o r n i s c e l e r e g o l e d i b a s e p e r p e r m e t t e r e d i c o l l e g a r e u n ci
(costituito semplicemen-
at " T h e p u r p o s e o f t h e T e l n e t p r o t o c o l is t o p r o v i d e a f a i r l y g e n e r a l , b i d i r e c t i o n a l ,
-bit b y t e o r i e n t e d c o m m u n i c a t i o n s f a c i l i t y . Its p r i m a r y g o a l is t o a l l o w a s t a n d a r d m e t h o d
rfacing terminal devices a n d terminal o r i e n t e d processes t o each o t h e r . . . "
richiesto
m e u t e n t e e la p a s s w o r d , m a , c o m e v e d r e m o , s o n o f a c i l m e n t e i n t e r c e t t a b i l i d a t o c h e
="ch'essi v i a g g i a n o c o m e i d a t i senza cifratura.
237
L o s t r a t o di a p p l i c a z i o n e
I l p r o t o c o l l o
T e l n e t
I l p r o t o c o l l o T e l n e t f u s v i l u p p a t o a p a r t i r e d a l 1969
e f u u n o t r a i p r i m i p r o t o c o l l i d e l livell
oc-
distribuito con
che
i l sistema operativo,
-4
JK^5>
v e r s o u n i n t e r p r e t e d i c o m a n d i i n esec u z i o n e su u n h o s t r e m o t o : i l server.
Client
Se" -
Le v e r s i o n i o d i e r n e d e i s i s t e m i o p e r a t i v i n o n h a n n o a b i l i t a t o d i d e f a u l t t a l e c l i e n t , m a n e c e
sario attivarlo s e l e z i o n a n d o l'apposita v o c e d a l p a n n e l l o di controllo.
P e r e s e m p i o , p e r W i n d o w s 7, la p r o c e d u r a la s e g u e n t e :
F a r e c l i c s u l p u l s a n t e Start,
s u Pannello
In Programmi
f a r e c l i c s u Attivazione
e funzionalit
di controllo
e infine su
Programmi
o disattivazione
d e l l e funzionalit
d o w s . Se v i e n e c h i e s t o d i f o r n i r e u n a p a s s w o r d a m m i n i s t r a t o r e o u n a c o n f e r m a , d i g i t a
la p a s s w o r d o c o n f e r m a r e .
N e l l a f i n e s t r a d i d i a l o g o Funzionalit
Windows
s e l e z i o n a r e la c a s e l l a d i c o n t r o l l o Client
Cerco t
.Funzionalit .'/inde/,;
Sistema e sicurezza
Rete e Internet
Hardware e suoni
Programmi
Account utente e pr
famiglia
Aspetto
Orologio e opzioni
internazionali
Accessibilit
1 O
refflClientTelnetl
Uiit
Teine
stalla un gadget
Client TFTP
12 Si j , Funzionalit multimediali
E S i , Giochi
8 bflS
Server Telnet |
Servizi di stampa e digitalizzazione
H i
E O
Ji
t
Servizi XPS
Servizio Attivazione processo Windows
Servizio di indicizzazione
Simple Network Management Protocol (SNMP)
OK
238
Annulla
Il p r o t o c o l l o T e l n e t
Lezione 2
nomehost
35
c o m u n i c a z i o n e avviene m e d i a n t e u n p r o t o c o l l o b i d i r e z i o n a l e h a l f - d u p l e x c o d i f i c a t o a 8 b i t e i l
tisso d i d a t i v i e n e i n v i a t o l i n e a p e r l i n e a : i l b y t e che segue u n v a l o r e 255 v i e n e i n t e r p r e t a t o c o m e
o comando.
\ p r o t o c o l l o Telnet si basa su t r e c o n c e t t i f o n d a m e n t a l i :
il p a r a d i g m a d e l t e r m i n a l e v i r t u a l e d i rete ( N V T , Network
il p r i n c i p i o d i o p z i o n i negoziate;
* l i simmetria del collegamento.
Virtual
Terminal);
/Cli snt\
\ T E L METJ
(
Se ver \
V J E L METJ
^
V
Terminale dell'utente
Sistema jperativo
Sistema Dperativo
Porta 23
Formato utilizzato
dal sistema locale
Formato NVT
(Network Virtual Terminal)
Formato utilizzato
dal sistema remoto
239
T e l n e t ha d e f i n i t o in p r a t i c a u n o s t a n d a r d affinch t e r m i n a l i d i d i v e r s o t i p o , c o n d i f f e r e r :
c a r a t t e r i s t i c h e e s e t d i c a r a t t e r i , p o t e s s e r o e s s e r e m e s s i in c o m u n i c a z i o n e fra l o r o , u t i l i z z a n e :
un'astrazione d e l terminale stesso, c o n s e n t e n d o a host diversi d i c o m u n i c a r e tra loro.
obbliga::
a d a c c e t t a r l a i n q u a n t o il s u o i n t e r l o c u t o r e g l i s t a i n d i c a n d o l ' i m p o s s i b i l i t d i c o m u n i c a r e
quella modalit.
v u o l e usare ( D O )
r i f i u t a d i usare ( D O N T )
v u o l e che l ' a l t r a e s t r e m i t u s i ( W I L L )
r i f i u t a che l ' a l t r a e s t r e m i t u s i ( W O N T )
O g n i r i c h i e s t a seguita da u n n u m e r o che i n d i c a i l t i p o d i o p z i o n e , c o m e p e r e s e m p i o :
WILL XXX
i n d i c a che u n p a r t n e r d e s i d e r a usare l ' o p z i o n e X X X ;
240
protocollo Telnet
i comando
DO
XXX
WON'T
XXX
, WILL
Risposta
Interpretazione
WILL
WON'T
DO
DONT
DON'T
WON'T
L ' e m i t t e n t e s e g n a l a c h e ha d i s a t t i v a t o l ' o p z i o n e
WON'T
DONT
241
UdA 4
L o s t r a t o di a p p l i c a z i o n e
ESEMPIO
S u p p o n i a m o che l ' h o s t A d e b b a s p e d i r e i c a r a t t e r i X , Y, Z, CR, LF, 1 , 2, m a c h e voglia spedire g l i u l t i m i d u e , c i o 1 e 2, s u b i t o , senza aspettare i l p r o s s i m o end o/line; p o s s i b i l e f a r l o i n questo mode
p r i m a si spediscono i c a r a t t e r i X, Y, Z, CR, L F e si m e m o r i z z a n o i n u n b u f f e r i c a r a t t e r i 1 e 2:
q u i n d i si i n v i a n o d u e r i c h i e s t e d i o p z i o n i D O E C H O e D O SUPPRESS-GO-AHEAD
per
inforni
SUPPRESS-GO-AHEAD;
Codice
Significato
SE
240
Fine d e i p a r a m e t r i d e l l a s u b n e g o z i a z i o n e
NOP
241
Nessuna operazione
Data Mark
242
Break
243
C a r a t t e r e BRK d e l l ' N V T
I n t e r r u p t Process
244
La f u n z i o n e IP
Abort output
245
La f u n z i o n e A O
A r e You T h e r e
246
La f u n z i o n e AYT
Erase c h a r a c t e r
247
La f u n z i o n e EC
Erase Line
248
La f u n z i o n e EL
Go ahead
249
Il s e g n a l e G A
SB
250
Indica c h e ci c h e s e g u e la s u b n e g o z i a z i o n e d e l l ' o p z i o n e i n d i c a i
251
252
D O (codice opzione)
253
254
ESEMPIO
p r o t o c o l l o Telnet
Lezione 2
: c o m a n d i r i g u a r d a n t i la n e g o z i a z i o n e delle o p z i o n i sono u n a s e q u e n z a d i t r e b y t e ; i l t e r z o b y t e s a r
- dice d e l l ' o p z i o n e r e f e r e n z i a t a .
( I A C ) , 253
( D O ) e 0 (opzione
TRANSMIT-BINARY).
n o n d o v r e b b e us
a p p u n t o p e r m o t i v i d i sicurezza
un p r o g r a m m a aggiuntivo
c o n crittografia c h e utilizza
non
).
Utilizzo di Telnet
Ma c o m e v i e n e u t i l i z z a t o oggi Telnet,
>= cos v u l n e r a b i l e ?
L'uso p r i n c i p a l e d i T e l n e t a v v i e n e n e l |e fasi d i d e b u g d i s e r v i z i d i n e t w o r k i n g c o m e i server SMTP e H T T P , i n
quanto r a p p r e s e n t a u n m o d o semplice p e r m a n d a r e c o m a n d i a l server
e d esaminare le r i s p o s t e , e n e i g i o c h i
M U D i n rete.
< M U D A M U D ( M u l t i p l e User D i m e n s i o n , M u l t i p l e U s e r D u n g e o n , o r M u l t i p l e U s e r D i a l o g u e ) is
a c o m p u t e r p r o g r a m w h i c h users can l o g into a n d e x p l o r e .
Each user t a k e s c o n t r o l o f a c o m p u t e r i z e d persona/avatar/
incarnation/character.
You can walk around, chat with other characters,
re
dangerous
monster-infested
areas,
solve
explopuzzles,
243
UdA 4
.o s t r a t o di a p p l i c a z i o n e
A n c h e n e l l a p o s t a e l e t t r o n i c a T e l n e t t r o v a v a r i e u t i l i z z a z i o n i , c o m e q u e l l a d i o f f r i r e l'agevole l e t t u r *
della corrispondenza sulla p r o p r i a m a i l b o x , cancellarla o p p u r e spedire missive elettroniche d a i :
c h e , c o m e v e d r e m o i n s e g u i t o , n o r m a l m e n t e l'accesso a l l a p r o p r i a casella d i p o s t a e l e t t r o n i c a viene
fatto i n m o d o n o n sicuro.
V i e n e a n c h e u t i l i z z a t o p e r a c c e d e r e alla b a n c h e d a t i l i b e r e p r e s e n t i i n t u t t o i l m o n d o , c o m e p e r
e s e m p i o q u e l l e r i p o r t a t e n e l l a seguente t a b e l l a :
N o m e host
E n t e / t i p o di archivio
Login
access.usask.ca
hytelne:
envirolink.org
gopK
library
callcat.med.miami.edu
244
hpcvbbs.cv.hp.com
martini.eecs.umich.edu 3000
G e o g r a p h i c N a m e Server Universit d e l M i c h i g a n .
ipac.caltech.edu
D a t i su 1 0 0 . 0 0 0 galassie.
ned
forsy.thetn.stanford.edu
Universit d i S t a n f o r d , d o c u m e n t i r i g u a r d a n t i M a r t i n L u t h e r K i n g .
Socrate;
madlab.sprl.umich.edu 3000