隐藏APACHE Banner信息
1、没有隐藏banner之前用扫描器的结果:
$ nmap -sV www.xxx.com -p 80
Starting Nmap 5.21 ( https://nmap.org ) at 2011-01-02 20:20 中国标准时间
Nmap scan report for www.xxx.com (1.1.1.1) Host is up (0.039s latency).
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd 2.2.9 ((Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_perl/2.0.4 Perl/v5.10.0)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 16.15 seconds
2、修改apache配置文件类似如下:
xxx:/etc/apache2/conf.d# more security
# Disable Server Info on HTTP HEADERS
ServerTokens Prod
# Disable Server Signature on error pages
ServerSignature Off
# Disable TRACE method
TraceEnable Off
3、再次扫描结果如下:
Starting Nmap 5.21 ( https://nmap.org ) at 2011-01-02 20:29 中国标准时间
Nmap scan report for www.xxx.com (1.1.1.1)
Host is up (0.015s latency).
PORT STATE SERVICE VERSION
80/tcp open http Apache httpd
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 20.46 seconds