daxumaming
October 17th, 2007, 12:19 AM
Hi guys, I've setup a Gutsy RC server and it's been running really well. However, I'm quite concerned about the possible break-in attempts of unscrupulous individuals, and I'd like to consult the community about this.
1 ) I've configured OpenSSH to only accept logins with an SSH key, so no PAM.. Is there a way someone can circumvent this?
2 ) I only created 2 users, my main one (with sudo privileges) and a regular account - an email account. What command do I need to type to list down users and groups on my server. I need to keep track any newly created accounts/groups.
3 ) I'd like to confirm that the only one capable of creating a root account is the account with sudo priviliges. Is this correct? I'm not comfortable with having a root account, so I want to make sure no one else is capable.
4 ) I checked /var/log/auth.log and got this:
Oct 17 06:26:32 server su[26605]: Successful su for www-data by root
Oct 17 06:26:32 server su[26605]: + ??? root:www-data
Oct 17 06:26:32 server su[26605]: pam_unix(su:session): session opened for user www-data by (uid=0)
Oct 17 06:26:32 server su[26605]: pam_unix(su:session): session closed for user www-data
Oct 17 06:26:35 server su[26632]: Successful su for nobody by root
Oct 17 06:26:36 server su[26632]: + ??? root:nobody
Oct 17 06:26:36 server su[26632]: pam_unix(su:session): session opened for user nobody by (uid=0)
Oct 17 06:26:36 server su[26632]: pam_unix(su:session): session closed for user nobody
Oct 17 06:26:36 server su[26636]: Successful su for nobody by root
Oct 17 06:26:36 server su[26636]: + ??? root:nobody
Oct 17 06:26:36 server su[26636]: pam_unix(su:session): session opened for user nobody by (uid=0)
Oct 17 06:26:36 server su[26636]: pam_unix(su:session): session closed for user nobody
Oct 17 06:26:36 server su[26638]: Successful su for nobody by root
Oct 17 06:26:36 server su[26638]: + ??? root:nobody
Oct 17 06:26:36 server su[26638]: pam_unix(su:session): session opened for user nobody by (uid=0)
Oct 17 06:27:10 server su[26638]: pam_unix(su:session): session closed for user nobody
Oct 17 06:31:34 server CRON[26523]: pam_unix(cron:session): session closed for user root
Oct 17 06:39:01 server CRON[31492]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 17 06:39:01 server CRON[31492]: pam_unix(cron:session): session closed for user root
Oct 17 06:40:53 server sshd[31499]: Did not receive identification string from 200.27.236.10
Does this mean that I now have a root account?
If so, how is this possible?
If not, do I need to worry about anything?
5 ) I've also been getting this:
Oct 15 22:22:13 server sshd[7958]: Invalid user pgsql from 200.74.167.51
Oct 15 22:22:21 server sshd[7962]: Invalid user adm from 200.74.167.51
Oct 15 22:22:25 server sshd[7964]: Invalid user ident from 200.74.167.51
Oct 15 22:22:29 server sshd[7966]: Invalid user webpop from 200.74.167.51
Oct 15 22:22:33 server sshd[7968]: Invalid user susan from 200.74.167.51
Oct 15 22:22:37 server sshd[7970]: Invalid user sunny from 200.74.167.51
Oct 15 22:22:41 server sshd[7972]: Invalid user steven from 200.74.167.51
Oct 15 22:22:45 server sshd[7974]: Invalid user ssh from 200.74.167.51
Oct 15 22:22:49 server sshd[7976]: Invalid user search from 200.74.167.51
Oct 15 22:22:52 server sshd[7978]: Invalid user sara from 200.74.167.51
Oct 15 22:22:57 server sshd[7980]: Invalid user robert from 200.74.167.51
Oct 15 22:23:01 server sshd[7982]: Invalid user richard from 200.74.167.51
Oct 15 22:23:05 server sshd[7984]: Invalid user party from 200.74.167.51
Oct 15 22:23:09 server sshd[7986]: Invalid user amanda from 200.74.167.51
Oct 15 22:23:13 server sshd[7988]: Invalid user rpm from 200.74.167.51
Oct 15 22:23:18 server sshd[7990]: Invalid user operator from 200.74.167.51
Oct 15 22:23:22 server sshd[7992]: Invalid user sgi from 200.74.167.51
Oct 15 22:23:26 server sshd[7994]: User sshd not allowed because account is locked
Oct 15 19:39:01 server CRON[7584]: pam_unix(cron:session): session closed for user root
Oct 15 19:51:02 server sshd[7591]: Did not receive identification string from 208.75.212.160
Oct 15 19:51:35 server sshd[7592]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 15 19:51:35 server sshd[7592]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.75.212.160 user=root
Oct 15 19:51:37 server sshd[7592]: Failed password for root from 208.75.212.160 port 44871 ssh2
Oct 15 19:51:41 server sshd[7594]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 15 19:51:41 server sshd[7594]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.75.212.160 user=root
Oct 15 19:51:43 server sshd[7594]: Failed password for root from 208.75.212.160 port 47610 ssh2
Oct 15 19:51:48 server sshd[7611]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 15 19:51:48 server sshd[7611]: Invalid user apple from 208.75.212.160
Oct 15 19:51:48 server sshd[7611]: pam_unix(ssh:auth): check pass; user unknown
Oct 15 19:51:48 server sshd[7611]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.75.212.160
Oct 15 19:51:51 server sshd[7611]: Failed password for invalid user apple from 208.75.212.160 port 48360 ssh2
Oct 15 19:51:54 server sshd[7613]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 17 01:24:53 server sshd[25765]: Address 211.233.59.172 maps to 211-233-59-172.kidc.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 17 01:24:53 server sshd[25765]: User root not allowed because account is locked
Oct 17 06:41:11 server sshd[31500]: Invalid user test from 200.27.236.10
Oct 17 06:41:19 server sshd[31502]: Invalid user test from 200.27.236.10
Oct 17 06:41:28 server sshd[31504]: Invalid user test from 200.27.236.10
Is this normal for a server?
6 ) Where can I find the log of all executed commands?
7 ) What other logs do I need to review regularly?
8 ) Do I need to setup a firewall for my server?
Thanks for your help!
1 ) I've configured OpenSSH to only accept logins with an SSH key, so no PAM.. Is there a way someone can circumvent this?
2 ) I only created 2 users, my main one (with sudo privileges) and a regular account - an email account. What command do I need to type to list down users and groups on my server. I need to keep track any newly created accounts/groups.
3 ) I'd like to confirm that the only one capable of creating a root account is the account with sudo priviliges. Is this correct? I'm not comfortable with having a root account, so I want to make sure no one else is capable.
4 ) I checked /var/log/auth.log and got this:
Oct 17 06:26:32 server su[26605]: Successful su for www-data by root
Oct 17 06:26:32 server su[26605]: + ??? root:www-data
Oct 17 06:26:32 server su[26605]: pam_unix(su:session): session opened for user www-data by (uid=0)
Oct 17 06:26:32 server su[26605]: pam_unix(su:session): session closed for user www-data
Oct 17 06:26:35 server su[26632]: Successful su for nobody by root
Oct 17 06:26:36 server su[26632]: + ??? root:nobody
Oct 17 06:26:36 server su[26632]: pam_unix(su:session): session opened for user nobody by (uid=0)
Oct 17 06:26:36 server su[26632]: pam_unix(su:session): session closed for user nobody
Oct 17 06:26:36 server su[26636]: Successful su for nobody by root
Oct 17 06:26:36 server su[26636]: + ??? root:nobody
Oct 17 06:26:36 server su[26636]: pam_unix(su:session): session opened for user nobody by (uid=0)
Oct 17 06:26:36 server su[26636]: pam_unix(su:session): session closed for user nobody
Oct 17 06:26:36 server su[26638]: Successful su for nobody by root
Oct 17 06:26:36 server su[26638]: + ??? root:nobody
Oct 17 06:26:36 server su[26638]: pam_unix(su:session): session opened for user nobody by (uid=0)
Oct 17 06:27:10 server su[26638]: pam_unix(su:session): session closed for user nobody
Oct 17 06:31:34 server CRON[26523]: pam_unix(cron:session): session closed for user root
Oct 17 06:39:01 server CRON[31492]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 17 06:39:01 server CRON[31492]: pam_unix(cron:session): session closed for user root
Oct 17 06:40:53 server sshd[31499]: Did not receive identification string from 200.27.236.10
Does this mean that I now have a root account?
If so, how is this possible?
If not, do I need to worry about anything?
5 ) I've also been getting this:
Oct 15 22:22:13 server sshd[7958]: Invalid user pgsql from 200.74.167.51
Oct 15 22:22:21 server sshd[7962]: Invalid user adm from 200.74.167.51
Oct 15 22:22:25 server sshd[7964]: Invalid user ident from 200.74.167.51
Oct 15 22:22:29 server sshd[7966]: Invalid user webpop from 200.74.167.51
Oct 15 22:22:33 server sshd[7968]: Invalid user susan from 200.74.167.51
Oct 15 22:22:37 server sshd[7970]: Invalid user sunny from 200.74.167.51
Oct 15 22:22:41 server sshd[7972]: Invalid user steven from 200.74.167.51
Oct 15 22:22:45 server sshd[7974]: Invalid user ssh from 200.74.167.51
Oct 15 22:22:49 server sshd[7976]: Invalid user search from 200.74.167.51
Oct 15 22:22:52 server sshd[7978]: Invalid user sara from 200.74.167.51
Oct 15 22:22:57 server sshd[7980]: Invalid user robert from 200.74.167.51
Oct 15 22:23:01 server sshd[7982]: Invalid user richard from 200.74.167.51
Oct 15 22:23:05 server sshd[7984]: Invalid user party from 200.74.167.51
Oct 15 22:23:09 server sshd[7986]: Invalid user amanda from 200.74.167.51
Oct 15 22:23:13 server sshd[7988]: Invalid user rpm from 200.74.167.51
Oct 15 22:23:18 server sshd[7990]: Invalid user operator from 200.74.167.51
Oct 15 22:23:22 server sshd[7992]: Invalid user sgi from 200.74.167.51
Oct 15 22:23:26 server sshd[7994]: User sshd not allowed because account is locked
Oct 15 19:39:01 server CRON[7584]: pam_unix(cron:session): session closed for user root
Oct 15 19:51:02 server sshd[7591]: Did not receive identification string from 208.75.212.160
Oct 15 19:51:35 server sshd[7592]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 15 19:51:35 server sshd[7592]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.75.212.160 user=root
Oct 15 19:51:37 server sshd[7592]: Failed password for root from 208.75.212.160 port 44871 ssh2
Oct 15 19:51:41 server sshd[7594]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 15 19:51:41 server sshd[7594]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.75.212.160 user=root
Oct 15 19:51:43 server sshd[7594]: Failed password for root from 208.75.212.160 port 47610 ssh2
Oct 15 19:51:48 server sshd[7611]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 15 19:51:48 server sshd[7611]: Invalid user apple from 208.75.212.160
Oct 15 19:51:48 server sshd[7611]: pam_unix(ssh:auth): check pass; user unknown
Oct 15 19:51:48 server sshd[7611]: pam_unix(ssh:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.75.212.160
Oct 15 19:51:51 server sshd[7611]: Failed password for invalid user apple from 208.75.212.160 port 48360 ssh2
Oct 15 19:51:54 server sshd[7613]: Address 208.75.212.160 maps to server160.inetservices.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 17 01:24:53 server sshd[25765]: Address 211.233.59.172 maps to 211-233-59-172.kidc.net, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Oct 17 01:24:53 server sshd[25765]: User root not allowed because account is locked
Oct 17 06:41:11 server sshd[31500]: Invalid user test from 200.27.236.10
Oct 17 06:41:19 server sshd[31502]: Invalid user test from 200.27.236.10
Oct 17 06:41:28 server sshd[31504]: Invalid user test from 200.27.236.10
Is this normal for a server?
6 ) Where can I find the log of all executed commands?
7 ) What other logs do I need to review regularly?
8 ) Do I need to setup a firewall for my server?
Thanks for your help!