Study Guide

Guided Lab: Kali and Metasploitable Service Discovery

A supplementary, instructional lab plan for an isolated VirtualBox lab: check the topology, find each VM's lab address, run service and version discovery, and research findings responsibly. Not yet completed.

Lesson 4.6 Network & Infrastructure Security

Stage: Think

Before you touch anything

Think it through

You are about to practise scanning a computer that is deliberately full of weaknesses. Before switching anything on, what would you want to be certain of, and why?

Show what happens

That the weak computer can be reached only from your own lab, never from the internet or a shared network, and that you are entitled to test it. A deliberately vulnerable machine on the wrong network is a danger to you and to everyone else on it.

Think it through

Which of these is a suitable target for this lab?
Show the answer

Answer: C. Your own isolated lab VM.

A deliberately vulnerable VM in your own isolated lab. Only systems you own or are explicitly authorised to test are ever in scope.

Stage: Explain

Objective

By the end of this lab, a learner should be able to:

  1. verify that two VMs in VirtualBox are connected in an isolated topology;
  2. inspect both VMs’ network interfaces;
  3. identify Metasploitable’s lab IP address;
  4. perform service and version discovery against it;
  5. record what was observed;
  6. research possible vulnerabilities for the observed services;
  7. document findings responsibly, including how confident each one is.

Check your understanding

Where does this lab stop?
Show the answer

Answer: A. At discovery and research.

At discovery and research: the list ends with documenting findings, and the lab contains no exploitation steps.

The lab deliberately stops at discovery and research. It contains no exploitation steps.

Stage: Explain

What you need

Think it through

Why must the host computer be one you own?

Show what happens

The lab runs a deliberately vulnerable machine on it and sends scan traffic across it. You need the right to do both, and control over what the computer is connected to.

Stage: Predict

Required topology

Think it through

Metasploitable is deliberately full of weaknesses. If it could reach the internet or your home network, what could go wrong?

Show what happens

Others on that network could find and use its weaknesses, and it could become a stepping stone to your other devices. Its network has to be one that only the lab shares.

The topology this lab requires

Original diagram. Kali has a NAT adapter and a host-only adapter; Metasploitable has a host-only adapter only. Addresses are found during the lab, so none are shown.

  1. Internet

    Reached through the host computer’s own connection

  2. Kali Linux VM

    Security-testing machine

    • Adapter 1NATInternet access for updates and research
    • Adapter 2Host-onlyReaches the lab network
  3. Host-only network

    The lab scope: the host and these two VMs

  4. Metasploitable VM

    Deliberately vulnerable, authorised lab target

    No NAT or bridged adapter in this exercise

    • Adapter 1Host-onlyLab network only

Do not enable forwarding on Kali or add any other adapter to Metasploitable. Two adapters on Kali do not route between the networks unless someone configures that deliberately.

Check your understanding

Why does the diagram give Metasploitable no NAT or bridged adapter?
Show the answer

Answer: C. Others could reach its weaknesses.

Either would let it reach other networks, or be reached from them, exposing its weaknesses. Host-only keeps it on a network only the host and the lab VMs share.

Why Metasploitable gets no NAT or bridged adapter: it is deliberately vulnerable. A NAT adapter would let it reach the internet, and a bridged adapter would place it on your real network, where other devices, and anyone else on that network, could reach its weaknesses. Host-only keeps it on a network that only the host and the lab VMs share.

Stage: Predict

Check and start the lab

Think it through

Before starting either machine, which single check would do most to keep the lab safe?

Show what happens

Checking each machine’s network adapters against the required topology, so that the target is attached only to the host-only network. Step 1 makes that the lab’s main safety control.

Step 1 — Check the VirtualBox adapters

Before starting either VM, open each VM’s network settings in VirtualBox and compare them with the diagram:

  • Kali: Adapter 1 attached to NAT; Adapter 2 attached to Host-only Adapter.
  • Metasploitable: Adapter 1 attached to Host-only Adapter; every other adapter disabled.
  • Both host-only adapters attached to the same host-only network.

If anything differs, fix it before going further. This check is the main safety control in the lab.

Check yourself: you can say, without looking, which single network Metasploitable is attached to. If the answer is anything other than “the host-only network”, do not start it.

Step 2 — Start Kali and Metasploitable

Start both VMs and wait for each to reach its login prompt or desktop. What you see depends on the versions you downloaded, so compare with each project’s own documentation rather than expecting a particular screen.

Check yourself: both VMs are waiting for you to sign in. If one will not start, a common cause is too little memory left on the host for two VMs at once.

Step 3 — Log in to Metasploitable

Log in with the username msfadmin and the password msfadmin, the known default credentials for that virtual machine.

Check your understanding

