Раздача wifi kali linux

Setting Up Hotspot On Kali Linux

Unlike other operating systems such as Windows, Kali Linux is an open-source operating system. It is considered the best operating system in cyber security implementation by the white hat and black hat hackers.

Kali is a Debian-based Linux distribution used mainly in advanced penetration testing, also known as pen-testing. It is freely available and accessible to professionals and learners.

Kali Linux has a wide range of features and tools for penetration testing. Each distro of Linux has an intended purpose for implementation; Kali Linux majoring in security.

Table of contents

Prerequisites

  1. Be familiar with the Linux family of operating systems.
  2. Be familiar with Kali Linux basics and the way to use it. Refer to this article to get started with Kali Linux

Introduction

In general, it is a nice idea to disable services that you do not use. Kali makes it easy to do this since network services are disabled by default. As long as services remain disabled, they do not pose any security threat.

However, it would be best to be careful when you enable them because it has no firewall by default. So, if they listen on all network interfaces, they are effectively publicly available, making it vulnerable.

Kali Linux distro has mobile hotspot ability disabled. Creating a mobile hotspot can only be done by customizing the network configuration.

This article will look into the processes used to create a mobile hotspot on Kali Linux and other Linux distros such as Ubuntu.

Throughout this tutorial, we are going to be using Kali Linux to create our hotspot. You can use any other Linux distribution of your choice.

Finding wireless drivers

To access the available network drivers, type the following command in the terminal:

The command above works only for wireless drivers.

In the case of using a USB adapter, use the command shown below:

Drivers

Installing the necessary tools

To create our hotspot, we need to install the required tools. The first and crucial tool is hostapd , which acts as the hotspot server.

To install hostapd , type in the following command:

The second tool we will use is dnsmasq. It is a lightweight, easily configurable, DNS forwarder designed to provide DNS services to small networks.

It can serve the names of local machines which are not in the global DNS. The DNS server supports both static and dynamic DHCP leases, multiple networks, and IP address ranges. The dnsmasq will act as the server to the DHCP.

Читайте также:  Как переустановить драйвера linux

To install dnsmasq , type in the following command:

Once done with the installations, we can move to the next step.

We will proceed to check the just-installed processes. If already started, stop those in progress, and deter them from starting during the system’s start-up. This is because it turns off the Wi-Fi and turns it into a Wi-Fi hotspot.

Below are the commands used for stopping and disabling updates of the services:

To stop services in progress, we use these two commands:

sudo service hostapd stop 
sudo service dnsmasq stop 

To disable services already installed, we use these two commands:

sudo update-rc.d hostapd disable 
sudo update-rc.d dnsmasq disable 

Installations

Setting up configuration files

Configuration is vital since it reduces operation tasks, optimizing IP addressing planning, and easily manages user mobility. After installing the services, we will need to configure the necessary files, i.e. hotspot.sh.

We will begin by typing the command below in our terminal:

sudo gedit /etc/dnsmasq.conf 

After running the command, write the code below under hotspot.sh for configuration:

# Only bind it to one interface bind-interfaces # Select the interface to use for binding interface=wlan0 # Select a scope of IP addresses to be used in DHCP leasing dhcp-range=192.168.1.1,192.168.1.9 

The preceding step in this stage involves performing hostapd configuration. To perform this configuration, type in the following command in the terminal:

To properly configure hostapd, add the following code to our configuration file:

# Set interface interface=wlan0 # Set driver to driver=nl80211 # Set your desired ssid(Wi-Fi name) ssid=Wi-FiConnection # Set the access point hardware mode to 802.11g hw_mode=g # Select WIFI channel  channel=6 # Ensure to enable only WPA2 wpa_passphrase=Wi-Fi connection 

In the code above, wlan0 is your Wi-Fi card. WLAN stands for Wireless Local Area Network. The number 0 is the number allocated to the card. This is because the number of cards starts from zero and goes up (0,1,2,3, etc…).

You can change your SSID name and password with your desired choice. The above configuration will create a hotspot called a Wi-Fi connection with a password.

Note: You can create the configuration file anywhere you want, naming it as hotspot.sh using an editor of your choice.

After completing the configuration, we will stop the running services by typing in the commands below:

sudo service dnsmasq stop 
sudo service hostapd stop 

Using the graphical user interface

In this part, we will be using the graphical user interface to do the configurations. Go to advanced network settings, click on the gear icon to open it up.

Читайте также:  Linux tmp файловая система

Your screen should look like this:

Settings

To proceed with our configuration, follow the steps below:

Step I: You click the “+” button in the window, and another window pops up. In this new window, we are going to do the configuration of your hotspot.

Connection

Step II: Under the network type, select “Wi-Fi”. Ensure your configuration resembles the second screenshot below:

Security

Step III: To set a password, click on Wi-Fi security and select WPA & WPA2 Personal. Below the input box, key in an eight or more memorable digit password of your choice and click save.

Security is an essential feature; this encryption protection is designed for homes and small office networks and does not need an authentication server.

WPA-Personal, also known as WPA-PSK (pre-shared key), is available on all 3 WPA versions, i.e. WPA, WPA2, and WPA3.

You’ve done it! Close all the opened windows, enjoy your newly created hotspot, and share it amongst computers, mobile phones, etc.

Conclusion

In this article, you have gained insights for setting up a hotspot on Kali Linux. You are now equipped to set up and manage your personal hotspot on Kali Linux.

Enjoy sharing data via hotspot on Kali Linux!

Peer Review Contributions by: Willies Ogola

Источник

Инструменты Kali Linux

