ARP攻擊之Kali Linux局域網斷網攻擊


特別聲明:
我們學習研究網絡安全技術的目的應是為了維護網絡世界的安全,保護自己和他人的私有信息不被非法竊取和傳播。請您遵守您所在地的法律,請勿利用本文所介紹的相關技術做背離道德或者違反法律的事情。

Special statement:
The purpose of our study of cyber security technology should be to maintain the security of the cyber world and protect the private information of ourselves and others from being illegally stolen and disseminated. Please comply with your local laws. Do not take advantage of the relevant technology introduced in this article to do anything that deviates from morality or against the law.

前言:

ARP攻擊是基於ARP協議的工作模式進行的,關於ARP協議和ARP攻擊的基礎知識請查看我的這篇博文ARP協議與ARP攻擊入門

ARP攻擊能夠實現的技術前提有兩個,一是作為攻擊者的計算機需要和被攻擊者的計算機在一個局域網中,二是作為攻擊者的計算機需要知道被攻擊者計算機的局域網IP。本文將模擬真實的攻擊過程,在不與被攻擊的計算機發生物理接觸的情況下實現對其的局域網斷網攻擊。

網絡拓撲圖

圖 1
圖 1

注:在這里,作為攻擊者的計算機使用的是安裝在VMware Workstation中的Kali Linux,我們需要在VMware的設置中將Kali的聯網方式改為“橋接模式”,並且不要勾選“復制物理網絡連接狀態”。

獲取目標主機IP

在這里,我們使用Ettercap對內網進行掃描以獲取目標主機IP和網關的信息。輸入命令:

ettercap -G

打開Ettercap的GUI界面:
圖 2
圖 2

依次點擊“Sniff(嗅探) -> Unified sniffing(統一嗅探)”,之后彈出如下界面讓選擇進行掃描的網絡接口(Network interface):
圖 3
圖 3

這里我們使用默認的eth0端口。點擊“OK”。

之后依次點擊“Hosts(主機) -> Scan for hosts(掃描主機)”。
這時會出現一個進度條,等待進度條結束,依次點擊“Hosts -> Hosts list(主機列表)”即可顯示本機所在局域網中除本機之外,當前已連接至網絡的設備的IP地址和MAC地址:
圖 4
圖 4

注:Ettercap掃描結果的第一項一般是本局域網中的網關,如圖中的192.168.50.1就是實驗時局域網中的默認網關。

這樣我們就獲得了目標主機的IP和本局域網的網關。

對局域網內的目標主機實施斷網攻擊

我們使用Kali Linux中的Arpspoof進行ARP攻擊。

在實施斷網攻擊前,我們先測試一下目標主機192.168.50.130是不是能上網,輸入命令:

ping www.baidu.com

發現可以Ping通,說明目標主機在攻擊開始之前是可以上網的。

在我們的攻擊機上,即Kali中,輸入命令:

arpspoof [-i interface] [-c own|host|both] [-t target] [-r] host
e.g:
arpspoof -i eth0 -t 192.168.50.130 192.168.50.1

回車就開始對目標主機進行斷網攻擊了,此時我們在目標主機上執行命令:

ping www.baidu.com

就會返回一個錯誤提示:“Ping請求找不到主機www.baidu.com”。

通過上述命令產生的Arpspoof的攻擊進程不會自動停止,除非當前攻擊鏈路被中斷,如攻擊機關機或者斷開與當前局域網的連接,或目標機關機或者斷開與當前局域網的連接或者更改了其在當前局域網內的IP地址。我們可以在Arpspoof進程所在終端上使用“Ctrl+Z”手動關閉Arpspoof的攻擊進程。

關閉Arpspoof的攻擊進程后,之前被攻擊的目標主機一般會在幾秒鍾的時間內自動恢復正常的網絡連接。

附:
Ettercap0.8.2的幫助信息(命令ettercap -help):

ettercap 0.8.2 copyright 2001-2015 Ettercap Development Team


Usage: ettercap [OPTIONS] [TARGET1] [TARGET2]

TARGET is in the format MAC/IP/IPv6/PORTs (see the man for further detail)

Sniffing and Attack options:
  -M, --mitm <METHOD:ARGS> perform a mitm attack   -o, --only-mitm don't sniff, only perform the mitm attack   -b, --broadcast sniff packets destined to broadcast   -B, --bridge <IFACE> use bridged sniff (needs 2 ifaces)   -p, --nopromisc do not put the iface in promisc mode   -S, --nosslmitm do not forge SSL certificates   -u, --unoffensive do not forward packets   -r, --read <file> read data from pcapfile <file>   -f, --pcapfilter <string> set the pcap filter <string>   -R, --reversed use reversed TARGET matching   -t, --proto <proto> sniff only this proto (default is all)       --certificate <file> certificate file to use for SSL MiTM       --private-key <file> private key file to use for SSL MiTM 
User Interface Type:
  -T, --text use text only GUI        -q, --quiet do not display packet contents        -s, --script <CMD> issue these commands to the GUI   -C, --curses use curses GUI   -D, --daemon daemonize ettercap (no GUI)   -G, --gtk use GTK+ GUI 
Logging options:
  -w, --write <file> write sniffed data to pcapfile <file>   -L, --log <logfile> log all the traffic to this <logfile>   -l, --log-info <logfile> log only passive infos to this <logfile>   -m, --log-msg <logfile> log all the messages to this <logfile>   -c, --compress use gzip compression on log files 
Visualization options:
  -d, --dns resolves ip addresses into hostnames   -V, --visual <format> set the visualization format   -e, --regex <regex> visualize only packets matching this regex   -E, --ext-headers print extended header for every pck   -Q, --superquiet do not display user and password 
LUA options:
      --lua-script <script1>,[<script2>,...] comma-separted list of LUA scripts       --lua-args n1=v1,[n2=v2,...] comma-separated arguments to LUA script(s) 
General options:
  -i, --iface <iface> use this network interface   -I, --liface show all the network interfaces   -Y, --secondary <ifaces> list of secondary network interfaces   -n, --netmask <netmask> force this <netmask> on iface   -A, --address <address> force this local <address> on iface   -P, --plugin <plugin> launch this <plugin>   -F, --filter <file> load the filter <file> (content filter)   -z, --silent do not perform the initial ARP scan   -6, --ip6scan send ICMPv6 probes to discover IPv6 nodes on the link   -j, --load-hosts <file> load the hosts list from <file>   -k, --save-hosts <file> save the hosts list to <file>   -W, --wifi-key <wkey> use this key to decrypt wifi packets (wep or wpa)   -a, --config <config> use the alterative config file <config> 
Standard options:
  -v, --version prints the version and exit   -h, --help this help screen

end
更多內容請訪問我的個人網站荒原之夢

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM