2
1
I have a very weird situation. I've just created a new VM, it has been working for only 30 minutes and I'm seeing a strange activity in the auth.log
:
Aug 10 16:52:35 ubuntu sshd[23186]: Failed password for root from 121.18.238.29 port 59064 ssh2
Aug 10 16:52:40 ubuntu sshd[23186]: message repeated 2 times: [ Failed password for root from 121.18.238.29 port 59064 ssh2]
Aug 10 16:52:40 ubuntu sshd[23186]: Received disconnect from 121.18.238.29 port 59064:11: [preauth]
Aug 10 16:52:40 ubuntu sshd[23186]: Disconnected from 121.18.238.29 port 59064 [preauth]
Aug 10 16:52:40 ubuntu sshd[23186]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.29 user=root
Aug 10 16:52:41 ubuntu sshd[23188]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.20 user=root
Aug 10 16:52:43 ubuntu sshd[23190]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.29 user=root
Aug 10 16:52:43 ubuntu sshd[23188]: Failed password for root from 121.18.238.20 port 56100 ssh2
Aug 10 16:52:45 ubuntu sshd[23190]: Failed password for root from 121.18.238.29 port 39684 ssh2
Aug 10 16:52:47 ubuntu sshd[23188]: Failed password for root from 121.18.238.20 port 56100 ssh2
Aug 10 16:52:47 ubuntu sshd[23190]: Failed password for root from 121.18.238.29 port 39684 ssh2
Aug 10 16:52:50 ubuntu sshd[23190]: Failed password for root from 121.18.238.29 port 39684 ssh2
Aug 10 16:52:50 ubuntu sshd[23188]: Failed password for root from 121.18.238.20 port 56100 ssh2
Aug 10 16:52:50 ubuntu sshd[23190]: Received disconnect from 121.18.238.29 port 39684:11: [preauth]
Aug 10 16:52:50 ubuntu sshd[23190]: Disconnected from 121.18.238.29 port 39684 [preauth]
Aug 10 16:52:50 ubuntu sshd[23190]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.29 user=root
Aug 10 16:52:50 ubuntu sshd[23188]: Received disconnect from 121.18.238.20 port 56100:11: [preauth]
Aug 10 16:52:50 ubuntu sshd[23188]: Disconnected from 121.18.238.20 port 56100 [preauth]
Aug 10 16:52:50 ubuntu sshd[23188]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.20 user=root
Aug 10 16:52:52 ubuntu sshd[23196]: Did not receive identification string from 13.64.88.11
Aug 10 16:52:53 ubuntu sshd[23194]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=121.18.238.20 user=root
I have only made an update/upgrade to the VM and added a new adm
user. How can I be attacked so fast?
Fortunately this is just a test machine so is not critical, but thanks to this i now know that security never is enough.... from now on i will follow your recomendations on every vm, thanks... – Chico3001 – 2016-08-10T17:29:57.293
When changing a SSH port remember to close 22 on the firewall and open your new port (ints between 1024 and 65535). Having a firewall is always important too! iptables is what I use. – mt025 – 2016-08-10T17:31:53.107
+1 for fail2ban – Trevor Sullivan – 2018-11-11T22:33:19.967