Kirjoittaja Aihe: Onko suojaus pettänyt? Who ja last ei listaa root:ia, /var/log/firewall nollattu  (Luettu 4069 kertaa)

0 jäsentä ja 1 Vieras katselee tätä aihetta.

guest728

  • Vieras
Teen ylläpidon yleensä root terminaalista. Kysyin siitä 'who' ja sain vain listan normaaleista käyttäjistä. Sitten 'last' ja lista oli tyhjä, samaten 'lastb' oli tyhjä. Olin luonut asianmukaiset tiedostot asennuksen jälkeen. WTF. Katsomaan lokeja - /var/log/firewall oli nollattu. rkhunter andtaa cnf:än. Ei löydy repoistakaan.

Onko rosvo sisällä?

OS 11.2, palomuuri päällä - eth määritetty ulkoiseksi verkoksi, aukko SSH:ta varten, kiinni reitittimessä jossa NAT ja palomuuri.

Repojen ulkopuolelta on ladattu Intelin C, Google CL, Google Earth, Google Chrome, Eclipse ja AMD:n openC-jotakin.

Poissa harmie

  • Valvoja
  • *
  • Viestejä: 2795
  • Sukupuoli: Mies
mikäli et kirjaudu root-käyttäjänä vaan vaihdat oikeudet "su" niin silloin last olet kirjautunut vielä silla omalla tunnuksellasi.

Kokeile ottaa ssh ja kirjaudu suoraan root-käyttäjänä niin jo pitäisi näkyä last:llä.

Tuohon palomuuri lokin nollaamiseen en osaa sanoa.

Poissa jmp

  • openSUSE Member
  • *
  • Viestejä: 4553
  • Sukupuoli: Mies
    • openSUSEa suomeksi
Onko SSH:n tunnistautuminen hoidettu salasanalla vai julkisella avaimella?

Kaikki epäonnistuneet yritykset ssh:n kautta näet komennolla
Koodia: [Valitse]
zgrep -i invalid /var/log/message* | wc -l
Kaikki ssh:ta koskevat lokimerkinnät komennoilla

Koodia: [Valitse]
grep -i sshd /var/log/messagesja
Koodia: [Valitse]
zgrep -i sshd /var/log/messages-*

Kokeile asentaa chkrootkit ja tarkista kone sillä.

Yksi oma koneeni jossa ei ole palomuuria käytössä kertoo seuraavaa:

Koodia: [Valitse]
xxxxxxx:~ # uptime
 12:05pm  up 268 days  9:13,  1 user,  load average: 0,18, 0,20, 0,09

Koodia: [Valitse]
xxxxxxx:~ # grep -i invalid /var/log/messages
Aug 28 16:43:25 xxxxxxx sshd[5476]: Invalid user admin from 175.19x.25.71
Aug 28 16:43:30 xxxxxxx sshd[5481]: Invalid user stud from 175.19x.25.71
Aug 28 16:43:33 xxxxxxx sshd[5483]: Invalid user trash from 175.19x.25.71
Aug 28 16:43:35 xxxxxxx sshd[5485]: Invalid user aaron from 175.19x.25.71
Aug 28 16:43:38 xxxxxxx sshd[5487]: Invalid user gt05 from 175.19x.25.71
Aug 28 16:43:40 xxxxxxx sshd[5489]: Invalid user william from 175.19x.25.71
Aug 28 16:43:43 xxxxxxx sshd[5491]: Invalid user stephanie from 175.19x.25.71
Aug 28 16:43:58 xxxxxxx sshd[5503]: Invalid user gary from 175.19x.25.71
Aug 28 16:44:03 xxxxxxx sshd[5507]: Invalid user guest from 175.19x.25.71
Aug 28 16:44:05 xxxxxxx sshd[5543]: Invalid user test from 175.19x.25.71
Aug 28 16:44:08 xxxxxxx sshd[5545]: Invalid user oracle from 175.19x.25.71
Aug 28 16:45:02 xxxxxxx sshd[5589]: Invalid user apache from 175.19x.25.71
Aug 28 16:45:10 xxxxxxx sshd[5649]: Invalid user lab from 175.19x.25.71
Aug 28 16:45:15 xxxxxxx sshd[5653]: Invalid user oracle from 175.19x.25.71
Aug 28 16:45:17 xxxxxxx sshd[5655]: Invalid user svn from 175.19x.25.71
Aug 28 16:45:19 xxxxxxx sshd[5657]: Invalid user iraf from 175.19x.25.71
Aug 28 16:45:22 xxxxxxx sshd[5659]: Invalid user swsoft from 175.19x.25.71

