Monday, June 30, 2014

Kali Linux 1.0.7 kernel 3.14 install NVIDIA driver kernel Module CUDA and Pyrit – CUDA, Pyrit and Cpyrit-cuda

Read full details here: Kali Linux 1.0.7 kernel 3.14 install NVIDIA driver kernel Module CUDA and Pyrit – CUDA, Pyrit and Cpyrit-cuda



In this guide, I will show how to install NVIDIA driver kernel Module CUDA, replace stock Pyrit, and install Cpyrit. The main problem with new Kali Linux 1.0.7 running Kernel 3.14 was that it broke Pyrit and cudaHashcat. When you try to run pyrit command, you get this errorERROR: could not insert ‘nvidia_uvm’: Invalid argument.  I will show how to install all the necessary drivers, modules and also fix this error. At the end of this guide, you will be able to use GPU acceleration for enabled applications such as cudaHashcat, Pyrit, crunch etc.
This guide replaces the old guides
  1. How to Install NVIDIA Kernel Module CUDA and Pyrit in Kali Linux
  2. Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver
This is part 2 of installing NVIDIA driver kernel Module CUDA and Pyrit on Kali Linux Driver series which was divided into two parts:
  1. Kali Linux 1.0.7 kernel 3.14 – Install proprietary NVIDIA driver – NVIDIA Accelerated Linux Graphics Driver
  2. Kali Linux 1.0.7 kernel 3.14 install NVIDIA driver kernel Module CUDA and Pyrit – CUDA, Pyrit and Cpyrit-cuda
You use the first guide to install NVIDIA Driver on Kali Linux. I would assume you followed the first guide and completed all steps there and would like to enable GPU acceleration, (cudahashcat, GPU pass through etc.) on your Kali Linux.

CUDA Toolkit

The NVIDIA® CUDA® Toolkit provides a comprehensive development environment for C and C++ developers building GPU-accelerated applications. The CUDA Toolkit includes a compiler for NVIDIA GPUs, math libraries, and tools for debugging and optimizing the performance of your applications. You’ll also find programming guides, user manuals, API reference, and other documentation to help you get started quickly accelerating your application with GPUs. You can read a lot more here in NVIDIA Developers official webpage:

Prerequisites

Following are the prerequisite before you start following this guide:
NOTE: This guide does not apply to VMWare, VirtualBox users. GPU Acceleration doesn’t work on Virtual environment.

Prerequisite 1: add Official Kali Linux repository.

I’ve added the correct Kali Official repositories and issued the following commands to update, upgrade and dist-upgrade my Kali Linux.
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

Prerequisite 2: Install proprietary NVIDIA driver on Kali Linux

I’ve installed the correct official proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver using the previous guide:
If you’ve completed both, move to next instruction.

Step 1: Install NVIDIA CUDA toolkit and openCL

At first we need to install NVIDIA CUDA toolkit and NVIDIA openCL
aptitude install nvidia-cuda-toolkit nvidia-opencl-icd

Friday, June 27, 2014

Kali Linux 1.0.7 kernel 3.14 - Install proprietary NVIDIA driver - NVIDIA Accelerated Linux Graphics Driver

Read full details here: Kali Linux 1.0.7 kernel 3.14 - Install proprietary NVIDIA driver - NVIDIA Accelerated Linux Graphics Driver

This guide explains how to install proprietary “NVIDIA Accelerated Linux Graphics Driver” or NVIDIA driver on Kali Linux 1.0.7 kernel 3.14 system. The first part where you install NVIDIA Driver is very straight forward (well exactly same as before) but on the second part where you install NVIDIA CUDA driver, you get an error while running pyrit “ERROR: could not insert ‘nvidia_uvm’: Invalid argument”. This two part series guide will help you to install NVIDIA Driver and NVIDIA CUDA on your Kali Linux machines. I am not too sure if this applies to all Ubuntu or Debian variants, but it sure works if you have those errors or trying to do it in Kali Linux.
By default Kali Linux installs pen source NVIDIA driver nouveau which works great if you just want a display. Open source drivers can be confirmed by using  lsmod | grep nouveau command. But like I said in my previous guides, it doesn’t give you 3D acceleration features or GPU acceleration based applications (such as CUDA and GPU pass through). That means you MUST install proprietary NVIDIA driver.
The proprietary “NVIDIA Accelerated Linux Graphics Driver” provides optimized hardware acceleration of OpenGL applications via a direct-rendering X server. It is a binary-only Xorg driver requiring a Linux kernel module for its use. The first step is to fully update your Kali Linux system and make sure you have the kernel headers installed.
This guide replaces the old guides
  1. How to Install NVIDIA Kernel Module CUDA and Pyrit in Kali Linux
  2. Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver
I had to divide it into two parts:
  1. Kali Linux 1.0.7 kernel 3.14 – Install proprietary NVIDIA driver – NVIDIA Accelerated Linux Graphics Driver
  2. Kali Linux 1.0.7 kernel 3.14 – Install NVIDIA driver kernel Module CUDA and Pyrit on Kali Linux – CUDA, Pyrit and Cpyrit-cuda
You use the first guide to install NVIDIA Driver on Kali Linux 1.0.7 kernel 3.14. For normal users, you should just stop here and enjoy your nice smooth NVIDIA graphics. Install some game or enjoy a movie.
For the more advanced users or those who want GPU acceleration, (cudahashcat, GPU pass through etc.) follow the second guide (link above).Since Kali 1.0.7 was introduced along with Kernel 3.14, users been plagued with this annoying error message “ERROR: could not insert ‘nvidia_uvm’: Invalid argument” while running pyrit or simialr GPU based tools. I have since tried multiple times and thanks to use Shinri show came up with the correct advise and solution. This was a bug and there’s way around it, so that’s good news.
I’ve included as much details I can, including troubleshooting steps and checks but I would like to hear your part of the story, so leave a comment with your findings and issues.


Is this guide for me?

I have a freshly installed Kali Linux installation where I updated, upgraded everything following special guide … 20 things to do after Installing Kali Linux.
So except  proprietary NVIDIA driver, everything was installed and working. In case those who are not so familiar which guide to follow, ask yourself these questions:
  1. Do I have a NVIDIA card?
  2. Is this a freshly installed Kali system?
  3. When did I installed it?
  4. Did I upgrade everything like blackMORE advised?
  5. Is this the correct version of guide to run on my Kali Linux?

blackMORE’s settings

So I’ve installed my Kali Linux v 1.0.7 running Kernel 3.14 on 26/05/2014. I’ve got a NVIDIA GeForce 210 card on this machine running a 64-bit version Kali Linux. How do I know that? You can run the following commands to ensure those:
To find out when you’ve installed your Kali Linux, run the following two commands:
passwd -S sys | tail -1 | awk '{print $3}'
tune2fs -l /dev/sda5 |grep  'Filesystem created'
Which CPU you’re running on? Run the following command:
lscpu
Which graphics card you’re using? Run the following command:
lspci | grep VGA
Here’s mine…




Read the rest of it here: Kali Linux 1.0.7 kernel 3.14 - Install proprietary NVIDIA driver - NVIDIA Accelerated Linux Graphics Driver

Thursday, June 26, 2014

Securing SSH with two factor authentication using Google Authenticator

Read full details here: Securing SSH with two factor authentication using Google Authenticator

Two-step verification (also known as Two-factor authentication, abbreviated to TFA) is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network. This is a special case of a multi-factor authentication which might involve only one of the three authentication factors (a knowledge factor, a possession factor, and an inheritance factor) for both steps. If each step involves a different authentication factor then the two-step verification is additionally two-factor authentication.

Google’s two-step verification process

