漏洞扫描

  • Post author:
  • Post category:其他




【主机漏洞】HTTP TRACE / TRACK Methods Allowed

1、影响说明

TRACE and TRACK are HTTP methods that are used to debug web server connections.

TRACE 和 TRACK方法是 web 服务器连接的调试方法.

Servers supporting this method are subject to cross-site-scripting attacks when

used in conjunction with various weaknesses in browser.

这些 HTTP 方法被开启时可能导致服务器容易遭受 (与其他多种浏览器漏洞配合的) XSS 攻击

TRACE方法用于调用请求消息的远程应用层回送。
请求的最终接收方应该以 200(OK)响应的实体主体向客户端反映接收到的消息。
TRACE 可让客户端查看在请求链的另一端收到什么,并将这项数据用于测试或诊断信息
TRACE方法是HTTP(超文本传输)协议定义的一种协议调试方法,该方法使得服务器原样返回任何客户端请求的内容。
恶意攻击者可以通过TRACE方法返回的信息了解到网站前端的某些信息,如缓存服务器等,从而为进一步的攻击提供便利。

2、检测方法

  • 基于 Nmap 的方式

    nmap -n -p80 -sT –script http-methods,http-trace 192.168.1.1

  • 使用 curl, 如果该问题已修复,服务器会返回 405 Method Not Allowed 的响应

    curl -i -X TRACE

    http://192.168.1.1/

3、解决方案

4、

常见的HTTP Method深度解析



SSH 支持弱加密算法漏洞(SSH Weak Algorithms Supported)

1、漏洞描述

SSH的配置文件中加密算法没有指定,默认支持所有加密算法,包括 arcfour,arcfour128,arcfour256等弱加密算法。

这个漏洞属于SSH的配置缺陷,SSH服务启用了Arcfour (也称RC4)这个不安全算法。

2、漏洞验证

使用 nmap 、Nessus 等工具可以进行验证,这里使用 nmap 进行验证。

使用 Nmap 验证:

nmap –script ssh2-enum-algos -sV -p 22 10.4.225.229

在这里插入图片描述

可以看到支持 arcfour、arcfour128、arcfour256 等弱加密算法。

3、漏洞修复

  • 方案一:修改 SSH 配置文件,添加加密算法:

vi /etc/ssh/sshd_config

最后添加一下内容(去掉 arcfour、arcfour128、arcfour256 等弱加密算法)

Ciphersaes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc

保存文件后重启 SSH 服务:service sshd restart

验证

ssh -vv -oCiphers=aes128-cbc,3des-cbc,blowfish-cbc

ssh -vv -oMACs=hmac-md5

  • 方案二:升级 openssh 版本为最新版本


SSL Weak Cipher Suites Supported(SSL支持弱密码套件)

修改SSL配置文件中的的SSL Cipher参数

不同Web服务软件的配置文件位置及参数名称不同,需根据实际情况查找。

具体安全算法配置可参考此网站:

https://cipherli.st/


如Apache修改以下内容:

在这里插入图片描述

验证方法:

nmap -p 443 –script “ssl-enum-ciphers” xx.xx.xx.xx

作者:Shad0wpf

链接:

https://www.jianshu.com/p/0106ff85df0b


来源:简书

简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。



【主机漏洞】 Apache Tomcat Default Files

1、影响说明

docs, examples 等目录以及默认的 404 页面会泄露 Tomcat 的版本信息。

此外,攻击者可以利用 example 中的部分示例代码读写 session, 有一定潜在危害。

2、检测方法


http://192.168.1.1:8080/docs/



http://192.168.1.1:8080/examples/



http://192.168.1.1:8080/PageNotExist.jsp


也可以使用 wget 来访问。

wget –no-check-certificate

https://192.168.112.114/PageNotExist.jsp

3、修复参考

1 删除 /docs/, /examples/。

2 隐藏 404 页面的 Tomcat 版本信息,可以考虑使用自定义的 404 页面

4、修复细节

对于隐藏 404 页面的 Tomcat 版本信息,以下两种方案二选一即可,建议使用重打包 Tomcat jar 的方式。

5、自定义 404 页面

Tomcat配置400/404/500自定义错误页面


https://blog.csdn.net/JustinQin/article/details/78879185


how to build server level custom error page in tomcat?


https://stackoverflow.com/questions/13914575/how-to-build-server-level-custom-error-page-in-tomcat


史上最全 web.xml 配置文件元素详解


https://www.cnblogs.com/hafiz/p/5715523.html


web.xml 参考


https://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html

6、隐藏 Tomcat 版本信息

重打包 Tomcat jar


https://jingyan.baidu.com/article/d2b1d102a9dc955c7e37d487.html



http://blog.51cto.com/chicozy/1878453

unzip catalina.jar
vim org/apache/catalina/util/ServerInfo.properties
#
# server.info=Apache Tomcat
# server.number=0.0.0.0
# server.built=Nov 7 2016 20:05:27 UTC
#
jar uvf catalina.jar org/apache/catalina/util/ServerInfo.properties

# restart tomcat


AMQP Cleartext Authentication(AMQP明文验证)

1、详情

远程高级消息队列协议(AMQP)服务支持一种或多种允许以明文形式发送凭据的身份验证机制。

2、禁用AMQP配置中的明文身份验证机制。



DNS 服务器缓存窥探攻击

参考:

https://support.microsoft.com/zh-cn/help/2678371/microsoft-dns-server-vulnerability-to-dns-server-cache-snooping-attack




web漏洞描述以及修复建议



Network Time Protocol (NTP) Mode 6 Scanner

修改NTP配置文件

#vi /etc/ntp.conf

添加以下内容(建议使用此方式):

restrict default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

或在提供NTP查询的网段加入noquery参数:

restrict 1.1.2.1 mask 255.255.255.0 nomodify notrap noquery

建议方法中两条配置为高版本NTP中的默认配置,noquery参数限制了mode 6 query,可根据NTP服务端实际配置参考修改。
noquery:Deny ntpq and ntpdc queries. Time service is not affected.
notrap:Decline to provide mode 6 control message trap service to matching hosts.
nomodify:Deny ntpq and ntpdc queries which attempt to modify the state of the server.
参考文档:http://doc.ntp.org/current-stable/accopt.html
http://support.ntp.org/bin/view/Support/AccessRestrictions


SMB Password Encryption Not Required

Linux:修改smb配置文件

#vi /etc/samba/smb.conf

添加以下内容:

encrypt passwords = yes

其它和密码明文相关的参数有client plaintext auth =no、client NTLMv2 auth = yes、min protocol = LANMAN1等
如min protocol = SMB2,密码加密将不生效,依然为密码明文传输。
Samba配置参考:https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html


SMB Signing Disabled

Linux:修改smb配置文件

#vi /etc/samba/smb.conf

添加以下内容:

server signing = mandatory

Windows:编辑注册表

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters

修改RequireSecuritySignature值为1



SNMP使用默认团体名

SNMP团体名可猜

SNMP团体名可读

修改SNMP默认community的值

参考链接




https://blog.csdn.net/qq_40606798/article/details/86512610





https://www.jianshu.com/p/0106ff85df0b