Skip to main content
IoT
PSUT Engineering StudioPrincess Sumaya University for Technology
Student Edition
Connected Networks StudioNetworking and CommunicationExperimentsWorkspaces
IoT Security and Privacy / NS02
IoTPSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
ESSENTIAL LABORATORY · NS02 · IoT SECURITY AND PRIVACY
IoT Security and Privacy

Nmap — authorized local service inventory

Measure open and closed TCP ports on an owned loopback service.

Design experiment & verify evidence →
NS02 · Laboratory mentorAsk about the current experiment, its algorithms or Python notebook.
Ask Dr. MohammadAdaptive practice

Related course access: Networking and Communication — same laboratory, notebook and completion record.

NS02 · Academic orientation

Scope and objectives

Scope of the experiment

Measure open and closed TCP ports on an owned loopback service.

The focus of this experiment is to interpret authorized local service inventory and port states. Students then distinguish observed service reachability from vulnerability evidence, and document scope and verify findings without external probing. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.

Learning objectives

  • Interpret authorized local service inventory and port states.
  • Distinguish observed service reachability from vulnerability evidence.
  • Document scope and verify findings without external probing.
  • Record the relevant inputs, intermediate states and final verification result before changing the reference configuration.
  • Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.

Expected learning outcomes

On completion, students can interpret authorized local service inventory and port states, distinguish observed service reachability from vulnerability evidence, and document scope and verify findings without external probing.

Required deliverables

Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing document scope and verify findings without external probing. Separate predicted values from observations.

Prerequisite knowledge and related learning

Review the following catalogue prerequisites before starting. After completion, continue to Shodan — authorized IoT exposure inventory.

Environment and experimental methodology

The specified isolated laboratory environment, with local synthetic inputs and authorized services only. Use the experiment-specific setup and verification instructions.

Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.

Scientific concepts and engineering principles

Scientific architecture · NS02 · Nmap — authorized local service inventory

Local Nmap TCP connect classification — Scanner; Local TCP port; Result inventory; Connect probe / 0>1; Accept or refuse / 1>0; Record observed state / 0>2; Start local test service / 1>1; Repeat & compare / 0>2
Scientific concept map: Local scanner — Approved loopback; TCP connect — Selected ports; Response — SYN-ACK / RST / timeout; Classification — Open / closed / filtered; Inventory — Compare before / after.

Scientific foundations and analytical reasoning

A TCP connect inventory classifies a controlled service as open, closed or filtered based on connection outcome. Port state does not prove vulnerability.

Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.

Scientific theory · TCP service-state evidence

A TCP connect inventory attempts the normal connection handshake against an authorized service. An open port accepts connections; a closed port can refuse them; filtering may cause timeout or another indication depending on the network. A port number alone does not establish the service version or vulnerability.

Worked example and engineering interpretation

Start the assigned local HTTP service and compare the approved localhost inventory before and after startup. Record port state and server status; stop the service and verify the state again. Use only the assigned targets and avoid interpreting an open port as proof of compromise.

Engineering principles · additional worked teaching example

Authorized inventory distinguishes listening service, network reachability and application authentication. A closed port can actively reject connection; filtered observations may be inconclusive. A banner does not establish software vulnerability.

From theory to experiment

Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.

How to investigate Nmap — authorized local service inventory

Measure open and closed TCP ports on an owned loopback service.

Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.

Experiment-specific guided practice

Objective: Measure open and closed TCP ports on an owned loopback service.

  1. Owned service inventory — complete its numbered steps and record the requested evidence.
  2. Protocol state inspection — complete its numbered steps and record the requested evidence.
  3. Compare observations with the reference checks and submit the required evidence.
  4. Run the localhost TCP connect scan before starting an HTTP service, then start it on 127.0.0.1:8080 and repeat.

Reference check: SYN, SYN ACK, ACK; open. RST ACK; closed. No response/timeout in model. 8080 changes from closed to open if unused initially; other ports depend on local services.

Model boundary: Nmap TCP connect scans use the operating system connect call. Open means connection succeeds, closed means refusal, filtered means the scanner cannot determine openness because of filtering or lack of response. The virtual filtered state is a teaching model, not a guaranteed loopback observation. Only scan the fixed 127.0.0.1 targets in this experiment; do not scan third-party hosts.

Independent task and submission evidence

2. Protocol state inspection — complete its numbered steps and record the requested evidence. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.

Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.

TrialChanged settingFixed settingsPredicted resultActual observation / unitsEvidence / uncertainty
A: baselineReferenceRecordPredictRecordRecord
B: one changeRecordSame as APredictRecordRecord
A: repeatRestoreSame as APredictRecordRecord

Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.

Service exposure

A network service binds a local address and port. A TCP connect scan attempts a connection: a successful connection indicates open, a refusal generally indicates closed, while no response or an administrative prohibition may indicate filtered. State is an observation from the scanner’s perspective.

Controlled comparison

Use only the loopback target and the selected ports. Record baseline, start a Python HTTP server, repeat the scan, stop it and scan again. The virtual filtered condition demonstrates a timeout without requiring a host firewall change.

Interpretation

An open port does not prove a vulnerable product. A service inventory is a starting point for verifying the expected application, configuration, version and owner-approved remediation.

Prerequisites: NS01

NS02 engineering diagram
Algorithm structure and data flow. Use the simulation to inspect the corresponding numerical transformations.

Worked engineering reasoning and boundary conditions

A service inventory is not a vulnerability verdict. Open indicates a response consistent with a listening service, closed indicates no listener, filtered means the scanner cannot determine state due to filtering. Restrict work to authorized fixtures.

Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.

Concept animation · operation pathway

Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.

Nmap — authorized local service inventory: operation pathwayApproved localscopethree test servicesInventoryopen / closed /filteredValidatecompare listenerconfigurationReportexposure is notexploitabilityRead the active operation, then inspect the accumulated state.

Step 1 of 4 · Approved local scope

Approved local scope

Approved local scope
three test services

Teaching example only; inspect live calculations or real practical evidence separately.

Interactive flashcards

Self-rated study progress is stored locally, not used for official grades.

Browse all explanations
What indicates an open TCP connect port?

Successful connection.

What distinguishes closed from filtered?

Refusal versus lack of a definitive response.

Why use localhost?

Controlled authorized target.

Does an open port prove vulnerability?

No.

What is a TCP connect scan?

A scan using normal OS TCP connection attempts.

What does an open TCP port typically return to SYN?

SYN-ACK.

What response usually indicates a closed TCP port?

RST or RST-ACK.

What does filtered mean?

The scanner cannot determine openness due to filtering or missing responses.

Why scan before starting the lab service?

To establish a baseline.

Why scan after stopping the server?

To verify the expected state change.

What does -p select?

The port or ports to inspect.

Why use -n in a local experiment?

To avoid DNS lookup variability.

Does an open port prove exploitability?

No, it establishes a reachable service under the scan conditions.

What is the authorized target in this lab?

The student's own loopback server or an explicitly assigned lab asset.

A localhost HTTP server is stopped after a successful connect scan. What state may change?

The selected port usually moves from open to closed if no other service or filtering is present.

Does a TCP connection refusal mean the host is unreachable?

No. A refusal generally implies that the target was reachable but the port was not listening.

Why repeat a service inventory with a known local service?

It establishes a controlled positive and negative case for interpreting the scanner’s output.

Shared research workbenches · network designer & advanced studies
Concurrent-device simulation & Monte Carlo research
Distributed digital twin · topology, protocol & battery research