Avast - "We've moved TSLocationManager to your Virus Chest because it was infected with MacOS:Pirrit-CS [PUP]"
Your Environment
- Plugin version: -> 3.9.3
- Platform: iOS or Android -> Both
- OS version: 10.15.7 MacOS Catalina
- Device manufacturer / model: Apple MacBook Pro 15-inch mid-2015
- React Native version (
react-native -v): 0.61.5 - Plugin config
Not necessary to put as it is not relevant.
Expected Behavior
yarn add [email protected]
Package should install
Actual Behavior
yarn add [email protected]
Package installation gets interrupted and the Avast window appears showing the message:
"We've moved TSLocationManager to your Virus Chest because it was infected with MacOS:Pirrit-CS [PUP]"
Steps to Reproduce
- Have Avast installed.
- Execute
yarn add [email protected]
Context
Debug logs
Logs
From Avast:
Threat name: MacOS:Pirrit.CS [PUP]
Severity: (2 out of 3)
File name: TSLocationManager
File path: /Users/username/Library/Caches/Yarn/v6/npm-react-native-background-geolocation-3.9.3-7bab17653c852e3b54fa2765a85f1ae3d6bf548a-integrity/node_modules/react-native-background-geolocation/ios/RNBackgroundGeolocation/TSLocationManager.framework/TSLocationManager
Process: /usr/local/Cellar/node@10/10.21.0/bin/node
Detected by: File Shield
Status: Threat blocked
This may be infected in your cache, not the original distribution.
Here's the file as you pull it from github: https://github.com/transistorsoft/react-native-background-geolocation/blob/f8b75ad73f9e3fe3d3bc534940a0d757da99b1e0/ios/RNBackgroundGeolocation/TSLocationManager.framework/TSLocationManager
Not sure how exactly to run a test detection against it, but if you download that file directly and have your Avast scan it, the result could be interesting. Note there are reports of false positives of this one, as well as virus packages with false negatives, so any result is just a result until corroborated.
Likely a false positive. A virus inserting itself into a compiled Obj-c framework doesn't seem plausible.
This may be infected in your cache, not the original distribution.
Here's the file as you pull it from github: https://github.com/transistorsoft/react-native-background-geolocation/blob/f8b75ad73f9e3fe3d3bc534940a0d757da99b1e0/ios/RNBackgroundGeolocation/TSLocationManager.framework/TSLocationManager
Not sure how exactly to run a test detection against it, but if you download that file directly and have your Avast scan it, the result could be interesting. Note there are reports of false positives of this one, as well as virus packages with false negatives, so any result is just a result until corroborated.
Hi @mikehardy and @christocracy , thank you for your answers. I did what it's mentioned above and Avast marks the file downloaded directly from the repo as a threat. So, maybe it can be a false positive. But just in case, can you double-check that file and if you determine it is indeed a false positive, please close the issue and let me know.
Thank you very much.
MalwareBytes says all is good on my machine:

Not trying to be a pain, but it appears malwarebytes is false negative for at least some versions of this one
https://www.virustotal.com/gui/file/96b5ab22505da91c50369b64ecee36279ee507c8c986a4b3d5aa2cc8c966653b/detection
I wish there was just a byte string (or strings) we could grep for rather than relying on opaque malware detection engines. I've got no special knowledge here unfortunately
For the record, I also think infection is implausible, I'm 99% this is false positive, but paranoia pays (to a certain extend) in security, so just trying to pin down that last %
Ran Avast on my machine:

Someone on private Cordova repo reported this too, which references *Process: FileProvider.framework`, which is an iOS System library.

Ran Avast on my machine:
Someone on private Cordova repo reported this too, which references *Process: FileProvider.framework`, which is an iOS System library.
this is file system because its extracting from zip npm install from git url git blocked git clone fails git blocked download repo in zip and extract git the above image
Using https://virustotal.com and uploading different versions of TSLocationManager starting with 3.0.0, I've found the exact version where this starts being detected. I had a hunch it would be when I introduced the new Config.encrypt feature (with RNCryptor) and I was right.
The exact version where this starts being detected is 3.4.0
Removing RNCryptor from the library cleans it up.
I'm going to throw the Config.encrypt feature in the garbage.
@christocracy
I think its because you are using the old version of RNCryptor which is known to have vulnerabilities try the new version and i think it will work fine
regards
@mohamedsharaf Reference?
https://robnapier.net/rncryptor-hmac-vulnerability https://seclists.org/fulldisclosure/2015/Jun/28
hope this help
- Your first reference is from year 2012.
- Your second link is from year 2015.
Config.encrypt was introduced a year ago (2019) using what is still the latest version of RNCRyptor 5.1.0
Config.encrypt feature is removed in branch release-3.10.0. Go ahead and analyze TSLocationManager from that branch.
its clean now can u update cordova version
All 3 plugin versions (react-native, cordova and flutter) have been pushed..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.
Latest 3.10.0 released today has removed Config.encrypt.