Google was one of the first Internet companies to introduce a two-step verification process. To access a Google service using the two-step verification process, a user has to go through the following two stages:
The first step is to log in using the username and password. This is an application of the knowledge factor.
The implementation of the second step requires a mobile phone or the Google Authenticator application, which is an application of the possession factor.
If the user opts to use a mobile phone, he/she has to register his/her phone number with Google. When one attempts to authenticate with username and password, Google will send via SMS a new, unique code to the phone. Receiving the SMS demonstrates that the user has the phone (or, in the case of GSM like networks the appropriate SIM chip).
If the user opts to use the Google Authenticator (or another supported code generator application), he/she simply opens the application, which generates a new code every 30 seconds. This code is to be entered to complete the log in process. As a backup option in case the registered mobile phone or device running Google Authenticator is lost, stolen, or otherwise unavailable, the user can print a set of static single-use backup codes (also the knowledge factor) and store them in a safe place.
The following are some other sites which offer two-step verification service:
  1. Amazon Web Services
  2. ANX
  3. App.net
  4. Apple ID
  5. Authy
  6. Battle.net
  7. Bitstamp
  8. Blockchain.info
  9. Box
  10. Dropbox
  11. eBay
  12. Etrade
  13. Evernote
  14. Facebook
  15. GitHub
  16. GoDaddy
  17. HootSuite
  18. Lastpass
  19. LinkedIn
  20. LocalBitcoins
  21. Microsoft
  22. MongoLab
  23. Namecheap
  24. PayPal
  25. SocialFlow
  26. timetotrade
  27. Tumblr
  28. Twitter
  29. Viaduct
  30. WordPress
  31. Yahoo! Mail
  32. innoview.gr
  33. zoho

Google Authenticator

Google Authenticator implements TOTP security tokens from RFC6238 in mobile apps made by Google, sometimes branded “two-step authentication”. The Authenticator provides a six digit one-time password users must provide in addition to their username and password to log into Google services or other sites. The Authenticator can also generate codes for third party applications, such as password managers or file hosting services. Some versions of the software are open source.
[Source: WikiPedia]



Note: Google Authenticator doesn't “call home” to Google — all the work happens on your SSH server and your phone. Google Authenticator is a open-source software, that means you can check the codes yourself. I guess after what happened with openSSL, that’s not a bad idea after all.
In this article I will demonstrate how to secure SSH by setting up Two Factor Authentication (TFA) with Google Authenticator for the following Linux operating systems:
  1. Debian
  2. Ubuntu
  3. Linux Mint
  4. Kali Linux
  5. Red Hat
  6. CentOS
  7. Fedora
Google Authenticator can be used in the following smartphones:
  1. Android,
  2. iOS and
  3. Blackberry.
I am not too sure if you can use this on a Windows Based phone (i.e. new Nokia phones or Windows Mobiles devices). Feel free to try and report back.

App Download Links as follows:

  1. Android: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en
  2. iOS: https://itunes.apple.com/au/app/google-authenticator/id388497605?mt=8
  3. Blackberry: http://www.google.com/mobile/other
More detailed per device install instructions can be found on this page:
https://support.google.com/accounts/answer/1066447?hl=en
The implementation is exactly same except for some package name differences. So you can implement this in any Linux Operating System that uses these packages.

Requirements

Followings are the requirements for using Google Authenticator on your system:
  1. A PC running Linux
  2. A smartphone
  3. A running SSH server on your machine.

In case you don’t have SSH server running, just follow this guide to install openSSH server.

Read the rest of it here: Securing SSH with two factor authentication using Google Authenticator

Tuesday, June 24, 2014

kSar sar grapher - A Graphical interface for sysstat sar data

Read full details here: kSar sar grapher - A Graphical interface for sysstat sar data

sysstat sar provides command line based monitoring data. Those who are new or migrating from Windows or MAC and used to the graphical output, it might get confusing and boring. Hence the development of kSar sar grapher. kSar sar grapher is a graphing tool that can graph for Linux, MAC and Solaris sar outputs. Using KSar you can output graphs to a pdf file. kSar sar grapher is developed byAlexandre Cherif and uses a BSD license for distribution.
kSar sar grapher is a java based application that graphs your sar data.
You can load data from three method :
  1. local file
  2. local command execution and
  3. remote command execution via SSH


kSar sar grapher supports the sar output of the following OS:
  1. Solaris 8, 9 and 10
  2. Mac OS/X 10.4+
  3. Linux (Systat Version >= 5.0.5)
  4. AIX (4.3 & 5.3)
  5. HPUX 11.00+
So let’s get onto business and install kSar sar grapher.
Read the rest of it here: kSar sar grapher - A Graphical interface for sysstat sar data

Thursday, June 19, 2014

Kali Linux remote SSH - How to configure openSSH server

