HOMESCRIPTSPROJECTSREADINGCV
|
Please donate if you find SSH Canary (sshcanary) useful.BTC: 1GwYToq2AuUWUfJJ7NeCpksfjMth7bw7TuLTC: LKh99yzPeXZ7jQgvGgRhkTGReN4TRK4C6p SSH Canary (sshcanary) can be found on GitHub. You can clone the repository directly from github:
Or you can download the current distribution tarball: sshcanary v0.6 What is sshcanaryd?SSH Canary is a ver low interaction honeypot specifically designed to gather information about potential attackers that attemp to brute-force into a system using SSH.Why use it?If you are tired of the constant SSH brute-force noise from your IDS and installing fail2ban is just too simple for you, you can use SSH Canary to monitor attackers and better understand the attributes of their campaigns against your systems. It is also nice to know if their dictionaries include some of your passwords at the same time.Once you have some date, you can start looking into the patterns associated with the brute forcing tools and campaigns as shown in the next two heat maps distilling 12 months of log data from sshcanary. |
|
% ssh-keygen -t rsa -f server.key |
|
# /sbin/iptables -A PREROUTING -t nat -p tcp --dport 22 -j REDIRECT --to-port 2222 |
|
# /sbin/iptables -A PREROUTING -t nat -p tcp -s ! 192.168.10.0/24 --dport 22 \ -j REDIRECT --to-port 2222 |
|
# sshcanaryd -l /var/sshcanary/server.log -k /var/sshcanary/server.key |
|
# sshcanaryd -p 2222 -u sshcanary -g sshcanary -l /var/sshcanary/server.log -k /var/sshcanary/server.key |
|
# sshcanaryd -p 2222 -u sshcanary -g sshcanary -l /var/sshcanary/server.log -k /var/sshcanary/server.key -t 1000 |
|
Apr 17 12:29:57 server-dev sshcanaryd: sshcanaryd v0.6 [Apr 1 2021 - 20:57:47] started Apr 17 12:30:10 server-dev sshcanaryd: Client sent service message Apr 17 12:42:50 server-dev sshcanaryd: Client sent service message Apr 17 12:42:50 server-dev sshcanaryd: Client tried to connect without authenticating Apr 17 12:43:51 server-dev sshcanaryd: Client sent service message Apr 17 12:43:51 server-dev sshcanaryd: Client tried to connect without authenticating Apr 17 14:05:12 server-dev sshcanaryd: Error exchanging keys: [] |
|
date=2021-04-16@23:47:59 ip=91.197.232.103 user=support pw=support date=2021-04-16@23:48:02 ip=91.197.232.103 user=sysadmin pw=admin date=2021-04-16@23:48:04 ip=91.197.232.103 user=telecomadmin pw=nE7jA%5m date=2021-04-16@23:48:06 ip=91.197.232.103 user=telnet pw=admin date=2021-04-16@23:48:08 ip=91.197.232.103 user=test pw=test date=2021-04-16@23:48:14 ip=91.197.232.103 user=ubnt pw=ubnt date=2021-04-16@23:48:16 ip=91.197.232.103 user=user pw=user date=2021-04-16@23:48:16 ip=91.197.232.103 user=user pw=123456 date=2021-04-16@23:48:16 ip=91.197.232.103 user=user pw=1234 date=2021-04-16@23:48:19 ip=91.197.232.103 user=user1 pw=1234 |
|
~/git/sshcanary$ ./src/sshcanaryd --help sshcanaryd v0.6 [Jun 10 2021 - 01:13:20] syntax: sshcanaryd [options] -c|--chroot {dir} chroot to {dir} -d|--debug {lvl} enable debugging info (0-9) -D|--daemon run in the background -h|--help this info -k|--key {fname} filename where ssh key is stored -l|--log {fname} filename where events will be logged -L|--listen {addr} address to listen on -p|--port {portnum} port to listen on (default:22) -P|--pid {fname} filename where pid is stored -t|--trap {freq} randomly report success (default:1000) -u|--user {uname} user to run as -g|--group {gname} group to run as -v|--version display version information |