LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-14-2019, 07:53 AM   #1
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Rep: Reputation: Disabled
Chkrootkit reports bindshell infected port 465


Today when I ran chkrootkit on my Linux Mint (MATE) laptop, I got this result, which didn't appear previously:

Code:
Checking `bindshell'...                                     INFECTED PORTS: ( 465)

This infected result appears only when I establish an internet (WiFi) connection, while prior to that chkrootkit doesn't report anything. Rkhunter still doesn't report anything special or out of ordinary.

I searched the internet for this result and all I could find are false positives for people who have Cpanel installed or something similar. But I don't have CPanel installed - it's just a regular Mint MATE installation, and I am sure this infected result didn't appear until a few days ago (I run chkrootkit and rkhunter often). The only thing that I changed in the past several days is that I installed the SNAP package (snapd) and, using snap, I installed a couple of snap applications (somafm-qt and something else whose name I now forgot).

When I run this command:

grep 465 /etc/services

I get the following result:

Code:
bluelight@bluelight:~$ grep 465 /etc/services
urd		465/tcp		ssmtp smtps  # URL Rendesvous Directory for SSM
and I don't know what it means.

Could somebody please help me to decipher this and whether I have a reason to be concerned about the possible infection?
 
Old 04-14-2019, 11:26 AM   #2
RickDeckard
Member
 
Registered: Jan 2014
Location: Canton, Georgia, USA
Distribution: Debian 12
Posts: 205

Rep: Reputation: Disabled
I don't really think the services file will be of much help here. Can you run "lsof -Rpni :465" from the command line when you bring up a WiFi connection and see what happens?
 
Old 04-14-2019, 11:53 AM   #3
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
After a few more times running chkrootkit, when I run it now, it doesn't report that infected result anymore. Today I uninstalled snap and its applications, but after that when I ran chkrootkit, it reported one more time that same infected result again. Now it doesn't report it anymore... so maybe it was some unimportant and benign glitch... I don't know.

Anyway, here is the result of the command you proposed:


Code:
bluelight@bluelight:~$ lsof -Rpni :465
lsof: illegal process ID: ni
lsof 4.89
 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
 latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
 usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-E] [+|-e s] [+|-f[gG]]
 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
 [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.
Perhaps it gives the "illegal process ID" error because that process doesn't exist anymore? But I know it did exist, I wonder what application caused it earlier today and why it's gone now... hm, strange... I just hope it's not some rootkit virus again.

Last edited by Seniark; 04-14-2019 at 11:54 AM.
 
Old 04-14-2019, 11:57 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
that means incorrect parameters, lsof did not run at all. Your version does not understand that -Rpni :465 (or you mistyped something).
 
Old 04-14-2019, 12:12 PM   #5
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
that means incorrect parameters, lsof did not run at all. Your version does not understand that -Rpni :465 (or you mistyped something).

I just copy/pasted what RickDeckard wrote in this thread (without the quotes). What should I type so that Rpni runs properly?
 
Old 04-14-2019, 12:36 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
could it be
Code:
lsof -RPni :465
i'm really just guessing here.
 
Old 04-14-2019, 02:38 PM   #7
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
could it be
Code:
lsof -RPni :465
i'm really just guessing here.

The output of that appears to be an empty line (no result at all - just gives a new prompt, as if I pressed only enter). I don't know what that means.


Code:
bluelight@bluelight:~$ lsof -RPni :465
bluelight@bluelight:~$
 
Old 04-14-2019, 02:48 PM   #8
RickDeckard
Member
 
Registered: Jan 2014
Location: Canton, Georgia, USA
Distribution: Debian 12
Posts: 205

Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
could it be
Code:
lsof -RPni :465
i'm really just guessing here.
Yes!!! That's what I meant. My apologies.

Quote:
Originally Posted by Seniark View Post
The output of that appears to be an empty line (no result at all - just gives a new prompt, as if I pressed only enter). I don't know what that means.


Code:
bluelight@bluelight:~$ lsof -RPni :465
bluelight@bluelight:~$
Then you may have to be root in order to find the process that way. You can try again using sudo.

I'm hoping that if we find the name of the process we can locate it and then maybe either run some more analysis on it or totally get rid of it depending on what it says.

Last edited by RickDeckard; 04-14-2019 at 02:50 PM.
 
Old 04-14-2019, 05:06 PM   #9
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by RickDeckard View Post
Then you may have to be root in order to find the process that way. You can try again using sudo.

I'm hoping that if we find the name of the process we can locate it and then maybe either run some more analysis on it or totally get rid of it depending on what it says.

I just tried the same command with sudo and the result is again the same as it was without sudo (no result at all, as if I just pressed enter).

Code:
bluelight@bluelight:~$ sudo lsof -RPni :465
bluelight@bluelight:~$

I want to point out that now when I run chkrootkit it does not report the same rootkit warning as it did earlier today.. this is what it now says under the bindshell item, even when I am connected to the internet:


Code:
Checking `bindshell'...                                     not infected
I wonder how that process can switch on and off by itself? Now you see it, now you don't... strange.
 
