Friday, 24 February 2017

How to reset Windows password with Kali Linux

Download Kali Linux and burn the ISO to a CD/DVD. Boot Windows machine with the LiveCD. On the boot menu of Kali Linux, select Live (forensic mode). Kali Linux initialize and when it loads, it will open a terminal window and navigate to the Windows password database file. Almost all versions of windows password is saved in SAM file. This file is usually located under /Windows/System32/config. On your system it may look something like this: /media/hda1/Windows/System32/config. Below is the screenshot.
The SAM database is usually in the /media/name_of_hard_drive/Windows/System32/config
The screen shot below lists the SAM database file on my hard drive. The screen shot below lists the SAM database file on my hard drive.
Type command chntpw -l SAM and it will list out all the usernames that are contained on the Windows system.
The command gives us a list of usernames on the system. When we have the username we want to modify and we simply run the command chntpw -u “username” SAM

In the example below we typed: chntpw -u “Administrator” SAM and we get the following menu:
We now have the option of clearing the password, changing the password, or promoting the user to administrator. Changing the password does not always work on Windows 7 systems, so it is recommended to clear the password. Therefore you will be able to log in with a blank password. You can also promote the user to a local administrator as well.

Installing Kali Linux- A step-by-step instruction

  • Minimum 8 GB of HDD space to install Kali Linux
  • For i386 or amd64 architecture, a minimum of 512 MB RAM (1024 MB RAM recommended)
  • An ISO or VMWare image can be downloaded from Kali Linux site
Here, I am going to guide you step by step to install Kali Linux (ver. 1.0.2) in a virtual machine. Procedure of installation is very much similar to Backtrack.
Click on the above link to download Kali Linux. When you goto this link it will ask you to register, however registration is not mandatory to download Kali Linux. Either, you can register by giving your name or email address to receive information updates or simply you can skip this step and click on "No thanks, just want to download!". Depending on the type, you can customize your download in ISO or VMWare format. Click on "Download Kali". Once Kali Linux is downloaded you are ready to install it in a virtual machine. I am using VMWare Player version: 5.0.2 build-1031769 here.

1. Open VMWare Player and click on Click a New Virtual Machine. It will open New Virtual Machine Wizard.
2. On this screen select I will install the operating system later and the click on Next.
3. Select Guest operating system as Linux (kernel of Kali Linux is based on Linux) and then select Version as Ubuntu. Click on Next to goto next screen
4. Type Virtual machine name and specify the Location where you want install Kali Linux, however you can leave the default Virtual machine name and Location. Click on Next to proceed to the next screen
5. Specify Disk Capacity. Default is 20 GB. Select Split virtual disk into multiple files where file transfer is a major issue. Click on Next
6. On this screen, either you can click on Customize Hardware to customize settings and then to goto step no. 8 or click on Finish to complete the process of creating virtual machine
7. Click on Edit virtual machine settings
8. This is the screen where you can customize or edit your Hardware Settings. As mentioned above, the minimum system requirement is uni-processor of i386 or amd64 architecture processor, so click on 
(a) Memory, to select minimum 1024 MB of RAM;
(b) Processors, as 1 or 2 (depending upon the processing speed) and Preferred mode as Automatic;
(c) Click on CD/DVD IDE. Now, on right hand panel you will Connection. It has two options: 
      Use physical drive- select this option if you have Kali Linux is in your CD or DVD drive; or
      Use ISO image file- select this option if you have downloaded Kali Linux on your hard drive. Click on Browse to locate the ISO file 
(d) Floppy drive is optional, as now a days most of the computers do not floppy drive
(e) Select NAT if you have network adapter for Internet
Other Hardware settings can be modified once installation process is completed. Now click on OK.
9. Select kali linux on left side panel screen and then click on Play virtual machine
10 VMWare setup will startup
11. You will be greeted with Kali Linux boot screen. Choose either Graphical or Text-Mode install and press Enter to boot
12. Select your preferred language and click on Continue
13. Select your location and click on Continue
14. Select option to configure your keyboard and click on Continue
15. Once disc is detected by operating system, it will copy the image to your hard disk and probe your network interfaces
16. Enter hostname to configure your network and click on Continue
17. If you have a domain name, then enter here in the box. Make sure that you have a correct domain name. You can enter the domain name later and leave this box blank. Click on Continue
18. Enter robust password for your root account
19. It will auto-detect time from network time server
20. Installer will probe hard disk and offer you four choices of partitioning of disk. Beginner can select Guided- use entire disk however experienced user can setup partition as Manual
21. Below are the screenshots of manual partition. I have created three partitions
      a. /boot (a partition from where your operating system will boot)
      b. / (root partition for super user or admin)
      c. swap (a portion where buffering is done)
22. This is the screen where you’ll have last chance to review your disk configuration before the installer makes irreversible changes. After you click Continue, the installer will go to work and you’ll have an almost finished installation.

23. Configure network mirror to give additional software that is included on the CD-ROM
24. Install GRUB boot loader
25. Finally, click on Finish to reboot Kali Linux installation

26. Login screen of Kali Linux

Install Kali Linux on Android Phone or Tablet

You can now install Kali Linux on any Android Phone or Tablet. Pre-requisite to install Kali Linux is here below.


  • OS version: Android 2.0
  • Memory: 5 GB free
  • Fast wireless connection
  • Patience to wait for distribution and boot from the network
Please click here to follow the steps. Thanks.

Kali Linux on Android using Linux Deploy


Kali Linux on Android

Kali Linux on Android using Linux Deploy

Kali Linux on any Android Phone or Tablet

linux-deploy-kali-list-00
Getting Kali Linux to run on ARM hardware has been a major goal for us since day one. So far, we’ve built native images for the Samsung Chromebook, Odroid U2, Raspberry Pi, RK3306, Galaxy Note 10.1, CuBox, Efika MX, and BeagleBone Black to name a few. This however does not mean you cannot install Kali Linux in a chroot on almost any modern device that runs Android. In fact, the developers of Linux Deploy have made it extremely easy to get any number of Linux distributions installed in a chroot environment using a simple GUI builder.
Prerequisites
  • A device running Android 2.1 and above, rooted.
  • At least 5 GB free space on internal or external storage.
  • A fast, wireless internet connection.
  • Patience to wait for a distribution to bootstrap from the network.
Configuring Linux Deploy for Kali
There’s actually very little to be done to get Kali installed. By choosing Kali Linux in the “Distribution” tab, you’ve pretty much covered the important stuff. Optionally, you can choose your architecture, verify that the Kali mirror is correct, set your installation type and location on your Android device, etc. Generally speaking, the defaults provided by Linux Deploy are good to begin with.
Building the Kali Image
install-kali-linux-deploy
Once you are happy with all the settings, hitting the “install” button will start a Kali Linux bootstrap directly from our repositories. Depending on your Internet connection speed, this process could take a while. You’ll be downloading a base install of Kali Linux (with no tools) at minimum.
Starting up your chrooted Kali
Once the installation is complete, you can have Linux Deploy automatically mount and load up your Kali Linux chroot image. This also includes the starting of services such as SSH and VNC for easier remote access. All of this is automagically done by hitting the “start” button. You should see Linux Deploy setting up your image with output similar to the following:
linux-deploy-mount
At this stage, Linux Deploy has started a VNC and SSH server inside your chrooted Kali image. You can connect to the Kali session remotely using the IP address assigned to your Android device (in my case, 10.0.0.10).
Logging in to your chrooted Kali
Now you can use either a SSH or VNC client to access your Kali instance. The VNC password is “changeme” and the SSH credentials are “android” for the username (configured via Linux Deploy) and “changeme” as the password.
muts@slim:~$ ssh android@10.0.0.10
android@10.0.0.10 password:
Linux localhost 3.4.5-447845 #1 SMP PREEMPT Fri Apr 12 17:22:34 KST 2013 armv7l
Kali GNU/Linux 1.0 [running on Android via Linux Deploy]
android@localhost:~$ sudo su
root@localhost:/home/android# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop3 4180944 667268 3304012 17% /
tmpfs 952708 80 952628 1% /dev
tmpfs 952708 0 952708 0% /dev/shm
root@localhost:/home/android#
root@localhost:/home/android# apt-get update
Hit http://http.kali.org kali Release.gpg
Hit http://http.kali.org kali Release
Hit http://http.kali.org kali/main Sources
Hit http://http.kali.org kali/contrib Sources
Hit http://http.kali.org kali/non-free Sources
Hit http://http.kali.org kali/main armel Packages
Hit http://http.kali.org kali/contrib armel Packages
Hit http://http.kali.org kali/non-free armel Packages
Ign http://http.kali.org kali/contrib Translation-en_US
Ign http://http.kali.org kali/contrib Translation-en
Ign http://http.kali.org kali/main Translation-en_US
Ign http://http.kali.org kali/main Translation-en
Ign http://http.kali.org kali/non-free Translation-en_US
Ign http://http.kali.org kali/non-free Translation-en
Reading package lists... Done
root@localhost:/home/android#
Image Size Considerations
If left unchanged, Linux Deploy will automatically set an image size of around 4 GB, for a “naked” installation of Kali. If you would like to install additional Kali tools down the road, you might want to consider using a larger image size, which is configurable via the settings in Linux Deploy.
Local VNC Connections
We had to try a couple of VNC clients to get one to work properly. Although controlling Kali through a local VNC client isn’t the most convenient of tasks, it certainly is possible. However, we suspect that most people will be SSH’ing into this instance. The picture below was overlayed with a Kali Linux desktop screenshot taken from a Galaxy S4.
galaxy-s4-kali-linux
Anyone fancy a simple smartphone hardware backdoor?

