Kali Linux Docker macOS — 🌩️

👀
Hey Folks,
Today, we will see how to run Kali Linux & not only on Docker from a macOS in minutes.
☁️
For Newby, what’s Docker?
Docker is a cloud-based platform that helps developers create containers for their applications, making it easy to deploy them without hassle on any supported system. Dockers are also perfect alternatives to virtual machines for individuals or businesses who want to run another OS on the same machine without needing VM compatibilities, requirements & so on. It will all be simplified as it will mostly be run from a web browser or screen-sharing app for macOS.
Let’s start. Then, we will examine the main differences between VM & Dockers & a few alternatives.
💻
To begin, head to the “Docker” “Official Website” -> “https://www.docker.com" — & avoid non-official versions, as you never know what & who had modified the file integrity &, thus, for which purposes… Once there, download it, making sure to download the .dmg file as we are on macOS. I will skip guiding you through the basic installation on Mac, as you will only have to choose the disk size you want to leave to dockercontainers. I suggest 30% to 40% of your total hard disk. For example, if you have 100 GB available, use 30 to 40 GB at most if not less. The memory you want to set for it, here again, try to use 30% to 40% of your total RAM as it may slow the system, but feel free to play. Remember that you will run 2 OSwithin the same machine; thus, even if it requires less than a VM, it still needs device resources for optimal performance.
Once you are done with it & make sure to sign in or sign in, secure the account & be ready to go; then, open a terminal on your Mac & paste the following:
- A light easy to go version of Kali
docker pull kalilinux/kali-bleeding-edgeor The current (most updated)
docker pull docker.io/kalilinux/kali-rolling- Full detailed info about Kali Docker Versions @ >>>>>
>>>>>
docker run -t -d - name my-kali -p 25900:5900 -p 25901:5901 kalilinux/kali-bleeding-edge- Note you can personalize your machine name by changing just after — name “name-of-your-choice-no-spaces-”
>>>>>
docker exec -it my-kali /bin/bash>>>>>
- this will take a while…
apt-get update && apt-get upgrade && apt clean && apt autoremove>>>>>>>>>>
apt-get autoclean>>>>>>
- — — optional — —
- This will install all the Tools in Kali-Linux & can go up to 24GB or near there, consider so. Yes, you will have everything, but it will require time & disk space.
apt install kali-linux-everything>>>>>
- This also will take a while as the GUI environment
apt install kali-desktop-xfce>>>>>>
apt install tightvncserver>>>>>>
vncpasswd- Now enter the password 2 times & if you are new & worried about not seeing anything moving, it is all cool; this is Linux.
>>>>>>>>>
export USER=root>>>>>>>>
tightvncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565>>>>>>>
Now open screen sharing & as IP, use what we used to set at the beginning.
Usually, it should be your IP — 127.0.0.1:25900 — or — //localhost:5959 — or — //localhost:25900 — You can find it by running “ifconfig” on your terminal macOS. Then, input your password & you are in!
Things to do are countless, from updating, complete upgrading, distro upgrading & so on… Below are a few tools that may come in handy.
apt install net-tools && apt install wget && apt install curl && apt install git
apt-get install - fix-missing
apt-get update && apt-get upgrade && apt clean && apt autoremove
apt distro upgrade
apt full-upgrade
pip3 install requests
apt install pip && pip install colorama
sudo apt -y upgrade
sudo apt - fix-broken install
apt-get install curl
apt-get install ruby
apt-get install ruby-dev
apt-get install libcurl4-openssl-dev
apt-get install libsqlite3-dev
apt-get install zlib1g-dev
apt-get install libxml2-dev
apt-get install libxslt1-dev
apt-get install build-essential
apt-get install libssl-dev
apt-get install libreadline-dev
apt-get install libyaml-dev
apt-get install libffi-dev
apt-get install libgdbm-devJust above most of the Beef-xss requirements…..If you did run the command Kali Linux install everything, you might not need those contrary; save it for your reference.
Now, you are ready to go on the cloud with Kali Linux, but let me get you some parts you may need. Sometimes, when you log out & log in back on, your environment may happen the following when you call the machine in GUI, as in the example below.
- In case you try connecting, but GUI does not respond, go back to Kali terminal & paste -
tightvncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565- I am trying to remember the GUI, but probably you’ll see this…
Perfect, select the issue.
/tmp/.X0-lock& >>>>>
rm /tmp/.X0-lock
- Once done, you may see this once you rerun the command.
tightvncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565>>>>>>>>

Now you can log in again!!
Ok, now a few extras! In case you want to test any other OS or Apps, Languages & so on, head to >>>>>>> — https://hub.docker.com — & pick your favourite; thus, most of them come with linked tutorials and are easy to use.
Another pre-set Ubuntu flavoured can be found @ >>>>>
or
or
or
docker pull ubuntuor
docker pull amazonlinux🥷🏻
A few points about Dockers & VM

Virtual Machines (VM) Pros:
1. VMs provide complete isolation from the host operating system, making them highly secure.
2. VMs can run various operating systems, including legacy systems.
3. VMs provide full access to hardware resources like graphics cards & peripherals.
4. VMs are highly flexible & can be easily migrated between hosts.
Virtual Machines (VM) Cons:
1. VMs are resource-intensive & require significant memory & processing power.
2. VMs can be slow to boot up or shut down & can take a long time to migrate between hosts.
3. VMs require significant storage space to store virtual hard disks.
4. VMs require a hypervisor, which can be relatively inexpensive to license or maintain.
Docker Pros:
1. Dockers are lightweight & consume fewer resources than VMs.
2. Dockers can be easily ported between different hosts & operating systems.
3. Dockers are highly scalable & easily deployed across multiple machines.
4. Dockers allow for easy versioning & rollbacks, making testing or deploying new applications easy.
Docker Cons:
1. Dockers are less secure than VMs, as they share the host operating system kernel.
2. Dockers do not provide full access to hardware resources, which can limit application performance.
3. Dockers can be more challenging to manage & secure than VMs, requiring more advanced knowledge of containerization.
Main differences:
1. VMs provide complete isolation, while dockers share the host operating system kernel.
2. VMs require more resources to run than dockers.
3. VMs are suitable for running legacy systems, while dockers are not.
4. Dockers are more scalable and flexible than VMs.
Now you can add a few new tool to your Lab!
Surf Safe & Stay Tuned!
😎
You think I did well?
Get in touch or buy me @ Coffee



Comments
Post a Comment