Old 04-14-2019, 05:41 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Have you tried following the diagnostics used on https://benohead.com/chkrootkit-fals...cted-port-465/ ?
 
Old 04-14-2019, 05:44 PM   #11
RickDeckard
Member
 
Registered: Jan 2014
Location: Canton, Georgia, USA
Distribution: Debian 12
Posts: 205

Rep: Reputation: Disabled
That's bad news for us to hear. If an open connection is being hidden from root itself, I have a lot of reason to suspect this isn't a false positive.
 
Old 04-15-2019, 03:23 AM   #12
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Have you tried following the diagnostics used on https://benohead.com/chkrootkit-fals...cted-port-465/ ?
When I run the first command according to that procedure, I get an empty line as a result (as if I just pressed enter), so I am unable to proceed with the described procedure as there is no process to examine:


Code:
bluelight@bluelight:~$ sudo netstat -pan | grep ":465 "
bluelight@bluelight:~$
Since chkrootkit doesn't report the infected process anymore, is it possible that the problematic process actually doesn't exist anymore (rather than being hidden)? I did uninstall the snapd package (and its applications) yesterday, and that might have resolved the issue, although I remember that chkrootkit reported the infected process one more time after that, and then stopped reporting it.

As far as I remember, I had these packages installed using snapd:

https://snapcraft.io/odio
https://snapcraft.io/somafm-qt

Do these programs have any component that might have caused chkrootkit to report the issue with bindshell? The timing of the problem and when I installed these packages seem to have a correlation, but I'm not sure about the causation.
 
Old 04-15-2019, 03:44 AM   #13
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by RickDeckard View Post
That's bad news for us to hear. If an open connection is being hidden from root itself, I have a lot of reason to suspect this isn't a false positive.
Please see my first reply to hydrurga from today. It seems to me that the problematic process doesn't exist anymore, although of course we can't be sure. Chkrootkit doesn't report it anymore, and Rkhunter never reported anything weird since it started happening yesterday.

Yesterday Mint shut down itself for a few seconds and then restarted itself (without going through the regular loading procedure with its logo screen), which of course is not a good sign, but I've seen it before and it might be a tech glitch rather than virus (in my opinion).

Rkhunter does report one suspicious file, and this has been an issue ever since I installed Mint MATE on this laptop. I explained that issue in detail in this thread some time ago.

Now when I run rkhunter the name of the suspicious file has changed a little, but it's still always reported:

Code:
[09:55:38] Info: Starting test name 'filesystem'
[09:55:38] Performing filesystem checks
[09:55:38] Info: SCAN_MODE_DEV set to 'THOROUGH'
[09:55:45]   Checking /dev for suspicious file types         [ Warning ]
[09:55:45] Warning: Suspicious file types found in /dev:
[09:55:45]          /dev/shm/mono.2058: data
[09:55:46]   Checking for hidden files and directories       [ Warning ]
[09:55:46] Warning: Hidden directory found: /etc/.java
[09:55:46]   Checking for missing log files                  [ Skipped ]
[09:55:46] Info: No missing log file names configured.
[09:55:46]   Checking for empty log files                    [ Skipped ]
[09:55:46] Info: No empty log file names configured.

In that forum thread you hypothesized that the file might have been created by Tomboy Notes or some other Mono application. I do have Tomboy notes installed but I never use it. Is it possible to determine accurately what application or process creates (and maintains) the mono.2058 file?

