LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-27-2009, 04:00 AM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Rep: Reputation: 30
weird pregmatch in chkrootkit


I got this in ym chkrootkit today whereas before it has been clean.
ANy ideas?

Code:
Checking `chkutmp'...  The tty of the following user process(es) were not found
 in /var/run/utmp !
! RUID          PID TTY    CMD
! root         3187 tty6   /sbin/mingetty tty6
! RSTART      24942 r(filename, - 1);?      } else {?        filename_no_gz = filename;?      }?      match(filename_no_gz, "/[^/]+$");?      progname = substr(filename, RSTART + 1, RLENGTH - 1);?      if (match(progname, "\\." section "[A-Za-z]+")) {?        actual_section = substr(progna! da?         16232 |      $2 ~ /^NUME/ ||             # ro?            $2 ~ /^BEZEICHNUNG/ ||      # de?            $2 ~ /^NOMBRE/ ||           # es?            $2 ~ /^NIMI/ ||             # fi?            $2 ~ /^NOM/ ||              # fr?            $2 ~ /^IME/ ||              # sh?chkutmp: nothing deleted
 
Old 09-27-2009, 04:17 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
The PID of the process is known (24942), so what does 'lsof -P -w -n -p 24942' show? (Most likely this is 'makewhatis'. As answer that may be satisfactory but that's wrong: you should focus on the methods you need to be able to find out things yourself.)
 
Old 09-27-2009, 04:27 AM   #3
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
The PID of the process is known (24942), so what does 'lsof -P -w -n -p 24942' show? (Most likely this is 'makewhatis'. As answer that may be satisfactory but that's wrong: you should focus on the methods you need to be able to find out things yourself.)
lsof 24942 shows nothing.
Just strange that nothing had been appearing with all those charatcters in recent reports

When I rerun now I only get this. It looks like the code of chkrootkit somehow came out in the report ?
Code:
Checking `chkutmp'...  The tty of the following user process(es) were not found
 in /var/run/utmp !
! RUID          PID TTY    CMD
! root         3187 tty6   /sbin/mingetty tty6
chkutmp: nothing deleted

Last edited by qwertyjjj; 09-27-2009 at 04:36 AM.
 
Old 09-27-2009, 04:46 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by qwertyjjj View Post
lsof 24942 shows nothing.
Please be precise. I said 'lsof -P -w -n -p 24942'!


Quote:
Originally Posted by qwertyjjj View Post
Just strange that nothing had been appearing with all those charatcters in recent reports
Because the process already finished?..


Quote:
Originally Posted by qwertyjjj View Post
It looks like the code of chkrootkit somehow came out in the report ?
I already pointed you to 'makewhatis' and I said you should focus on the methods of getting information. So: 'locate makewhatis; file /usr/sbin/makewhatis; grep filename_no_gz /usr/sbin/makewhatis'. If you think "the code of chkrootkit somehow came out in the report" then by all means try: 'locate chkrootkit; file /path/to/chkrootkit; grep filename_no_gz /path/to/chkrootkit', OK?
 
Old 09-27-2009, 05:01 AM   #5
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
Please be precise. I said 'lsof -P -w -n -p 24942'!
Sorry, was just abbreviating:
Code:
[root@localhost ~]# lsof -P -w -n -p 24942
[root@localhost ~]#
Quote:
Because the process already finished?..
I already pointed you to 'makewhatis' and I said you should focus on the methods of getting information. So: 'locate makewhatis; file /usr/sbin/makewhatis; grep filename_no_gz /usr/sbin/makewhatis'. If you think "the code of chkrootkit somehow came out in the report" then by all means try: 'locate chkrootkit; file /path/to/chkrootkit; grep filename_no_gz /path/to/chkrootkit', OK?
makewhatis seems to have a completely different process number.
Code:
[root@localhost ~]# grep filename_no_gz /usr/sbin/makewhatis
        filename_no_gz = substr(filename, 0, RSTART - 1);
        filename_no_gz = filename;
      match(filename_no_gz, "/[^/]+$");
[root@localhost ~]# ps aux| grep makewhatis
root     32760  0.0  0.0   4116   620 pts/0    SN+  10:59   0:00 grep makewhatis
[root@localhost ~]#
Code:
[root@localhost ~]# grep filename_no_gz /usr/bin/chkrootkit
[root@localhost ~]#
 
Old 09-28-2009, 10:43 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by qwertyjjj View Post
makewhatis seems to have a completely different process number.
Since you didn't post timestamps for the inital and this command it may point to a different 'makewhatis' run. BTW, you don't have to actually post the 'locate makewhatis; file /usr/sbin/makewhatis; grep filename_no_gz /usr/sbin/makewhatis' output, how did you think I came up with those commands?..
 
Old 09-29-2009, 02:54 AM   #7
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by unSpawn View Post
Since you didn't post timestamps for the inital and this command it may point to a different 'makewhatis' run. BTW, you don't have to actually post the 'locate makewhatis; file /usr/sbin/makewhatis; grep filename_no_gz /usr/sbin/makewhatis' output, how did you think I came up with those commands?..
Quote:
makewhatis reads all the manual pages contained in the given sections of manpath or the preformatted pages contained in the given sections of catpath. For each page, it writes a line in the whatis database; each line consists of the name of the page and a short description, separated by a dash. The description is extracted using the content of the NAME section of the manual page.
Not sure I really understand the point of makehwhatis and why it would have a different process ID. The chkrootkit report was run at 00:00 and the manual entries I posted above were done 9hrs later.
 
Old 09-30-2009, 09:59 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by qwertyjjj View Post
Not sure I really understand the point of makehwhatis
See 'apropos makewhatis; man makewhatis'.


Quote:
Originally Posted by qwertyjjj View Post
and why it would have a different process ID.
I'ts not a daemon or something so makewhatis usually runs from a cronjob.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what does that mean (chkrootkit)? sycamorex Linux - Security 4 08-07-2009 04:34 AM
Weird results from CHKrootkit jim.thornton Linux - Security 3 01-30-2008 07:25 AM
chkrootkit EchoWarrior Linux - Newbie 2 04-20-2006 04:45 PM
when I ./chkrootkit it says .... chemichael Fedora 2 08-18-2005 11:48 PM
chkrootkit-0.45 aaru_ali Mandriva 1 04-25-2005 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration