🔬SSH Enum

SSH (Secure Shell Protocol) - a cryptographic network protocol for operating network services securely over an unsecured network, based on a client-server model.

Default SSH TCP port is 22.

sudo nmap -p22 -sV -sC -O <TARGET_IP>

Lab 1

🔬 SSH Recon: Basic

  • Target IP: 192.8.3.3

  • Enumeration of OpenSSH server

ip -br -c a
	eth1@if130369   UP   192.8.3.2/24 
  • Target IP is 192.8.3.3

nmap -sV 192.8.3.3
22/tcp open  ssh   OpenSSH 7.2p2 Ubuntu 4ubuntu2.6 (Ubuntu Linux; protocol 2.0)
MAC Address: 02:42:C0:08:03:03 (Unknown)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

📌 SSH server version is OpenSSH 7.2p2 Ubuntu 4ubuntu2.6.

nc (netcat) - TCP/IP swiss army knife, tool wich reads and writes data across network connections

  • Fetch the banner and check the SSH server version using nc(netcat)

ssh - establish an encrypted secure connection with the host machine

  • Fetch the pre-login SSH banner

ssh

📌 SSH banner is Welcome to attack defense ssh recon lab!!

📌 There are 6 supported encryption_algorithms

📌 The entire ssh-rsa host key is AAAAB3NzaC1yc2EAAAADAQABAAABAQC1fkJK7F8yxf3vewEcLYHljBnKTAiRqzFxkFo6lqyew73ATL2Abyh6at/oOmBSlPI90rtAMA6jQGJ+0HlHgf7mkjz5+CBo9j2VPu1bejYtcxpqpHcL5Bp12wgey1zup74fgd+yOzILjtgbnDOw1+HSkXqN79d+4BnK0QF6T9YnkHvBhZyjzIDmjonDy92yVBAIoB6Rdp0w7nzFz3aN9gzB5MW/nSmgc4qp7R6xtzGaqZKp1H3W3McZO3RELjGzvHOdRkAKL7n2kyVAraSUrR0Oo5m5e/sXrITYi9y0X6p2PTUfYiYvgkv/3xUF+5YDDA33AJvv8BblnRcRRZ74BxaD

nmap ssh-auth-methods

📌 none_auth authentication method for student user is used.

📌 publickey and password authentication method for admin user is used.

Reveal Flag - /home/student/FLAG is: 🚩

e1e3c0c9d409f594afdb18fe9ce0ffec

Lab 2

🔬 SSH Recon: Dictionary Attack

  • Target IP: 192.230.83.3

  • Detailed SSH Enumeration

  • Target IP is 192.230.83.3

  • Use hydra to find student user password

hydra bruteforce

📌 student's password is friend

nmap ssh-brute

📌 student's password is sunshine

  • Use ssh_login metasploit module to bruteforce root's password

Reveal Flag - root password is: 🚩

attack

Metasploit - ssh_login

ssh - root

📌 The message of the day is SSH recon dictionary attack lab.


Last updated

Was this helpful?