20189224网络攻防实践第六周作业

20189224网络攻防实践第六周作业

教材内容总结

TCP/IP网络协议攻击

从安全属性来看,机密性,完整性和可用性构成了网络安全的三个基本属性。在网络通信中,攻击者可以采取截获、中断、篡改与伪造四种基本的攻击模式。网络层协议攻击包括IP源地址欺骗、ARP欺骗、ICMP路由重定向攻击。传输层协议攻击包括RST攻击、会话劫持攻击、SYN Flood拒绝服务攻击、UDP Flood拒绝服务攻击。

安全模型

为了保障被CIA安全属性,信息安全领域提出了一系列的安全模型来指导信息系统安全体系建设,目前最重要的就是PDR安全模型,它是一个基于时间的动态安全模型,其基本描述就是:网络安全=根据风险分析指定安全策略+执行安全防护策略+实时监测+实时响应,在此,模型中,安全策略是模型的核心,所有的防护,检测,响应都是根据安全策略实施的,安全策略为安全管理提供管理方向和支持手段。响应措施主要包括应急处理,备份恢复,灾难恢复等。

防火墙

防火墙可以在网络协议栈的各个层次上实施网络访问控制机制,对网络流量和访问进行检查和控制,防火墙技术可以分为包过滤,电路级网关和应用层代理技术。防火墙最基本的功能就是控制在计算机网络中不同信任程度网络域之间传送的数据流。可以使用iptables为用户提供配置netfilter规则的命令行接口。

入侵检测技术

入侵者可分为:外部渗透者,假冒者,违法者,秘密用户。在入侵检测技术方面,围绕吴用检测和异常检测这两种基本检测技术分类,误用检测也成为特征检测,主要关注对复杂攻击特征的描述和检测,采用能够准确描述已知入侵行为的攻击特征库,因而能够保证较低的误报率,同时只需收集与特征描述相关的数据集合,有效的减少系统负担。异常检测方法则更加多种多样,代表性研究有采用统计分析方法的IDES统计异常检测器,NIDES,Haystack.从入侵检测系统的检测数据来源,可以将入侵检测系统分为基于主机的入侵检测系统(HIDS)和基于网络的入侵检测系统,根据入侵检测系统所采用的体系结构分类,可以分为集中式,层级式和协作式。

开源网络入侵检测系统:snort

snort是一款具备多种功能的强大工具,snort除了是一款跨平台,轻量级的网络入侵检测软件之外,还具备数据包嗅探,数据包分析与记录等多种功能,snort还支持内联模式,可以作为网络入侵防御系统使用。snort用C语言编写,并采用了标准的捕获数据包函数库libpcap.snort数据包嗅探器通过将网卡设置成混杂模式,然后利用libpcap抓包函数库进行数据包的监听和捕获。

视频教材内容总结

1.密码攻击

在线攻击

1)Cewl通过爬行网站获取关键信息创建一个密码字典

2)CAT很小的安全审计工具,扫描Cisco路由器的一般漏洞

3)Findmyhash在线哈希破解工具,借助在线破解哈希网站借口制作的工具


4)hydra黑客组织thc的一款开源密码攻击工具




ssh服务测试:passtxt是字典文件



5)Medusa属于暴力破解,需要强大的彩虹表


6)Ncrack突出RDP(3389)爆破功能



7)onesixtyone snmp扫描工具

8)Patator python编写的多服务工具

9)phrasen|drescher 多线程支持插件式密码破解工具
10)THC-PPTP-Bruter针对PPTP VPN端点(TCP端口1723)的暴力破解程序。

离线攻击

1)Creddump套件
Kali Linux下离线攻击工具中的Cache-dump、lsadump和pwdump均为creddump套件的一部分,基于Python的哈希抓取工具。
2)Chntpw
用来修改Window SAM文件实现系统密码修改,亦可在Kali作为启动盘时做删除密码的用途
3)Crunch
实用的密码字典生成工具,可以指定位数生成暴力枚举字典:
4)Dictstat
字典分析工具,可以分析出一个现有字典分部状况,也可按照一定的过滤器提取字典。
5)Fcrackzip
ZIP压缩包密码破解工具
6)Hashcat
hashcat只支持cpu破解,oclHashcat(分为AMD版和NIVDA版)和oclGausscrack则支持gpu加速
7)Hashid
哈希分析工具,可以判断哈希或哈希文件是何种哈希算法加密的。
HashIdentifyer
8)John the ripper
常用于Linux Shadow中账户的密码破解,社区版也支持MD5-RAW等哈希的破解
9)Johnny
图形化,更易操作
10)Ophcrack
彩虹表Windows哈希破解工具,对应有命令行版的ophcrack-cli。

