Remote ssh attack: sshd tries to connect to udp port 0
Posted: Sun Dec 30, 2007 12:10 pm
I've found a bunch of these messages in my log:
"grsec: From 219.87.17.209: (root:U:/usr/sbin/sshd) denied connect() to 219.87.17.3 port 0 sock type dgram protocol udp by /usr/sbin/sshd[sshd:19031] uid/euid:0/0 gid/egid:0/0, parent /usr/sbin/sshd[sshd:4997] uid/euid:0/0 gid/egid:0/0"
Along with these:
"Address 219.87.17.209 maps to cameo.com.tw, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!"
Apart from the fact, that there are usually a couple of tries every day for regular user names, it seems that this time sshd was forced to make a strange connection attempt. DNS lookups are enabled by the RBAC for the sshd process.
Is it a normal behavior of the sshd to make udp connections to remote host (excluding DNS queries)? Especially on port 0? I have a feeling somebody could make my sshd do bad things without grsec's RBAC system.
It annoys me. Are there anybody on the list with the same experience or who knows more about this?
RESPECTIVE RBAC rule snipplet:
subject /usr/sbin/sshd {
/etc/ssh r
/etc/shadow r
/dev/log rw
/root r
/root/.ssh rw
/var/empty rw
/var/log r
/var/log/lastlog rw
/var/log/wtmp rw
/var/run/utmp rw
/var/run/sshd.pid rwcd
/dev/ptmx rw
-CAP_ALL
+CAP_CHOWN
+CAP_FOWNER
+CAP_FSETID
+CAP_SETGID
+CAP_SETUID
+CAP_NET_ADMIN
+CAP_SYS_CHROOT
+CAP_SYS_RESOURCE
+CAP_SYS_TTY_CONFIG
+CAP_KILL
bind 0.0.0.0/32:22 stream dgram ip tcp
bind 0.0.0.0/32:0 stream dgram ip tcp
connect 0.0.0.0/0:53 stream dgram tcp udp
connect 0.0.0.0/32:22 dgram udp
}
Regards,
Dw.
"grsec: From 219.87.17.209: (root:U:/usr/sbin/sshd) denied connect() to 219.87.17.3 port 0 sock type dgram protocol udp by /usr/sbin/sshd[sshd:19031] uid/euid:0/0 gid/egid:0/0, parent /usr/sbin/sshd[sshd:4997] uid/euid:0/0 gid/egid:0/0"
Along with these:
"Address 219.87.17.209 maps to cameo.com.tw, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!"
Apart from the fact, that there are usually a couple of tries every day for regular user names, it seems that this time sshd was forced to make a strange connection attempt. DNS lookups are enabled by the RBAC for the sshd process.
Is it a normal behavior of the sshd to make udp connections to remote host (excluding DNS queries)? Especially on port 0? I have a feeling somebody could make my sshd do bad things without grsec's RBAC system.
It annoys me. Are there anybody on the list with the same experience or who knows more about this?
RESPECTIVE RBAC rule snipplet:
subject /usr/sbin/sshd {
/etc/ssh r
/etc/shadow r
/dev/log rw
/root r
/root/.ssh rw
/var/empty rw
/var/log r
/var/log/lastlog rw
/var/log/wtmp rw
/var/run/utmp rw
/var/run/sshd.pid rwcd
/dev/ptmx rw
-CAP_ALL
+CAP_CHOWN
+CAP_FOWNER
+CAP_FSETID
+CAP_SETGID
+CAP_SETUID
+CAP_NET_ADMIN
+CAP_SYS_CHROOT
+CAP_SYS_RESOURCE
+CAP_SYS_TTY_CONFIG
+CAP_KILL
bind 0.0.0.0/32:22 stream dgram ip tcp
bind 0.0.0.0/32:0 stream dgram ip tcp
connect 0.0.0.0/0:53 stream dgram tcp udp
connect 0.0.0.0/32:22 dgram udp
}
Regards,
Dw.