

- How to use telnet to enumerate a web service code#
- How to use telnet to enumerate a web service windows#
In this part of the Metasploitable 2 enumeration tutorial we will be enumerating the running services, accounts and perform an open port scan. Metasploitable 2 enumeration and port scanning The last step is to scan the target host for these vulnerabilities with a vulnerability scanner called OpenVAS on Kali Linux. We will be using the Open Source Vulnerability Database (OSVDB) and the Common Vulnerabilities and Exposures (CVE) for this purpose. With information retrieved from the enumeration process, for example the operating system version and running services with version, we will be looking for known vulnerabilities in these services.
How to use telnet to enumerate a web service windows#
Enum4linux is a tool used for enumerating information from Windows and Samba hosts.Īfter we’ve successfully completed enumerating the Metasploitable 2 VM we will be doing a vulnerability assessment on the network side in the next tutorial. We will also use an enumeration tool called enum4linux. A very popular tool used for network enumeration, port scanning and fingerprinting is NMap (Network Mapper) which we will be using throughout this tutorial. Fingerprinting is the process of identifying the services connected to those ports. Port scanning is used to probe a server or host for open TPC and UDP ports. An important part of the Metasploitable 2 enumeration process is the port scanning and fingerprinting process. This is also called network enumeration. During this process we will also collect other useful network related information for conducting a penetration test. Enumeration in the hacking context is the process of retrieving usernames, shares, services, web directories, groups, computers on a network. Enumeration in mathematics or computer science is referred to as listing a number of elements in a set. #8 We're going to generate a reverse shell payload using msfvenom.This will generate and encode a netcat reverse shell for us.In this new Metasploit Hacking Tutorial we will be enumerating the Metasploitable 2 virtual machine to gather useful information for a vulnerability assessment. #7 Great! This means that we are able to execute system commands AND that we are able to reach our local machine.

Do we receive any pings? Note, you need to preface this with. #6 Now, use the command "ping -c 1" through the telnet session to see if we're able to execute system commands. #5 Start a tcpdump listener on your local machine using: "sudo tcpdump ip proto \\icmp -i tun0" This starts a tcpdump listener, specifically listening for ICMP traffic, which pings operate on. Let's check to see if what we're typing is being executed as a system command. #3 Let's try executing some commands, do we get a return on any input we enter into the telnet session? (Y/N) #2 Great! It's an open telnet connection! What welcome message do we receive?

#1 Okay, let's try and connect to this telnet port! If you get stuck, have a look at the syntax for connecting outlined above.
How to use telnet to enumerate a web service code#
The attacking machine has a listening port, on which it receives the connection, resulting in code or command execution being achieved. #8 Always keep a note of information you find during your enumeration stage, so you can refer back to it when you move on to try exploits.Ī "shell" can simply be described as a piece of code or program which can be used to gain code or command execution on a device.Ī reverse shell is a type of shell in which the target machine communicates back to the attacking machine. #7 Who could it belong to? Gathering possible usernames is an important step in enumeration. #6 Based on the title returned to us, what do we think this port could be used for? It's important to try every angle when enumerating, as the information you gather here will inform your exploitation stage. #5 Here, we see that by assigning telnet to a non-standard port, it is not part of the common ports list, or top 1000 ports, that nmap scans. #4 Now re-run the nmap scan, without the -p- tag, how many ports show up as open? #3 This port is unassigned, but still lists the protocol it's using, what protocol is this? #1 How many ports are open on the target machine? Let's see what's going on on the target server. p- : Enables scanning across all ports, not just the top 1000 A : Enables OS Detection, Version Detection, Script Scanning and Traceroute all in one Scan the machine with nmap and the tag -A and -p. Let's start out the same way we usually do, a port scan, to find out as much information as we can about the services, applications, structure and operating system of the target machine.
