Make CentOS virtual machine in VirtualBox use the host’s VPN Connection

If your host PC (in my case Windows 10) is connected to a VPN but your CentOS 6.x VM is not using the VPN, then do the following:

1: Power off your CentOS VM.

2: Right click your centos machine in virtualbox and then click “Settings“.

right click your centos virtual machine and click settings (Screenshot)

3: Click “Network” and change the Adapter Settings to “NAT“.

change virtualbox network settings to NAT (Screenshot)

4: Now power on your centos virtual machine.

5: Once your VM boots up, login and then restart the network service. You can use the following CLI command “service network restart“.

Your CentOS virtual machine should now to able to use the VPN connection and use it accordingly. Do verify the same in your virtual machine. Hope this helps!

Do like and subscribe if this guide helped you. Cheers!

Unlock Bootloader Honor 4c + Screenshots

This is a guide on how to unlock the bootloader on Honor 4c running Android 6.0 from a Windows 10 PC.

Requirements:

  1. HiSuite software
  2. Minimal ADB and Fastboot
  3. Unlock code
  4. Your Honor 4c phone- For obvious reasons 😛

Disclaimer: Please follow this guide at your own risk. Following this guide will void your warranty and may result in a bootloop and I assume you would know how to fix bootloop. If your phone gets bricked, don’t blame me.

Step 1. Get required phone details

Model Number:

In your phone, click on Settings>About Phone and you would find “Model Number”. For example, mine is CHM-U01.

IMEI number:

You would have two IMEI numbers, take a note of the 1st IMEI number that you see in the “About Phone” under Settings.

Serial Number:

Go to Settings>About Phone>Status and you should your phone’s serial number.

Product ID:

Open your phone’s dialer and type the following code: *#*#1357946#*#*

Step 2. Enable Developer Mode + USB debugging

  • Go to Settings>About Phone and keep tapping on “Build Number” until it says You’re a developer.
  • Now go back to Settings, you should be able to see “Developer Options”. Click on it and then move the slider next to “USB debugging” to enable it.

Step 3: Install HiSuite

Step 4: Get your unlock code:

honor 4c unlock bootloader link screenshot

  • Login to your Huawei Account, click “I have read and accept all terms above” and then click “Next”.
  • Fill in your phone details and you will get your unlock code Please take a note of it as we will need it to unlock the bootloader.
  • In case you do not get your unlock code, please send an email to Huawei at [email protected] and they should be able to provide you with the unlock code.

Step 5: Install Minimal Adb and fastboot

  • To download and install Minimal ADB and Fastboot, use the download link below:

https://www.androidfilehost.com/?fid=24521665358595410

  • During installation, please take a note of the installation directory. By default it would be installed to “C:\Program Files (x86)\Minimal ADB and Fastboot” for a 32-bit OS and “C:\Program Files\Minimal ADB and Fastboot” for a 64-bit OS.

[Note: For more information about Minimal ADB and Fastboot package, please visit XDA and support the original creators of the software. (XDA Link)]

Step 6: Unlock bootloader

  • Connect your Honor 4c via a USB cable to your PC/laptop and then unlock your phone.
  • Now browse to the Minimal ADB and Fastboot installation directory. Press and hold SHIFT in your keyboard and then right click on any blank space in that folder and click on “Open command window here”.
  • You should be able to see command prompt window like the one below:

adb location

  • Now we need to verify that your phone is accessible via adb run the following command:
adb.exe devices

You may receive a message in your phone to allow the connection, click Allow when prompted. If the above command does not display your device, then something went wrong with the installation of Huawei HiSuite drivers or your phone is not connected properly to your PC. Below is a screenshot when adb was able to detect my device.

adb recogized device screenshot

  • Now type the following to boot into your phone’s bootloader.
adb.exe reboot bootloader
  • You would see a screen with a white background titled “FASTBOOT&RESCUSE MODE” with the message “BOOTLOADER LOCKED”.
  • Verify that you are fastboot is able to recognize your device by running the following command:
fastboot.exe devices
  • To unlock your bootloader, run the following command “fastboot oem unlock keyyourecieved” from your pc after replacing 123456789 with the unlock code that you received from Huewai’s website:
fastboot oem unlock 123456789

You should see the message “Phone Unlocked” message in the bottom after the bootloader has been successfully unlocked.

  • Now, reboot your phone by typing the following command:
