telnet, ssh -> wireshark

Mindannyian tudjuk, hogy telnet esetén clear text-ben megy a kommunikáció, SSH esetén titkosítottan. Nézzük, mit mutat a kábelcápa.

telnet_ssh

Alap konfigurációk, és kezdjünk a telnettel.

R1#sh run
Building configuration…

Current configuration : 1014 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username fecogee privilege 15 secret 5 $1$O..G$NE6JpLRdWcsNO9kuQ7nLT/
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface Loopback1
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login local
line vty 5 15
login local
!
!
end

R1#

R2#sh run
Building configuration…

Current configuration : 991 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
ip domain name lab.local
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username fecogee privilege 15 password 0 cisco
archive
log config
hidekeys
!
!
!
!
!
!
!
!
interface Loopback1
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 10.0.12.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login local
line vty 5 15
login local
!
!
end

R2#

Indítsunk R2-ről egy telnetet R1-re, közben már megy a Wireshark.

R2#telnet 10.0.12.1
Trying 10.0.12.1 … Open
User Access Verification

Username: fecogee
Password:
R1#

Wireshark capture:

telnet_SSH_telnet_capture

username fecogee, password cisco. Szép.

Álljunk át SSH-ra, és nézzük, arra mit mutat.

R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#crypto key gene rsa
The name for the keys will be: R1.lab.local
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable…[OK]

R1(config)#lin
*Mar 1 00:08:31.095: %SSH-5-ENABLED: SSH 1.99 has been enabled
R1(config)#line vty 0 15
R1(config-line)#tran in none
R1(config-line)#tran in ssh
R1(config-line)#^Z
R1#
*Mar 1 00:08:40.891: %SYS-5-CONFIG_I: Configured from console by console
R1#

R2#ssh -l fecogee 10.0.12.1

Password:

R1#

telnet_SSH_ssh_capture

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.