Список инструментов для тестирования на проникновение и их описание

create_ap

Описание create_ap

Этот скрипт создаёт WiFi точку с сетевым соединением мост (Bridge) или NAT.

  • Создаёт ТД (точку доступа) на любом канале.
  • На выбор одно из следующих шифрований: WPA, WPA2, WPA/WPA2, Open (без шифрования).
  • Скрытая SSID.
  • Отключение связи между клиентами (изоляция клиентов).
  • Поддержка IEEE 802.11n и 802.11ac
  • Методы совместного доступа в Интернет: NAT или Bridge или None (без предоставления Интернета).
  • Выбор IP шлюза ТД (только при методах предоставления доступа к Интернет ‘NAT’ и ‘None’).
  • Вы можете создать ТД с тем же интерфейсом, на котором выходите в Интернет.
  • Вы можете передать ваш SSID и пароль через трубу или через аргументы.

Справка по create_ap

-h, --help Показать справку --version Напечатать номер версии -c Номер канала (по умолчанию: 1) -w Используйте 1 для WPA, используйте 2 для WPA2, используйте 1+2 для обоих (по умолчанию: 1+2) -n Отключить предоставление Интернета (если вы используете это не указывайте аргумент ) -m Метод предоставления интернета. Используйте: 'nat' для NAT (по умолчанию) 'bridge' для моста 'none' без доступа в интернет (равнозначно -n) --psk Использовать вместо пароля 64 шестнадцатеричные цифры общего ключа --hidden Сделать точку доступа скрытой (не вещать SSID) --mac-filter Включить фильтрацию по MAC адресам --mac-filter-accept Расположение списка для фильтра MAC адресов (по умолчанию в /etc/hostapd/hostapd.accept) --redirect-to-localhost Если установлена -n, перенаправлять все веб-запросы на localhost (полезно для публичных информационных сетей) --hostapd-debug Уровнем 1 и 2, в hostapd передаются аргументы -d или -dd для отладки. --isolate-clients Отключить связь между клиентами --ieee80211n Включить IEEE 802.11n (HT) --ieee80211ac Включить IEEE 802.11ac (VHT) --ht_capab HT возможности (по умолчанию: [HT40+]) --vht_capab VHT возможности --country Установить двухбуквенный код страны для порядка (пример: US) --freq-band Установить диапазон частот. Правильный ввод: 2.4, 5 (по умолчанию: 2.4) --driver Выбор драйвера вашего WiFi адаптера (по умолчанию: nl80211) --no-virt Не создавать виртуальный интерфейс --no-haveged Автоматически не запускать при необходимости 'haveged' --fix-unmanaged Если NetworkManager показывает ваш интерфейс как unmanaged после того, как вы закрыли create_ap, то используйте эту опцию для обратного переключения вашего интерфейса в управляемый режим --mac Установить MAC адрес --dhcp-dns Установить DNS возвращаемый DHCP --daemon Запустить create_ap в фоне --stop Отправить команду остановиться для уже запущенного create_ap. Для вы можете указать PID от create_ap или WiFi интерфейс. Вы можете получить их с --list-running --list-running Показать уже запущенные процессы create_ap --list-clients Список подключенных клиентов к экземпляру create_ap . В вы можете вписать PID от create_ap или WiFi интерфейс. Если был создан виртуальный WiFi интерфейс, тогда используйте его. Вы можете получить их с --list-running --mkconfig Сохранить файл конфигурации в conf_file --config Загрузить конфигурацию из conf_file Не-мостовые опции: --no-dns Отключить dnsmasq DNS сервер -g IPv4 шлюз для точки доступа (по умолчанию: 192.168.12.1) -d DNS сервер будет принимать во внимание /etc/hosts

Руководство по create_ap

  • Если вы не используете опцию —no-virt, тогда вы можете создать ТД с тем же интерфейсом, на котором у вас установлено Интернет-подключение
  • Вы можете передать ваш SSID и пароль по трубе или через аргументы.
  • При методе bridge если не является мостовым интерфейсом, тогда мостовой интерфейс создаётся автоматически.
Читайте также:  Диаграмма linux and windows

Примеры запуска create_ap

Создать открытую точку доступа с именем MyAccessPoint на беспроводном интерфейсе wlan0, Интернет-подключение будет обеспечиваться через интерфейс eth0:

sudo create_ap wlan0 eth0 MyAccessPoint

Например, чтобы создать ТД с именем MyAccessPoint и паролем PASSWORD1 на беспроводном интерфейсе wlan0, Интернет-подключение будет обеспечиваться через интерфейс eth0:

sudo create_ap wlan0 eth0 MyAccessPoint PASSWORD1

Установка create_ap

Установка в Kali Linux

sudo apt-get install haveged hostapd git util-linux procps iproute2 iw dnsmasq iptables git clone https://github.com/oblique/create_ap cd create_ap sudo make install cd .. && rm -rf create_ap

Установка в BlackArch

sudo pacman -S create_ap haveged hostapd util-linux procps iproute2 iw dnsmasq iptables --needed

Установка в Ubuntu, Linux Mint, Debian, Kali Linux

sudo apt-get install haveged hostapd git util-linux procps iproute2 iw dnsmasq iptables git clone https://github.com/oblique/create_ap cd create_ap sudo make install cd .. && rm -rf create_ap

Установка в Gentoo

emerge layman layman -f -a jorgicio emerge net-wireless/create_ap

Информация об установке в другие операционные системы будет добавлена позже.

Скриншоты create_ap

Инструкции по create_ap

Источник

Оцените статью
Adblock
detector