NetHunter Article Featured in Hakin9 Magazine

The latest Hakin9 Magazine is out! This issue is all about Android security and features my article on using Kali NetHunter and Responder together for getting quick user credentials.

Front Cover

In my article I explain how you could recover network credentials from a Windows network using the Android based Kali NetHunter and Responder (an LLMNR, NBT-NS & MDNS poisoner). I also show how you can “pass the hash” with credentials obtained and gain remote shell access to an unsecured or improperly secured Windows Server.

Other Articles in this Issue Include:

Mobile Penetration Testing Tutorial

by Olivia Orr

The objective of this tutorial is to learn the most common vulnerabilities in mobile applications using an app intentionally designed to be insecure. This tutorial will be based on the Windows platform, but you can use other systems if you wish.


Quick Android Review Kit (QARK) – A comrade for Android security analysis

by Vinayak Joshi and Venkatesh Sivakumar (Pranav Venkat)

QARK stands for Quick Android Review Kit. A quirky companion to get the hidden potential vulnerabilities of any Android applications. It is an open community tool designed to assist mobile application security pentesters to leverage its capabilities to reverse engineer mobile applications and conduct static analysis on the hidden vulnerabilities that can potentially create critical breaches. This article will explain how to use it.


Peeping Inside Android Applications: Reverse Engineering with Androguard

by Ajit Kumar

Reverse engineering is one of the ways to find out what’s inside of any Android applications; it also helps developers to learn, test and debug their and applications as well as applications written by others. Reverse engineering is a complex and cumbersome task, so tools like Androguard make this task automated and hence ease the job of reverse engineers. This tutorial provides a brief introduction of Androguard, explains various tools available inside Androguard and provides some examples of basic reverse engineering with Androguard.

And much more, check it out!

Advertisements

Running Kali Linux in a Windows 10 Command Prompt

Ever wanted to run Kali Linux in Windows 10? Well, you can using Docker! Docker is a great way to run programs or even entire operating systems on different platforms. Using Docker you can even run Kali Linux on Windows 10!

But just because you can do something doesn’t mean that you should. Yes, it is cool to see Kali in a command prompt, but personally I think there are much easier ways to run Kali on a Windows platform.

With Docker, usually you just pull down your app and it works. In Windows, you need to enable Containers, then install Docker, then enable Hyper-V (which will disable your VMWare or VirtualBox VMs by the way) and then finally download Kali for Docker. Oh, and don’t forget to reboot, multiple times. When done you will have a minimal install of Kali, enjoy!

If you are new to Kali and want to run Kali in Windows 10, use VMWare or Virtualbox, and just download the VM version of Kali. You will be much happier with your life.

Okay, fine, I can see that you are determined to see this through, so let’s continue. Official instructions for installing the Kali Docker image can be found on the Kali website:

https://www.kali.org/news/official-kali-linux-docker-images/

Technet even has an article on it, which is helpful as well:

https://blogs.technet.microsoft.com/positivesecurity/2017/09/01/setting-up-kali-linux-in-docker-on-windows-10/

But you kind of need a mix of both and a few more steps to actually get it working.

Installing Docker

In Windows 10, open a command prompt

  • Search for and run “optionalfeatures” as an administrator
  • Click on “Containers” to add it:

Kali Docker Install_1

When this is done:

Kali Docker Install_2

Once Docker is installed, it will tell you that it needs to close your active user and log back in. Don’t believe it, you actually need to reboot your system.

After Reboot:

  • From the main menu, run “Docker for Windows” as administrator
  • At the Hyper-V Feature not enabled, choose enable, note this breaks Virtualbox
  • Reboot again…

From the main menu start “Docker for Windows” again

  • Wait until it is ready, this can take a few minutes
  • Now open a system level command prompt

Installing Kali

At the command prompt:

  • Enter, “docker pull kalilinux/kali-linux-docker

Kali Docker Install_3

This will download the Kali Linux Docker image.

  • When finished enter, “docker run -t -i kalilinux/kali-linux-docker /bin/bash

You will then be greeted with a Kali root prompt. You now have a minimal install of Kali Linux! Several programs do work at this point, like nmap and some of the other basic Kali tools. Metasploit is not installed by default and you need to install it if you need it.

Update the system:

  • apt-get update
  • apt-get upgrade

This will take a while. When done, install Metasploit:

  • apt install metasploit-framework ruby

When it is finished, you need to start and initialize the database:

  • service postgresql start
  • msfdb init
  • And lastly, “msfconsole

And Metasploit starts:

Kali Docker Install_4

At this point you can install any of the Kali tool metapackages if you wish, or just play around with it as is. Just a note, ifconfig isn’t installed by default. You need to use the newer “ip address” or “ip a” commands, or you can just install “net-tools”.

Uninstalling it

Done already? I had it on my Windows 10 system about as long as it took to install it. Don’t get me wrong, this is really cool. But like I mentioned earlier, this is much easier to do in Windows using VMWare, or VirtualBox and the corresponding Kali VM. Though some might prefer using the Windows Subsystem for Linux and not have the Virtual machine overhead.

Here is how you uninstall it:

  • In Optional Features, uncheck “Containers”
  • Uninstall Docker
  • Don’t forget to also remove Hyper-V or your other virtual machine software will not work.

Kali for Docker is a great idea, I do really like it, but my personal preference is just not for the Windows platform. But don’t take my word for it, you might like it, if interested try it and see what you think.

Kali Linux 2018 Released

Just a few months after the Kali 2017.3 release, Kali releases the new Kali 2018!

No immediately apparent cosmetic changes from the 2017 version, but some changes under the hood – A new Kernel (4.14.12) and several package updates:

  • Burpsuite
  • Dbeaver
  • Pixiewps
  • Reaver
  • Seclists
  • Secure-socket-funneling
  • Zaproxy

The new Kernel brings two important features:

  • AMD Secure Memory Encryption Support
  • Increased Memory Limits (for those who didn’t think 64 TB was enough)

Updating

Upgrade old version:

apt update && apt full-upgrade

But if it has been a long time, either download the new version or update the repository key (it expired) before updating:

wget -q -O – https://archive.kali.org/archive-key.asc | apt-key add

On a new Kali 2018 download, there are already quite a few updates available, so don’t forget to update. My virtual machine host anti-virus blocked one of the updates, I don’t recall ever having that happen before.

For more information and all download links check out the official release article:

https://www.kali.org/news/kali-linux-2018-1-release/

Quick Creds with Responder and Kali Linux

Tool website: https://github.com/lgandx/Responder
Tool Author: Laurent Gaffie

Responder is a powerful tool for quickly gaining credentials and possibly even remote system access. It is a LLMNR, NBT-NS & MDNS poisoner that is easy to use and very effective against vulnerable networks.

For the last few years one of the favorite tools in the pentester’s toolbox has been Responder. Responder works by imitating several services and offering them to the network. Once a Windows system is tricked into communicating to responder via one of these services or when an incorrect UNC share name is searched for on the LAN, responder will respond to the request, grab the username & password hash and log them. Responder has the ability to prompt users for credentials when certain network services are requested, resulting in clear text passwords. It can also perform pass-the-hash style attacks and provide remote shells.

In this article we will see how to use Responder in Kali Linux. In the next article we will dig a little deeper and look at some of the additional tools that are included with Responder.

Basic Usage

Responder is installed by default in Kali Linux. To view the Responder help screen and see what options are available, just use the “-h” switch.

Kali Linux Responder 1

From the help screen, the usage is:

responder -I eth0 -w -r -f

or:

responder -I eth0 -wrf

So, basically run the program, provide your network interface with the “-I” switch and then any other switches that you want. You can combine the switches together if you wish, as shown in the second usage example above. You can also use the verbose switch, “-v” to increase the text output of the program for more formation.

Analyze mode

A good place to start is “Analyze mode”. This mode runs responder but it does not respond to requests. It is specified with the “-A” switch. This can be handy to see what types of requests on the network responder could respond to, without actually doing it.

Kali Linux Responder 2

Any events will be shown on the screen, as below:

Kali Linux Responder 3

Analyze mode is also a good way to passively discover possible target systems.

Enough intro, let’s see Responder in action.

Poisoning with Responder

You can start Responder with the basic poisoner defaults by just typing:

responder -I eth0

Kali Linux Responder 4

Responder will poison responses and, if it can, capture any credentials. If a user tries to connect to a non-existing server share, Responder will answer the request and prompt them with a login prompt for access. If they enter their credentials, Responder will display and save the password hash:

Kali Linux Responder 5

We could then take the hash and attempt to crack it.

Basic Authentication & WPAD

WPAD is used in some corporate environments to automatically provide the Internet proxy for web browsers. Many Internet browsers have “enable system proxy” set by default in their internet settings, so they will seek out a WPAD server for a proxy address.

We can enable WPAD support in Responder to have it respond to these requests. If we use WPAD with the “Force Basic Authentication” option, Responder prompts users with a login screen when they try to surf the web and grabs the entered creds in clear text.

Command:

Responder -I eth0 -wbF

  • -w” Starts the WPAD Server
  • -b” Enables basic HTTP authentication
  • -F” Forces authentication for WPAD (a login prompt)

Kali Linux Responder 6

When a user goes to surf the web, the browser will reach out for proxy settings using WPAD. Responder will respond to the request and trigger a login prompt:

Kali Linux Responder 7

If the user enters their credentials, you get a copy of them in clear text. No cracking needed!

Kali Linux Responder 8

As you can see in the picture above, the user “Joe User” is using the password, “SuperSecurePassword”, which it isn’t.  🙂

Log Files

Log files for Responder are located in the /usr/share/responder/logs directory:

Kali Linux Responder 9

Along with the regular program log files, any credentials recovered will be stored in a file that includes the IP address of the target. You can view these files to see the hash or clear text creds:

Kali Linux Responder 10

If only the password hashes were recovered you can take the hash file and use it directly with your favorite cracking program:

john [responder password hash file]

Kali Linux Responder 11

Obviously, this is just an example as corporate networks should never allow “12345” as a password. But sadly enough, I have seen companies remove password complexity requirements so users could continue to use simple passwords.

Conclusion

In this article we saw how easy it is to use Responder to obtain both clear text and password hashes. How would you defend against this tool?

Basic Network Security Monitoring (NSM) will pick up and flag Basic plain text authentication attempts and WPAD auto-proxy requests. This is just one reason why NSM is so important.

You can disable the services that Responder is taking advantage of, but you must be sure that this will not affect your network functionality before you do, especially in environments with old systems still running.

For WPAD based attacks, provide an entry for WPAD in DNS, or don’t use the “system proxy” setting in the browser.

In the next article, we will look at some of the extra tools included with Responder.