ophcrack 3.7.0 by Objectif Securite (http://www.objectif-securite.ch)

Usage: ophcrack [OPTIONS]
Cracks Windows passwords with Rainbow tables

  -a              disable audit mode (default)
  -A              enable audit mode
  -b              disable bruteforce
  -B              enable bruteforce (default)
  -c config_file  specify the config file to use
  -D              display (lots of!) debugging information
  -d dir          specify tables base directory
  -e              do not display empty passwords
  -f file         load hashes from the specified file (pwdump or session)
  -g              disable GUI
  -h              display this information
  -i              hide usernames
  -I              show usernames (default)
  -l file         log all output to the specified file
  -n num          specify the number of threads to use
  -o file         write cracking output to file in pwdump format
  -p num          preload (0 none, 1 index, 2 index+end, 3 all default)
  -q              quiet mode
  -r              launch the cracking when ophcrack starts (GUI only)
  -s              disable session auto-saving
  -S session_file specify the file to use to automatically save the progress of the search
  -u              display statistics when cracking ends
  -t table1[,a[,b,...]][:table2[,a[,b,...]]]
                  specify which table to use in the directory given by -d
  -v              verbose
  -w dir          load hashes from encrypted SAM file in directory dir
  -x file         export data in CSV format to file


Example:	ophcrack -g -d /path/to/tables -t xp_free_fast,0,3:vista_free -f in.txt

		Launch ophcrack in command line using tables 0 and 3 in
		/path/to/tables/xp_free_fast and all tables in /path/to/tables/vista_free
		and cracks hashes from pwdump file in.txt

11)Pyrit
无线网络密码破解工具,借助GPU加速,可以让WPA2密码破解效率更高。
使用方法:
使用analyze检查抓到的包pyrit -r xxx.cap analyze
开始跑包(单纯字典)pyrit -r xxx.cap -i yyy.dic -b ssid attack_passthrough
将PYRIT与CRUNCH结合使用crunch 8 8 1234567890 | pyrit -i - -r /file/hack01-cap -b bssid attack_passthrough
12)Rcrack
彩虹表密码哈希工具,使用了第一代彩虹表(RT格式),当然有一点注意:使用彩虹表可以大大缩短哈希破解的实践,但前提是需要有足够容量的彩虹表。
13)Rcracki_mt
也是彩虹表哈希破解工具,不同的是此工具支持最新格式的彩虹表进行哈破解。
14)Rsmangler
字典处理工具,可以生成几个字串的所有可能组合形式,在生成社工字典时亦可用到。
15)Samdump2与BKhive
16)SIPCrack
针对SIP protocol协议数据包的破解工具,支持PCAP数据包与字典破解。
17)SUCrack
借助su命令进行本地root账户的密码破解
18)Truecrack
针对TrueCrack加密文件的密码破解工具

哈希传递

1.Passing the hash 套件
要进行哈希传递攻击,首先我们要有目标主机的哈希信息。
PTH套件每个工具都针对WIN下响应的EXE文件,如使用Pth-winexe可以借助哈希执行程序得到一个cmdshell。
2.Keimpx
有Python编写,可以通过已有的哈希信息得到一个后门SHELL。
3.Metasploit
模块exploit/windows/smb/psexec也可完成HASH攻击。
Metasploit是一款开源的安全漏洞检测工具,可以帮助安全和IT专业人士识别安全性问题,验证漏洞的缓解措施,并管理专家驱动的安全性进行评估,提供真正的安全风险情报。这些功能包括智能开发,代码审计,Web应用程序扫描,社会工程.

无线安全分析工具

