Enter your email address:

Delivered by FeedBurner

smap - Linux command to look for VoIP devices


StumbleUpon Toolbar

Introduction

As part of your tools as system administrators, or as VoIP administrators, you need to know how many VoIP devices are a given network, the tool you need for this is, smap

With this tool you will be able to find Asterisk boxes, and also ATAs, or SIP phones, even should be able to find PC with softphones enabled and listening to VoIP ports.

As far as I know this tool is not coming with Ubuntu nor with Debian, I have not looked for it in other Distros, so it must be compiled from the tarbal, but it is really an easy task.

Instalation

First download the tarbal archive.

wget http://www.wormulon.net/files/pub/smap-syscan.tar.gz

Then compile it.

make

Using it

Usage

smap [ Options ]

you can run

./smap -h

to get this help text.

smap 0.3.4 http://www.wormulon.net/

usage: smap [ Options ]

-h: this help
-d: increase debugging
-O: enable fingerprinting
-l: fingerprint learning mode
-P0: Treat all hosts as online - skip host discovery
-p
: destination port
-D : SIP domain to use without leading sip:
-t : timeout in msec

To discover all the VoIP enabled devices in your network run

./smap 192.168.1.0/24

change the IP/mask for your own network data, once you have identified a device with VoIP enabled, you can run,

./smap 192.168.1.20

You will see something like this,

smap 0.3.4 http://www.wormulon.net/

Host 192.168.1.20:5060: (ICMP untested) SIP enabled
best guess (60% sure) fingerprint:
Siemens IAD SLI-5790-I (running Asterisk)
headers found:
User-Agent: Asterisk PBX

1 hosts scanned, 0 up, 1 SIP enabled

If you want also more information about this device run:

./smap -l 192.168.1.20

And you will get:

smap 0.3.4 http://www.wormulon.net/

NOTICE: test_allow: "Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY"
NOTICE: test_headers: cmpstr: "Via:From:To:Call-ID:CSeq:User-Agent:Allow:Accept:Content-Length:"
NOTICE: test_headers: Please add new cmpstr
Host 192.168.1.20:5060: (ICMP untested) SIP enabled
best guess (60% sure) fingerprint:
Siemens IAD SLI-5790-I (running Asterisk)

FINGERPRINT information:
newmethod=481
allow_class=201
supported_class=NR
hoe_class=NR
options=404
brokenfromto=404
prack=481
invite=404
headers found:
User-Agent: Asterisk PBX

1 hosts scanned, 0 up, 1 SIP enabled

If you get this error while trying to use this command:

Segmentation fault

You have to run it as root or if you can't do it, edit the Makefile file, and comment the -DRAW_SOCKET option, so yours should look like this.
***************************************************
#
# smap Makefile
#
# compile flags
# -DHAVE_RANDOM: system has random() as rand() replacement (i.e. FreeBSD)
# -DRAW_SOCKET: use raw socket when available
#
# $Id: Makefile,v 1.9 2006/07/05 20:36:58 hscholz Exp $

LDFLAGS= -L/usr/local/lib -lm
CFLAGS= -Wall -g -I/usr/local/include
CFLAGS+= -DHAVE_RANDOM # -DRAW_SOCKET
CC?= gcc
OBJS= error.o fingerprint.o helpers.o icmpping.o localip.o message.o randomizer.o response.o scan.o sip.o smap.o stats.o test_allow.o test_supported.o test_headers.o

all: smap

smap: $(OBJS)
$(CC) -o smap $^ $(LDFLAGS)
clean:
rm -f $(OBJS) smap smap.core
*************************************************************

Trackback URL for this post:

http://www.go2linux.org/trackback/240
StumbleUpon Toolbar

 If you like this article, subscribe to our full rss

If this article was somehow useful for you, you can leave something in the tip's jar

Please post your question in our forum and use comments only to leave your comments about the article, thanks.

Wow - a network scanner for

Wow - a network scanner for voice over devices. Completely new to me.

Added to my toolbox. Thx for sharing!

The polarizer

Voip is a great service and

Voip is a great service and a scanner for it sounds amazing

Yes indeed. Guillermo Garron

Yes indeed.
Guillermo Garron

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

This site is proudly hosted at Bluefur Hosting