免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3638 | 回复: 10
打印 上一主题 下一主题

怎么设置SSH远程扫描不提示版本号及其它信息呢? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-29 23:07 |只看该作者 |倒序浏览
subject "怎么设置SSH远程扫描不提示版本号及其它信息呢?"

我用telnet 到我的系统22端口就有提示: SSH-2.0-OpenSSH_3.6.1 NetBSD_Secure_Shell-20030917
这些信息,请问大家怎么去设置屏蔽这些信息的出现呢? 谢谢大家!!

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2007-03-29 23:44 |只看该作者
sshd:
Current banner: SSH-2.0-OpenSSH_3.5p1
Banner lay-out: SSH-version-OpenSSH_version
Wanted banner: SSH-2.0-OpenSSH
Howto:
Open /version.h and cut the "_3.5p1" from the end. Re-compile and it's done.

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
3 [报告]
发表于 2007-03-29 23:44 |只看该作者
proftpd:
Current banner: 220 ProFTPD 1.2.7 Server (FTP for: ) []
Banner lay-out: “response_code product_name product_version Server (ServerName) [hostname]”
Wanted banner: 220 Microsoft FTP Service (Version 5.0).
Howto:
Open /src/main.c and search for “if((id = find_config(server->conf,CONF_PARAM,"ServerIdent",FALSE))”. Comment (/* if-block */) the whole if-block and add the following line under the if-block:
send_response("220", "%s", server->ServerName);
Now re-compile proftpd. After compiling edit proftpd.conf and change the “ServerName” directive to " Microsoft FTP Service (Version 5.0).".

sshd:
Current banner: SSH-2.0-OpenSSH_3.5p1
Banner lay-out: SSH-version-OpenSSH_version
Wanted banner: SSH-2.0-OpenSSH
Howto:
Open /version.h and cut the "_3.5p1" from the end. Re-compile and it's done.

postfix:
Current banner: 220 ESMTP Ready and Serving.
Banner lay-out: “response_code hostname ESMTP additional_information”
Wanted banner: 220 Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Tue, 18 Mar 2003 18:35:40 +0100
Howto:
Open postfix’s main.cf (configuration file) and search for “smtpd_banner”. Change the banner to whatever you want. The problem: Microsoft’s ESMTP sends a date back, Postfix can’t. However, the file /src/global/mail_date.c returns a time in this form: "Mon, 9 Dec 1996 05:38:26 -0500 (EST)". So, if you really want to pretend to be Microsoft’s ESMTP do the following:
Before compiling, open /src/smtpd/smtpd.c and search for the line "smtpd_chat_reply(state, "220 %s", var_smtpd_banner);" and replace it with these two lines:
state->time = time((time_t *) 0);
smtpd_chat_reply(state, "220 %s ready at %s", var_smtpd_banner, mail_date(state->time));
Now recompile, edit the main.cf to say " Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329" and you're done.

apache:
Current banner: Apache/1.3.27 (Unix) mod_perl/1.25 PHP/4.2.3
Banner lay-out: “BASEPRODUCT/BASEREVISION (OS) Apache modules”
Wanted banner: Microsoft-IIS/5.0
Howto:
Open /src/include/httpd.h and search for:
#define SERVER_BASEVENDOR “Apache Group”
#define SERVER_BASEPRODUCT “Apache”
#define SERVER_BASEREVISION “”
Change this to the desired values (BASEVENDOR: Microsoft, BASEPRODUCT: Microsoft-IIS, BASEREVISION: 5.0). Now re-compile apache.
Next: open your httpd.conf and search for the ServerTokens directive. If it’s not there, add it. Set ServerTokens to Min (“ServerTokens Min”). More information about the ServerTokens directive is at: http://carnagepro.com/pub/Docs/A ... .html#servertokens.

teapop:
Current banner: +OK Teapop [v0.3.5] - Teaspoon stirs around again <1048009854.3FB15180@Llywellyn>
Banner lay-out: "POP_OK Teapop [version] - banner - "
Wanted banner: +OK Microsoft Exchange 2000 POP3 server version 6.0.6249.0 () ready.
Howto: The file /teapop/pop_hello.c contains the following line:
"pop_socket_send(pinfo->out, "%s Teapop [v%s] - %s %s", POP_OK, POP_VERSION, POP_BANNER, pinfo->apopstr);"
Change this line to:
"pop_socket_send(pinfo->out, "%s Microsoft Exchange 2000 POP3 server version 6.0.6249.0 () ready.", POP_OK);"
Now re-compile and it's done.

论坛徽章:
0
4 [报告]
发表于 2007-03-30 00:06 |只看该作者
好象要重新编译ssh

论坛徽章:
0
5 [报告]
发表于 2007-03-30 00:22 |只看该作者
.

屏蔽这个字符串可不是明智的防攻击办法。攻击者完全有理由,也有必要来忽略掉它,从而攻破有漏洞的 SSHd。正确的方法是,经常关注 Security Advisory,对每一处可能造成潜在威胁的漏洞进行修补。

.

论坛徽章:
0
6 [报告]
发表于 2007-03-30 10:03 |只看该作者
我就不晓得怎么修补——怎么自动修补
请指教

论坛徽章:
0
7 [报告]
发表于 2007-03-30 15:13 |只看该作者
请教怎么去修补这些有漏洞的软件呢? 系统上自带的第三方软件怎么去修补.同时想问一下,如果不想用系统自带的第三方软件,在系统运行中怎么去干净的清掉它呢?如ipf等软件.谢谢!!

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
8 [报告]
发表于 2007-03-30 15:52 |只看该作者
原帖由 yjl 于 2007-3-30 15:13 发表
请教怎么去修补这些有漏洞的软件呢? 系统上自带的第三方软件怎么去修补.同时想问一下,如果不想用系统自带的第三方软件,在系统运行中怎么去干净的清掉它呢?如ipf等软件.谢谢!!


不执行它不就得了。

论坛徽章:
0
9 [报告]
发表于 2007-03-30 17:33 |只看该作者
要让系统不用的服务最少和不用的软件清最干净的呢?  假如不想要ipf这个软件,我们要怎么才能把它从系统上彻底删掉呢?

论坛徽章:
0
10 [报告]
发表于 2007-03-30 17:40 |只看该作者
.

ipf 是内核的一部分。ipf 可以当作防火墙使用,建议保留。长城上一定是有漏洞的,但不能因噎废食把长城给拆了——那样岂不是让匈奴长驱直入?

有少数已知漏洞的软件,新三年、旧三年、缝缝补补又三年;漏洞太多,多到没办法补了或者没人愿意去修补,那么发行版的维护者会适时地将其清除。

指望自动修补也是不现实的,起码要有一些安全意识吧?

.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP