kancboom.ru

Installing Kali as an additional operating system on a Windows computer. How to install Kali Linux as the main or second operating system Video: detailed installation of Linux Ubuntu on a computer with BIOS

Kali Linux is now available in the Microsoft Store. Powered by Windows Subsystem for Linux (WSL). If you are too lazy to follow the link, then WSL is the reverse of Wine, which allows you to run Linux applications natively (without a virtual computer) on Microsoft OS. One of the advantages is improved performance (compared to working in a virtual OS). And there are many different disadvantages: lack of support for raw sockets, hardware, partial support for the graphical interface, a number of kernel interfaces are not implemented, etc.

I'm not particularly keen on the concept of WSL (as it is currently implemented). Therefore, this note will be short: we will look at installing Kali Linux from the Windows App Store, launch it, install a couple of applications, do a test run of them, install the GUI and connect to it. Why do you need to do all this through WSL? You can figure it out yourself.

How to Install Kali Linux on WSL

1. WSL is available on updated Windows 10. Therefore, update your Windows, open the window PowerShell(Win+x) and run the command there

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

2. After reboot, open the Microsoft Store and find the application there " Kali Linux" Or just click to go directly there. Install the application and enjoy Kali!

To install, click the button Get.

How to run Kali Linux on WSL

To “enjoy Kali” you need to at least run it. To do this, open PowerShell again and run the command

When you first start, initialization occurs - this takes some time.

We are then asked to create a default UNIX account. It may have nothing to do with your Windows OS user:

The default is the minimum number of packages. Therefore, you need to install the programs you need yourself.

The changed command line is your new Kali Linux.

Installing programs in Kali Linux on WSL

Everything is similar to normal work in the console. Let's start with updating the system:

Sudo apt update sudo apt dist-upgrade sudo apt install wpscan whatweb

When installing some programs, for obvious reasons, problems with the antivirus may arise. You need to solve these problems individually (perhaps add the entire Kali Linux folder - C:\Users\Alex\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\ - to your antivirus exceptions).

How to run a program in Kali Linux on WSL

If you are used to the Kali Linux menu, then you will have to relearn how to launch programs from the console. If you already run them in the console, then launching programs is no different:

For example, let's update the wpscan database

Sudo wpscan --update

Let's check some site on WordPress:

Sudo wpscan -u spryt.ru

Let's collect some information about the site using whatweb:

Whatweb suip.biz

How to restore Kali WSL

If you have corrupted the operating system (deleted files necessary for the OS to work, etc.), or simply want to start from scratch, then it is possible to reset the Kali Linux installation in WSL to its original state.

Using Win+x open " Applications and features", search for Kali Linux:

Click " Extra options", on the new page click the button " Reset»:

The system will be removed and a new instance deployed. Accordingly, all previously made changes will disappear.

Kali Linux GUI on WSL

Install XFCE:

Wget https://kali.sh/xfce4.sh sudo sh xfce4.sh

During the installation process, select the language of the keyboard layout and the method for switching layouts (to move between elements, use the key TAB):

At the end, a message will appear that XRDP is configured to listen on port 3390, but the service itself is not running.

To start the service, run:

Sudo /etc/init.d/xrdp start

If the launch is successful, you will see something like the following:

[....] Starting Remote Desktop Protocol server: xrdp-sesman xrdp Testing if xrdp can listen on 0.0.0.0 port 3390. Closed socket 6 (AF_INET6:: port 3390)

Now on Windows, press Win+x and select " Execute" In the window that opens, enter:

A new window will open, enter there

127.0.0.1:3390

And click the button To plug».

A message window will appear:

The authenticity of the remote computer cannot be verified. Do you want to connect anyway?

This issue may occur if the remote computer is running a version of Windows earlier than Windows Vista or the server is not configured to support authentication.

Contact your network administrator or the owner of the remote computer for assistance.

Check the box " Don't ask for connections to this computer again" and press " Yes».

A login window will appear, enter your Kali Linux username and password:

After logging in you will be prompted, select " Use default config»:

Using a graphical desktop environment, you can run GUI programs (after installing them).

To exit, explicitly terminate the service, to do this, click on the user name, click " Log Out...»:

Then uncheck " Save session for future logins" and press " Log Out»:

Stop the service

Sudo /etc/init.d/xrdp stop

Conclusion

Unfortunately, due to the implementation of the WSL architecture, some Kali Linux tools will not work. But those that work (various site scanners, brute forcers, network traffic capture file analyzers and others) are quite convenient to use directly from the Windows command line, without the need to launch an entire virtual machine with Kali Linux, or reboot into a second system (if Kali is not your main OS).

You already know about Faculty of Information Security from GeekBrains? Comprehensive annual program practical training covering all main topics, as well as additional courses For a present. Based on the results of training, a certificate established sample and certificate. For a special discount on any faculties and courses!

With the introduction of the Windows Subsystem for Linux (WSL), Windows 10 introduced new features, such as support for Linux distributions, in particular Ubuntu. In this article I will tell you how to use this subsystem to connect Kali LInux in a Windows environment without using virtualization systems.


While running Kali on Windows may not be optimal due to various limitations, there are still many situations where Kali Linux may be needed for use with Windows 10. For example, this could be consolidating workspaces, especially if Windows is your primary work environment. . Standardizing tools and scripts to work across multiple environments, quickly porting Linux penetration testing command line tools to Windows, etc. can also be helpful.


In order to install Kali you need to follow several steps. First of all, you need to enable and install Windows Subsystem for Linux Command Reference - launch a powershell shell with administrator rights, run the command and reboot your machine:


Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

After reboot you need to install Ubuntu-environment:


lxrun /install

Next, you need to install WSL Distribution Switcher. This program is designed to switch the Linux subsystem to use different Linux distributions. Rootfs images are currently downloaded from Docker Hub repositories as sources or prebuilt builds.


