How to scan whole Internet 3.7 billion IP addresses in few minutes?

2024-05-31 01:38

本文主要是介绍How to scan whole Internet 3.7 billion IP addresses in few minutes?,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Cyber security audit and ethical hacking training professionals normally use scanner to scans the networks. Scanning every IP address on the internet isn’t an easy job, and if you don’t have the resources of a botnet, a single scan can take months. If you want to take snapshots of the internet it will be very difficult, because doing a network scan of the whole thing has typically taken weeks or months to complete. However this is now possible explains cyber security services expert with the help of new tools like ZMap Masscan and other tools. In this article we will be covering different advance port scanning tools.

Zmap

ZMap is designed to execute widespread scans of the IPv4 address space or large portions of it. It is a very powerful tool for cyber security services researchers, and you can scan the entire IPv4 address space by using its high rate of 1.4 million packets per second. ZMap can’t replace general-purpose mappers like Nmap, which is excellent for scanning sub-networks in depth. ZMap is intended to do a shallow scan - typically of a single port or service - of the entire internet, or at least the IPv4 internet, from a single, dedicated computer, in under an hour. Ame Wilson, cyber security audit services consultant mentions that ZMap is proficient of scanning the IPv4 public address space over 1300 times faster than the Nmap.
ZMap is able to work so fast because it uses cyclic multiplicative groups. ZMap has been designed to achieve parallelism and performance. First, ZMap is completely stateless, which means that it does not maintain status per connection. In place of maintaining a big list of probes it’s sent, and the time they’ve been out there, and how much longer it should wait for each one, and thoroughly updating the list with every acknowledged response, ZMap just use cyclic multiplicative group to avoid all this explains Ame Wilson, cyber security audit services consultant.
Second, ZMap sends in parallel as many probes as the network bandwidth permits, in order to attain the maximum rate possible. Normally all the probes are sent in a pseudo-random order, so that’s if lot of people do scan together there is no DDOS attack, this way the probability to overload a single network is greatly reduced. Although each successive probe follows a strict algorithmic sequence, the IP numbers randomly bounce around the IPv4 address space. Thus, we don’t get thousands of probes delivered in on a single subnet at the same time.

Because of these reasons with ZMap we can scan about 3.7 billion addresses available for use in IPv4 addresses, in an hour thus ZMap really can crawl across the entire internet.

By default, ZMap will execute a TCP SYN scan on the particular port at the maximum rate possible. A more different configuration will be to scan 10,000 random addresses on port 80 at a maximum 10 Mbps and can be run as follows:

$ ZMap --bandwidth=10M --target-port=80 --max-targets=10000 --output-file=results.csv

You can also use ZMap to scan specific subnets or CIDR blocks. For instance, to scan only 10.0.0.0/8 and 192.168.0.0/16 on port 80, run:

$ ZMap -p 80 -o results.csv 10.0.0.0/8 192.168.0.0/16

As per cyber security services expert, normally when we use ZMap, it will deliver a list of distinct IP addresses that answered successfully (e.g. with a SYN ACK packet). Also it is recommended to use a blacklist file, with which you can exclude both reserved/unallocated IP space (e.g. multicast, RFC1918), as well as companies or military networks that should be excluded from your scans. By default, ZMap will employ a simple blacklist file having reserved and unallocated addresses and this file can be found in /etc/ZMap/blacklist.conf.

MASSCAN: Mass IP port scanner

Masscan is one of the fastest Internet port scanner as it can scan the all the IP’s of the Internet in less than 6 minutes, while transmitting 10 million packets per second mentions ethical hacking training professor. It produces output similar to Nmap and employs asynchronous transmission. The only big difference is that Masscan is faster than these other scanners. Also, it’s more flexible, allowing arbitrary address ranges and port ranges. Masscan uses a its own custom TCP/IP stack which means anything other than simple port scans will cause inconsistency with the local TCP/IP stack. This means we should either use the -S option to use a separate IP address, or configure your operating system to firewall the ports that Masscan uses.

While Linux is the primary platform on which Masscan works, the code runs well on many other operating systems like:

• Windows w/ Visual Studio
• Windows w/ MingGW
• Windows w/ cygwin
• Mac OS X /w XCode
• Mac OS X /w cmdline
• FreeBSD