Read full details here: Kali Linux remote SSH - How to configure openSSH server

Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers. It connects, via a secure channel over an insecure network, a server and a client running SSH server and SSH client programs, respectively. The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.
The best-known application of the protocol is for access to shell accounts on Unix-like operating systems, but it can also be used in a similar fashion for accounts on Windows. It was designed as a replacement for Telnet and other insecure remote shell protocols such as the Berkeley rsh and rexec protocols, which send information, notably passwords, in plaintext, rendering them susceptible to interception and disclosure using packet analysis.The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet.


You can use your Android phone, remote computer, iPAD or anything to login to a SSH server and execute command as if you’re sitting on that workstation. So let’s see how you can install a SSH server (we will be using openSSH-Server here) on Kali Linux. After this guide you will be able to do the followings:
  1. Install Kali Linux remote SSH – openSSH server
  2. Enable Kali Linux remote SSH service on boot
  3. Change Kali default ssh keys to avoid MITM attack
  4. Set MOTD – Message of the Day message with a nice ASCII
  5. Troubleshoot and fix “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED” error during SSH session.
  6. Change SSH server port for extra safety

Read the rest of it here: Kali Linux remote SSH - How to configure openSSH server

Wednesday, June 18, 2014

How to use sar for monitoring your Linux system? sysstat sar examples and usage

Read full details here: How to use sar for monitoring your Linux system? sysstat sar examples and usage

This article describes how to install and use sar (sysstat) a system performance tools for Linux. It comes with plenty of sar examples and usage. Sar is part of the sysstat package. According to the package description it includes the following system performance tools:
  • sar: collects and reports system activity information;
  • iostat: reports CPU utilization and disk I/O statistics;
  • mpstat: reports global and per-processor statistics;
  • pidstat: reports statistics for Linux tasks (processes);
  • sadf: displays data collected by sar in various formats.
Using sar you can monitor performance of various Linux subsystems (CPU, Memory, I/O..) in real time. You can also collect all performance data on an on-going basis, store them, and do historical analysis to identify bottlenecks. 


What SAR can do?

In this article I will demonstrate how to install and configure sysstat package (which contains sar utility) and explains how to monitor the following Linux performance statistics using sar.
  • Collective CPU usage
  • Individual CPU statistics
  • Memory used and available
  • Swap space used and available
  • Overall I/O activities of the system
  • Individual device I/O activities
  • Context switch statistics
  • Run queue and load average data
  • Network statistics
  • Report sar data from a specific time
The statistics reported by sar deal with I/O transfer rates, paging activity, process-related activities, interrupts, network activity, memory and swap space utilization, CPU utilization, kernel activities and TTY statistics, among others. Both UP and SMP machines are fully supported.


Read the rest of it here: How to use sar for monitoring your Linux system? sysstat sar examples and usage

Tuesday, June 10, 2014

Correct way to install Virtualbox Guest Additions packages on Kali Linux and create shared folders

Read full details here: Correct way to install Virtualbox Guest Additions packages on Kali Linux and create shared folders

It seems there’s lots of confusion on what is the correct way to install VirtualBox guest additions packages on Kali Linux. Unfortunately, there’s only one way to do it! So if you’re not following the steps below, you won’t be able to use Kali Linux is full screen properly (seamless windows) and shared clipboard or drag n’drop will not work. I’ve actually posted this in a separate post with detailed step by step instructions showing how to install Kali Linux on VirtualBox. But even on that post, I’ve seen many users getting confused and it seems creating a separate post about correct way to install VirtualBox Guest additions packages on Kali Linux is the way to go.
This post will fix or resolve the following issues:
  1. Can’t make Kali Linux run in full screen on VirtualBox
  2. Can’t enable shared folder on Kali Linux running on VirtualBox.
  3. Shared clipboard not working on Kali Linux on VirtualBox.
  4. Kali Linux on VirtualBox is slow and not responding. It freezes!
  5. Mouse integration is not working on Kali Linux on VirtualBox.
  6. Kali Linux on VirtualBox doesn’t detect your display resolution properly.
While we are at it, I will also include the instructions on how to create a shared folder so that you can copy paste contents between your host and guest operating system.



Read the rest of it here: Correct way to install Virtualbox Guest Additions packages on Kali Linux and create shared folders

Recommended books for Pentesters - A collection of books for Linux security administrators and pentesters

Read full details here: Recommended books for Pentesters - A collection of books for Linux security administrators and pentesters

