Skip to content
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

create directory to group native samples #279

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hcnpeiris
Copy link

Summary

  • Added a separate directory for PMA Labs.
  • Plan to add directories for benign and malware samples.
  • Considering using the VirusTotal API in a Python script to automatically classify files.

Question

  • Is using VirusTotal API the best approach, or is there a better way to classify files?

Related Issue

Thank you!

Copy link

google-cla bot commented Mar 9, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@williballenthin
Copy link
Collaborator

tbh, i'm not sure there are any benign files in test-files, except perhaps things like al-khaser and mimikatz. so i'm not sure it's worth the effort of scripting this, unless you'd like to try for experience.

@hcnpeiris hcnpeiris changed the title create directory to group native samples | Fixes capa#1787 create directory to group native samples Mar 11, 2025
@hcnpeiris
Copy link
Author

hcnpeiris commented Mar 11, 2025

create directory to group native samples

Fixes capa#1787

To improve the organization of test files, three new directories have been added:

  • /benign: Contains benign test binaries.
  • /malware: Stores malware test samples.
  • /pma_labs: Includes PMA test binaries.

Relevant test files have been moved to these new directories.

Pytest File Updates & Issue

Since this change modifies the test file structure, pytest file paths have been updated accordingly. A PR will be submitted to the capa repository to reflect these changes.

However, one expected failure test (xfailed) unexpectedly passed.
I ran pytest on the latest master branch, and it produced the same result.

Pytest Results After Updating File Paths

Image 2025-03-11 at 18 21

Pytest Results for latest master branch

Image 2025-03-11 at 16 51

Request for Feedback

Can I get feedback on resolving this issue?

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

@mr-tz
Copy link
Collaborator

mr-tz commented Mar 12, 2025

I'd advise against benign/malware labels and would suggest to just use native (vs dotnet or sandbox results). It could be a headache to verify for each sample if it's benign or malicious without much benefit.

@hcnpeiris
Copy link
Author

@mr-tz
Oops,I misunderstood it as needing to categorize as malware and benign. Just to clarify, all I need to do is create two separate directories for pma_labs and native , and move the native test binaries to the respective directory?

@hcnpeiris hcnpeiris force-pushed the move-pma-files branch 3 times, most recently from dd523bd to 96d5960 Compare March 15, 2025 17:07
@hcnpeiris
Copy link
Author

@mr-tz
Files have been moved as mentioned above. However, the pytest file needs to be updated for the new file paths. I will update it soon.

@hcnpeiris
Copy link
Author

@mr-tz
I added a PR mandiant/capa#2623 with the updated pytest files. Can I get feedback on it?

@hcnpeiris hcnpeiris marked this pull request as ready for review March 20, 2025 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testfiles: create directory to group native samples
3 participants