1.Aircrack
主要功能有:网络侦测、数据包嗅探、WEP和WPA/WPA2-PSK破解。

Aircrack-ng 1.2 rc4 - (C) 2006-2015 Thomas d'Otreppe
  http://www.aircrack-ng.org

  usage: aircrack-ng [options] <.cap / .ivs file(s)>

  Common options:

      -a <amode> : force attack mode (1/WEP, 2/WPA-PSK)
      -e <essid> : target selection: network identifier
      -b <bssid> : target selection: access point's MAC
      -p <nbcpu> : # of CPU to use  (default: all CPUs)
      -q         : enable quiet mode (no status output)
      -C <macs>  : merge the given APs to a virtual one
      -l <file>  : write key to file

  Static WEP cracking options:

      -c         : search alpha-numeric characters only
      -t         : search binary coded decimal chr only
      -h         : search the numeric key for Fritz!BOX
      -d <mask>  : use masking of the key (A1:XX:CF:YY)
      -m <maddr> : MAC address to filter usable packets
      -n <nbits> : WEP key length :  64/128/152/256/512
      -i <index> : WEP key index (1 to 4), default: any
      -f <fudge> : bruteforce fudge factor,  default: 2
      -k <korek> : disable one attack method  (1 to 17)
      -x or -x0  : disable bruteforce for last keybytes
      -x1        : last keybyte bruteforcing  (default)
      -x2        : enable last  2 keybytes bruteforcing
      -X         : disable  bruteforce   multithreading
      -y         : experimental  single bruteforce mode
      -K         : use only old KoreK attacks (pre-PTW)
      -s         : show the key in ASCII while cracking
      -M <num>   : specify maximum number of IVs to use
      -D         : WEP decloak, skips broken keystreams
      -P <num>   : PTW debug:  1: disable Klein, 2: PTW
      -1         : run only 1 try to crack key with PTW

  WEP and WPA-PSK cracking options:

      -w <words> : path to wordlist(s) filename(s)

  WPA-PSK options:

      -E <file>  : create EWSA Project file v3
      -J <file>  : create Hashcat Capture file
      -S         : WPA cracking speed test
      -r <DB>    : path to airolib-ng database
                   (Cannot be used with -w)

  Other options:

      -u         : Displays # of CPUs & MMX/SSE support
      --help     : Displays this usage screen

另外,Aircrack-ng可以工作在任何支持监听模式的无线网卡上并嗅探802.11a、802.11b、802.11g的数据。该程序可运行在Linux和Windows上。
2.Cowpatty
WPA-PSK握手包密码破解工具

cowpatty 4.6 - WPA-PSK dictionary attack. <jwright@hasborg.com>
cowpatty: Must supply a pcap file with -r

Usage: cowpatty [options]

	-f 	Dictionary file
	-d 	Hash file (genpmk)
	-r 	Packet capture file
	-s 	Network SSID (enclose in quotes if SSID includes spaces)
	-c 	Check for valid 4-way frames, does not crack
	-h 	Print this help information and exit
	-v 	Print verbose information (more -v for more verbosity)
	-V 	Print program version and exit

3.EAPMD5PASS
针对EAP-MD5的密码破解工具
图形化的Fern WiFi cracker(Python编写)
如果有外置的无线网卡,然后虚拟机中勾选,就能通过接口扫描周围的无线网,扫描之后可以做进一步的攻击测试。
4.MDK3
是一款无线DOS攻击测试工具,能够发起BeaconFlood、AuthenticationDoS、Deauthentication/Disassocation Amok等模式的攻击,另外他还针对隐藏ESSID的暴力探测模式、802.1X渗透模式、WIDS干扰等功能。

MDK 3.0 v6 - "Yeah, well, whatever"
by ASPj of k2wrlz, using the osdep library from aircrack-ng
And with lots of help from the great aircrack-ng community:
Antragon, moongray, Ace, Zero_Chaos, Hirte, thefkboss, ducttape,
telek0miker, Le_Vert, sorbo, Andy Green, bahathir and Dawid Gajownik
THANK YOU!

MDK is a proof-of-concept tool to exploit common IEEE 802.11 protocol weaknesses.
IMPORTANT: It is your responsibility to make sure you have permission from the
network owner before running MDK against it.

