CasualX / pelite

Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.
MIT License
290 stars 42 forks source link

Windows defender detects `tests\pocs\blob` as Trojan:Win32/Fuery.B!cl #224

Closed simonbuchan closed 4 years ago

simonbuchan commented 4 years ago

Not really sure what's going on here, since it's not a file in github, and my understanding of cargo means the tests shouldn't be being run: image

CasualX commented 4 years ago

Ugh this dumb issue, it's a false positive which I already tried to make go away once.

That file contains like 200 PE samples for testing pelite against. These are fairly unusual samples because I wanted to see how pelite would fare and due to their unusual nature tend to get picked up by anti virus.

I'll add some XOR masking to make this not happen anymore.

Thanks for reporting!

Kixiron commented 4 years ago

It seems that Malwarebytes also flags multiple files from pelite/tests/tiny

Malwarebytes
www.malwarebytes.com

-Log Details-
Scan Date: 3/18/20
Scan Time: 11:29 AM
Log File: a9f20128-6935-11ea-abd7-309c23031b84.json

-Software Information-
Version: 4.1.0.56
Components Version: 1.0.848
Update Package Version: 1.0.20950

-System Information-
OS: Windows 10 (Build 18362.720)
CPU: x64
File System: NTFS

-Scan Summary-
Scan Type: Custom Scan
Scan Initiated By: Manual
Result: Completed
Objects Scanned: 1620745
Threats Detected: 9
Threats Quarantined: 0
Time Elapsed: 1 hr, 42 min, 1 sec

-Scan Options-
Memory: Enabled
Startup: Enabled
Filesystem: Enabled
Archives: Enabled
Rootkits: Enabled
Heuristics: Enabled
PUP: Detect
PUM: Detect

-Scan Details-
Process: 0
(No malicious items detected)

Module: 0
(No malicious items detected)

Registry Key: 0
(No malicious items detected)

Registry Value: 0
(No malicious items detected)

Registry Data: 0
(No malicious items detected)

Data Stream: 0
(No malicious items detected)

Folder: 0
(No malicious items detected)

File: 9
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.296, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.IMPORT.161, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.Exit, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.C.1024, No Action By User, 8618, 144327, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.97, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.WEBDAV.133, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.128, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.168, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.IMPORT.133, No Action By User, 14346, 277589, 1.0.20950, , ame, 
RiskWare.TinyPE.Gen, C:\USERS\CHASE\.CARGO\REGISTRY\SRC\GITHUB.COM-1ECC6299DB9EC823\PELITE-0.8.0\TESTS\TINY\TINY.IMPORT.209, No Action By User, 14346, 277589, 1.0.20950, , ame, 

Physical Sector: 0
(No malicious items detected)

WMI: 0
(No malicious items detected)

(end)
shepmaster commented 4 years ago

You can choose to not ship those test files as part of the released crate to crates.io, which would probably avoid most issues.

CasualX commented 4 years ago

@shepmaster That seems simple enough, I can probably just delete the file and cargo publish --allow-dirty or is there a better way to ignore certain files for publishing?

cuviper commented 4 years ago

You can explicitly include/exclude files in Cargo.toml: https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields

CasualX commented 4 years ago

Ok I uploaded v0.8.1 and v0.7.2 (for anyone still on v0.7 branch) which excludes the blob file. I hope I didn't screw up too bad.

Sorry for the delay, the current setup requires a bunch of changes not in the source tree before it can be published which caused me to procrastinate...