2016年8月22日 星期一

[研究] Zmap 2.1.1 網路掃描器安裝 (CentOS 7-1511 (7.2) x64 ))

[研究] Zmap 2.1.1 網路掃描器安裝 (CentOS 7-1511 (7.2) x64 ))

2016-08-22

https://zmap.io/

安裝
https://zmap.io/download.html

使用
https://zmap.io/documentation.html

測試環境:CentOS 7-1511 (7.2) x64

照 Zmap 官方網站,應該可用 yum 安裝,實際上不行

[root@localhost ~]# yum -y install zmap
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.tc.edu.tw
 * extras: ftp.tc.edu.tw
 * updates: ftp.tc.edu.tw
No package zmap available.
Error: Nothing to do
[root@localhost ~]#

抓 tar.gz 安裝吧

# su root
yum -y install cmake gmp gmp-devel libpcap-devel gengetopt byacc flex
#No package gengetopt available.  (少了,先不理會看看)

cd  /usr/local/src
wget  https://github.com/zmap/zmap/archive/v2.1.0.tar.gz
tar  v2.1.0.tar.gz
cd zmap-2.1.0/
yum -y install gcc
cmake -DENABLE_DEVELOPMENT=OFF 
make 
make install.

cmake 會出錯
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 2.8.12 or higher is required.  You are running version 2.8.11



-- Configuring incomplete, errors occurred!

ftp://ftp.gnu.org/gnu/gengetopt
cd /usr/local/src
wget ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.tar.gz
tar zxvf gengetopt-2.22.tar.gz
cd  gengetopt-2.22
yum  -y  install   gcc   gcc-c++
yum -y install gcc gcc-c++ make autoconf automake gawk binutils
./configure
./make

strlen was not declared in this scope
失敗

EPEL 有 zmap-2.1.1-1.el7.x86_64.rpm

rpm   -Uvh   https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
yum   -y   zmap

[root@localhost src]#  zmap -p 80 -o results.csv  192.168.0.0/16 -i eno16777736
Aug 22 14:21:19.986 [WARN] blacklist: ZMap is currently using the default blacklist located at /etc/zmap/blacklist.conf. By default, this blacklist excludes locally scoped networks (e.g. 10.0.0.0/8, 127.0.0.1/8, and 192.168.0.0/16). If you are trying to scan local networks, you can change the default blacklist by editing the default ZMap configuration at /etc/zmap/zmap.conf.
Aug 22 14:21:19.990 [ERROR] blacklist: no addresses are eligible to be scanned in the current configuration. This may be because the blacklist being used by ZMap (/etc/zmap/blacklist.conf) prevents any addresses from receiving probe packets.
Aug 22 14:21:19.990 [FATAL] zmap: unable to initialize blacklist / whitelist
[root@localhost src]#

換一個非 local 的 IP   XXX.XXX.XXX.XXX ( 請不要照抄,用自己可以測試的 IP)

[root@localhost src]#  zmap -p 80 -o results.csv   XXX.XXX.XXX.XXX/32 -i eno16777736
Aug 22 14:26:06.316 [WARN] blacklist: ZMap is currently using the default blacklist located at /etc/zmap/blacklist.conf. By default, this blacklist excludes locally scoped networks (e.g. 10.0.0.0/8, 127.0.0.1/8, and 192.168.0.0/16). If you are trying to scan local networks, you can change the default blacklist by editing the default ZMap configuration at /etc/zmap/zmap.conf.
Aug 22 14:26:06.321 [WARN] zmap: too few targets relative to senders, dropping to one sender
Aug 22 14:26:06.322 [INFO] zmap: output module: csv
 0:00 0%; send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:00 0%; send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:01 13%; send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:02 25%; send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:03 38%; send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:04 50%; send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:05 63% (3s left); send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:06 75% (2s left); send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
 0:07 88% (1s left); send: 1 done (51 p/s avg); recv: 0 0 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 0.00%
Aug 22 14:26:14.369 [INFO] zmap: completed
[root@localhost src]#

(完)

相關

[研究] Zmap 2.1.1 安裝 (CentOS 7-1511 (7.2) x64 ))
http://shaurong.blogspot.com/2016/08/zmap-211-centos-7-1511-72-x64.html

[研究] Zmap 1.2.1 安裝 (CentOS 7.0 x64)
http://shaurong.blogspot.com/2014/10/zmap-121-centos-70-x64.html

[研究] Zmap 1.2.1 (yum)安裝 (CentOS 6.7 x64) http://shaurong.blogspot.com/2016/02/zmap-121-yum-centos-67-x64.html

[研究] Zmap 1.2.1安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/10/zmap-121-centos-65-x64.html

沒有留言:

張貼留言