0% found this document useful (0 votes)
28 views7 pages

CCN Experiment - 6-1

The document outlines an experiment conducted by Soham Manish Parikh at Sardar Patel Institute of Technology, focusing on network mapping using Nmap. It details various tasks including ping scans, TCP SYN scans, and the creation of a custom Nmap script for automating scanning tasks. The conclusion emphasizes the insights gained into network reconnaissance and security analysis through practical exercises.

Uploaded by

Soham parikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views7 pages

CCN Experiment - 6-1

The document outlines an experiment conducted by Soham Manish Parikh at Sardar Patel Institute of Technology, focusing on network mapping using Nmap. It details various tasks including ping scans, TCP SYN scans, and the creation of a custom Nmap script for automating scanning tasks. The conclusion emphasizes the insights gained into network reconnaissance and security analysis through practical exercises.

Uploaded by

Soham parikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

BHARATIYA VIDYA BHAVAN’S

SARDAR PATEL INSTITUTE OF TECHNOLOGY


Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

Name SOHAM MANISH PARIKH

UID no. 2023300160

Experiment No. 6

AIM: Network Mapping using Nmap

Tasks

PROBLEM: ○ Perform a simple ping scan on a target IP address to determine its


availability.
○ Conduct a TCP SYN scan on a target IP range to identify open ports

SCREENSHOT:

PROBLEM: ○ Write a simple NMAP script to automate a scanning task of your choice.

PROGRAM: #include <stdio.h>


#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>

#define START_PORT 1 ​ // Start scanning from port 1


#define END_PORT 1024 ​ // Scan up to port 1024

void scan_port(const char *ip, int port) {


​ int sock;
​ struct sockaddr_in target;

​ // Create socket
​ sock = socket(AF_INET, SOCK_STREAM, 0);
​ if (sock < 0) {
​ perror("Socket creation failed");
​ return;
​ }
BHARATIYA VIDYA BHAVAN’S
SARDAR PATEL INSTITUTE OF TECHNOLOGY
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

​ // Set up target address


​ target.sin_family = AF_INET;
​ target.sin_port = htons(port);
​ target.sin_addr.s_addr = inet_addr(ip);

​ // Try connecting to the port


​ if (connect(sock, (struct sockaddr *)&target,
sizeof(target)) == 0) {
​ printf("[+] Port %d is OPEN\n", port);
​ }

​ // Close the socket


​ close(sock);
}

int main(int argc, char *argv[]) {


​ if (argc != 2) {
​ printf("Usage: %s <IP>\n", argv[0]);
​ return 1;
​ }

​ char *target_ip = argv[1];

​ printf("Scanning %s...\n", target_ip);

​ // Scan ports from START_PORT to END_PORT


​ for (int port = START_PORT; port <= END_PORT; port++) {
​ scan_port(target_ip, port);
​ }

​ printf("Scan completed.\n");
​ return 0;
}

SCREENSHOT:

Problem Statements

PROBLEM: 1.Scan a given network range and identify all active hosts.
BHARATIYA VIDYA BHAVAN’S
SARDAR PATEL INSTITUTE OF TECHNOLOGY
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

SCREENSHOT:

PROBLEM: 2. Identify the top 5 most commonly open ports on a specific target.

SCREENSHOT:

PROBLEM: 3. Determine the MAC address of a target device using NMAP.

SCREENSHOT:

PROBLEM: 4. Perform a scan to detect the presence of HTTP and HTTPS services on a
target network.

SCREENSHOT:

PROBLEM: 5. Find out if a particular host has FTP service running on it.
BHARATIYA VIDYA BHAVAN’S
SARDAR PATEL INSTITUTE OF TECHNOLOGY
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

SCREENSHOT:

PROBLEM: 6. Identify the SSH version running on a given host.

SCREENSHOT:

PROBLEM: 7. Scan a range of IP addresses and list all hosts that have Telnet service
running.

SCREENSHOT:

PROBLEM: 8. Determine the operating system of a target host using NMAP.

SCREENSHOT:

PROBLEM: 9. Identify any SQL services running on a given network.

SCREENSHOT:
BHARATIYA VIDYA BHAVAN’S
SARDAR PATEL INSTITUTE OF TECHNOLOGY
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

PROBLEM: 10. Find out if a specific host has Remote Desktop Protocol (RDP) enabled.

SCREENSHOT:

PROBLEM: 11. Scan a target network and determine if any hosts are running DNS
services.

SCREENSHOT:

PROBLEM: 12. Detect if a host has SNMP (Simple Network Management Protocol)
enabled.

SCREENSHOT:

PROBLEM: 13. Perform a scan to identify any SMTP (Simple Mail Transfer Protocol)
servers on a network.

SCREENSHOT:
BHARATIYA VIDYA BHAVAN’S
SARDAR PATEL INSTITUTE OF TECHNOLOGY
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

PROBLEM: 14. Determine if a target network has any active FTP servers allowing
anonymous login.

SCREENSHOT:

PROBLEM: 15. Find out if any hosts in a network are running vulnerable versions of the
Apache HTTP server.

SCREENSHOT:

PROBLEM: 16. Detect if a target host has any open NFS (Network File System) shares.

SCREENSHOT:

PROBLEM: 17. Identify the presence of any MySQL database servers on a given
network.

SCREENSHOT:

PROBLEM: 18. Scan a network to determine if any hosts have the Remote Procedure
Call (RPC) service running.
BHARATIYA VIDYA BHAVAN’S
SARDAR PATEL INSTITUTE OF TECHNOLOGY
Bhavan’s Campus, Munshi Nagar, Andheri (West), Mumbai – 400058-India
Department of Computer Engineering

SCREENSHOT:

PROBLEM: 19. Detect if a specific host has any open VNC (Virtual Network
Computing) ports.

SCREENSHOT:

PROBLEM: 20. Perform a scan to identify any hosts with the Secure Shell (SSH) service
running on non-default ports.

SCREENSHOT:

CONCLUSION: In this experiment, we explored various network scanning techniques using


Nmap to identify active hosts, open ports, running services, and system
details on a given network. We implemented a custom Nmap script in both
Lua (NSE) and C to automate scanning tasks.

Through practical exercises such as ping scans, TCP SYN scans, service
detection, and OS fingerprinting, we gained insights into how Nmap
operates and how it can be leveraged for network security analysis and
troubleshooting.

This experiment enhanced our understanding of network reconnaissance,


port scanning methodologies, and scripting automation in network
security.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy