-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maldet --clean gives file path error on /usr/local/maldetect/quarantine/., aborting. #203
Comments
Can confirm. Happening for 1.5 - Ran a scan and now unsure how to recover the files other than to restore from backups |
@mikeohara this should be relative to post-run cleans only. If in doubt you can download / install LMD 1.6rc6 at https://github.com/rfxn/linux-malware-detect/releases/tag/1.6-rc6. On install it should import all your quarantine and session information and then you can run a 'maldet --restore SCANID'. Thanks |
Thanks @rfxn! I will give it a shot. |
Unfortunately this still isn't fixed with the 1.6 release. I did a fresh install and tested:
|
I'm also getting this with v1.6: ./maldet --clean 170321-0911.2035Linux Malware Detect v1.6 maldet(20608): file path error on /usr/local/maldetect/quarantine/., aborting. Also, not sure why the clean does not happen on the scan as I think I have the conf setup to clean on scan: Thanks- |
I'm also getting this error with v1.6 |
Considering that this has been broken for almost 2 years now wouldn't it be better to just deprecate and remove this functionality from maldet now? Really bad that this wasn't fixed in 1.6 as it makes the project look bad and confuses users :( |
Having the same issues with V1.6. Does it mean that the quarantine function doesn't actually work? Which in turn probably means cleaning doesn't work either? |
I am having the same issues as everyone above on 1.6.1 still. Does not matter if its a post-run clean or if I had the config set to auto quarantine and clean. Same issue. |
Same issue here on v 1.6.2: maldet --clean 170719-1131.29879Linux Malware Detect v1.6.2 maldet(12781): file path error on /usr/local/maldetect/quarantine/., aborting. |
Same issue here on v1.6.2 |
Yep same here 1.6.2 |
What happens if I just delete all the files in quarantine? would that for all intents and purposes clean them? Or are the files in the quarantine only reference files? |
Same issue ( v1.6.2 ), but i think that problem can be validation argv $file "/usr/local/maldetect/quarantine/."
I debugging and the results are : cldir= /usr/local/maldetect/clean |
I confirm the same problem, also when run from inotify does not detect viruses anymore. It is really inconsistent and we will be forced to look for alternative solutions. Too bad, a good project left for dead. |
I just wanted to add that I am facing the same problem, too, on an Ubuntu 14.04 LTS server running v1.6.2 of Maldet.
I had set ClamAV as the scanning engine and enabled the option to quarantine and clean automatically, but the malware files got quarantined with a message that cleaning failed. Then, I changed the maldet config file to not use ClamAV as the scanning engine and ran Maldet again and it didn't find any malware files on the scanned directory, so it looks like the original scan worked. I am not sure if deleting the malware files from quarantine will ensure they are gone for ever. One other thing I noticed is that using Maldet without ClamAV as the scan engine takes nearly 10 times as long to scan the same folder. See the time difference in the scan reports below:
It is a bit disheartening that this particular issue hasn't been fixed for nearly two years. |
[New] added cleaner rule for php.malware.magentocore_ccskim and an alias of as php_malware_hexinject for associated yara rule [Fix] refactored clean_hitlist() & clean() functions to resolve pathing errors when cleaning previous session hits; issue #203 [Change] file_stat() has been renamed get_filestat to match associated quar_get_filestat function naming [Change] get_file_stat() will now grab md5 hash of files to avoid superfluous md5sum calls
…nore and gensigs functions causing clean tasks to fail due to missing variables; issue #203
This still appears to be an issue and 1.6.4 hasn't been released yet - do you happen to have an eta? |
The same issue even on1.6.4 after |
Confirm problem still exists |
+1 from me too (an a Debian oldstable based system). I think it would be a good addition, an option, for scanning the current directory. |
This problems still exists in v1.6.4 because maldetect is automatically installed in home directory (I'm referring to Ubuntu 20.04 now), not in usr/local/as it used to be installed. Even when I specify the full path to maldet, it still says that it cannot find the command; it cannot also find the 'intcnf' which in this version, is stored in 'internals' as 'internals.conf'. I guess they did not update their code accordingly to be able to find the files. |
Restoring a Files accidentally removed with Maldet & all files are in /usr/local/maldetect/quarantine/. How to restore.Also how to find all SCANID |
This is actually an old issue that was reported two years ago, but still hasn't been fixed.
The cause is pretty obvious: The function clean_hitlist() requires (but does not have) the same code that quar_hitlist() does in order to define the variables $file_name, $file_owner, $file_group, $rnd, etc. before it invokes clean() with arguments that use all those variables. Because $file_name is undefined at the time clean_hitlist() calls clean(), clean() gets a $1 parameter consisting solely of a "." and barfs when it discovers that /usr/local/maldetect/quarantine/. is not a file.
This means that the only way to clean is during a scan. You cannot scan without cleaning and then use maldet --clean SCANID afterwards as intended.
The text was updated successfully, but these errors were encountered: