修改常见服务器的banner
干货写在前面
httpd.conf配置
ServerTokens ProductOnly
ServerSignature Off
ProxyVia Block
php.ini配置
expose_php=Off
curl -I yourdomain.com 能看到什么? Server: Apache xxx PHP xxx XXX xxx ,明码实价,一字排开。这是干嘛,卖菜呢?
我们不妨看看 curl -I www.google.com 结果如何:
HTTP/1.1 302 Found
Cache-Control: private
Location: http://sorry.google.com/sorry/?continue=http://www.google.com/
Date: Mon, 12 Jan 2009 06:57:41 GMT
Content-Type: text/html; charset=UTF-8
Server: GFE/1.3
Content-Length: 259
请注意这里 Google 的前端 Web Server 是 GFE/1.3 (Google Front Edge 1.3),至于它具体对应 Apache 1.3.x 还是 Windows 1.3,我们并不知晓。这样就起到了很好的信息隐藏作用,一旦网上发现 Apache 1.3.x 或者 Windows 1.3 的最新漏洞,黑客们并不会直接联想到 GFE/1.3,自然也就不会来多作尝试了。
所以,我们应该把这些不可告人的秘密都隐藏起来,哪怕放一段文字广告(如:[AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
),也比卖菜似的一一详细罗列版本要好。
参考解决方案:
1. Lighttpd 1.4.20
src/response.c:108
改为:
buffer_append_string_len(b, CONST_STR_LEN("/r/nServer: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]"));
输出 Header:
HTTP/1.1 404 Not Found
Content-Type: text/html
Content-Length: 345
Date: Mon, 12 Jan 2009 13:54:02 GMT
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
2. Nginx 0.7.30
src/http/ngx_http_header_filter_module.c:48-49
改为:
static char ngx_http_server_string[] = "Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]" CRLF;
static char ngx_http_server_full_string[] = "Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]" CRLF;
输出 Header:
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
Date: Mon, 12 Jan 2009 14:01:10 GMT
Content-Type: text/html
Content-Length: 151
Last-Modified: Mon, 12 Jan 2009 14:00:56 GMT
Connection: keep-alive
Accept-Ranges: bytes
3. Cherokee 0.11.6
cherokee/version.c:93
添加:
ret = cherokee_buffer_add_str (buf, "[AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]");
return ret;
输出 Header:
Connection: Keep-Alive
Keep-Alive: timeout=15
Date: Mon, 12 Jan 2009 14:54:39 GMT
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
ETag: 496b54af=703
Last-Modified: Mon, 12 Jan 2009 14:33:19 GMT
Content-Type: text/html
Content-Length: 1795
4. Apache 2.2.11
server/core.c:2784
添加:
ap_add_version_component(pconf, "[AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]");
return;
输出 Header:
Date: Mon, 12 Jan 2009 14:28:10 GMT
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT
ETag: "1920edd-2c-3e9564c23b600"
Accept-Ranges: bytes
Content-Length: 44
Content-Type: text/html
5. Squid 3.0 STABLE 11
src/globals.cc:58
改为:
const char *const full_appname_string = "[AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]";
输出 Header:
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
Mime-Version: 1.0
Date: Mon, 12 Jan 2009 15:25:15 GMT
Content-Type: text/html
Content-Length: 1553
Expires: Mon, 12 Jan 2009 15:25:15 GMT
X-Squid-Error: ERR_INVALID_URL 0
X-Cache: MISS from 'cache.hutuworm.org'
Via: 1.0 'cache.hutuworm.org' ([AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ])
Proxy-Connection: close
6. Tomcat 6.0.18
java/org/apache/coyote/http11/Constants.java:56 和 java/org/apache/coyote/ajp/Constants.java:236
均改为:
ByteChunk.convertToBytes("Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]" + CRLF);
输出 Header:
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
ETag: W/"7857-1216684872000"
Last-Modified: Tue, 22 Jul 2008 00:01:12 GMT
Content-Type: text/html
Content-Length: 7857
Date: Mon, 12 Jan 2009 16:30:44 GMT
7. JBoss 5.0.0 GA
a. tomcat/src/resources/web.xml:40
改为
[AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
b. 下载 JBoss Web Server 2.1.1.GA srctar (http://www.jboss.org/jbossweb/downloads/jboss-web/)
均改为:
java/org/apache/coyote/http11/Constants.java:56 和 java/org/apache/coyote/ajp/Constants.java:236
ByteChunk.convertToBytes("Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]" + CRLF);
将编译所得 jbossweb.jar 覆盖 JBoss 编译输出文件:
JBOSS_SRC/build/output/jboss-5.0.0.GA/server/all/deploy/jbossweb.sar/jbossweb.jar
JBOSS_SRC/build/output/jboss-5.0.0.GA/server/standard/deploy/jbossweb.sar/jbossweb.jar
JBOSS_SRC/build/output/jboss-5.0.0.GA/server/default/deploy/jbossweb.sar/jbossweb.jar
JBOSS_SRC/build/output/jboss-5.0.0.GA/server/web/deploy/jbossweb.sar/jbossweb.jar
输出 Header:
Server: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
X-Powered-By: [AD: DangDang http://tinyurl.com/2dangdang ][ Your AD Here ][AD: Joyo http://tinyurl.com/2amazon ]
Accept-Ranges: bytes
ETag: W/"1581-1231842222000"
Last-Modified: Tue, 13 Jan 2009 10:23:42 GMT
Content-Type: text/html
Content-Length: 1581
Date: Tue, 13 Jan 2009 10:30:42 GM
修改常见服务器的banner相关推荐
- 英灵神殿修改服务器名字吗,《Valheim英灵神殿》服务器彩色名称设置教程及常见服务器问题讲解...
<Valheim英灵神殿>玩家们可以通过服务器进行联机,但是有一些关于服务器的问题不少新人服主还不明白,下面请看"他是龙"分享的<Valheim英灵神殿>服 ...
- 怎么修改远程服务器的地址,怎么修改远程服务器的地址
怎么修改远程服务器的地址 内容精选 换一换 已成功登录Java性能分析.待安装Guardian的服务器已开启sshd.待安装Guardian的服务器已安装JRE,JRE版本要求为Huawei JDK ...
- 如何修改游戏服务器端的数据,如何修改网络游戏服务器数据
如何修改网络游戏服务器数据 内容精选 换一换 排查安全组规则.排查网络ACL.排查弹性云服务器内部网卡信息.排查不通端口.相同,请查看同一个VPC内的两台弹性云服务器无法互通或者出现丢包等现象时,如何 ...
- 常见服务器返回状态码
常见服务器返回状态码 输入网址后会发生什么 1. 200 服务器正确处理请求,并将请求的资源放在响应体中返回给客户. 2. 204 若服务器拒绝对PUT.POST或者DELETE请求返回任何状态信息或 ...
- 魔兽世界怎么修改登录服务器地址,wow如何修改登录服务器地址
wow如何修改登录服务器地址 内容精选 换一换 代码迁移工具进行代码迁移时,需要调用Linux下的rpm.deb等命令才能完成扫描和迁移相关任务,这些命令和逻辑必须在后端Linux运行.插件只支持以W ...
- wow修改默认服务器地址,wow如何修改登录服务器地址
wow如何修改登录服务器地址 内容精选 换一换 华为云帮助中心,为用户提供产品简介.价格说明.购买指南.用户指南.API参考.最佳实践.常见问题.视频帮助等技术文档,帮助您快速上手使用华为云服务. 华 ...
- godaddy域名修改解析服务器,GoDaddy域名解析设置(详细图解教程) URL转发
一.Godaddy域名解析设置 1.登陆域名管理页面 首先打开Godaddy官网:,登陆自己的Godaddy账户,然后点击导航条里的Domain Manager,接着点击自己注册的域名,具体操作如下: ...
- 如何修改手机服务器地址,手机服务器地址修改
手机服务器地址修改 内容精选 换一换 云手机实例是以整台服务器的形式购买的,在购买时选择不同手机开数的实例规格,最终可获得的云手机数量也不一样.本章节将为您详细介绍购买服务器的操作步骤.登录管理控制台 ...
- 安卓系统改服务器地址,安卓修改定位服务器地址
安卓修改定位服务器地址 内容精选 换一换 日志记录了系统的运行情况和功能流程的处理情况,是维护人员查看系统状态.进行问题定位的重要工具和手段.日志模块根据系统设置的日志级别,记录不同详细程度的内容,满 ...
- ansible批量修改linux服务器密码的playbook
从网上找到批量修改Linux服务器root密码的playbook. 使用方法: 1.输入要修改的inventory组 2.按需要,在playbook中输入要修改的IP.新密码,如下: - hosts: ...
最新文章
- 【django】配置数据库(mysql)
- sockaddr与 sockaddr_in
- 将图片处理成圆形_如何把图片批量处理成指定/固定的文件大小/体积以内?
- Magento微信支付接口开发小记
- 计算机硬件配置组件,配置vcenter server的硬件(默认指windows版本的)
- 整型和浮点型之间的转化
- linux性能调优干货,【干货分享】详解Linux性能调优之tuned特性
- MyBatis参数为Integer型并赋值为0时判断失误的问题解决
- 081 re正则表达式模块
- 轨迹跟踪算法——Stanley法
- Matplotlib:初学者绕不开的库,详解50种常用可视化图表!
- 电视机与计算机共享,win7与智能电视怎么共享
- 从 git 的历史记录中彻底删除文件或文件夹
- mysql高并发和大流量_高并发-高并发和大流量解决方案
- 实现微信小程序与微信生态的互相跳转H5入口
- enc28j60 linux 驱动_linux enc28j60网卡驱动移植(硬件spi和模拟spi)
- Caffe2自定义Operator
- MySQL 常见时间获取整理(当日、当月、当年、上一日、上一月、上一年,当月第一天,当年第一天等等)
- C语言实现网络聊天室 socket的简单应用
- Chromium 基础库使用说明(入门必看)
热门文章
- 面向对象---基础概念
- 仿真:自动生成战争地图
- manifest.json文件的 “name” “description” “version 字段解释
- .Net Compact Framework 高级篇(2)-- 扩展SOAP应用
- The Furthest Distance In The World
- 关于rstudio的一些快捷键
- 时间序列深度学习:状态 LSTM 模型预测太阳黑子(二)
- k8s控制平面 scheduler部署
- 如何用纯 CSS 创作 404 文字变形为 NON 文字的交互特效
- Linux 入门记录:五、vi、vim 编辑器