Scanning & Enumeration

VMWare lab

Download the following PEH Course VMs based on vulnerable VMs from VulnHub

  • Import Kioptrix.ova

    • set RAM to 256MB or 512MB

    • set the VM Network Adapter to NAT, the same NAT network of the Kali VM

    • run the virtual machine, select Do nothing if asked and let it boot to the login screen

Kioptrix Level 1

๐Ÿ“Œ kioptrix login user credentials are - john:TwoCows2


Nmap scanning

From the Kali VM, find its network and user netdiscover to find the Kioptrix VM IP

  • Tools for network discovery - netdiscover, arp-scan

โžก๏ธ nmap - utility for network discovery and security auditing

  • Look for open sports and what is running on those ports

Look at the open ports and get all the details down by taking notes:

  • 22 - ssh - OpenSSH 2.9p2 (protocol 1.99)

  • 80 - http - Apache httpd 1.3.20

  • 111 - rpcbind

  • 139 - netbios-ssn Samba smbd

  • 443 - ssl/https - Apache/1.3.20 (Unix) (Red-Hat/Linux)

  • OS details: Linux 2.4.9 - 2.4.18 (likely embedded)


Enumerating HTTP and HTTPS

PORTS - 80, 443

  • Usually WebServers

Architecture enumeration

  • runs Apache

  • the VM (potentially) runs Red Hat Linux

  • other web directories may be present (dir-busting)

  • public default webpage - poor hygiene

Information disclosure

  • Apache 1.3.20

nikto

โžก๏ธ nikto - web server scanner

  • Save the scan to a file

dirbuster

โžก๏ธ dirbuster (GUI) - multi threaded java application designed to brute force directories and files names on web/application servers

  • Look for any sort of interesting directory

  • Dig and navigate to sub-pages and find disclosed information

burpsuite

โžก๏ธ Burp Suite

  • Use BurpSuite to find disclosed information when navigating the found webpages

    • server header disclosed version information


Enumerating SMB

PORT - 139

  • Usually file servers

Kioptrix nmap:

  • _smb2-time: Protocol negotiation failed (SMB2)

Metasploit

โžก๏ธ Metasploit

smbclient

โžก๏ธ smbclient

Quick fix for some errors


Enumerating SSH

PORT - 22

  • OpenSSH 2.9p2

  • Attempt to connect to SSH via the port

  • A login attempt on SSH is exploitation

  • If a banner is exposed, server version can be exposed


Research potential vulnerabilities

๐Ÿ“ Always take good and concise assessment notes about the identified/exposed data and versions

  • make them clean, screenshots with border, sections, etc

80/443 - 192.168.31.130 -

  • Default webpage - Apache, PHP

  • Information Disclosure - 404 page

  • Information Disclosure - server headers disclose version information

80/tcp open http Apache httpd 1.3.20 ((Unix) (Red-Hat/Linux) mod_ssl/2.8.4 OpenSSL/0.9.6b)

139/tcp open netbios-ssn Samba smbd (workgroup: MYGROUP)

  • Unix (Samba 2.2.1a)

22/tcp open ssh

  • OpenSSH 2.9p2

Search Google for vulnerabilities on the services versions, e.g. <service> <version> exploit

searchsploit

โžก๏ธ searchsploit - command line search tool for Exploit-DB that also allows you to take a copy of Exploit Database with you


Last updated

Was this helpful?