如何使用evilscan 掃描網路

語言: CN / TW / HK
Evilscan 是一個網路掃描器,它執行在 NodeJS 環境中。有許多種選項,允許使用者掃描單個 IP 地址或一個範圍的IP。它還允許使用者選擇掃描單個埠或一組埠。
環境

Centos8

npm(Node包管理器)

安裝

從github中克隆該倉庫,如果系統沒有安裝git和npm需要提前安裝:

[[email protected] ~]# yum -y install git npm
[[email protected] ~]# git clone https://github.com/eviltik/evilscan.git
Cloning into 'evilscan'...
remote: Enumerating objects: 901, done.
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 901 (delta 88), reused 114 (delta 46), pack-reused 723
Receiving objects: 100% (901/901), 12.97 MiB | 5.66 MiB/s, done.
Resolving deltas: 100% (545/545), done.

進入evilscan工作目錄並安裝:

[[email protected] ~]# cd evilscan/
[[email protected] evilscan]# npm install -g evilscan
/usr/local/bin/evilscan -> /usr/local/lib/node_modules/evilscan/bin/evilscan.js
+ [email protected]
added 4 packages from 4 contributors in 6.476s
使用方式

使用下面命令可以檢視evilscan的幫助資訊:

[[email protected] ~]# evilscan --help

Usage: evilscan  [options]

Example: evilscan --target=192.168.0.0/24 --port=21-23,80

Options:
  --port          port(s) you want to scan, examples:
                  --port=80
                  --port=21,22
                  --port=21,22,23,5900-5900

  --reverse       display DNS reverse lookup
  --reversevalid  only display results having a valid reverse dns, except if
                  ports specified
  --geo           display geoip (free maxmind)
  --banner        display grabbed banner when available
  --bannerraw     display raw banner (as a JSON Buffer)
  --bannerlen     grabbed banner length in bytes
                  default 512
  --progress      display progress indicator each seconds

  --status        ports status wanted in results (example --status=OT)
                  T(timeout)
                  R(refused)
                  O(open, default)
                  U(unreachable)

  --scan          scan method
                  tcpconnect (full connect, default)
                  tcpsyn (half opened, not yet implemented)
                  udp (not yet implemented)

  --concurrency   max number of simultaneous socket opened
                  default 500

  --timeout       maximum number of milliseconds before closing the connection
                  default 2000

  --hugescan      allow number of ip/port combinaison greater than 16580355
                  (i.e a /24 network with port range 0-65535)
  --display       display result format (json,xml,console)
                  default console
  --outfile       dump result in a file

  --json          shortcut for --display=json
  --xml           shortcut for --display=xml
  --console       shortcut for --display=console
  --help          display help
  --about         display about
  --version       display version number

如何使用evilscan 掃描網路如何使用evilscan 掃描網路

使用例項

語法:

evilscan  [options]

掃描網路中的一臺主機上的0-4000埠,抓取banner並僅顯示open的埠:

[[email protected] ~]# evilscan 192.168.0.10 --port=0-4000 --banner
192.168.0.10|139||open                                                                                    
192.168.0.10|135||open                                                                                    
192.168.0.10|110||open                                                                                    
192.168.0.10|25||open                                                                                     
192.168.0.10|445||open                                                                                    
192.168.0.10|2381||open                                                                                   
192.168.0.10|2301||open                                                                                   
192.168.0.10|3389||open

如何使用evilscan 掃描網路如何使用evilscan 掃描網路
掃描網路中的一臺主機上的0-100埠,抓取banner,僅顯示開啟的埠,使用json格式輸出,每秒顯示進度狀態:

[[email protected] ~]# evilscan 192.168.0.13 --port=0-100 --banner --isopen --istimeout --progress --json
{"_timeStart":"N/A","_timeElapsed":"N/A","_jobsTotal":100,"_jobsRunning":0,"_jobsDone":0,"_progress":0,"_concurrency":500,"_status":"Starting","_message":"Starting"}
{"_timeStart":1628685339594,"_timeElapsed":999,"_jobsTotal":100,"_jobsRunning":100,"_jobsDone":0,"_progress":0,"_concurrency":500,"_status":"Running","_message":"Scanning 192.168.0.13:100"}
{"_timeStart":1628685339594,"_timeElapsed":2003,"_jobsTotal":100,"_jobsRunning":100,"_jobsDone":0,"_progress":0,"_concurrency":500,"_status":"Running","_message":"Scanning 192.168.0.13:100"}
{"ip":"192.168.0.13","port":25,"status":"open"}
{"ip":"192.168.0.13","port":22,"banner":"SSH-2.0-OpenSSH_7.9-hpn14v15\\r\\n","status":"open"}
{"ip":"192.168.0.13","port":80,"status":"open"}
{"_timeStart":1628685339594,"_timeElapsed":2019,"_jobsTotal":100,"_jobsRunning":0,"_jobsDone":100,"_progress":100,"_concurrency":500,"_status":"Finished","_message":"Scanned 192.168.0.13:80"}

如何使用evilscan 掃描網路如何使用evilscan 掃描網路
提示:併發數預設為100。如果想掃描大量的 ip/埠範圍,可以使用 --concurrency 選項(例如 1000)。

如果要突破 1024 個開啟套接字的限制,使用下面命令更新限制引數:

ulimit -u unlimited
總結

Evilscan 是一個網路掃描器,它執行在 NodeJS 環境中。有許多種選項,允許使用者掃描單個 IP 地址或一個範圍的IP。它還允許使用者選擇掃描單個埠或一組埠。

本文原創地址:https://www.linuxprobe.com/use-evilscan-network.html