How to use Masscan, Nmap and ELK to collect intranet assets
This article will explain in detail how to use Masscan, Nmap and ELK to collect intranet assets. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Installation
Install masscan
# yum install git gcc make libpcap-devel# git clone https://github.com/robertdavidgraham/masscan# cd masscan# make# cp bin/masscan / bin
Install the latest nmap 7.8
Wget https://nmap.org/dist/nmap-7.80-1.x86_64.rpmrpm-ivh nmap-7.80-1.x86_64.rpm
Install es and kibana
Docker run-d-- name es-p 127.0.0.1 name es 9201 ES_JAVA_OPTS= 9200-p 9300 ES_JAVA_OPTS= "- Xms2G-Xmx2G"-e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch-oss:7.1.1 docker run-- name kibana- d-p 5601 ELASTICSEARCH_HOSTS= http://127.0.0.1:9201 docker.elastic.co/kibana/kibana-oss:7.1.1
The general logic is that
1. Use Masscan for host survival scan.
2, and then use Nmap to scan the surviving hosts above and export xml
3, format xml, write to es, and then kibana to do visualization
Upper code
Code address: https://github.com/njcx/nmap_to_es.git
Use kibana for visualization:
On how to use Masscan, Nmap, ELK to do intranet asset collection is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.