SSH入侵者密码转为文本
pshitt的Python项目详细描述
简介
pshitt(用于将SSH入侵者的密码转换为文本)是一个轻量级的 设计用于收集入侵者发送的身份验证数据的伪造SSH服务器。 它主要收集SSH bruteforce软件使用的用户名和密码 并将提取的数据写入JSON格式的文件中。在
pshitt是用Python编写的,并使用paramiko实现SSH层。在
运行pshitt
进入源目录并运行
./pshitt -o passwords.json
这将运行一个监听端口2200的伪SSH服务器来捕获身份验证 入侵者发送的数据。有关SSH连接尝试的信息将是 以JSON格式存储在passwords.json中
^{pr2}$通过'-h'选项提供完整选项
usage: pshitt [-h] [-o OUTPUT] [-k KEY] [-l LOG] [-p PORT] [-t THREADS] [-v] [-D] Passwords of SSH Intruders Transferred to Text optional arguments: -h, --help show this help message and exit -o OUTPUT, --output OUTPUT File to export collected data -k KEY, --key KEY Host RSA key -l LOG, --log LOG File to log info and debug -p PORT, --port PORT TCP port to listen to -t THREADS, --threads THREADS Maximum number of client threads -v, --verbose Show verbose output, use multiple times increase verbosity -D, --daemon Run as unix daemon
使用pshitt数据
由于格式是JSON,所以很容易在数据分析中使用数据 Splunk或Logstash等软件。在
下面是logstash的配置示例
input { file { path => [ "/var/log/pshitt.log" ] codec => json type => "json-log" } } filter { # warn logstash that timestamp is the one to use if [type] == "json-log" { date { match => [ "timestamp", "ISO8601" ] } } # optional but geoip is interesting if [src_ip] { geoip { source => "src_ip" target => "geoip" add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ] add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ] } mutate { convert => [ "[geoip][coordinates]", "float" ] } } } output { elasticsearch { host => "localhost" } }
基本上,只要提到pshitt.log文件是 使用JSON格式。在
- 项目
标签: