Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kali Linux Intrusion and Exploitation Cookbook

You're reading from   Kali Linux Intrusion and Exploitation Cookbook Powerful recipes to detect vulnerabilities and perform security assessments

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher
ISBN-13 9781783982165
Length 512 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Dhruv Shah Dhruv Shah
Author Profile Icon Dhruv Shah
Dhruv Shah
Ishan Girdhar Ishan Girdhar
Author Profile Icon Ishan Girdhar
Ishan Girdhar
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Getting Started - Setting Up an Environment FREE CHAPTER 2. Network Information Gathering 3. Network Vulnerability Assessment 4. Network Exploitation 5. Web Application Information Gathering 6. Web Application Vulnerability Assessment 7. Web Application Exploitation 8. System and Password Exploitation 9. Privilege Escalation and Exploitation 10. Wireless Exploitation Pen Testing 101 Basics

Installing Docker on Kali Linux


In this recipe, we will be to and setting-up on Kali Linux.

Getting ready

To step through this recipe, you will need a running Kali Linux in Oracle Virtualbox or VMware, and an Internet connection. No other prerequisites are required.

How to do it...

For this recipe, you need to perform the following steps:

  1. At the time of writing this book, Kali Linux 2.0 Rolling is based on Debian Wheezy and therefore these steps will only work for Debian Wheezy based Kali Linux. In future, if Kali is updated, then kindly check the latest steps to install Docker from the Docker documentation.
  2. In your terminal window open /etc/apt/sources.list.d/backports.list in your favorite editor. If the file doesn't exist, create it.
  3. Remove any existing entries and add an entry for backports on Debian wheezy:
      deb http://http.debian.net/debian wheezy-backports main
  1. Update the package information and ensure that APT works with the HTTPS method, and that CA certificates are installed:
      $ apt-get update
      $ apt-get install apt-transport-https ca-certificates
  1. Add the GPG key:
      $ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80  
      --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
  1. Open /etc/apt/sources.list.d/docker.list in your favorite editor. If the file doesn't exist, create it.
  2. Remove any existing entries and add an entry for backports on Debian wheezy:
      $ deb https://apt.dockerproject.org/repo debian-wheezy main
  1. Update the package information and verify that APT is pulling from the right repository:
      $ apt-get update && apt-cache policy docker-engine
  1. Install Docker:
      $ apt-get install docker-engine
  1. Start the Docker daemon:
      $ service docker start
  1. Verify that Docker is installed properly:
      $ docker run hello-world

Since, you're already logged in as root in your Kali Linux installation, you don't need to use sudo. But it is important to note that the docker daemon always runs as the root user and the docker daemon binds to a Unix socket instead of a TCP port. By default, that Unix socket is owned by the user root, and so, you will need to use the preceding commands with sudo, if you are not logged in as root.

How it works...

In this recipe, we have added the docker source list so that we can fetch the Docker updates every time we use the apt-get update command on our system. Then, update the apt-get sources and install the prerequisites required for installing Docker. We added the GPG key to ensure that whatever updates we are installing are valid official unchanged packages. After all this basic configuration, we ran a basic apt-cache to ensure APT is fetching the docker-engine from the right repository. Finally, we installed docker-engine using apt-get.

You have been reading a chapter from
Kali Linux Intrusion and Exploitation Cookbook
Published in: Apr 2017
Publisher:
ISBN-13: 9781783982165
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image