博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SSLyze:快速全面的SSL安全扫描器
阅读量:3726 次
发布时间:2019-05-22

本文共 2247 字,大约阅读时间需要 7 分钟。

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文件进行进一步处理。

开始使用

下载地址:

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.pyPython API示例。

Windows可执行文件

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

python.exe setup_py2exe.py py2exe
*参考来源:,FB小编dawner编译,转载请注明来自FreeBuf黑客与极客(FreeBuf.COM)
你可能感兴趣的文章
shell 将字符串分割成数组
查看>>
shell遍历文件夹及去掉文件后缀名
查看>>
shell命令执行hive脚本
查看>>
Hive分区+根据分区查询
查看>>
shell按分隔符截取字符串
查看>>
hive插入分区报错SemanticException Partition spec contains non-partition columns
查看>>
hive清空表删除分区
查看>>
Hive统计日首次登陆游戏的用户数
查看>>
Hive去重统计
查看>>
Hive的桶表
查看>>
Flume概述安装及实操
查看>>
Sqoop概述安装及实操
查看>>
干货:解码OneData,阿里的数仓之路
查看>>
数据孤岛浅谈
查看>>
数据湖详解
查看>>
数据仓库和数据集市的概念、区别与联系
查看>>
Zookeeper概述安装及实操
查看>>
Hadoop完全分布式搭建
查看>>
List小练习之统计字母数
查看>>
List小练习之随机生成十个不重复数存入
查看>>