Bluetooth (Word) - ECE Users Pages

superfluitysmackoverΑσφάλεια

23 Φεβ 2014 (πριν από 3 χρόνια και 10 μήνες)

110 εμφανίσεις

1


ECE4112 Internetwork Security

How to Set up Bluetooth Proximity System


Group Number: _________

Member Names: ___________________ _______________________


Lab Authored by:
Alan Nix &
Soud Laskar

Date Assigned:

Date Due:

Last Edited:

April 19, 2007


Please read the entire lab and any extra materials carefully before starting. Be sure to start early
enough so that you will have time to complete the lab. Answer ALL questions in the provided
Answer Sheet

and be sure you turn in to the TAs ALL materials l
isted in the
Turn
-
in Checklist

on or before the Date Due.


Goal:

This lab is designed to set up a Bluetooth proximity system which will link the
computer to a cell phone and
automatically lock it when the user is away.


Summary:

This lab consists of settin
g up the Bluetooth
receiver

on the RedHat 4.0 WS
host machine and connecting to a cell
-
phone/PDA or any other Bluetooth device.
Then the
Bluetooth enabled device will be used to track distance and lock the computer accordingly.


Background:

Biometrics is

the study of methods for uniquely recognizing humans
based upon one or more intrinsic physical or behavioral traits.


In
information technology
,
a biometric au
thentication refers to technologies that measure and
analyze

human physical and behavioral characteristics for
authentication

purposes. Examples of
physical (or physiological o
r biometric) characteristics include
fingerprints
, eye
retinas

and
irises
, facial patterns and
hand measurements
, while examples of mostly behavioral
characteristics include
signature
,
gait

and typing patterns. All behavioral biometric
characteristics have a physiological component, and, to a lesser degree, p
hysical biometric
characteristics have a behavioral element.


Why biometrics

The modern rapid advancements in networking, communication and mobility increased the need
of reliable ways to verify the identity of any person. Nowadays identity verification is

mainly
performed in two ways:



Possession
-
based
: the whole security is based on a "token" the user has (such as a credit
card or a document). If it is lost, somebody else might use it to falsify his identity

2




Knowledge
-
based

using a password. Even if we use

the best encrypting algorithm, the
whole security is based on the key. If it is too short, it is simple to guess it or crack it
making several attempts, but if it is too complicated it can't be remembered and the
common user will keep it written somewhere
, so it can be lost or stolen

Those weaknesses of standard validation systems can be avoided if our own body becomes our
key. Particular characteristics of the body or habits are much more complicated to forge then a
string, even if it is very long. Reliab
ility of biometric systems will be discussed later, but it is
evident that using biometrics adds a complexity to identification systems that would be hard to
reach with a standard password
-
based approach. The main advantages of biometrics over a
standard s
ystem are:



biometric traits can not be lost or forgotten (while passwords can)