I have to emphasize that I am absolutely positive I had a rootkit virus on this laptop earlier this year. I experienced things such as all my passwords in chrome were deleted (not just in the chrome program but on google's servers as well), files from desktop were deleted or moved, and some textual files where I keep passwords were tampered with and edited. This problem would re-surface every time even though I would reinstall the whole system on a clean drive (I would clean it with the erase disk drive feature in Parted Magic, which was loaded from an USB stick).

This problem appears to have gone only when I updated my laptop BIOS about a month ago. I strongly suspect that it was a BIOS rootkit, because there's no other way to explain it. It was difficult to update the BIOS because, in their infinite wisdom, the manufacturer of my laptop (Lenovo) gives its users only one way to update the BIOS, and that is by using a Windows .exe application. So I had to install Windows just to update BIOS. But when I did that, at least those obvious virus/rootkit-related things such as passwords and files being deleted or moved finally stopped happening. The hidden mono file and these latest problems with bindshell that chkrootkit reported are disconcerting, but perhaps they have a different explanation, such as some snapd application that was able to cause a false positive...

Last edited by Seniark; 04-15-2019 at 03:52 AM.
 
Old 04-15-2019, 06:02 AM   #14
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by Seniark View Post
As far as I remember, I had these packages installed using snapd:

https://snapcraft.io/odio
https://snapcraft.io/somafm-qt

Do these programs have any component that might have caused chkrootkit to report the issue with bindshell? The timing of the problem and when I installed these packages seem to have a correlation, but I'm not sure about the causation.
Ah, that I don't know. I suppose, in the interests of discovery, you could always reinstall them and see what happens.
 
Old 04-16-2019, 10:09 AM   #15
Seniark
LQ Newbie
 
Registered: Mar 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Ah, that I don't know. I suppose, in the interests of discovery, you could always reinstall them and see what happens.

Good idea. I reinstalled snap and all the snap applications that I remember having a few days ago. When running chkrootkit out of maybe a dozen times, I got this problematic result twice (once yesterday and once today). Otherwise, chkrootkit doesn't report anything different than when snap is not installed. Rkhunter still doesn't report anything different than when snap is not installed.


EDITED:

RKhunter also reported a LKM trojan now.. but when I ran it again it didn't report it again




Code:
Checking `bindshell'...                                     not infected
Checking `lkm'...                                           You have     1 process hidden for readdir command
You have     1 process hidden for ps command
chkproc: Warning: Possible LKM Trojan installed
chkdirs: nothing detected
Checking `rexedcs'...                                       not found
Checking `sniffer'...                                       lo: not promisc and no packet sniffer sockets
wlp2s0: PACKET SNIFFER(/sbin/wpa_supplicant[654], /sbin/wpa_supplicant[654], /sbin/dhclient[21571])
tun0: not promisc and no packet sniffer sockets
Checking `w55808'...                                        not infected
Checking `wted'...                                          chkwtmp: nothing deleted
Checking `scalper'...                                       not infected
Checking `slapper'...                                       not infected
Checking `z2'...                                            user bluelight deleted or never logged from lastlog!
Checking `chkutmp'...                                        The tty of the following user process(es) were not found
(bold letters added by me)

The packet sniffer is always reported (whether I have snap or not), and I assume it's a false positive. I don't know why this "possible LKM trojan" is sometimes reported now with snap installed... Should I be concerned?

Last edited by Seniark; 04-16-2019 at 10:29 AM.
 
  


Reply



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
[SOLVED] chkrootkit bindshell INFECTED PORT 4369 masuch Linux - Security 5 02-28-2012 10:58 AM
chkrootkit Checking `bindshell'... INFECTED (PORTS: 600) gavin2u Linux - Security 5 10-26-2011 06:51 AM
chkrootkit found an infected port qwertyjjj Linux - Newbie 13 08-16-2009 07:58 AM
465 Infected Ports. How reliable is chkroot? xbaez Linux - Security 1 01-12-2005 09:29 PM
chkrootkit problem (port 465 infected) myguest Linux - Security 1 09-30-2004 07:07 PM

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

All times are GMT -5. The time now is 09:00 AM.

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