| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
JameyGuinn
8年前发布

SSLyze:快速全面的SSL安全扫描器

来自: http://www.freebuf.com/tools/99151.html

SSLyze是一个Python打造的工具,它可以分析我们用于连接某服务器的SSL配置。其设计出来就是为了帮助组织和测试人员,快速发现会影响他们SSL服务器的错误配置。

主要特点

多进程+多线程扫描:速度会非常快。

SSLyze也可以作为库文件,从python直接调用运行扫描和处理结果。

性能测试:session resumption和TLS票据支持。

安全测试:弱密码套件,不安全的renegotiation,CRIME、心脏滴血攻击。

服务器证书检查,通过OCSP stapling进行SSL撤销检查。

支持SMTP、XMPP、LDAP、POP、IMAP、RDP、PostGres、FTP协议的StartTLS握手。

支持扫描服务器时,用于交互验证的客户端证书。

扫描结果可以写入XML或者JSON文件进行进一步处理。

开始使用

下载地址: https://github.com/nabla-c0d3/sslyze

SSLyze可以通过pip直接安装:

  pip install sslyze

直接从repository库里获取代码,然后进行安装也是很方便的。

  git clone https://github.com/nabla-c0d3/sslyze.git  cd sslyze  pip install -r requirements. txt --target./lib

然后我们可以使用命令行工具来扫描服务器了:

  python sslyze_cli. py --regularwww.yahoo.com:443 www.google.com

SSLyze已经在以下平台通过测试:

  Windows 7 (32 and 64 bits)  Debian 7 (32 and 64 bits)  OS X El Capitan

作为库文件使用

从SSLyze v0.13.0开始,它就可以被当作直接扫描和处理结果的python模块。

# Script to get the list of SSLv3 ciphersuites supported by smtp.gmail.com

hostname = 'smtp.gmail.com'

try:

# First we must ensure that the server is reachable

server_info = ServerConnectivityInfo(hostname=hostname, port=587,

tls_wrapped_protocol=TlsWrappedProtocolEnum.STARTTLS_SMTP)

server_info.test_connectivity_to_server()

except ServerConnectivityError as e:

raise RuntimeError('Error when connecting to {}: {}'.format(hostname,e.error_msg))

# Get the list of available plugins

sslyze_plugins = PluginsFinder()

# Create a process pool to run scanningcommands concurrently

plugins_process_pool =PluginsProcessPool(sslyze_plugins)

# Queue a scan command to get the server'scertificate

plugins_process_pool.queue_plugin_task(server_info,'sslv3')

# Process the result and print thecertificate CN

for plugin_result inplugins_process_pool.get_results():

if plugin_result.plugin_command == 'sslv3':

# Do something with the result

print 'SSLV3 cipher suites'

for cipher in plugin_result.accepted_cipher_list:

print '    {}'.format(cipher.name)

关于扫描的详细命令,可参见sslyze_cly. py –help命令。

他们运行时都能使用python的多进程模块,每条命令都会返回一个 PluginResult 对象,其中包含正在扫描的命令的结果(比如 –tlsv1 的密码套件列表),这些属性对于每个插件和命令都是单独隶属的,但是在每个插件的模块里都有记录。

想要知道更多情况么?请查看 api_sample.py 的 Python API 示例。

Windows 可执行文件

Release 处有个预编译的 windows 可执行文件,你也可以通过下面的方法来生成:

  python.exe setup_py2exe.py py2exe  

*参考来源: kitploit ,FB小编dawner编译,转载请注明来自FreeBuf黑客与极客(FreeBuf.COM)

 本文由用户 JameyGuinn 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1458203809102.html
SSL协议 Python 加密/解密软件包