I have just scanned my system and clamav
has detected a few suspect files:
File: .cahe/mozilla/firefox/jqxk4r44.default/cache2/entries/750B6E2F1286....
Status: PUA.Win.Exploit.CVE_2012_1461-1
File: .cahe/mozilla/firefox/jqxk4r44.default/cache2/entries/F099C33HJ45J....
Status: PUA.Win.Exploit.CVE_2012_1461-1
File: .config/libreoffice/4/user/basic/Standard/Module1.xba
Status: PUA.Doc.Tool.LibreOfficeMacro-2
File: Downloads/nodejs/node-v8.9.4-linux-x64/lib/node_modules/imurmurhash/imurmurhash.min.js
Status: PUA.Win.Trojan.Xored-1
How likely is it that these files are real threats / trojans?
My conclusion: nothing to worry about.
That leaves ...
.config/libreoffice/4/user/basic/Standard/Module1.xba
has an extension clamav trips on. They believexba
, visual basic macro's, are considered "unwanted". See Clamtk reports these LibreOffice files as possible threats. Are they safe? for a more complete list, the answers and comments.ClamAV is notoriously flawed software: basing you scans and warnings on Windows and then apply them to Linux does not and will never work.
When you see a notice like this, and you really believe clamav is the tool to use, the next step is to check with a 2nd source: for instance upload the file to an site like virustotal or use a 2nd virusscan software together with clamav (where when both claim the same problem you investigate and otherwise consider them false positives).
But I would ditch clamav altogether and follow a Linux based method: use debsum (link to man page) to check packages (link to a howto).
And when you are really paranoid (here's looking at you Panda) use all of the above ;)
I wouldn't dismiss this warning so lightly, it says PUA
Module1.xba: PUA.Doc.Tool.LibreOfficeMacro-2 FOUND
dotjoshjohnson.xml-2.5.1: PUA.Win.Trojan.Xored-1 FOUND
ms-azuretools.vscode-docker-1.8.1: PUA.Win.Trojan.Xored-1 FOUND
file-downloader-PUA.Win.Adware.Qjwmonkey-6892535-0 FOUND
BouncyCastle.Crypto.dll: PUA.Win.Adware.Qjwmonkey-6892535-0 FOUND
BouncyCastle.Crypto.dll: PUA.Win.Adware.Qjwmonkey-6892535-0 FOUND
jquery-ui.min.js: PUA.Win.Trojan.Generic-6888382-0 FOUND
So IMHO, you can dismiss the LibreOffice macro because it detects is as a libre office macro, Though I might remove them anyway, I would have to test it and see if it is something I use. the file downloader and adware is just crapware, but potential risk. The others concern me because they detect as a trojan. Now the reason I have some concern here is:
: # ifconfig |grep inet
inet 10.0.0.58 netmask 255.0.0.0 broadcast 10.255.255.255
inet6 xxx prefixlen 64 scopeid 0x20
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
Now I have suricata as a IDS, and looking at the fast.log
12/11/2020-11:42:30.052835 [] [1:2025331:3] ET POLICY Possible External IP Lookup Domain Observed in SNI (ipinfo. io) [] [Classification: A Network Trojan was detected] [Priority: 1] {TCP} 10.0.0.58:56692 -> 216.239.36.21:443
Doing a whois on 216.239.36.21 shows that it is a google server however we don't know if it is a Google service or a customer of the cloud services or a compromised server. Going to the site it appears that it is on a content server because it 404s, trying to go to HTTPS shows that it cannot provide a secure connection. Looking deeper at it, the file doesn't appear to be provided by a package.
dpkg -S /usr/share/javascript/jquery-ui/jquery-ui.min.js
libjs-jquery-ui: /usr/share/javascript/jquery-ui/jquery-ui.min.js
This is a borderline case at this point because there is a package that provides it, looking at the package it shows that it is installed from the Ubuntu archives
apt-cache policy libjs-jquery-ui libjs-jquery-ui: Installed: 1.12.1+dfsg-5 Candidate: 1.12.1+dfsg-5 Version table: *** 1.12.1+dfsg-5 500 500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages 500 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages 100 /var/lib/dpkg/status
Now I can uninstall the package and reinstall it and scan it again and see if it is coming from the repository. If it is from the repository, then I would lean more towards a false positive. Otherwise, if it isn't from the repository I would lean more towards a potential threat.
Looking deeper as to how this could have gotten on the system in the first I look at my firewall
Verified by Kali scan that shows all ports as filtered, so I know the threat could not have entered my system from any source but one of the programs that have been allowed access to my system. Now Chrome and firefox run in the user-space so they shouldn't have access to that file location. This leaves it down to apt which would have access to the HTTPS port. That all said, my first task will be moving the file to another location to store it, typically making a copy to document it, then uninstall/reinstall the package and see if its is triggered again.
Here I would document the entire process the IP addresses associated and why I made the decisions I did. This would be the standard procedure for documenting a compromised system. In a SOC, you might want to take an image of the entire disk at this point, since I am fairly confident in my other security measures I am going to proceed and monitor the system for further signs of being compromised.
Now I have had problems with system errors popping up so I am starting to lean more towards wiping the entire system and reloading from scratch after taking a careful backup and mean the windows and Linux side.
Now if I had a SIEM active I would probably correlate the various security log warning beyond the baseline, IE sort by commonality from baseline, and correlate a security event like this from the IDS log to the server logs. I would go further if I was getting paid to look into it, but this is my workstation and I can do without a feature or two to just not deal with having to dig that deep.
So continuing the statement above I then
then
Then
The two directories that had the other JS files, so I will rerun the entire scan over again and see if the alerts during the scan stop. They were plugins so I just deleted the entire directory, but if they were in system locations I would have probably removed them the same way that I did with jquery.
Now time to install it again and rescan:
So this clearly shows that the library listed here is coming from the ubuntu repository, now I could get a static code analysis tool, I will use a linter to see if there is anything terribly obvious the result is :
eslint usr/share/javascript/jquery-ui/jquery-ui.min.js|grep -v "Missing semicolon"
I would have run the fix option and see if that helps at all but that isn't going to fix the detection.
This shows the following
The problem here is that the entire js file has had all formatting removed to try and obfuscate the code, this alone should be a reason to delete the file and not use it. I am going to give the Ubuntu team the benefit of the doubt here and just assume this is a false positive since the linter shows common and low priority issues. One example is the - escape, this is very common, since it is used in a regex to imply a range such as [a-zA-Z] to my knowledge it is a special character in the regex statement and people often escape it to be sure.
One a file has been flagged as PUA, simply upload that file to virustotal.com to get a better idea of what may be happening. Virustotal will scan against a plethora of engines so if the file is fishy, it will likely show clearly.