Installing Firefox on Kali Linux

Mozilla Firefox is a quite handy browser compared to Iceweasel (default browser in Kali Linux). It has lot of plug-in features that Iceweasel lag. Sometimes, we find it difficulty while navigating through Iceweasel. Hence, I thought of installing Mozilla Firefox. To do this, you have to first un-install Iceweasel from Kali Linux or else it won't allow you to install Mozilla Firefox. Here are the step that I performed.

1. Open root terminal window and type
    apt-get remove iceweasel
it removes iceweasel from the application menu

2. type echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
it adds repository for the installation

3. type apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
import the required gpg key

4. type apt-get update
update the required package

5. type apt-get install firefox-mozilla-build
install mozilla firefox on your sytem

6. type firefox on terminal window to start working with mozilla firefox








Adjust screen resolution in Kali Linux

1. Click on  Applications --> System Tools --> Preferences --> System Settings
2. Click on  Display
3. Click Drop down box, next to Resolution to adjust resolution of the monitor
4. Click on Apply to take effect

TOR for Kali Linux

Tor (used to stand for "The Onion Router", but it's no longer considered an abbreviation, so it's just "Tor"), is an anonymity network, used to surf the web (and more) anonymously. Basically, anyone running the Tor software on their computer runs a proxy, and traffic gets passed (encrypted) from one person running Tor to another person running Tor, multiple times through many users, until it get's to the page that you requested. Hence the term "Onion" used to describe it, since it works in "layers". Each person running Tor on their computer is called a "Node".
To the page (and anyone logging requests to that page, such as the website owner for example) they can only see the IP address of the last Node (called the "end node"). Any communication along the way, between you, when you request the website page, and the final destination, is encrypted, and cannot be analyzed. However, the last Node in the chain can log and view traffic through it, if the person running it is unscrupulous, so for that reason it can't be said that Tor is 100% anonymous.
TOR Auto-install Shellscript
#!/bin/sh
echo "deb http://deb.torproject.org/torproject.org wheezy main" >> /etc/apt/sources.list
clear scr
echo "[*] Installing the keys...."
gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
echo "Ready!!"
clear scr
echo "[*] Updating Repositories...."
apt-get update
clear scr
echo "[*] Installing TOR"
apt-get install deb.torproject.org-keyring
apt-get install tor
echo "Ready!!"
echo "[*] Installing Vidalia"
apt-get install vidalia
echo "Ready!!"
echo "[*] Installing iceweasel-torbutton"
apt-get install iceweasel-torbutton
echo "Ready!!"
clear scr
echo "[*] Installing Privoxy"
apt-get install privoxy
echo "[*] Configuring privoxy"
echo "forward-socks5 / 127.0.0.1:9050 ." >> /etc/privoxy/config
echo "Ready!!"
service tor restart
service privoxy restart
echo "Tor has been installed successfully."
Save this script to a file like torinstall.sh and chmod +x it.
#chmod +x torinstall.sh
#./torinstall.sh

How to access a drive or a folder in a network through Kali Linux

In this scenario, I have Windows 7 and Kali Linux operating systems. Kali Linux is installed in a virtual server, i.e. vmware player
(A) Now to create a shared drive or folder in Windows 7

  • Click on Start  and then on Computer
  • Select the drive or the folder you want to share. Right click on it, then click on Share with and then on Advanced sharing...
  • Goto Sharing tab and click on Advanced Sharing...
  • Check on Share this folder, then click on Add button to give Share name and Description of the drive or folder and select the number of users that you allow to share the drive or folder. Then click on permissions and add number of users to whom you grant permission to share your drive or folder in a network. Click on OK to all pop windows that has opened so far. This will take affect and you will see shared drive or folder in the network.
(B) Open vmware player and allow Kali Linux to boot.
  • Login with username and password
  • Press Alt. + F2 key to bring run dialog box. 
  • type smb://username/shared, where 'username' is the host name and 'shared' is the drive or folder name that has to accessed (smb is a program of samba distribution that allows to maintain interoperability between linux/unix server and windows client), then click on 'Run'.
  • type 'username' and 'password' of windows 7 user to access the drive or folder (username and password is the account of the user where the drive or folder has been shared) and click on 'Connect'.
This will mount the shared drive or folder and it will appear on the desktop of Kali Linux.