Table of Contents
Background
Efficient Scan
Common Parameter Options Review
Fast Survival Scan
Optimize scanning
Specify service type scanning
Comprehensive vulnerability scanning command:
Specify vulnerability type scan - SMB
Commonly used scan Options
Vulnerability POC verification
Weak password detection
Writing of ftp weak password script command
Windows SMB weak password scan
SQL Server weak password scan
nmap --script external www.baidu.com
Copy after login
" >
nmap --script external www.baidu.com
Copy after login
nmap -p 80,443 --script=http-enum.nse www.baidu.com
Copy after login
" >
nmap -p 80,443 --script=http-enum.nse www.baidu.com
Copy after login
Home Operation and Maintenance Safety Example analysis of Nmap operations

Example analysis of Nmap operations

May 17, 2023 pm 12:22 PM
nmap

Background

With the development of the security industry, the country attaches great importance to it. Various industries suffer from various threats. Some companies of Party A do not have relevant security departments or their security capabilities are relatively weak, so they will hire Party B's security personnel to provide operational services. Then Party B's security engineers need to help customers deal with some security events that occur during business operations. For example, after a vulnerability occurs, our security engineers need to detect whether other business systems have the vulnerability and whether it needs to be repaired in time. We also need to output some results to facilitate customer reporting, as well as how to improve work efficiency, etc.

Efficient Scan

Common Parameter Options Review

Example analysis of Nmap operations

Fast Survival Scan

nmap  -T4  -n  -V  –sn  -iL  ip.txt   -oN  live_host.txt
Copy after login

Example analysis of Nmap operations

提示:-sn参数也是ping 扫描,不进行端口扫描。Sn扫描 和sp 扫描的区别是:sp扫描无法扫描出防火墙禁ping 的存活主机;而sn扫描。防火墙在禁ping状态下,防火墙把icmp包都丢弃了,依然能检测到存活的主机
-P0.-PS,-PA,-PU 扫描会进行端口开放扫描,而-Sp ,-sn 扫描则不会进行端口开放扫描
Copy after login

Optimize scanning

nmap  -T4  -n –v  --top-ports  “1000” –max-retries 3  --min-hostgroup   100  --host-timeout   18000ms  --max-rtt-timeout  500ms   --open  -iL  ip.txt  -oA  openport_result



提示:--max-rrt-timeout,  --host-timeout 在旧版本的nmap 中,默认单位为毫秒,在新版nmap7.80版本中,默认的单位是秒,如果想要设置毫秒单位,记得在数字后面加ms ,例如:
Copy after login

Example analysis of Nmap operations

Specify service type scanning

Only scan ports that open HTTP services

nmap  -T4 –n –v –p http* --max-retries 3 –min-hostgroup 30 –host-timeout 18000ms –open –iL ip.txt –oA httpport_result
Copy after login

Example analysis of Nmap operations

Comprehensive vulnerability scanning command:

nmap  -v  -n  -Pn  --script=vuln  -T4  --open  -M 5  -iL ip.txt  -oN vuln_scan_result.txt
Copy after login

Example analysis of Nmap operations

Specify vulnerability type scan - SMB

nmap  -T4  -n  -v  –script=smb*  --max-retries  3  --open   -iL  ip.txt   -oA  smbvuln_result
Copy after login

Example analysis of Nmap operations

Commonly used scan Options

Example analysis of Nmap operations

Vulnerability POC verification

You can use batch processing scripts to write Nmap’s vulnerability POC one-click verification script tool, which is simple and easy to use

Example analysis of Nmap operations

Weak password detection

命令如下:

Nmap  -sT  -p  目标应用端口  -v  -n  -Pn   --script = 弱口令扫描脚本  --script-args   userdb=用户名字典,passdb=弱口令字典  -iL    ip.txt   -oN   result.txt
Copy after login

Example analysis of Nmap operations

Writing of ftp weak password script command

Example analysis of Nmap operations

Windows SMB weak password scan

