Introduction
pshitt (for Passwords of SSH Intruders Transferred to Text) is a lightweight fake SSH server designed to collect authentication data sent by intruders. It basically collects username and password used by SSH bruteforce software and writes the extracted data to a file in JSON format.
pshitt is written in Python and use paramiko to implement the SSH layer.
Running pshitt
Go into the source directory and run
./pshitt -o passwords.json
This will run a fake SSH server listening on port 2200 to catch authentication data sent by the intruders. Information about SSH connection attempt will be stored in the passwords.json using JSON as format
{"username": "root", "src_ip": "116.10.191.184", "password": "P@ssword", \
"src_port": 41397, "timestamp": "2014-06-25T21:35:21.660303"}
Full options are available via ‘-h’ option
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
Using pshitt data
As the format is JSON, it is easy to use the data in data analysis software such as Splunk or Logstash.
Here’s a sample configuration for 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"
}
}
Basically, it is just enough to mention that the pshitt.log file is using JSON format.
Metadata
Release files for pshitt 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pshitt-1.0.1.tar.gz | 5.6 kB | Without provenance | Details for pshitt-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pshitt-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pshitt-1.0.1-py3-none-any.whl |
Total release size: 23.4 kB
Release files / pshitt-1.0.1.tar.gz
| Download URL | pshitt-1.0.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
740720a140f1bee73bb150a3243dcbd9e111019c230db2d601ad026162569432
|
|
BLAKE2b-256 checksum How to use checksums |
eb21a0ff73dabebfe911d60b8508cc248a93f3b65d3e2a9922e1ca792b15fec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
|
Release files / pshitt-1.0.1-py3-none-any.whl
| Download URL | pshitt-1.0.1-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37152129502975975ca55c886b026956852f9736821860b6e51bc8252b89486d
|
|
BLAKE2b-256 checksum How to use checksums |
b0c7975b8f3d994c4b3c2cdeeb9964346f68a5f9d25dcd86ebaa140fe80dc6a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
|
Security for pshitt 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.