To reach beyond two million packets per second, we need an Intel 10-gbps Ethernet adapter and a special driver called as “PF_RING DNA”. Masscan doesn’t need to be rebuilt in order to use PF_RING. To use PF_RING, you need to build the following components:

• libpfring.so (installed in /usr/lib/libpfring.so)
• pf_ring.ko (their kernel driver)
• ixgbe.ko (their version of the Intel 10-gbps Ethernet driver)

Masscan can be used to for different purposes than just detect whether ports are open as per cyber security services experts. It can also be used to complete the TCP connection and interaction with the application at that port in order to grab simple “banner” information. The trouble with this is that Masscan contains its own custom TCP/IP stack separate from the operating system you run it on. When the local system accepts a SYN-ACK from the probed target machines, it replys with a RST packet that kills the connection before Masscan can grab the banner. The easiest way to stop this is to allocate Masscan a separate IP address.

How to scan the entire Internet

The software is designed really with the entire Internet, while it is also very useful for smaller, internal networks. When you run it for the internet, it might look something like this:

# masscan 0.0.0.0/0 -p0-65535

It is very bad to scan the entire Internet. For one thing, some organizations of the Internet react badly to being scanned. For another thing, some websites track scans and can add you to a blacklist, which will get you, firewalled from useful websites of the Internet. Therefore, it sis suggested to exclude a lot of IP ranges. To exclude IP ranges, you want to use the following syntax:

# masscan 0.0.0.0/0 -p0-65535 --excludefile exclude.txt 

Scanrand

Scanrand is a high speed port scanner, route-tracer and very efficient in scanning explains ethical hacking training professor of international institute o cyber security. It is a fast network scanner that can scan single hosts to very large networks easily. Scanrand supports what is called stateless TCP scanning, which sets it apart from the other network scanners. Scanrand takes a different approach than the typical network scanner and implements more of a, ‘fire and forget’ ideology using little math.

Scanrand divides itself up into two processes. One process is accountable for doing nothing but sending out SYN packets using libnet. The other process is accountable for getting the responses from the remote computers using libpcap. One significant thing to note here is that these processes work separately. There is no consulting with the other process. Scanrand stores a list of IP addresses it is expecting a response from and the sending process does not wait for a response at all. It fires off a SYN, and then moves on to the next target leaving the receiving process to sort out the inundation of responses.

Unicornscan

Unicornscan is an open source (GPL) tool and intended to assist with information gathering and security auditing. As we all know that Nmap sets the standard for port scanning on both windows and UNIX systems. Nevertheless full range UDP and TCP port scans (65k ports) take a long time to finish. Unicornscan resolves this problem and excels at speed. Unicornscan is an asynchronous stateless port scanner that implements its own TCP/IP stack. Unicornscan passes the ports that are found to Nmap and/or Amap for further analysis.

Scanning Best Practices

Cyber security audit services experts offer these advices for researchers performing Internet-wide scans as guidelines for good Internet citizenship.

• Organize closely with local network administrators to diminish the risks and handle inquiries.
• Authenticate that scans will not overload the local network or upstream provider.
• Indicate the nature of the scans in web pages and DNS entries of the source addresses.
• Plainly explain the reason and scope of the scans in all interactions.
• Provide a simple form of opting out and honor requests promptly.
• Perform scans no larger or more frequent than is necessary for research objectives.
• Distribute scan traffic over time or source addresses when feasible.

It should go without saying that scan researchers should abstain from exploiting vulnerabilities or accessing protected resources, and should comply with any special legal requirements in their jurisdictions.

Security concerns and ethical problems

As usual, the capacity to almost instantly find out computers and networks that have un-patched security vulnerabilities can be a good thing for researchers, but it can be used for evil gain by the hackers out there. These are for sure great tools and will doubtless be accepted by many researchers. However, such potent Internet scanners can be used by hackers for malicious behavior such as vulnerability detection and exploitation. The only thing a hacker needs is a potent machine and a network with a high upload speed. Nowadays, these requirements can be easily fulfilled by a cloud virtual machine. The presence of these tools proves also that the time window between the presence of detection of vulnerability and its detection by hackers is getting shorter day by day. For this reason, it is important to properly secure your own infrastructure and protect personal/business data.
Ethical hacking training professor advices that these tools should be tools should be used cautiously without invading someone else’s privacy as anybody can use them.


  • masscan VS zmap VS unicornscan VS scanrand

http://www.iicybersecurity.com/internet-port-scanner.html

  • masscan
    https://github.com/robertdavidgraham/masscan
    http://tools.kali.org/information-gathering/masscan

  • zmap
    https://github.com/zmap/zmap/
    https://zmap.io/paper.pdf

这篇关于How to scan whole Internet 3.7 billion IP addresses in few minutes?的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1017209

相关文章

[vivado][IP核]FFT

刘东华的IP核详解: 1、 2、

[vivado][IP核]DDS

刘东华的IP核详解: 1、 这里的是指IP核配置中的相位数据的宽度。 2、 实际使用此IP核时并没有“频率分辨率”可以配,是靠改变来变的。 3、 4、 5、 数据输出的ready在数据正式输出时才会有。 自己仿真: 使用SIN/COS LUT only的模式,使用一个累加器作为相位输入,不知怎么,输出为X。

[ip核][vivado]aurora

Xapp1193:  discovered:1)并不是所有芯片都支持aurora.xc7z010就没有。                     2)XDC文件的指令-允许未约束的引脚的存在:                 set_property BITSTREAM.General.UnconstrainedPins {Allow} [current_design] PG046

[ip核][vivado]Block Menory Gennerator 学习

<刘东华的xilinx系列FPGA芯片IP核详解>读书摘录: 1. 2. 3.

[ip核][vivado]FIFO 学习

<xlinx FPGA应用进阶 通用IP核详解和设计开发>读书摘录: 1.        2.3.仿真模型 特点总结:1)复位后会有busy状态,需要等待wr_rst_busy信号低电平后才能正常写入                  2)prog_full信号的高电平长度可调                  3)仿真中的读状态很奇怪,并没有正常读取,都是XXX的状态。 所用的te

局域网内vue2 配置本地IP地址访问项目

在日常开发中同事可能需要访问你的前端项目,可以通过配置实现通过ip访问 一.首先找到config文件夹目录下的 index.js文件             将此处的host的值修改为0.0.0.0(即 host: 0.0.0.0) // Various Dev Server settings//host: 'localhost' //将localhost进行替换成 0.0.0.0host:

hbase scan的java操作

public class HbaseTest {public static void main(String[] args) throws Exception {//构建基本信息String table = "t_userBehavior2";final TableName tableName = TableName.valueOf(table);final HTable hTable = new

理解什么是DSR,嗅探器视角下的IP和MAC地址识别(C/C++代码实现)

网络嗅探器是监控和分析网络流量的一种工具,它能够捕获数据包并提取出关键的信息,比如IP地址和MAC地址。 网络嗅探器工作原理基于网卡的工作模式。正常情况下,网卡只处理发送给它的数据包,忽略其他数据。但是,如果将网卡设置为“混杂模式”,那么它可以接收到网络上所有的数据包,而不仅仅是发给它的数据包。网络嗅探器就是利用了这一特性来捕获网络上的数据交换。 数据包是网络通信的基本单位,包含了传输数据和控

webstorm 允许他人通过ip访问项目

webstorm 允许他人通过ip访问项目 如题,在网上搜配置局域网ip访问项目的相关问题,很多都有解释,这里主要是针对wenbstorm设置后依旧无法访问,做下记录。 如图所示,端口需要4位数,相应的地方需要打钩,到这一步,基本就可以通过ip和端口进行远端项目访问。如果还不行,基本就是防火墙的问题。解决步骤如下: 打开windows防火墙,找到webstorm,此时应该处于关闭

访问网站时IP被屏蔽是什么原因?

在互联网使用中,有时我们可能会遇到访问某个网站时IP地址被屏蔽的情况。IP地址被网站屏蔽是一个相对常见的现象,而导致这种情况的原因多种多样,包括恶意行为、违规访问等。本文将解释IP地址被网站屏蔽的常见原因,同时,我们将提供用户解决IP屏蔽问题的解决方案 一、IP地址被网站屏蔽的常见原因 1、恶意行为: 恶意行为是导致IP地址被网站屏蔽的一大原因。这些行为包括但不限于大规模网络爬虫、DDoS攻