Koodia: [Valitse]
xxxxxxx:~ # zgrep -i invalid /var/log/message* | wc -l
19405

Sitten nämä pellet jotka hakevat jotain tiettyä softaa palvelimelta kuten
Lainaus
[Sat Sep 04 11:42:48 2010] [error] [client 94.23.x7.174] File does not exist: /srv/www/htdocs/phpmanager
[Sat Sep 04 11:42:48 2010] [error] [client 94.23.x7.174] File does not exist: /srv/www/htdocs/php-myadmin
[Sat Sep 04 11:42:48 2010] [error] [client 94.23.x7.174] File does not exist: /srv/www/htdocs/phpmy-admin
[Mon Sep 06 17:17:05 2010] [error] [client 94.23.x7.174] File does not exist: /srv/www/htdocs/phpmyadmin

Koodia: [Valitse]
xxxxxxx:~ # grep -i "File does not exist: /srv/www/htdocs/" /var/log/apache2/error_log |wc -l
3924

Koodia: [Valitse]
xxxxxxx:~ # zgrep -i "File does not exist: /srv/www/htdocs/" /var/log/apache2/error_log-20100524.gz |wc -l
9654

chkrootkit:in listaus
Koodia: [Valitse]
xxxxxxx:~ # chkrootkit
ROOTDIR is `/'         
Checking `amd'... not found
Checking `basename'... not infected
Checking `biff'... not found       
Checking `chfn'... not infected   
Checking `chsh'... not infected   
Checking `cron'... not infected   
Checking `crontab'... not infected
Checking `date'... not infected   
Checking `du'... not infected     
Checking `dirname'... not infected
Checking `echo'... not infected   
Checking `egrep'... not infected   
Checking `env'... not infected     
Checking `find'... not infected   
Checking `fingerd'... not found   
Checking `gpm'... not infected     
Checking `grep'... not infected   
Checking `hdparm'... not infected 
Checking `su'... not infected     
Checking `ifconfig'... not infected
Checking `inetd'... not tested     
Checking `inetdconf'... not found 
Checking `identd'... not found     
Checking `init'... not infected   
Checking `killall'... not infected
Checking `ldsopreload'... not infected
Checking `login'... not infected     
Checking `ls'... not infected         
Checking `lsof'... not infected       
Checking `mail'... not found         
Checking `mingetty'... not infected   
Checking `netstat'... not infected   
Checking `named'... not found         
Checking `passwd'... not infected     
Checking `pidof'... not infected     
Checking `pop2'... not found         
Checking `pop3'... not found         
Checking `ps'... not infected         
Checking `pstree'... not infected     
Checking `rpcinfo'... not infected   
Checking `rlogind'... not found       
Checking `rshd'... not found         
Checking `slogin'... not infected     
Checking `sendmail'... not infected   
Checking `sshd'... not infected       
Checking `syslogd'... not infected   
Checking `tar'... not infected       
Checking `tcpd'... not infected       
Checking `tcpdump'... not infected   
Checking `top'... not infected       
Checking `telnetd'... not found       
Checking `timed'... not found         
Checking `traceroute'... not infected
Checking `vdir'... not infected       
Checking `w'... not infected         
Checking `write'... not infected     
Checking `aliens'... no suspect files
Searching for sniffer's logs, it may take a while... nothing found
Searching for HiDrootkit's default dir... nothing found           
Searching for t0rn's default files and dirs... nothing found     
Searching for t0rn's v8 defaults... nothing found                 
Searching for Lion Worm default files and dirs... nothing found   
Searching for RSHA's default files and dir... nothing found       
Searching for RH-Sharpe's default files... nothing found         
Searching for Ambient's rootkit (ark) default files and dirs... nothing found
Searching for suspicious files and dirs, it may take a while... 
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Digest/SHA1/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Crypt/SSLeay/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Crypt/DES/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Crypt/Blowfish/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Crypt/CBC/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/URI/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Net/Daemon/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/HTML/Tagset/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/HTML/Parser/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/TimeDate/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/RPC/PlServer/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Text/Iconv/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Config/Crontab/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Locale/gettext/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Irssi/TextUI/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Irssi/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Irssi/UI/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Irssi/Irc/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/DBI/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/X500/DN/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/XML/Parser/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/XML/Simple/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/XML/Bare/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Parse/RecDescent/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/ycp/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/LWP/.packlist
/usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/auto/Bootloader/.packlist
/usr/lib/perl5/5.10.0/i586-linux-thread-multi/.packlist