Metasploitable signs in with a published default password. When is that acceptable?
Show the answer

Answer: A. Only on an isolated training VM.

Only on a deliberately vulnerable training machine kept in an isolated lab. On any other system a default or guessable password is a vulnerability.

These weak, published credentials are acceptable only because Metasploitable is a deliberately vulnerable training machine kept in an isolated lab. On any other system, default or guessable passwords are a vulnerability, not a practice to copy.

Stage: Predict

Find the lab addresses

Think it through

Kali has two network interfaces as well as the loopback interface. How will you tell which one is on the lab network?

Show what happens

Work out the network each interface is on from its address and mask, and find the one that matches the target’s network. The NAT interface is not the one used to reach Metasploitable.

Step 4 — Inspect Kali’s networking

In a terminal on Kali, run:

ifconfig

Kali has two adapters, so it shows more than one interface, plus the loopback interface lo. Identify the interface on the host-only lab network and note its IPv4 address and netmask. The NAT interface is not the one used to reach Metasploitable. If ifconfig is not installed, ip addr shows the same information.

Check yourself: you have written down two different addresses for Kali and know which of them is on the lab network. If you see only one interface besides lo, Adapter 2 is not attached: go back to Step 1.

Step 5 — Inspect Metasploitable’s networking

On Metasploitable, run:

ifconfig

Identify its host-only IPv4 address. From here on, this address is written as <metasploitable-ip>. Apply each machine’s netmask to its address and check that Kali’s host-only interface and Metasploitable are on the same network. If they are not, return to Step 1.

Check your understanding

You apply each machine’s mask and get the same network address but different host addresses. What does that show?
Show the answer

Answer: C. They share the lab network.

That Kali’s host-only interface and Metasploitable are on the same network, as two different machines on it.

Check yourself: the two network addresses you worked out are identical, and the two host addresses are different. Which interface matters? works through this comparison with invented addresses.

Stage: Predict

Discover and record

Think it through

You are about to run a scan against the target’s lab address. What should you check one last time before pressing Enter, and why?

Show what happens

That the address really is Metasploitable’s lab address and nothing wider, because the scan must stay inside the lab’s scope.

Step 6 — Service and version discovery

From Kali, run:

nmap -sV <metasploitable-ip>

Replace <metasploitable-ip> with the address from Step 5, and double-check it before pressing Enter: the scan must target only Metasploitable’s lab address.

In the output, look at each open port’s PORT, STATE, SERVICE and VERSION columns. Treat the VERSION column as Nmap’s best identification, not a verified fact; some services reveal little about themselves.

Check your understanding

The scan reports that the host seems down. What is the right response?
Show the answer

Answer: B. Recheck the address and network.

Go back to Step 5 and check the address and the network. Widening the scan to look for the target would leave the lab’s scope.

Check yourself: the scan lists at least one open port. If it reports that the host seems down, the address is wrong or the two machines are not on the same network: go back to Step 5, and do not widen the scan to look for it.

Step 7 — Record observations

Record what the scan reported, in your own table. The rows below are placeholders to show the structure; they contain no results.

On narrow screens, focus the table and use the arrow keys or swipe to read across.

PortProtocolServiceObserved version or fingerprintResearch notes
(from your scan)(from your scan)(from your scan)(from your scan)(to complete in Step 8)

Think it through

One open port shows no version at all. What should your record say for it?
Show the answer

Answer: A. That it was not identified.

That the service or version was not identified. An honest gap is more useful than a guess.

Note anything uncertain, such as a service whose version was not identified.

This shows the standard to aim for. The product is invented, as in Service Discovery and Vulnerability Research; it is not a result from this lab or from any scan.

  • Observation (Step 7). Port 80, TCP. Service: http. Observed version: Examplesrv 2.3, as reported by Nmap’s version detection and not checked any other way.
  • Research (Step 8). Product: Examplesrv. Candidate advisory: a fictional advisory covering versions before 2.5, and only when the optional remote-administration module is switched on. Applicability: uncertain. The version is in the affected range, but whether the module is switched on has not been checked.

Why this is a good record: it keeps what the tool reported apart from what the research suggests, it says how the version was identified, and it gives a level of confidence with the reason. It does not say “vulnerable”.

Stage: Predict

Research, then stop

Think it through

Research finds an advisory whose affected versions include the version your scan reported. Is the lab machine vulnerable?
Show the answer

Answer: C. Not yet known.

Not yet known. The product, the version range and the configuration all have to be checked before a match becomes a finding.

Step 8 — Research vulnerabilities

For each service with an identified product and version, use trustworthy sources: the product’s CVE records, the NVD and the vendor’s security advisories. Record:

FieldWhat to write
ProductExactly as observed
Observed versionAs reported, with how it was identified
Candidate CVE or advisoryThe identifier and source
Affected-version criteriaThe versions and configurations the source says are affected
ApplicabilityConfirmed, rejected or still uncertain, and why

A match between the observed version and a CVE is a lead, not confirmation. Check product names, version ranges and configuration, and remember that vendors sometimes backport fixes without changing the version number.

Step 9 — Stop before exploitation

This lab ends here. Do not run exploit code or try to use any weakness you found, even though Metasploitable is designed to be vulnerable. Exploitation is a separate activity that would need its own explicit, written lab instructions and scope. Finding a possible vulnerability does not, by itself, extend what the lab authorises.

Check your understanding

You find a likely vulnerability. May you now try exploit code against Metasploitable as part of this lab?
Show the answer

Answer: C. No, the lab ends here.

No. This lab ends at discovery and research. Exploitation is a separate activity that would need its own explicit, written instructions and scope.

When you have finished, shut down both VMs.

Stage: Explain

Recording findings responsibly

Think it through

You want to share a screenshot of your scan notes. What should you check first?

Show what happens

That it reveals nothing about your real network or host, such as real addresses or device names, and that it shows only your own lab.

  • State the confidence of each finding: confirmed, rejected or uncertain.
  • Separate what the scan reported from what research suggests.
  • Keep screenshots and notes to the lab. Before publishing any of them, check that they reveal nothing about your real network or host.
  • Record the date, the VM versions and the exact commands used, so that the work can be repeated and checked.

Stage: Explain

Completion status

This lab is instructional and not yet completed. No observations, results, screenshots or findings have been recorded for it, and it is not evidence of a skill or certification. If the lab is completed in future, the work and its evidence will be recorded separately from these instructions.

Stage: Apply

Apply it in a new situation

These questions use the lab in situations it has not shown. For the strongest test of your understanding, come back to them on another day and answer each one at the first attempt.

Apply it

A classmate wants to switch Metasploitable to bridged mode to download updates. What do you advise?
Show the answer

Answer: A. No: keep it host-only.

Keep it host-only. Bridged mode would place a deliberately vulnerable machine on a real network, and NAT would let it reach the internet.

Apply it

Someone suggests scanning the whole host-only network “to see what else is there”. Is that within this lab’s scope?
Show the answer

Answer: B. No: only the target.

No. The lab scans only Metasploitable’s lab address, and does not widen the scan.

Apply it

Your scan reports a version inside an advisory’s affected range, but you have not checked its configuration. Which record is best?
Show the answer

Answer: C. “In range; uncertain.”

Record it as uncertain, with the reason: the version is in range, but the configuration has not been checked.

Stage: Check

Check your understanding

This question comes from the approved revision bank. It checks understanding of the lab’s design; answering it is not evidence that the lab has been done.

  1. Where does the Study Guide’s supplementary Kali and Metasploitable guided lab deliberately stop?

    Show answer

    Answer: After service discovery and vulnerability research, before exploitation

    The Study Guide’s guided lab is instructional and not yet completed. It covers checking the lab topology, service and version discovery, recording observations and vulnerability research, and it deliberately stops before exploitation: it contains no exploitation steps. It is a plan for future authorised practice, not a record of results or evidence of completed work, so no stage of it produces evidence of practical completion.

    Revision sources: Guided Lab: Kali and Metasploitable Service Discovery (Supplementary Study Guide explanation)

Stage: Consolidate

What to remember

  • Check the topology first: the target attaches only to the host-only network; that is the lab’s main safety control.
  • Find each machine’s lab address by comparing networks, not by guessing which interface to use.
  • Scan only the target’s lab address, and treat the reported versions as evidence to check.
  • A matching advisory is a lead; record each finding as confirmed, rejected or uncertain, with the reason.
  • The lab stops before exploitation; anything further would need its own written scope.
Lesson sources and acknowledgements

Sources and scope

  • Based on Session 6 (see the Session 6 Learning Log): the topology (Kali with NAT and host-only adapters, Metasploitable with a host-only adapter only), the msfadmin login, ifconfig on both machines, nmap -sV <metasploitable-ip> and researching detected versions were demonstrated by the tutor.
  • Supplementary: this lab is my own instructional plan. Its structure, safety notes, step-by-step checks, “check yourself” lines, recording templates, the fictional finished record, research criteria and the decision to stop before exploitation are Study Guide material, not the tutor’s instructions.
  • Guided version (published 1 November 2026, awaiting the site owner’s editorial review): the opening questions, every question asked in the lab with its feedback and hints, the application questions and the closing summary are supplementary explanation written for the Study Guide. The lab-status and safety notices are unchanged.
  • No practical work is claimed. The lab has not been completed. No addresses, ports, services, versions, vulnerabilities or screenshots are recorded.