Nmap Port Scanner – Introduction

Network scanners, such as Nmap (http://www.insecure.org/nmap/) or Nessus (http://
http://www.nessus.org), can scan for open ports on the local computer or on other computers. The
more sophisticated scanners, including Nessus, check for known vulnerabilities, so they can
tell you whether a server may be compromised should you decide to leave it running.

Nmap is capable of performing a basic check for open ports. Pass the -sT parameter and
the name of the target system to it, as shown here:

ami@amios:~$ nmap -sT google.com

Starting Nmap 6.00 ( http://nmap.org ) at 2014-03-01 12:40 UTC
Nmap scan report for google.com (
Host is up (0.0045s latency).
Other addresses for google.com (not scanned):
rDNS record for ea-in-f102.1e100.net
Not shown: 998 filtered ports
80/tcp  open  http
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 4.96 seconds

This output shows you 2 open port 80 (http) and 443 (https). You can use nmap to scan your server itself and then see if there are services running which does not support to be there.

When you use a network scanner, you should consider the fact that the ports you see
from your test system may not be the same as those that might be visible to an attacker.
This issue is particularly important if you’re testing a system that resides behind a fi rewall
from another system that’s behind the same firewall.

On the other hand, a
cracker on your local network would most likely have access similar to your own, so you
shouldn’t be complacent because you use a fi rewall. Nonetheless, fi rewalls can be important
tools for hiding servers without shutting them down.

You can use a stand-alone Linux boot CD-ROM to perform security
checks on a network. Tools intended for this purpose, such as BackTrack
(https://www.kali.org), provide easy access to Nmap and
other network security tools, enabling quick checks of network security
even if no computer on that network regularly runs Linux.

The latest current version is Kali Linux

You can also have a look on the following article if you are interested in VPN clients for Linux



“Many Thanks” for your support! Blog Stats

I though I will share some stats with you guys. Many Thanks for visiting my website this keeps me going 🙂

As per today I had 6119 site visit since last year.

My Blog has been visited by 125 Countries !!!!!!!

As you can see the USA seems to be on the top of list ;).

I have earned 0 from by Blog so far 🙂

Top Post All Time

Title Views
Transaction Check Error: file /usr/lib64/audit from install of glibc-2.16-30.fc18.x86_64 conflicts with file from package audit-2.2.1-2.fc18.x86_64 3,527
Home page / Archives 561
Mac Os Tranformation Pack for Ubuntu and Linux Mint 418
Undo scaffolding in rails 202
How to install Canon Printer on Fedora / Linux 64bit 178
How To Install AMD Catalyst Legacy Drivers in Ubuntu 12.10/ Linux Mint for better 3d support 150
Nodejs installation on Linux 120
Django DatabaseError: no such column error 108
Country Views
United States FlagUnited States 1,595
India FlagIndia 496
United Kingdom FlagUnited Kingdom 398
Germany FlagGermany 213
Brazil FlagBrazil 212
France FlagFrance 208
Korea, Republic of FlagRepublic of Korea 157
Australia FlagAustralia 144
Italy FlagItaly 140
Russian Federation FlagRussian Federation 139
Japan FlagJapan 125
Canada FlagCanada 119
Mexico FlagMexico 111
Spain FlagSpain 109
Poland FlagPoland 103
Chile FlagChile 103
Netherlands FlagNetherlands 94
Taiwan, Province of China FlagTaiwan 81
Indonesia FlagIndonesia 69
Argentina FlagArgentina 54
Hong Kong FlagHong Kong 54
Sweden FlagSweden 51
Romania FlagRomania 49
Czech Republic FlagCzech Republic 46
Portugal FlagPortugal 44
Turkey FlagTurkey 43
Austria FlagAustria 41
Ukraine FlagUkraine 36
Thailand FlagThailand 35
Kenya FlagKenya 35
Belgium FlagBelgium 32
Israel FlagIsrael 32
Singapore FlagSingapore 32
Switzerland FlagSwitzerland 32
Malaysia FlagMalaysia 32
Colombia FlagColombia 31
Viet Nam FlagViet Nam 30
Greece FlagGreece 29
Egypt FlagEgypt 28
Peru FlagPeru 26
Serbia FlagSerbia 25
South Africa FlagSouth Africa 23
Ireland FlagIreland 23
Finland FlagFinland 22
Philippines FlagPhilippines 21
Hungary FlagHungary 20
Denmark FlagDenmark 20
Pakistan FlagPakistan 19
New Zealand FlagNew Zealand 18
Croatia FlagCroatia 18
Bulgaria FlagBulgaria 17
Norway FlagNorway 17
Guatemala FlagGuatemala 17
Saudi Arabia FlagSaudi Arabia 16
Morocco FlagMorocco 16
Venezuela FlagVenezuela 16
Sri Lanka FlagSri Lanka 15
Slovakia FlagSlovakia 14
Bangladesh FlagBangladesh 13
Bolivia FlagBolivia 11
Dominican Republic FlagDominican Republic 11
Belarus FlagBelarus 11
Slovenia FlagSlovenia 10
El Salvador FlagEl Salvador 9
Luxembourg FlagLuxembourg 9
Ecuador FlagEcuador 9
Bosnia and Herzegovina FlagBosnia and Herzegovina 8
Nepal FlagNepal 8
Cambodia FlagCambodia 8
Ethiopia FlagEthiopia 8
United Arab Emirates FlagUnited Arab Emirates 7
Paraguay FlagParaguay 7
Estonia FlagEstonia 7
Costa Rica FlagCosta Rica 7
Lithuania FlagLithuania 7
Algeria FlagAlgeria 6
Panama FlagPanama 6
Mongolia FlagMongolia 6
Uruguay FlagUruguay 6
Lebanon FlagLebanon 6
Latvia FlagLatvia 6
Moldova, Republic of FlagMoldova 5
Iceland FlagIceland 5
Tunisia FlagTunisia 5
Puerto Rico FlagPuerto Rico 4
Cyprus FlagCyprus 4
Kuwait FlagKuwait 4
Jamaica FlagJamaica 4
Jordan FlagJordan 4
Rwanda FlagRwanda 4
Kazakhstan FlagKazakhstan 4
Mauritius FlagMauritius 3
Azerbaijan FlagAzerbaijan 3
Albania FlagAlbania 3
Qatar FlagQatar 3
Ghana FlagGhana 3
Montenegro FlagMontenegro 2
Georgia FlagGeorgia 2
Uganda FlagUganda 2
Macao FlagMacao 2
New Caledonia FlagNew Caledonia 2
Lesotho FlagLesotho 2
Togo FlagTogo 2
Iraq FlagIraq 2
French Guiana FlagFrench Guiana 2
Nicaragua FlagNicaragua 2
Aruba FlagAruba 1
Syrian Arab Republic FlagSyrian Arab Republic 1
Iran, Islamic Republic of FlagIran, Islamic Republic of 1
Botswana FlagBotswana 1
Djibouti FlagDjibouti 1
Andorra FlagAndorra 1
Nigeria FlagNigeria 1
Namibia FlagNamibia 1
Afghanistan FlagAfghanistan 1
Myanmar FlagMyanmar 1
Honduras FlagHonduras 1
Palestinian Territory, Occupied FlagPalestine, State of 1
Barbados FlagBarbados 1
Côte d'Ivoire FlagCôte d’Ivoire 1
China FlagChina 1
Congo, the Democratic Republic of the FlagDemocratic Republic of the Congo 1
Zimbabwe FlagZimbabwe 1
Oman FlagOman 1
Anguilla FlagAnguilla 1

Linux lsof command. How to use it

lsof – a linux command stand for LiSt Open Files and this is what this command does.

To get more inform you can type

man lsof

info lsof

type lsof

This will give you some info which I want be explaining here as you can manuals so you use them!

The lsof program can be used to identify what files are open in a directory, find who’s accessing them, and so on.

As everything in Linux is a file and is kept in the file it also means that you can use this command to display network connections.

i parameter will select all the listing of files any of whose Internet address matches the address specified. If no address is specified, this option select the listing of all Internet.

ami@amios:~$ lsof -i
ruby    19379  ami    8u  IPv4 4682378      0t0  TCP localhost:45065 (LISTEN)

You can restrict the output of lsof by including an address after the -i option. The addres takes the following form:


The digit 4 or 6 represent an IPv4 or IPv6 connection, the protocol is the protocl type (TCP or UDP), the hostname or hostaddr is the computer hostname or IP address associated with the remote system.

ami@amios:~$ lsof -i :ftp

Nothing get displayed as I am not running a FTP service on my testbed.

Alternatively, you can replace ftp with 21, because 21 is the port number associated with FTP port.

ami@amios:~$ lsof -i | grep LISTEN
ruby    19379  ami    8u  IPv4 4682378      0t0  TCP localhost:45065 (LISTEN)

Paging through the raw output (without using grep to search for LISTEN) will provide
you with a better idea of your system’s overall network use. You could conceivably spot
something suspicious, such as an outgoing network connection to a sensitive computer
that the client shouldn’t be contacting. This network activity may indicate active cracking
attempts by a user of the client, intrusion by an outsider, or the work of an automated
worm or Trojan horse program.

If you identify programs that shouldn’t be running, such as unnecessary servers, you can
use the command name, PID, and other information to help shut them down. The preceding
section “Disabling Unused Servers” describes how to do this in more detail.
Another use of lsof is in identifying who’s accessing fi les. This might be handy if you
need to unmount a fi lesystem (including a network fi lesystem) but can’t because of in-use
fi les or if you suspect inappropriate activities involving file access.





English Names for characters in keyboard

~ tilde (sounds like til-da); be prepared to explain to computer-illiterate people saying “you know, the wave-shaped thingy”
! exclamation; commonly read as bang in case of #!/bin/sh
@ at
# pound; but commonly read as shee in case of #!/bin/sh, not sure why
$ dollar
% percent
^ caret; not many people know this word so be prepared to say “no, not carrot; it’s the character above 6, an arrow pointing up”
& ampersand
* star; some read asterisk
( opening parenthesis (some may shorten it saying paren)
) closing parenthesis
_ underscore; once I heard people say underbar
+ plus
minus; as symbol before arguments in commands, some people including me read dash, easier to say one syllable
= equals
` backtick or backquote
{ opening brace
} closing brace
[ opening bracket
] closing bracket
| pipe or vertical bar
\ backslash; be prepared to explain to some computer-illiterate people
: colon
; semicolon
double quote
single quote
< less than; some may read left angle bracket
> greater than
, comma
. dot; period if in English text
? question mark
/ slash or forward slash; some computer-illiterate people may be confused about / and \
(), [] and {} may also be called brackets in general. In that case, they specifically call [] square brackets and {} curly brackets. I never like this. Open and Closing may also be called left and right.