Thursday, April 24, 2014

How to fix Kali Linux apt-get slow update?

How to fix Kali Linux apt-get slow update?

This is a small guide on How to fix Kali Linux apt-get slow update.
Kali is relatively new and got fewer Mirrors than some other distro’s. That means less servers to download from and less servers means more people trying to download from them and using all bandwidth. So when you type in apt-get update, you see a slow download speed for packages. This just means you’re connected to a server that’s really busy. Some users complains that nothing happens or they are not getting any updates at all. Some got different issues like update stuck is header and doesn’t move any further.
To fix this, you need to check a few things:
  1. Check if you have the right repositories is your /etc/apt/sources.list
  2. Remove unwanted or unsupported repositories.
  3. Clean apt-get cache.
  4. Choose a fast DNS server.
To fix sources.list, follow this guide: How to add official Kali Linux Repositories?
To switch repositories to a different mirror of your choice, follow this guide: How to change repositories to a different mirror?

Clean apt-get cache:

apt-get clean

Choose a proper DNS server:

Edit resolv.conf file:
leafpad /etc/resolv.conf

Enter Google DNS nameservers

Following two are Google DNS, let’s face it, if Google is broken, we all think Internet is broken. Hence the reason of using Google DNS. You can choose other DNS Server if you want that are fast and reliable.

Now save and close the file.

Test your changes

Let put our changes to the test..

Do an apt-get update

 apt-get update

Do and upgrade

 apt-get upgrade

Finally do a distribution upgrade

 apt-get dist-upgrade
Your download speed should be a lot better than you were getting previously.

Another solution, changing from HTTP to REPO in sources.list file (14/02/2014)

One of the readers advised that by changing the repositories from HTTP to REPO, he gained significant speed up. See Sameer Barha’s comment below.
Use the following repositories (update your sources.list file)
## Kali Regular repositories
deb kali main non-free contrib
deb kali/updates main contrib non-free
## Kali Source repositories
deb-src kali main non-free contrib
deb-src kali/updates main contrib non-free

Instead of
## Kali Regular repositories
deb kali main non-free contrib
deb kali/updates main contrib non-free
## Kali Source repositories
deb-src kali main non-free contrib
deb-src kali/updates main contrib non-free

This change seems to boost speed as it uses slightly different repo than the usual HTTP servers which are overloaded. Let us know how this worked for you.In case your sources.list file is messed up or you’re just not sure, what to put on there, follow these instruction’s to add official Kali Linux Repositories.

(Note: The above mentioned repositories are a slightly variant of the official one, you can choose either as they are both from 

In case your DNS server is picking up (even Google’s DNS server) a repository from a different country(or avoid a specific country) and you would like to manually switch repositories to a different mirror of your choice(say in same country or just something you know working faster, follow these instruction to change repositories to a different mirror.

Happy hunting!!! 

Saturday, November 23, 2013

Starting Metasploit Framework

In keeping with the Kali Linux Network Services Policy, there are no network services, including database services, running on boot so there are a couple of steps that need to be taken in order to get Metasploit up and running with database support.

Start the Kali PostgreSQL Service

Metasploit uses PostgreSQL as its database so it needs to be launched first.

service postgresql start

You can verify that PostgreSQL is running by checking the output of ss -ant and making sure that port 5432 is listening.

State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 :::22 :::*
LISTEN 0 128 *:22 *:*
LISTEN 0 128 *:*
LISTEN 0 128 ::1:5432 :::*


Start the Kali Metasploit Service

With PostgreSQL up and running, we next need to launch the metasploit service. The first time the service is launched, it will create a msf3 database user and a database called msf3. The service will also launch the Metasploit RPC and Web servers it requires.

service metasploit start


Launch msfconsole in Kali

Now that the PostgreSQL an Metasploit services are running, you can launch msfconsole and verify database connectivity with the db_status command as shown below.

msf > db_status
[*] postgresql connected to msf3
msf >


Configure Metasploit to Launch on Startup

If you would prefer to have PostgreSQL and Metasploit launch at startup, you can use update-rc.d to enable the services as follows.

update-rc.d postgresql enable
update-rc.d metasploit enable

tutorial from 

happy hunting...!!!

Install NVIDIA Drivers on Kali

This document explains how to make use of NVIDIA video hardware and install the drivers on a Kali Linux system. The first step is to fully update your Kali Linux system and make sure you have the kernel headers installed.
apt-get update
apt-get install -y linux-headers-$(uname -r)
Next, download the latest NVIDIA driver for your architecture and video card here. To locate your NVIDIA card model, execute the following command.

root@kali:~# lspci | grep -i vga
02:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce G210M] (rev a2)
03:00.0 VGA compatible controller: NVIDIA Corporation C79 [GeForce 9400M G] (rev b1)

The next step is to disable the nouveau driver. Nouveau is a open source NVIDIA driver project, however it lacks the 3D graphics acceleration needed to run Cuda pentest tools.

 sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub

Once the system has rebooted and you are looking at the GDM login screen, press CRTL+ALT+F1 in order to get to a TTY, which will be a black screen with a login prompt. We need to login as root and stop the gdm3 service as follows.

 service gdm3 stop

If you are on a 64-bit Kali system, you may want to install the ia32-libs package in order to allow the NVIDIA installer to install the 32-bit libraries, although this is optional. If you choose not to do it, simply select no when the installer asks if you want to install the 32-bit libraries.

dpkg --add-architecture i386
apt-get update
apt-get install ia32-libs 

Assuming you downloaded the NVIDIA driver to your /root/ directory, we need to give it executable permissions and run it.

chmod 755

Once the installer finishes, you should reboot your machine. Once the system boots back up, you may see a NVIDIA splash screen, which will indicate that the drivers installed correctly, however, this is not always the case. In order to check if the drivers are working properly, execute the following command.

root@kali:~# glxinfo | grep -i "direct rendering"
direct rendering: Yes

Although utilizing the Cuda tools included in Kali is beyond the scope of this article, checking to make sure that they are working properly is always a good idea. The following command uses Oclhashcat-plus with some of the example files included in the package.

cd /usr/share/oclhashcat-plus/
./cudaHashcat-plus.bin -t 32 -a 7 example0.hash ?a?a?a?a example.dict
cudaHashcat-plus v0.14 by atom starting...

Hashes: 6494 total, 1 unique salts, 6494 unique digests
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes
Workload: 256 loops, 80 accel
Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 80c
Device #1: GeForce G210M, 511MB, 1468Mhz, 2MCU
Device #2: GeForce 9400M G, 253MB, 1100Mhz, 2MCU
Device #1: Kernel ./kernels/4318/m0000_a1.sm_12.64.ptx
Device #2: Kernel ./kernels/4318/m0000_a1.sm_11.64.ptx

Generated dictionary stats for example.dict: 1210228 bytes, 129988 words, 129988 keyspace


As you can see in the output above, the cards are recognized and the passwords are being recovered successfully.

thank to the for this tutorial. try to help my friend.

happy hunting!!