Searching for LPD Worm files and dirs... nothing found
Searching for Ramen Worm files and dirs... nothing found
Searching for Maniac files and dirs... nothing found
Searching for RK17 files and dirs... nothing found
Searching for Ducoci rootkit... nothing found
Searching for Adore Worm... nothing found
Searching for ShitC Worm... nothing found
Searching for Omega Worm... nothing found
Searching for Sadmind/IIS Worm... nothing found
Searching for MonKit... nothing found
Searching for Showtee... nothing found
Searching for OpticKit... nothing found
Searching for T.R.K... nothing found
Searching for Mithra... nothing found
Searching for OBSD rk v1... nothing found
Searching for LOC rootkit... nothing found
Searching for Romanian rootkit... nothing found
Searching for Suckit rootkit... nothing found
Searching for Volc rootkit... nothing found
Searching for Gold2 rootkit... nothing found
Searching for TC2 Worm default files and dirs... nothing found
Searching for Anonoying rootkit default files and dirs... nothing found
Searching for ZK rootkit default files and dirs... nothing found
Searching for ShKit rootkit default files and dirs... nothing found
Searching for AjaKit rootkit default files and dirs... nothing found
Searching for zaRwT rootkit default files and dirs... nothing found
Searching for Madalin rootkit default files... nothing found
Searching for Fu rootkit default files... nothing found
Searching for ESRK rootkit default files... nothing found
Searching for rootedoor... nothing found
Searching for ENYELKM rootkit default files... nothing found
Searching for anomalies in shell history files... nothing found
Checking `asp'... not infected
Checking `bindshell'... not infected
Checking `lkm'... chkproc: nothing detected
Checking `rexedcs'... not found
Checking `sniffer'... eth0: not promisc and no PF_PACKET sockets
Checking `w55808'... not infected
Checking `wted'... chkwtmp: nothing deleted
Checking `scalper'... not infected
Checking `slapper'... not infected
Checking `z2'... chklastlog: nothing deleted
Checking `chkutmp'... chkutmp: nothing deleted
Ja muistakaa pitää hauskaa ;)

openSUSE Tumbleweed (x86_64)

guest728

  • Vieras
Oma moka. Olen aikaisemmin käyttänyt KDE:n 'terminal - superuser mode', mutta tämä oli lakannut toimimasta kun vaihdoin Gnomeen. Koska repot ei tarjonnut gksu:ta, käytin 'su -':ta terminaalista ja tulos oli OP:n mukainen. Nyt hankin gksu:n xfce repo haaroista. Avaan root terminaalin komennolla 'gksu gnome-terminal' ja homma toimii niin kun olen tottunut. Tiedostojen nollautumista pitää vielä miettiä.

Koodia: [Valitse]
puu:~ # whoami
root
puu:~ # who
hro      :0           2010-09-13 13:43 (console)
hro      pts/0        2010-09-13 13:44 (:0.0)
root     pts/2        2010-09-13 13:49 (:0.0)
puu:~ # last | head -3
root     pts/2        :0.0             Mon Sep 13 13:49   still logged in   
hro      :0           console          Mon Sep 13 13:43   still logged in   
reboot   system boot  2.6.31.12-0.2-de Mon Sep 13 13:39          (00:13)
puu:~ #



Kiitos avusta

guest728

  • Vieras
chkrootkit listauksen lopussa mielenkiintoinen kohta. Sama tulos teenkö sen sudo /sbin/chkrootkit terminaalista vai superuser terminaalista

Koodia: [Valitse]
Checking `chkutmp'...  The tty of the following user process(es) were not found
 in /var/run/utmp !
! RUID          PID TTY    CMD
! root         1889 tty7   /usr/bin/Xorg -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-UE61wX
chkutmp: nothing deleted
puu:~ #