(To clone a project from a git repository, you need to install a git client on Windows 10, for example from here: https://git-scm.com/download/win, and also install python for Windows).


git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git cd WSL-Distribution-Switcher python get-prebuilt.py kalilinux/kali-linux-docker python install.py rootfs_kalilinux_kali-linux-docker_latest.tar. gz lxrun /setdefaultuser root

Now that Kali-environment is deployed on your Windows 10 you can call it using the command:


bash

export LANG=C apt-get update && apt-get dist-upgrade

After deploying the Kali-environment, we can install the necessary utilities and use them from Windows:



In this simple way, you will get a modern distribution for penetration testing in your Windows environment without running virtualization systems, reboots, etc. Also, it is necessary to take into account that from such an environment, utilities for working with hardware, for wardriving, etc. will not work normally.

Let's say you read several articles on the Internet and became interested in the free Linux operating system. Perhaps you even installed it on your virtual machine or booted into Live mode and tried out how everything looks and works. You liked it, and now you want to install it on your computer and start using it. But at the same time, you don’t want to lose your already installed Windows so that in case of an unforeseen situation you can return to a fully working system, and your favorite games and necessary programs will always be at hand. It is possible to install Linux and Windows 10 on one computer. At one time, for me, as for many other users, this was the ideal option.

In this guide, we'll look at how to install Linux alongside Windows 10. I say Windows 10 because it's the newest operating system from Microsoft, but these instructions will also work for older versions like Windwos 7, 8, and 8.1.

I assume that you already have Windows installed, you have found and decided on which disk to allocate some space for Linux, but you just don’t know how to do it correctly. Here you will get a detailed answer to this question. Let's touch on another important topic - UEFI. This technology is used on all new Windows laptops, and many users are interested in how to install Linux on UEFI and what problems may arise.

To install the Linux operating system next to Windows 10, you will need to create several additional disk partitions. The minimum number is three sections. It is not customary to install Linux on one partition like Windows, although this option is possible. Linux is so flexible that it allows you to place the system, user files and settings on different partitions. This is very beneficial during reinstallation. You reinstall the system in the system partition, and all your files on the desktop and work environment settings will remain in place.

These are the three sections:

  • Systemic;
  • Home;
  • Swap partition.

The minimum volume requirements for a system partition in different distributions vary from seven to twenty Gigabytes. But this is enough to install the system itself and several additional programs. If you are going to use a lot of programs and games, especially if they take up a lot of space, you need to take a couple of tens of Gigabytes in reserve. I recommend using 30-40 Gigabytes for the Linux system partition in the same way as for the Windows C drive.

The swap partition is used when the system does not have enough RAM. At a certain percentage of fullness, Linux gradually begins to dump unused data into this file. Therefore, for this section, a volume half as large as the size of your RAM is suitable. But if you plan to use sleep mode or hibernation, then you need to allocate an amount of disk space equal to the size of the RAM for the swap partition, because in these modes the entire contents of the computer's RAM are transferred to disk. The home section is the section with your files, movies, music, downloads. Estimate how much you need.

Preparing a Disk in Windows

To install Linux next to Windows 10 already in use, you will need to “cut off” space from the system disk. Therefore, before taking decisive action, it is important to create a backup copy of the system or at least important files. If everything goes well, nothing bad will happen to either the files or the system, but due to some failure, such as a power outage, the file system may be damaged. You yourself, through inattention, can do something wrong and delete something that is not necessary.

Therefore, if you work with the system disk, copy important files to external media, and, if possible, create a backup copy of the operating system using the appropriate control panel item:

When working with a non-system partition, for example, D, E, F etc., just copy the files from there.

Now we proceed directly to preparing the disk for installing Windows 10 and Linux. The easiest way to do this is using the standard Windows Disk Management utility. Right-click on the " This computer"on the desktop and open the item" Control":

Here at the bottom of the window we see two drives: C (system) and D (regular). I will give an example of how to resize drive D. For drive C, all steps are similar.

Right-click on the desired drive and select the option Shrink Volume:

A window like this will open in which you need to enter the size of the volume to be created in the field size of compressible space:

Please note that you cannot specify a size greater than the amount of free disk space. So make room first if you haven't already. Click on the button compress. After this, unallocated space will appear, from which you can create the necessary partitions:

That's all. Now you have a place to install Linux next to Windows 10. I see no point in further partitioning the disk in the Windows utility, since we have already done all the dangerous operations that could damage the system, and it is best to configure partitions for Linux using Linux tools.

Preparing a Disk in Linux

This is not the next step in installing Linux with Windows 10. It is an alternative disk partitioning option without using Windows. If for some reason you do not want to use the standard Windows utility to allocate the required space, this can also be done using any LiveCD Linux distribution with the Gparted disk management program preinstalled. For example, the same Ubuntu.

Boot from the Ubuntu disk, in the Dash search type Gparted:

The following program window for disk management in Linux will open:

It is important to note here that disk partitions in Linux are named differently than in Windows. Here, drives are simply addresses of files in the dev virtual file system. Later you will understand what this is, but for now the only important thing is that the name of each partition begins with /dev/sd. Next comes the letter indicating the physical disk (sda, sdb, sdc, sdd, and so on). Behind it is a number that indicates the partition number on the disk, for example: sda1, sda2.

In the utility window, in addition to the name of the disk partition, we can see the file system, size and free space on the disk. Now, based on the size and file system, we can understand which disk our system is located on.

In my example, /dev/sdb1 is the C drive in Windows, and /dev/sdb2 is the D drive. We will do the same as in the previous example. Let's reduce the size of the /dev/sdb2 (D) partition to 10 Gigabytes so that we can install Linux on Windows 10 using the freed up space. To do this, right-click on the partition and select Resize/Move:

In the window that opens, you can enter the desired size manually in the field New size or use the slider:

Then click the button Resize/Move.

As you can see, free space has appeared, but there are no real changes on the disk yet. In order to burn everything to disk, click the green checkmark, or in the menu Edit select item Apply All Operations:

The file system resizing process may take a little time:

Now you can see that the /dev/sdb2 partition has shrunk and there is free space:

For the system partition, the operations are the same, only there is one note: do not touch the beginning of the partition. You can safely reduce the size of a partition by adding free space after it, but don't try to do it before it, like this:

There is no need to do this, otherwise the Windows bootloader will be damaged; it is very easy to restore, but I think there is no need for you to solve these problems at the very beginning of your acquaintance with Linux.

We will not create partitions for Linux here either; it is better to do all this during installation, using a utility specially designed for this.

Installing Linux next to Windows 10

I will not consider in detail here how to install Linux; all this has already been discussed in detail in my articles separately for different distributions. Let's look at just a few aspects of disk layout. Let's take Ubuntu as the most popular OS for beginners, but in other distributions everything is almost the same.

At the stage of choosing a marking method, I recommend choosing the manual option. Because this way you will better understand how to install the system:

Here, from the previously freed space, you create those sections that we talked about at the very beginning of the article. For the root partition the mount point must be /, for the home partition - /home, and for the swap partition the mount point must not be specified.

Installing Linux next to Windows 10 UEFI

All modern laptops released with Windows 8, 8.1, 10 use UEFI technology. This is a new progressive technology that has replaced the outdated BIOS. The first important and most noticeable change is the use of a GPT partition table instead of the legacy MBR, as well as the creation of a separate disk partition for operating system bootloaders. Many users are afraid that UEFI will make it more difficult to install Linux with Windows 10 on their laptop. And in vain - in most cases there is nothing complicated. If you already have Windows installed, then most likely the efi partition has already been created, and during disk partitioning you just need to select it to install the bootloader. The efi partition is usually created with the fat32 file system and takes up about 30 Megabytes of memory:

If you have a clean hard drive, you need to create a GPT partition table. This can be done using the same Gparted by opening the menu Devices ->Create Partition Table:

Then we specify this partition during the installation of Linux along with windows 10; for it you need to specify the mount point /boot/EFI. That's all the difficulties with installation in UEFI. In general, installation in UEFI is supported by all distributions running in Grub2.

Completing the installation

Many new users are interested in: “How can I boot my Windows later?” Don't worry, Grub will automatically find the Windows boot loader and offer you a menu where you can select your operating system before starting your computer:

This way, dual booting Windows 10 and Linux will be set up automatically.

If something doesn't go according to plan, although it's unlikely to happen, everything is very easy to adjust. So, if done correctly, you will definitely have access to your Windows after installing Linux.

conclusions

Today we looked at how to install Linux on Windows 10. We figured out how to partition, how to select partitions, and what to do if your laptop uses UEFI. There is no point in talking about installing any specific Linux distribution along with Windows 10, since, firstly, all the steps are similar, and secondly, you can find detailed instructions in the relevant articles. I would also like to note: for Windows 10 to work comfortably with Linux on one computer, you need to disable Windows FastBoot, otherwise you will not be able to. If you have any questions, ask in the comments!

The Kali Linux developers and the Offensive Security team are always trying to find new ideas and better ways to run Kali Linux.

With the recent introduction of Windows Subsystem for Linux (WSL) in Windows 10, it has opened up a new way to run Kali Linux.

Tell me, do you play games? Certainly.

Do you use Windows more than Kali Linux?

NVM, you are not answering this.

But the point is that if you want Windows and Kali Linux, you would want to install Kali Linux as a Windows subsystem in Windows 10 (like software in Windows!).

Using the Windows Subsystem for Linux Distribution Switcher utility, you can now install Kali Linux on a Windows Subsystem for Linux like Ubuntu.

KaliLinuxWindows subsystem


While this Kali setup on Windows is not optimal due to various environmental limitations (such as lack of raw sockets and lack of a customized Kali kernel), there are still many situations where Kali Linux along with your Windows 10 machine can be useful.

One example that comes to mind is workspace consolidation, especially if Windows is your primary work environment.

Other useful situations that came to mind were standardizing tools and scripts to work across multiple environments, quickly porting Linux penetration testing command line tools to Windows, etc. For example, below is a screenshot of working with Kali Linux's Metasploit Framework ,on top of WSL.

Setting up your environment

For easier copy/paste operation, these are the basic steps:

1. Update your Windows 10 machine.

Open a PowerShell administrative window and install the Windows subsystem using this one-line interface.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

2. After reboot, open a command prompt shell and run the following commands to set the default Ubuntu environment. This will lay the foundation for our Kali installation.

Lxrun/install

3. Install and install WSL Switcher, download the Kali base and extract it to disk:

# git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git # cd WSL-distribution-switcher # python get-prebuilt.py kalilinux / kali-linux-docker # python install.py rootfs_kalilinux_kali-linux- docker_latest.tar.gz # lxrun / setdefaultuser root

4. Now that Kali is configured on your Windows 10 machine, you can interact with it by running the "bash" command:

5. At this point you are inside Kali and you can use it as usual - install packages, use tools, etc. We highly recommend running the update and upgrade first:

Export LANG=C apt-get update apt-get dist-upgrade

Hello, friends! Recently, we pleased you with the appearance of a new version. Today there is more good news for hackers, pentesters and just those who like to play around. Now you can download and install Kali Linux directly from the Microsoft Store on Windows 10. Installing Kali Linux on Windows 10 occurs without crutches and dancing with a tambourine, just like any other regular application installed from the Microsoft Store. I know Kali Linux and Windows 10 sounds weird, but it's true.

Kali Linux on Windows 10

The highly popular, free, open-source Linux operating system, widely used by security professionals, is now available in the Windows 10 Store.

Installing Kali on Windows is made possible by WSL (Windows Subsystem for Linux) technology, which allows users to run Linux applications directly on Windows.

How to Download Kali Linux from the Windows 10 Store

Installing Kali in Windows 10 does not start from the Windows Store, as you might mistakenly think, but by enabling the “Windows Subsystem for Linux” setting, and only then installation.

Here is a video that shows the process of installing Kali Linix on Windows 10:

How to update Kali Linux in WSL

Updating Kali Linux in WSL is no different from a regular update. To update, run the following commands:

export LANG = C

sudo apt - get update

sudo apt - get dist - upgrade

sudo apt - get clean

So, we’ve figured out installing Kali Linux on Windows 10 and updating, now let’s move on to installing the Metasploit framework.

How to install Metasploit on Kali Linux under Windows 10

One problem that may arise with the installation of Metasploit is the Metasploit modules, which (obviously) will be picked up by antiviruses, primarily Windows Defender.


What a surprise! Windows 10 has flagged some files as viruses and exploits.

This problem is solved by adding the following folder to the antivirus exclusions:

Once the installation is complete, you will be able to launch Metasploit using the following command:

msfconsole

How to restore Kali Linux WSL

In case of a crash or some error, you can always restore Kali WSL. But be aware, the restore process will destroy your Kali WSL chroot and re-create a new copy. All changes made to the file system will be deleted and reset to default.

Here is a video that shows the process of restoring Kali Linux under WSL:

Total

Kali Linux on Windows does not provide any jailbreaking tools, but you can install them yourself. Problems can only arise with wardriving. I don't think it will be possible to use the equipment at a low level. Although, if you forward it and play around a little... But I’m definitely not going to do that.

Who is this aimed at, and why is Microsoft doing this?

A portrait emerges of some white hat hacker working for large companies. I don't think black hat will use this. Well, Microsoft has one interest - sales. Apparently things are going badly if they try to lure even that small part of computer users, which are hackers, into their “Windows”.

Is it worth trying?

Certainly! Computer hemorrhoids are so interesting;)

Loading...