So you want to be pentester? A common question is where do you start? This post gives you a list of recommended books for Pentesters. It is useful for any Linux security administrators and aspiring pentesters or anyone who is interested to learn the basic workings of Penetration test with Linux. As I write mostly about Kali Linux, I've focused on Kali Linux in this list, but this list if not limited to Kali Linux only, it is a recommended set of list for anyone who wants to be a Linux security administrator or penetration tester.



This list and these recommended books will benefit any information security professionals of all levels, hackers, systems administrators, network administrators, and beginning and intermediate professional pen testers, as well as students majoring in information security. All books are available in Amazon, I've only listed the ones with good ratings, but there are more books available.. so read some reviews before you go on and buy yourself one.




Read the rest of it here: Recommended books for Pentesters - A collection of books for Linux security administrators and pentesters

Linus Torvalds quotes

Read full details here: Linus Torvalds quotes

Linus Torvalds was born in Helsinki, Finland. He is the son of journalists Anna and Nils Torvalds, and the grandson of poet Ole Torvalds. Both of his parents were campus radicals at the University of Helsinki in the 1960s. His family belongs to the Swedish-speaking minority (5.5% of Finland's population). Torvalds was named after Linus Pauling, the Nobel Prize–winning American chemist, although in the book Rebel Code: Linux and the Open Source Revolution, Torvalds is quoted as saying, "I think I was named equally for Linus the Peanuts cartoon character", noting that this makes him half "Nobel-prize-winning chemist" and half "blanket-carrying cartoon character".

That's Linus, the guy to built Linux.. Classy, isn't he!


Linus is the person who Built The World's Most Robust OS And Gave It Away For Free.

Over the years, he made some interesting comments, both funny and controversial. Here's a list of those Linus Torvalds quotes .. Enjoy



Read the rest of it here: Linus Torvalds quotes

Thursday, June 5, 2014

Enable VPN on Kali Linux - fix VPN grayed out problem

Read full details here: Enable VPN on Kali Linux - fix VPN grayed out problem

A virtual private network (VPN) extends a private network across a public network, such as the Internet. It enables a computer to send and receive data across shared or public networks as if it is directly connected to the private network, while benefiting from the functionality, security and management policies of the private network A VPN is created by establishing a virtual point-to-point connection through the use of dedicated connections, virtual tunneling protocols, or traffic encryptions. On Kali Linux, by default VPN options are grayed out. This guide will show users how to install necessary packages to fix VPN grayed out issue and enable VPN on Kali Linux.



A virtual private network connection across the Internet is similar to a wide area network (WAN) link between sites. From a user perspective, the extended network resources are accessed in the same way as resources available within the private network. Through VPN you can access your private network over Internet.
VPNs allow employees to securely access their company’s intranet while traveling outside the office. Similarly, VPNs securely connect geographically disparate offices of an organization, creating one cohesive network. VPN technology is also used by Internet users to connect to proxy servers for the purpose of protecting personal identity and location. [Source:WikiPedia]

Why use VPN – benefits?

Here’s my top 11 reasons why you would want to use VPN services.
  1. VPN provides Privacy and cloaks your IP address.
  2. Use any network (public or private or free WiFi) with encryption
  3. Login to your home or Work network from anywhere with confidence.
  4. Bypass censorship and content monitoring.
  5. Browse and bypass Firewall and censorship policy at work or Anywhere!
  6. Access region restricted services from anywhere (i.e. Youtube videos, NetFlix or BBC Player etc.)
  7. Transfer or receive files with privacy.
  8. Hide your voice/VOIP calls.
  9. Use Search Engines while hiding some of your identity.
  10. Hide yourself
  11. Cause you like to be anonymous.
As you can see from the list above, VPN not necessarily hides everything. Search engines can probably still recognizes you based on your cookies, previous browsing behavior, account sign-in (duh!), browser plug-ins (i.e. Alexa, Google Toolbar etc.).
 

VPN grayed out problem on Kali Linux

By default the VPN section is grayed out on Kali Linux. While this can be a easy fix, those who are not familiar with packages required for VPN, can get confused and with so many websites around giving different advises, it can be a problem identifying the correct info. I will try to provide a short and concise guide with explanation to my best ability.



Read the rest of it here: Enable VPN on Kali Linux - fix VPN grayed out problem