fastboot.exe reboot

Congratutaions, you should have unlocked your bootloader by now. I will link another article soon on how to root and install custom recovery TWRP on Honor 4c running Android 6.0 (Marshmallow).

Do leave a comment below and share if you liked this guide. Cheers!

Source:
Minimal ADB and Fastboot: XDA

Install Kali Linux in virtualbox (using ova file)

This is how I installed Kali Linux in virtualbox using the ova file method in my windows 10 PC along with its screenshots.

Requirements:

  1. Kali Linux 2016.1 Preinstalled ImageDownload Link (Torrent)  (~2.83 GB) => [Note: New Version of Kali is released = Download Link (Torrent) ~ 3.2GB]
  2. VirtualBox: Download Link (~107 MB)
  3. CPU that supports Virtualization.
  4. Atleast 8GB of free disk space. 
  5. 7-zip: Download Link (~1.31 MB) [ Note: Winrar is another alternative you could use instead of 7-zip.]
  6. Virtual Box Extension Pack: Download Link (~15.6 MB) [Optional]

Installation Procedure:

The first thing you need to do is go ahead download and install Virtualbox in your system. Then download the Kali Linux ova file mentioned above and extract it using 7-zip or Winrar. The extracted file would be a .ova file format which is a pre-installed Kali Linux machine. Using a pre-installed file saves us a lot of time as we don’t have to go through the whole installation process.

Now, open VirtualBox:

open virtualbox

Then click on “File” and then click on “Import Appliance“.

click file import appliance

Click on the folder icon as shown below.

import ova file window

Now, browse to and select the extract .ova Kali Linux image file and click on “Open“.

select kali linux ova file

You would now see a window called “Appliance settings” where you can configure stuff like the name of your VM, the amount of RAM to be allocated to your Kali Linux VM etc.

kali linux appliance settings

If you want to change the name of the VM, simply click on the text and you can change it according to your will.

changing vm name

Finally, click on “Import” and wait for a few moments to import the Kali Linux Appliance.

click import to load kali linux appliance

importing kali linux appliance progress bar

Now, right click on your Kali Linux Virtual machine as shown below and click on “Settings“.

open kali linux virtual machine Settings

If you need to adjust the amount of RAM, click on “System” and you can move the slider accordingly. I would suggest atleast a minimum of 1024 MB (1GB) of RAM.

select ram for your Kali Linux VM

Now, click on “Network” as shown below and select “Bridged Adapter” and then click on “OK“.

Select Kali Linux network mode to Bridged Adapter

Click on your Kali Linux VM and then click on Start as shown below.

start kali linux in virtualbox

You should now be able to see the grub menu. Hit “Enter” in your keyboard.

kali linux grub menu

Now, login to your Kali Linux machine with the default username as root and password toor.

kali username

kali password

You should now be booted into your Kali Linux desktop.

kali linux logged in

Customize Kali (Optional): 

I would like to make some minor changes to make sure the VM is not interrupted during pen testing. This section is purely optional, you can skip to the next section if you don’t want to customize it.

Click on the triangle pointing downwards in the upper right corner and then click on the “Settings” icon.

Kali Linux drop down menu

This will bring you the “All Settings” window as shown below. Click on “Date & Time“.

all settings menu

You can change the time zone to your time zone.

change time zone

Now, go back to the “All Settings” window and then click on “Privacy“.

select privacy in all setting menu

You would see a screen similar to the one below:

default privacy settings

Now, disable “Automatic Screen Lock” by moving the slider.

disable auto screen lock

Go back to “All Settings“, then click on “Power“.

click on power in all settings

Now, select Blank Screen option as “Never” and turn off  “Automatic Suspend” as shown below.

disable blank screen and automatic suspend

Update Kali Linux:

Open the terminal window by clicking on the icon as shown below:

open terminal

This is what the terminal window would look like in a Kali Linux system.

Kali Linux Terminal

Enter the following commands in the terminal to update your Kali Linux system.

apt-get clean && apt-get update -y
apt-get upgrade -y && apt-get dist-upgrade -y

This may take a while depending on your internet connection for the update to complete.

And that is it for setting up Kali Linux in virtualbox to get started with pentesting (only for ethical hacking and for purely educational purposes).

If you have any sort of queries regarding this installation, just leave a comment and will get back to you. I will be posting some ethical hacking tutorials in the future, so stay tuned.