Cyber Survivals

Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts

Thursday, 11 April 2013

DNSenum - Gathering DNS Information

DNSenum is a tool that is designed with the purpose of enumerating DNS information about a domain. This is the one of the best tool used for information gathering which is the first step of the hacking.

The program mainly performs the following operations.

1) Get the Host address (A records)
2) Get the nameservers
3) Get the MX records

Lets begin:

First of all we need to go to the directory of the DNSenum where it is located.

In BT5 this is located in    /pentest/enumeration/dns/dnsenum

To Run:   perl dnsenum.pl [website.com]






As shown in above first it will get is the host address and Next we will see the name servers which give us the idea of the hosting provider. After that is the MX records where we can see the mail server of our target host.

Sunday, 31 March 2013

How to Reset the Root Password for Linux

At some point we can't remember the Root password for our Linux machine. At that time we stuck in between and we have only option to  re-install linux once again. Today we will learn how to reset root password with Linux live cd.

The only thing you need is a bootable linux live cd.

you can use Ubuntu in "Try Ubuntu"mode, OpenSuse in "Recovery" mode and Backtrack5 in "Forensics" mode. Other live cd  will be fine but it has to be the same architecture (x86 or x64) as your installed system.

Step1: you have to do is to find out the name of the partition on which you installed system in located. If you have only one hard drive it should be sda1 or sda2 but to find out you can use fdisk command.

# fdisk -l

Step2: Once you found the correct partition you have to mount it and have to bind the dev environment

# Sudo mount  /dev/sda1  /mnt

#sudo mount  --bind  /dev/  /mnt/dev

Step3: After that you have to change your root directory from live environment to the installed system.
 # sudo chroot  /mnt 

Step 4: Now you can work in your installed environment and easily set a new root password.

# sudo passwd 12345

Step 5: Finally exit chroot mode and reboot system.

#exit
#sudo reboot

You should now be able to log in as root using the new password 


How to change Backtrack Hostname root@bt#

Here, we see how to change Default Backtrack Hostname to your desired one.

By default your hostname will be bt and can be identified by root@bt# in terminal.

Step 1: To Check your hostname use hostname command.


As you can see my hostname is "bt"

Step 2: To change your hostname, you can run hostname command following your desired name.

hostname csurvivals


To view the change you should open the new terminal.

Step 3: The above command only applied to change for the present session, when you restart hostname service or restart your computer it will back to your earlier hostname (root@bt#)

command to restart service : service hostname restart

Step 4: To make teh hostname permanent, we need to edit the hostname file which resides in /etc/hostname using any editor.

root@bt# vi /etc/hostname
then change the "bt" with your desired name and save the file.

press "i" to insert mode
press "Esc" command mode
type ":w" to save


Step 5: Restart hostname service or Restart your computer.