LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-18-2019, 09:12 AM   #1
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
How to detect malware, keylogers, viruses, rootkits, malicious code, etc


I'm getting paranoid and would like to know anyone's views, experience in detecting malware, keylogers, and so on.

How can I scan files for malicious code?

TIA
 
Old 01-18-2019, 09:16 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Plug the following in to your favourite search engine:

rkhunter
ClamAV
AIDE
 
2 members found this post helpful.
Old 01-18-2019, 09:18 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
https://is.gd/HiVAkt
 
1 members found this post helpful.
Old 01-20-2019, 01:47 AM   #4
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
The first search result is this thread
 
Old 01-20-2019, 04:34 AM   #5
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
Don't be paranoid, just be safe and sensible. Use the likes of uBlock Origin and NoScript on your browser, backed up by a sandbox/resettable virtual machine if you're going to insist on browsing dodgy sites, don't open unknown attachments/documents or run unknown executables, exercise good judgement as to what you allow to run as root, occasionally run a malware checker (clamTK, Sophos AV, rkhunter, etc.). Make regular system backups and restore to a previous clean one (or even do a wipe & fresh install) if you suspect that you may have contracted some malware. It's all common sense and it should become second nature.
 
2 members found this post helpful.
Old 01-22-2019, 10:36 AM   #6
RickDeckard
Member
 
Registered: Jan 2014
Location: Canton, Georgia, USA
Distribution: Debian 12
Posts: 205

Rep: Reputation: Disabled
It may be a little complicated, but if you have a file you're suspicious of and want to verify that it hasn't been replaced with a trojaned copy you can always perform a stat of the file to look at inode numbers. Generally, files installed together (as part of the same package or packages installed concurrently, which you can figure out by looking at your install logs) will take inodes next to each other. So a file which is part of Package A might have 11554730, while a file which is also part of Package A = 11554731. If files of an important system package aren't lining up, you might want to investigate further.
 
2 members found this post helpful.
Old 01-25-2019, 03:05 AM   #7
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
Quote:
Originally Posted by RickDeckard View Post
you can always perform a stat of the file to look at inode numbers. Generally, files installed together (as part of the same package or packages installed concurrently, which you can figure out by looking at your install logs) will take inodes next to each other
this is a very nice gotcha, which makes me wonder is there any security scanner software that does such kind of filesystem checks?
 
  


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
LXer: How to Scan Your Linux Computer for Viruses and Rootkits LXer Syndicated Linux News 0 08-16-2017 04:47 AM
LXer: Three tools to scan a Linux server for Malware and Rootkits LXer Syndicated Linux News 0 02-12-2016 05:51 PM
LXer: Detect rootkits and malware on Linux Servers using rkhunter LXer Syndicated Linux News 0 06-26-2013 07:01 PM
viruses/malware etc: Is my Debian GNU/Linux system protected? edbarx Linux - Laptop and Netbook 44 09-07-2012 06:27 AM
LXer: iScanner : Detect and remove malicious code from your webpages LXer Syndicated Linux News 0 02-03-2010 06:40 PM

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

All times are GMT -5. The time now is 04:26 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