2014年8月12日 星期二

[研究] yersinia 0.7.3多協定攻擊測試工具安裝(CentOS 6.5 x64_86)

[研究] yersinia 0.7.3多協定攻擊測試工具安裝(CentOS 6.5 x64_86)

2014-08-12

官方網站
http://www.yersinia.net/index.htm

yersinia 是對網路實體做分析和測試的工具,支援下面協定

Spanning Tree Protocol (STP)
Cisco Discovery Protocol (CDP)
Dynamic Trunking Protocol (DTP)
Dynamic Host Configuration Protocol (DHCP)
Hot Standby Router Protocol (HSRP)
IEEE 802.1Q
IEEE 802.1X
Inter-Switch Link Protocol (ISL)
VLAN Trunking Protocol (VTP)

下載
http://www.yersinia.net/download/
http://www.yersinia.net/download/yersinia-0.7.3.tar.gz

需要套件

- Pcap library at least 0.8, you can get it at:
http://www.tcpdump.org

- Libnet library at least 1.1.2, you can get it at:
http://www.packetfactory.net/libnet

預計安裝步驟

cd /usr/local/src

#wget  http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
wget  http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh  epel-release-6-8.noarch.rpm

yum -y install gcc tcpdump libnet libnet-devel libpcap libpcap-devel

wget http://www.yersinia.net/download/yersinia-0.7.3.tar.gz
mkdir -p yersinia-0.7.3
tar zxvf yersinia-0.7.3.tar.gz -C yersinia-0.7.3
cd yersinia-0.7.3
./configure
make
make install

實際情況

./configure 會出現錯誤

more than one set found in:
/usr/include
/usr/include/pcap

please wipe out all unused pcap installations

這是因為有兩個 pcap.h,一個在 /usr/include/pcap/pcap.h,一個在  /usr/include/pcap.h
解決方法有兩個,把 /usr/local/include/pcap.h 移掉,
mv /usr/local/include/pcap.h /usr/local/include/pcap.h_
或者執行 ./configure 時候加上路徑
./configure --with-pcap-include=/usr/local/include/pcap/pcap.h


[root@localhost yersinia-0.7.3]# ./configure --with-pcap-includes=/usr/include/pcap/pcap.h
會出現錯誤
checking for a complete set of pcap headers... no
!!! couldn't find a complete set of pcap headers

換成
[root@localhost yersinia-0.7.3]# ./configure --with-pcap-includes=/usr/include/pcap.h
會出現錯誤
checking for a complete set of pcap headers... no
!!! couldn't find a complete set of pcap headers

換一招
[root@localhost yersinia-0.7.3]# mv /usr/include/pcap.h /usr/include/pcap.h_
[root@localhost yersinia-0.7.3]# ./configure
會出現錯誤

configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met:

No package 'gtk+-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PACKAGE_CFLAGS
and PACKAGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


安裝 gtk2 相關,再執行 ./configure
[root@localhost yersinia-0.7.3]# yum -y install gtk2 gtk2-devel
[root@localhost yersinia-0.7.3]# ./configure
...(略)
 Yersinia, our beloved one, has been configured with the following options.
                         Remote admin : true
                          Use ncurses : false
                              Use gtk : yes

把 ncurses 也安裝吧
[root@localhost yersinia-0.7.3]# yum -y install ncurses ncurses-devel
[root@localhost yersinia-0.7.3]# ./configure
...(略)
 Yersinia, our beloved one, has been configured with the following options.
                         Remote admin : true
                          Use ncurses : true
                              Use gtk : yes


接下來 make 和 make install 都成功了
[root@localhost yersinia-0.7.3]# make 
[root@localhost yersinia-0.7.3]# make install

整理一下安裝步驟


cd /usr/local/src

wget  http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh  epel-release-6-8.noarch.rpm

yum -y install gcc tcpdump libnet libnet-devel libpcap libpcap-devel gtk2 gtk2-devel ncurses ncurses-devel

wget http://www.yersinia.net/download/yersinia-0.7.3.tar.gz
mkdir -p yersinia-0.7.3
tar zxvf yersinia-0.7.3.tar.gz -C yersinia-0.7.3
cd yersinia-0.7.3
mv /usr/include/pcap.h /usr/include/pcap.h_
./configure
make
make install


測試

[root@localhost yersinia-0.7.3]# yersinia
GNU yersinia 0.7.3 $Date: 2006/03/23 08:40:14 $
Try 'yersinia -h' to display the help.


MOTD: Do you have any Alcatel or Juniper switch? Share it!! ;)
[root@localhost yersinia-0.7.3]#


[root@localhost yersinia-0.7.3]# yersinia -h
    Û²ÛÛ²²Û
   ²Û°°°²²Û²²
 Û²²²°ÛÛÛ°²Û²²
²²°²°Û±²±Û²°°²²²Û
°²°°Û±²±²²±Û²²°²²Û
²°²°Û±²±±²²±Û°°²°²²               Yersinia...
²²°°²Û²²±²²±²±Û°²ÛÛ²²²
Û²²²°Û±²²²±±²²±ÛÛ°²°ÛÛ²²²         The Black Death for nowadays networks
 ²²²°²ÛÛ±²²²²²²²²±Û°°²²°²²
 ²ÛÛ°°²°Û±²²±±±²²²²²±Û°²²Û²²             by Slay & tomac
  Û²²Û²°°Û±²²²±±²²²²²²±Û²°°²²Û
     ²²Û²°Û±±²²±±±±±±²²²±Û°²°²Û        http://www.yersinia.net
      Û²°²²ÛÛ±±±²²±±±±²²²ÛÛÛ²Û²            yersinia@yersinia.net
       Û²²°°²ÛÛ±±±²²²±²²²ÛÛ²°ÛÛ
         ²Û²°²²°Û±±±²²²²±Û²°Û²²
         ²Û²²Û°²°ÛÛÛÛÛ±ÛÛ°²²²²     Prune your MSTP, RSTP, STP trees!!!!
             ²²Û°°²²²°°²°°Û²²


Usage: yersinia [-hVGIDd] [-l logfile] [-c conffile] protocol [protocol_options]
       -V   Program version.
       -h   This help screen.
       -G   Graphical mode (GTK).
       -I   Interactive mode (ncurses).
       -D   Daemon mode.
       -d   Debug.
       -l logfile   Select logfile.
       -c conffile  Select config file.
  protocol   One of the following: cdp, dhcp, dot1q, dot1x, dtp, hsrp, isl, mpls, stp, vtp.

Try 'yersinia protocol -h' to see protocol_options help

Please, see the man page for a full list of options and many examples.
Send your bugs & suggestions to the Yersinia developers <yersinia@yersinia.net>



MOTD: My notebook is totally deprecated... gimme one!... :)
[root@localhost yersinia-0.7.3]#


[root@localhost yersinia-0.7.3]# yersinia protocol -h
yersinia: Unknown protocol protocol!!


MOTD: The nightly bird catches the worm ;)
[root@localhost yersinia-0.7.3]#

[root@localhost yersinia-0.7.3]# yersinia -G




(完)

相關

[研究] yersinia 0.7.3多協定攻擊測試工具安裝(CentOS 6.5 x64_86)
http://shaurong.blogspot.com/2014/08/yersinia-073centos-65-x6486.html

[研究] yersinia 0.7.1 多協定攻擊測試工具安裝(Fedora 20 x64)
http://shaurong.blogspot.tw/2014/01/yersinia-071-fedora-20-x64.html

[研究] yersinia 多協定攻擊測試工具安裝(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20318

[研究] yersinia 多協定攻擊測試工具安裝(Fedora 15 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20384

沒有留言:

張貼留言