This code is licenced under the GPLv2

MDK USAGE:
mdk3 <interface> <test_mode> [test_options]

Try mdk3 --fullhelp for all test options
Try mdk3 --help <test_mode> for info about one test only

TEST MODES:
b   - Beacon Flood Mode
      Sends beacon frames to show fake APs at clients.
      This can sometimes crash network scanners and even drivers!
a   - Authentication DoS mode
      Sends authentication frames to all APs found in range.
      Too much clients freeze or reset some APs.
p   - Basic probing and ESSID Bruteforce mode
      Probes AP and check for answer, useful for checking if SSID has
      been correctly decloaked or if AP is in your adaptors sending range
      SSID Bruteforcing is also possible with this test mode.
d   - Deauthentication / Disassociation Amok Mode
      Kicks everybody found from AP
m   - Michael shutdown exploitation (TKIP)
      Cancels all traffic continuously
x   - 802.1X tests
w   - WIDS/WIPS Confusion
      Confuse/Abuse Intrusion Detection and Prevention Systems
f   - MAC filter bruteforce mode
      This test uses a list of known client MAC Addresses and tries to
      authenticate them to the given AP while dynamically changing
      its response timeout for best performance. It currently works only
      on APs who deny an open authentication request properly
g   - WPA Downgrade test
      deauthenticates Stations and APs sending WPA encrypted packets.
      With this test you can check if the sysadmin will try setting his
      network to WEP or disable encryption.

5.wifite
自动化的无线网审计工具,可以完成自动化破解。由Python脚本编写,结合Aircrack-ng套件与Reaver工具。
6.Reaver
对开启WPS的路由器PIN码进行破解。

Reaver v1.6.1 WiFi Protected Setup Attack Tool
Copyright (c) 2011, Tactical Network Solutions, Craig Heffner <cheffner@tacnetsol.com>

Required Arguments:
	-i, --interface=<wlan>          Name of the monitor-mode interface to use
	-b, --bssid=<mac>               BSSID of the target AP

Optional Arguments:
	-m, --mac=<mac>                 MAC of the host system
	-e, --essid=<ssid>              ESSID of the target AP
	-c, --channel=<channel>         Set the 802.11 channel for the interface (implies -f)
	-o, --out-file=<file>           Send output to a log file [stdout]
	-s, --session=<file>            Restore a previous session file
	-C, --exec=<command>            Execute the supplied command upon successful pin recovery
	-D, --daemonize                 Daemonize reaver
	-f, --fixed                     Disable channel hopping
	-5, --5ghz                      Use 5GHz 802.11 channels
	-v, --verbose                   Display non-critical warnings (-vv for more)
	-q, --quiet                     Only display critical messages
	-h, --help                      Show help

Advanced Options:
	-p, --pin=<wps pin>             Use the specified pin (may be arbitrary string or 4/8 digit WPS pin)
	-d, --delay=<seconds>           Set the delay between pin attempts [1]
	-l, --lock-delay=<seconds>      Set the time to wait if the AP locks WPS pin attempts [60]
	-g, --max-attempts=<num>        Quit after num pin attempts
	-x, --fail-wait=<seconds>       Set the time to sleep after 10 unexpected failures [0]
	-r, --recurring-delay=<x:y>     Sleep for y seconds every x pin attempts
	-t, --timeout=<seconds>         Set the receive timeout period [5]
	-T, --m57-timeout=<seconds>     Set the M5/M7 timeout period [0.20]
	-A, --no-associate              Do not associate with the AP (association must be done by another application)
	-N, --no-nacks                  Do not send NACK messages when out of order packets are received
	-S, --dh-small                  Use small DH keys to improve crack speed
	-L, --ignore-locks              Ignore locked state reported by the target AP
	-E, --eap-terminate             Terminate each WPS session with an EAP FAIL packet
	-n, --nack                      Target AP always sends a NACK [Auto]
	-w, --win7                      Mimic a Windows 7 registrar [False]

Example:
	reaver -i mon0 -b 00:90:4C:C1:AC:21 -vv

原文地址:https://www.cnblogs.com/20189224sxy/p/10630882.html