Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Unit :- 1

1
Practical :- 1

AIM :- List and Practice various “net” commands on DOS & Linux.

Below is a listing of the various network related commands used in MS-DOS, Windows, Linux, Unix, and other
operating systems. Each command includes additional information to what the command does, the command's syntax,
and miscellaneous information.
Note: If you are not the root or admin of a computer, these commands may not work.
1) Arp
About ARP
 Short for Address Resolution Protocol, ARP is a used with the IP for mapping a 32-bit
Internet Protocol address to a MAC address that is recognized in the local network specified
in RFC 826. Once recognized, the server or networking device returns a response containing
the required address.
Availability
The arp.exe command is an external command accessed through the C:\Windows or
C:\Winnt\System32 directory and is available in the below Microsoft operating systems.
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
ARP syntax

ARP -s inet_addr eth_adr [if_addr]


ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]

Displays current ARP entries by interrogating the current protocol data. If inet_addr is
-a specified, the IP and physical addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP table are displayed.
-g Same as -a
inet_addr Specifies an Internet address.
-N if
Displays the ARP entries for the network interface specified by if_addr.
addr
-d Deletes the host specified by inet_addr.

2
Adds the host and associates the Internet address inet_addr with the physical address
-s eth_addr. The physical address is given as 6 hexadecimal bytes separated by hyphens. The
entry is permanent.
eth_addr Specifies a physical address
If present, this specifies the Internet address of the interface whose address translation table
if_addr
should be modified. If not present, the first applicable interface will be used.
ARP examples
arp -a

Interface 220.0.0.80

Internet Address Physical address Type


220.0.0.160 00-50-04-62-F7-23 static
The physical address or MAC address as shown above in the format aa-bb-cc-dd-ee-ff is the
unique manufacturer identification number. This number should always be an unique address.

2) Finger
About Finger
The finger command available in Unix and Linux variants allows a user to find sometimes
personal information about a user. This information can include the last time the user logged
in, when they read their e-mail, etc. If the user creates a .PLAN or other related file the user
can also display additional information.
Syntax

finger [-lmsp] [user ...] [user@host ...]


Options

displays the user's login name, real name, terminal name and write status (as a "*" after the terminal
name if write permission is denied), idle time, login time, office location and office phone number.

-s Login time is displayed as month, day, hours and minutes, unless more than six months ago, in which
case the year is displayed rather than the hours and minutes.

Unknown devices as well as nonexistent idle and login times are displayed as single asterisks.
Produces a multi-line format displaying all of the information described for the -s option as well as the
user's home directory, home phone number, login shell, mail status, and the contents of the files “.plan”,
“.project”, “.pgpkey” and “.forward” from the user's home directory.
-l
Phone numbers specified as eleven digits are printed as "+N-NNN-NNN-NNNN". Numbers specified as
ten or seven digits are printed as the appropriate subset of that string. Numbers specified as five digits are
printed as "xN-NNNN". Numbers specified as four digits are printed as "xNNNN".
3
If write permission is denied to the device, the phrase "(messages off)" is appended to the line containing
the device name. One entry per user is displayed with the -l option; if a user is logged on multiple times,
terminal information is repeated once per login.

Mail status is shown as "No Mail." if there is no mail at all, "Mail last read DDD MMM ## HH:MM
YYYY (TZ)" if the person has looked at their mailbox since new mail arriving, or "New mail
received ...", " Unread since ..." if they have new mail.
Prevents the -l option of finger from displaying the contents of the “.plan”, “.project” and “.pgpkey”
-p
files.
Prevent matching of user names. user is usually a login name; however, matching will also be done on
-
the users' real names, unless the -m option is supplied. All name matching performed by finger is case
m
insensitive.

Examples
finger -p ch

Display information about the user ch. Output will appear similar to the following:
Login name: admin
In real life: Computer Hope
On since Feb 11 23:37:16 on pts/7 from domain.computerhope.com
28 seconds Idle Time
Unread mail since Mon Feb 12 00:22:52 2001
3) Hostname
About Hostname
The hostname command displays the host name of the Windows XP computer currently
logged into.

Availability
The hostname command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
Hostname syntax
hostname
sethostname: Use the Network Control Panel Applet to set hostname.
hostname -s is not supported.
Hostname examples
hostname
Running the command would display the hostname for the computer.

4) IPCONFIG
4
About IPconfig
IPconfig is an MS-DOS utility that can be used from MS-DOS and an MS-DOS shell to
display the network settings currently assigned and given by a network. This command can
be utilized to verify a network connection as well as to verify your network settings.
Availability
The ipconfig.exe command is an external command and is available in the below Microsoft
operating systems.

Windows 95
Windows 98
Windows ME
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8

Windows 2000 and XP syntax

ipconfig [/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns | /showclassid
adapter | /setclassid adapter [classidtoset] ]

/all Display full configuration information.


/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.
Ipconfig examples
 To get your computers local network IP address, subnet mask, and default gateway typing
ipconfig alone displays this information as shown below. Keep in mind this is only your local
network information.
ipconfig
 Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : hsd1.ut.comcast.net.
IP Address. . . . . . . . . . . . : 192.168.201.245
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.201.1
 To get all local network information for your computer use the /all switch as shown below,
followed by the results that would be seen when using this command.

5
ipconfig /displaydns :: Running this command would display all the DNS information.
ipconfig /flushdns :: Delete all DNS entries.
5) Ping
About Ping

 Ping is one of the most commonly used and known commands. Ping allows a user to ping
another network IP address. This can help determine if the network card can communicate
within the local network or outside network.
Windows XP and lower syntax

 ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k
host-list]] [-w timeout] destination-list

Options:

Pings the specified host until stopped.


-t To see statistics and continue - Type Control-Break;
To stop - press Ctrl + C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
6
Examples
ping localhost

 Pings the localhost, which helps determine if the computer can send information out and
receive the information back from itself.

6) NBTSTAT
About Ping
 The nbtstat MS-DOS utility that displays protocol statistics and current TCP/IP connections
using NBT.
Availability
 The nbtstat command is an external command that is available in the below Microsoft
operating systems.

Windows 98
Windows XP
Windows Vista
Windows 7
Windows 8

Nbtstat syntax
 NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]

-a (adapter status) Lists the remote machine's name table given its name
-A (Adapter status) Lists the remote machine's name table given its IP address.
-c (cache) Lists NBT's cache of remote [machine] names and their IP addresses
-n (names) Lists local NetBIOS names.
-r (resolved) Lists names resolved by broadcast and via WINS
-R (Reload) Purges and reloads the remote cache name table
-S (Sessions) Lists sessions table with the destination IP addresses
-s (sessions) Lists sessions table converting destination IP addresses to computer NETBIOS
names.
-RR (ReleaseRefresh) Sends Name Release packets to WINs and then, starts Refresh
RemoteName Remote host machine name.
IP address Dotted decimal representation of the IP address.
interval Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C
to stop redisplaying statistics.

7
Nbtstat examples
nbtstat -A 204.224.150.3
 The above command would run nbtstat on 204.224.150.3, a remote IP address.
7) NSLOOKUP
About NSLOOKUP
 MS-DOS utility that enables a user to look up an IP address of a domain or host on a network.
 Users who are using earlier versions of Microsoft Windows 95, Windows 98, or Windows
ME and need the options available with the nslookup command need to download an
alternative, third-party program.
Nlslookup syntax
 nslookup [-opt ...] # interactive mode using default server
 nslookup [-opt ...] - server # interactive mode using 'server'
 nslookup [-opt ...] host # just look up 'host' using default server
 nslookup [-opt ...] host server # just look up 'host' using 'server'
Nslookup examples
 This command is often used to perform a reverse lookup on an IP address as shown in the
example below. The first section specifies the server and address of that server that provided
you with the domain name and IP address displayed in the second section.
nslookup 204.228.150.3
Server: ns.computerhope.com
Address: 1.1.1.1
Name: www.computerhope.com
Address: 204.228.150.3
nslookup
 Running nslookup without specifying an IP address or domain name displays your routers
server and address. To get out of the > prompt type exit and press enter

Route
Tracert and Traceroute
Whois
Winipcfg

8
Practical :- 2
AIM :- Configure Web browser security setting.

These settings can be accessed through the “Internet Options” menu.


 Configure security settings: Under the “Security” tab, do the following:
 Set security zones: IE offers the option to configure different security settings for different
“zones,” including the Internet, local intranet, trusted sites, and restricted sites. Set up the zones for
Intranet, Trusted Sites, and Restricted sites to your desired security level.
 Set Internet zone security to “Medium High” or higher. This blocks certain cookie types,
enables ActiveX filtering, and implements several other default settings for increased security.
 Disable javaScript: Click “Custom Level,” locate the “Active Scripting” setting, and select
“Disable.” It is recommended that users disable JavaScript because of the high amount of
vulnerabilities it contains.
 Automatically clear history: Select “Delete browsing history on exit” under the “General” tab.
Clearing your history at the end of each session helps to limit the amount of information IE saves when
you browse.
 Configure privacy settings: Under the “Privacy” tab, complete the following steps:
 Privacy setting: Set the Internet zone privacy to “Medium High” or higher. This blocks
certain cookie types to prevent sites from tracking or contacting you without your consent.
 Location: Select “Never allow websites to request your physical location.”
 Pop-up Blocker: Double check that Pop-up Blocker is enabled.
 Configure Advanced Security settings: Scroll down to the “Security” section under the
“Advanced” tab and do the following:
 Ensure that all default settings are in place. If you aren’t sure, click “Restore advanced
settings” before making any other changes.
 Select “Do not save encrypted pages to disk.” This will delete files cached from HTTPS
pages when the browser is closed.
 Select “Empty Temporary Internet Files folder when browser is closed.” This prevents IE
from storing your personal info (logins, passwords, activity, etc) beyond your browsing session.
 Turn off autoComplete: The AutoComplete feature should be turned off for forms and
usernames/passwords. Keeping AutoComplete turned off ensures that your sensitive information
isn’t being stored unnecessarily.
 Tracking protection: IE’s Tracking Protection feature keeps your browsing private from specified
third-party websites. This feature can be accessed through IE’s “Safety” menu. In order to use Tracking
Protection you will need to provide a Tracking Protection List that names all of the sites you don’t want
your information being sent to. You can create a list yourself or download lists online.

9
Practical :- 3

AIM :- Draw diagram of DOS,Backdoor,Trapdoor.


 DOS (Denial of Services) :-

 Backdoor :-


10
Trap door :-

11
Practical :- 4
AIM :- Draw diagram for Confidentiality , Integrity , Availability.

1. Confidentiality :-

2. Integrity :-

12
3. Availability :-

13

You might also like