nmap -v -n -sT -d --script=smb-brute.nse --script-args userdb=smb_user.dic,passdb=week.txt -p 445,139 -oN res.txt -iL ip.txt
Copy after login

Example analysis of Nmap operations

SQL Server weak password scan

nmap –v –n  -sT –script ms-sql-brute.nse –script-args userdb= conf\mssql_user.dic,passdb=conf\weekpassword.txt  -p 1433  -oN result\mssql_result.txt   -iL  ip.txt
Copy after login

Example analysis of Nmap operations

##Execute ms-sql-xp- cmdshell.cmd="net users" IP

Example analysis of Nmap operationsExample analysis of Nmap operations

Detailed whois analysis

nmap --script external www.baidu.com
Copy after login

Example analysis of Nmap operations

Scan web directory

nmap -p 80,443 --script=http-enum.nse www.baidu.com
Copy after login

Example analysis of Nmap operations

Scanning results

https://github.com/mrschyte/nmap-converter
或者  nmaptocsv
Copy after login
pip install XlsxWriter


pip install python-libnmap
Copy after login

Example analysis of Nmap operations

Example analysis of Nmap operations##Convert xml document to HTML

安装 xsltproc


xsltproc -o test01.htm t.xml
Copy after login

Example analysis of Nmap operationsUse the modified template to output the html file:

xsltproc -o test02.htm xslt模板.xsl test01.xml
Copy after login

Example analysis of Nmap operations

The above is the detailed content of Example analysis of Nmap operations. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What category does the operation and maintenance security audit system belong to? What category does the operation and maintenance security audit system belong to? Mar 05, 2025 pm 03:59 PM

This article examines operational security audit system procurement. It details typical categories (hardware, software, services), budget allocation (CAPEX, OPEX, project, training, contingency), and suitable government contracting vehicles (GSA Sch

What are the job safety responsibilities of operation and maintenance personnel What are the job safety responsibilities of operation and maintenance personnel Mar 05, 2025 pm 03:51 PM

This article details crucial security responsibilities for DevOps engineers, system administrators, IT operations staff, and maintenance personnel. It emphasizes integrating security into all stages of the SDLC (DevOps), implementing robust access c

What does the operation and maintenance safety engineer do? What does the operation and maintenance safety engineer do? Mar 05, 2025 pm 04:00 PM

This article explores the roles and required skills of DevOps, security, and IT operations engineers. It details the daily tasks, career paths, and necessary technical and soft skills for each, highlighting the increasing importance of automation, c

The difference between operation and maintenance security audit system and network security audit system The difference between operation and maintenance security audit system and network security audit system Mar 05, 2025 pm 04:02 PM

This article contrasts Operations Security (OpSec) and Network Security (NetSec) audit systems. OpSec focuses on internal processes, data access, and employee behavior, while NetSec centers on network infrastructure and communication security. Key

What is operation and maintenance security? What is operation and maintenance security? Mar 05, 2025 pm 03:54 PM

This article examines DevSecOps, integrating security into the software development lifecycle. It details a DevOps security engineer's multifaceted role, encompassing security architecture, automation, vulnerability management, and incident response

What is the prospect of safety operation and maintenance personnel? What is the prospect of safety operation and maintenance personnel? Mar 05, 2025 pm 03:52 PM

This article examines essential skills for a successful security operations career. It highlights the need for technical expertise (network security, SIEM, cloud platforms), analytical skills (data analysis, threat intelligence), and soft skills (co

What is operation and maintenance security? What is operation and maintenance security? Mar 05, 2025 pm 03:58 PM

DevOps enhances operational security by automating security checks within CI/CD pipelines, utilizing Infrastructure as Code for improved control, and fostering collaboration between development and security teams. This approach accelerates vulnerabi

Main work of operation and maintenance security Main work of operation and maintenance security Mar 05, 2025 pm 03:53 PM

This article details operational and maintenance (O&M) security, emphasizing vulnerability management, access control, security monitoring, data protection, and physical security. Key responsibilities and mitigation strategies, including proacti

See all articles