biometric traits are difficult to copy, share and distribute (passwords can be announced in
crackers' websites)



they require the person being authenticated to be present at the
time and point of
authentication

Moreover biometric systems can be used in conjunction with passwords or tokens, thus
improving the security of existing systems without replacing them.

Common biometric characteristics



Classification of some biometr
ic traits

Biometric characteristics can be divided in two main classes, as represented in figure on the
right:



Physiological

are related to the shape of the body. The oldest traits that have been used
for more than 100 years are
fingerprints
, other examples are
face recognition
,
hand
geometry

and
iris recognition
.

3




Behavioral

are related to the behavior of a person. The first characteristic to be used that
is still widely used
today is the
signature
. More modern approaches are the study of
keystroke dynamics

and of
voice
.

Strictly speaking,
voice

is a physiological trait as well because any person has a different
pitch
,
but v
oice recognition is mainly based on the study of the way a person speaks, that is why it is
commonly classified as behavioral.

There are many other biometric strategies being developed such as those based on
gait

(way of
walking),
retina
,
hand veins
,
ear recognition
,
facial thermo
-
gram
,
DNA
,
odor

and
palm prints
.

It is possible to understand if a human characteristic c
an be used for biometrics in terms of the
following parameters:



Universality

describes how commonly a biometric is found in each individual.



Uniqueness

is how well the biometric separates one individual from another.



Permanence

measures how well a biometri
c resists aging.



Collectability

explains how easy it is to acquire a biometric for measurement.



Performance

indicates the accuracy, speed, and robustness of the system capturing the
biometric.



Acceptability

indicates the degree of approval of a technology
by the public in everyday
life.



Circumvention

is how hard it is to fool the authentication system.

The following table shows a comparison of existing biometric systems in terms of those
parameters:

Comparison of various biometric technologies, according to

A. K. Jain
[2]

(
H
=High,
M
=Medium,
L
=Low)

Biometrics

Universality

Uniqueness

Permanence

Collectability

Performance

Acceptability

Circumvention

Face

H

L

M

H

L

H

L

Fingerprint

M

H

H

M

H

M

H

Hand
geometry

M

M

M

H

M

M

M

Keystrokes

L

L

L

M

L

M

M

Hand veins

M

M

M

M

M

M

H

Iris

H

H

H

M

H

L

H

Retinal scan

H

H

M

L

H

L

H

Signature

L

L

L

H

L

H

L

Voice

M

L

L

M

L

H

L

facial
thermogram

H

H

L

H

M

H

H

Odor

H

H

H

L

L

M

L

DNA

H

H

H

L

H

L

L

Gait

M

L

L

H

L

H

M

Ear
recognition

M

M

H

M

M

H

M

4


A. K. Jain ranks each biometric based on the categories as b
eing
low
, medium, or high. A low
ranking indicates poor performance in the evaluation criterion whereas a high ranking indicates a
very good performance.

Biometric systems



The basic block diagram of a biometric system

The diagram on right shows a simple block diagram of a b
iometric system. The main operations
a system can perform are
enrollment

and
test
. During the enrollment biometric information of an
individual are stored, during the test biometric information are detected and compared with the
stored ones. The first bloc
k (sensor) is the interface between the real world and our system; it has
to acquire all the necessary data. Most of the times it is an image acquisition system, but it can
change according to the characteristics we want to consider. The second block perfo
rms all the
necessary pre
-
processing: it has to remove artifacts from the sensor, to enhance the input (e.g.
removing some noise), to use some kind of normalization, etc. In the third block we have to
extract the features we need. This step is really impor
tant: we have to choose which features to
extract and how. Moreover we have to do it with a certain efficiency (it can't take hours!). After
that, we can have a vector of numbers or an image with particular properties: all those data are
used to create a
t
emplate
. A template is a synthesis of all the characteristics we could extract
from the source, it has to be as short as possible (to improve efficiency) but we can't discard too
many details, thus loosing discrimination ability. Then the behavior of the s
ystem changes
according to what was requested.

Then, if it is performing enrollment, then the template is simply stored somewhere (it can be in
on a card or within a database). If it is performing the matching phase, the obtained template is
passed to a ma
tcher that compares it with other existing templates, estimating the distance
between them using any algorith
m.
The decision that the matcher has taken is sent as output, so
that it can be used for any purpose (e.g. it can allow a purchase or the entrance

in a restricted
area).


5



Figure 1.
Bluetooth services in ntsysv.


Prelab:

To get basic knowledge of how to use your Bluetooth enabled phone. Please read
any documentation that came with the phone and familiarize

you

with
the phone’s Bluetooth
capabilities and how to use it.


You may also want t
o familiarize yourself with the script code attached in Appendix A. You
may also get a copy of it from
http://gentoo
-
wiki.com/Talk:TIP_Bluetooth_Proximity_Monitor
.


Lab Scenario
:

This lab requires the use of the following equipment:

1.

RedHat 4.0 WS Host Machine

2.

USB Bluetooth Dongle

3.

Bluetooth enabled phone or PDA.


1.1.

Setting up Bluetooth device

The first thing you need to do is turn on the Bluetooth services on your RedHat host
machin
e. To do this, do the following steps:

1.

Open up a console.

2.

Type:


#
ntsysv

3.

Scroll down to
Bluetooth
, and make sure it’s checked and shown in
Figure 1.

4.

Tab down to
Ok

and press enter to save and quit.

5.

Plug in the USB Bluetooth dongle.


On the console type
in:

#
hciconfig



Make sure you get something similar to what is shown in
Figure 2.



6
























1.2.

Searching for phone and tracking.

Now we will scan for the phone and
set up the proximity system.


1.

Make sure the Bluetooth feature is turned on

in your phone and that the Bluetooth
visibility is also turned on.

2.

Open up a console and type:

#
hcitool scan

After the scan is complete, you should get a list of Bluetooth devices that are in range.
It should be something similar to
Figure 3.





















Figure 2.
hciconfig showing proper installation of USB Bluetooth.


Figure 3.
Scan results from hcitools.

7


Q1.1.

What is the MAC address of your phone?







We will now set up the script. You will need to do the following:

1.

The screensaver in RedHat WS 4.0 cannot be run in root mode and we will need
to create a new user. Type the following to create

a new user:


#adduser blueuser


#passwd blueuser

Type in “password” as the password or any other password you would like.

2.

We need to change the permissions of several files in the system. Type:


#chmod +s /usr/bin/hcitool


#chmod +s /usr/bin/L2ping

3.

Now
copy the
bluetooth.sh

script file to /bin and type the following:


#chmod 777 /bin/bluetooth.sh

4.

Open up the bluetooth.sh file in your favorite text editor and find the line starting
with DEVICE=”aa:bb:cc:dd:ee:ff” and put the MAC address of your phone.
Sa
ve the file and exit.

5.

Logout completely out of RedHat by clicking
Action

on the top taskbar and
clicking logout.

6.

Log back in as
blueuser
.

7.

Open the console and type:


#cd /bin


#./bluetooth.sh

Now walk away from the machine. You may have to go further than

the size of the
room before the threshold is triggered.


Q1.2
.

What happened when you walked
away from the machine?







Q1.3.

What happened when you walked back to the machine?









"Biometrics."
Wikipedia, The Free Encyclopedia
. 29 Apr 2007, 19:35 U
TC. Wikimedia Foundation, Inc. 1 May
2007 <
http://en.wikipedia.org/w/index.php?title=Biometrics&ol
did=126922842
>.

8


AP
P
ENDIX A


#!/bin/bash

#set
-
o verbose sh
-
v


# These are the sections you'll need to edit



# You'll need to use the MAC address of your phone here

DEVICE="00:15:B9:2A:6B:93"


# How often to check the distance between phone and computer

in seconds

CHECK_INTERVAL=2


# The RSSI threshold at which a phone is considered far or near

THRESHOLD=
-
7


# The command to run when your phone gets too far away

FAR_CMD='xscreensaver
-
command
--
activate'


# The command to run when your phone is close agai
n

NEAR_CMD='xscreensaver
-
command
--
deactivate'


HCITOOL="/usr/bin/hcitool"

STARTX_PID=0

DEBUG="/tmp/btproximity.log"


connected=0


function msg {


echo "$1" #>> "$DEBUG"

}


function check_connection {


connected=0;


found=0


for s in `$HCITOOL
con`; do


if [[ "$s" == "$DEVICE" ]]; then


found=1;


fi


done


if [[ $found == 1 ]]; then


connected=1;


else


msg 'Attempting connection...'


if [
-
z "`$HCITOOL cc $DEVICE 2>&1`" ]; then


m
sg 'Connected.'


connected=1;


else


if [
-
z "`l2ping
-
c 2 $DEVICE 2>&1`" ]; then


if [
-
z "`$HCITOOL cc $DEVICE 2>&1`" ]; then


msg 'Connected.'



connected=1;


else


msg "ERROR: Could not connect to device $DEVICE."


connected=0;

9



fi


fi


fi


fi

}


check_connection


while [[ $connect
ed
-
eq 0 ]]; do


check_connection


sleep 3

done


name=`$HCITOOL name $DEVICE`

msg "Monitoring proximity of
\
"$name
\
" [$DEVICE]";


state="near"

while /bin/true; do



check_connection



if [[ $connected
-
eq 1 ]]; then


rssi=$($HCITOOL rssi

$DEVICE | sed
-
e 's/RSSI return value: //g')



if [[ $rssi
-
le $THRESHOLD ]]; then


if [[ "$state" == "near" ]]; then


msg "*** Device
\
"$name
\
" [$DEVICE] has left proximity"


state="far"


$FA
R_CMD > /dev/null 2>&1


fi


else


if [[ "$state" == "far" && $rssi
-
ge $[$THRESHOLD+2] ]]; then


msg "*** Device
\
"$name
\
" [$DEVICE] is within proximity"


state="near"


$NEAR_CMD > /
dev/null 2>&1


STARTX_PID=$(pgrep startx)


fi


fi


msg "state = $state, RSSI = $rssi"


fi



sleep $CHECK_INTERVAL

done















10


Answers to Questions:


Q1.1.

What is the MAC address of your phone?


Dependan
t on phone used for the lab.


Q1.2.

What happened when you walked away from the machine?


The screensaver turns on and locks the computer.


Q1.3.

What happened when you walked back to the machine?


The screensaver turns off and prompts the user to log back

in.