Articles by "Kali linux"

Showing posts with label Kali linux. Show all posts

How to install Virtualbox on Kali Linux

If you want to play around with different systems through the help of virtual machines or if you simply want to create your own pentesting virtual-lab for free, installing virtualbox is one of the best options for linux. Before installing virtualbox, you'll need to make sure that the below dependencies are added to your sources.list file:
## Regular repositories
deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
## Source repositories
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
These can be added manually through editing the sources.list file or by running the following command:
leafpad /etc/apt/sources.list
The above command will open one of the available text editors, LeafPad, and will edit your sources file that can be found in the /etc/apt/  location. Save the file after editing and close it. Now, open a terminal window and run:
apt-get update
apt-get upgrade
apt-get dist-upgrade
Once these commands are completed run the following command:
apt-get install linux-headers-$(uname -r)
And then:
wget download.virtualbox.org/virtualbox/4.2.14/virtualbox-4.2_4.2.14-86644~Debian~wheezy_i386.deb
dpkg -i virtualbox-4.2_4.2.14-86644~Debian~wheezy_i386.deb
installation-of-virtualbox-in-kali-linux

wget will download the mentioned version of virtualbox to your home/user folder and dpkg –i will unzip (de-package) your file and install it (through the use of the –i command).

If you need to test the successful installation simply type virtualbox in the terminal.

virtualbox-in-kali-linux

Now you can easily create your own pentesting lab in Kali Linux, but this will be covered in another post.

Create your first script - automatically update and upgrade your Kali Linux installation

Creating scripts is easy in Linux distributions, you just need access to any text editor - Linux has plenty available (gedit or gvim, to name just a few examples) and to some available neurons. In this example we'll use the update and upgrade commands and we'll create ourselves a script that once executed will automatically run the commands for us - this is the easiest example I came-up with.

Open your text editor. At the first line write
#!/bin/bash
Press enter and below this line type:
apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
Save it as "update.sh" - or any other name you would prefer.

Kali-update-script

Right click your script and on the "Permissions" tab set a checkmark near Execute - allow executing file as a program.

allow-executing-file-as-program

Now every time you boot-up your Kali, instead of typing the whole thing into a terminal, just run your script.
run-in-terminal-window




How to create a website offline copy with wget in Kali Linux

During the "Reconnaissance" phase we might need to frequently access the targeted website and this can trigger some alarms. I used to rely on Httrack – or WebHttrack – for making one-on-one offline copies for a given web-page, but for some odd reasons it doesn't work on my current Kali installation. For those who want to give WEBHTTRACK a chance, one thing you need to remember: it's not included by default in Kali. In order to install webhttrack type the following:
apt-get update
apt-get install webhttrack
to get the full GUI version, or
apt-get update
apt-get install httrack
to get the command-line version only.

Searching for alternative easy ways to do it, I've found this tutorial from kossboss – all the credit goes there.
Open a terminal and type mkdir /mywebsitedownloads/ and then
cd / mywebsitedownloads – you can name the folder in any way you wish.
Now (copy and paste):
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla http://www.nameofthesiteyouwanttocopy.com
Replace the nameofthesiteyouwanttocopy.com with the actual name of your targeted web-page. Below is the explanation of each command:

--limit-rate=200k: Limit the download to 200 Kb/sec – higher download rates might seem suspicious.
--no-clobber: don't overwrite any existing files (used in case the download is interrupted and
resumed).
--convert-links: convert links so that they work locally, off-line, instead of pointing to a website online.
--random-wait: Random waits between download – same reason as for the limit-rate.
-r: Recursive - downloads full website
-p: downloads everything, including pictures.
-E: gets the right extension of the file.
-e robots=off: prevent the website from considering your session as a robot/crawler.
-U mozilla: pretends to be just like a web-browser.

Once the download is completed you can find the offline copy in /nameofthefolder you used for saving your downloaded page – look for the home/index.html page.
wget-screen-running-offline-copy

You'll notice that it is an identical copy – it preserves the link structure, pictures, code and other formatting. Remember that anytime you interact directly with any online resources owned by the 'target', there's a chance you'll leave your digital fingerprint behind.

How To Remove Iceweasel and Install Firefox in Kali Linux

The default browser in Kali Linux is Iceweasel - in comparison, the default browser in previous backtrack installations has been Firefox, but this also comes from one main difference: Kali is Debian based and Backtrack was based on Ubuntu. Iceweasel is only a rebranded version of Firefox.

Ice Weasel browser logo

If you have whatever reasons and you need to install Firefox in Kali, follow the below steps.
Note: You might want to copy and paste-it into another document - since it involves removing your default browser first.
 apt-get remove iceweasel

This will remove iceweasel from the system.

echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29

apt-get update

apt-get install firefox-mozilla-build

Once Firefox has been installed, you might need flash player and some other add-ons.

To install flash-player addon, open a terminal window and type:

apt-get install flashplugin-nonfree
and then
update-flashplugin-nonfree --install

Personally I also install adblock plus and noscript add-ons.
At the end, we will add Firefox to the application panel: press ALT+right click on the panel and select add to panel. From the menu, click on "Application Launcher".
Expand the "Internet" menu and select Firefox.

How To Unmute Volume at Start-up in Kali Linux

You might have noticed that , by default, the volume is muted on system startup in Kali Linux – this is more annoying then helpful sometimes. If you want to get rid of adjusting your volume every time your system boots-up, here's how you can fix this.
First, install alsa utils: open a console window (for windows users it's the older brother of  "command prompt") and type:
apt-get install alsa-utils -y 
Once installed, type in the same console window:
alsamixer
 
You'll see a screen like the one below:

alsa-mixer-console-settings

Set your volume as high as you like by using the up or down directional keys.
Press F6, and from the list of available sound-cards choose the default card you have installed on your system – in my case it's the HDA Intel.
By using the directional keys (up-down-left-right arrows), move to the Auto-Mute menu.
Set it from the default “Enabled” to "Disabled". Press “Esc” to exit the alsamixer menu, reboot Kali and afterwards you'll notice that the system volume will retain it's volume control, no more “default mute at start-up”.

Contact Form

Name

Email *

Message *

Powered by Blogger.