Saturday, September 1, 2012

Let's scan a server

To scan a server we can use a lot of tools like nmap.
You can find a lot of tools with his description here
In this article we'll see in details scan tools like nmap , nikto , load balancer detector and halberd

Nmap


Nmap (Network Mapper) is a security scanner originally written by Gordon Lyon used to discover hosts and services on a computer network, thus creating a "map" of the network.
To accomplish its goal, Nmap sends specially crafted packets to the target host and then analyzes the responses.
You can donwload nmap from here, nmap works on linux , BSD , soalris, windows and macosx.

In Linxu/BSD/solaris


In some distro we can find nmap in official repository, then we can install nmap only digits in terminal : sudo apt-get install nmap.
Else we must downlaod nmap.bz2 from here.
After donwload we must extract file from bz2. Move on directory (with cd) where there is the archive just download:
tar -jxvf name archive
cd nmap
./configure
make
sudo make install

Windows


In windows you only need to install the exe. You can download the executable from here

Mac OSX


Firstable we must donwlaod nmap.dmg
Double click on file just donwloaded.
Double click on nmap-.mpkg
Follow the instructions in the installer.
For more detail to install : Windows , Mac OSX

Now we can use nmap to command line. Nmap have a gui called Zenmap, but we see how to use nmap in command line.
Nmap have a lot of options, we can see all : nmap -help
-sS --> TCP syn scan
-sU --> UDP port scan
-F --> Fast scan (limited port)
-O --> OS detection
-A --> Enable OS detection, version detection, script scanning, and traceroute
-p --> To set port
nmap -sS -A -p 25-30 127.0.0.1
TCP syn scan from port 25 to 30 with os detection , version detection , script scanninc and tracerout.


Nikto


Nikto Web Scanner is a Web server scanner that tests Web servers for dangerous files/CGIs, outdated server software and other problems.
It performs generic and server type specific checks. It also captures and prints any cookies received.
You can donwload nikto from here
Nikto is a perl script then we need perl. On unix system is pre-installed.
You can downlaod perl from here
We move to directory where si nikto.pl.To start nikto :
perl nikto.pl -h ip
For more details : perl nikto.pl -help

Load balancer detector


Load balancer detector is a bash script.
You can download the script from here
To start script move on directory where is lbd.sh
For start this script we need root (sudo).
./lbd.sh www.sito.it

Halberd


Halberd is python script, you can download from here
We need python 2.4 or above to install halberd.
Extrack archive, move into new directory and digits:
python setup.py install
Now we have install halberd. To start halberd digits:
halberd www.sito.it
For more details digits : halberd -h

If you have a problem or you need some explanations just write under this post!

No comments:

Post a Comment