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

err-first-miss broken: no longer exits after miss #577

Closed
tstromberg opened this issue Nov 4, 2024 · 1 comment · Fixed by #579
Closed

err-first-miss broken: no longer exits after miss #577

tstromberg opened this issue Nov 4, 2024 · 1 comment · Fixed by #579
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tstromberg
Copy link
Collaborator

We should add a test for this. It doesn't seem to exit properly for non-detected files in scan or analyze mode:

go run ./cmd/mal --err-first-miss scan /bin/*
🔎 Scanning "/bin/["
🔎 Scanning "/bin/ab"
🔎 Scanning "/bin/aconnect"
🔎 Scanning "/bin/activate-global-python-argcomplete"
🔎 Scanning "/bin/addr2line"
🔎 Scanning "/bin/adwaita-1-demo"
├─ 🟠 /usr/bin/adwaita-1-demo
│     • c2/addr/ip — hardcoded IP address:
│     137.634.24.969, 17.29.371.563, 29.371.563.593, 306.137.634.24, 336.298.674.582, 445.228.872.406
🔎 Scanning "/bin/airscan-discover"
🔎 Scanning "/bin/alias"
@tstromberg tstromberg added the bug Something isn't working label Nov 4, 2024
@tstromberg tstromberg changed the title err-first-miss broken: err-first-miss broken: no longer exits after miss Nov 4, 2024
@tstromberg
Copy link
Collaborator Author

I suspected --err-first-hit is similarly broken, but it's broken differently:

% go run ./cmd/mal --min-risk=medium --err-first-hit analyze ../malcontent-samples/python/
🔎 Scanning "../malcontent-samples/python/"
time=2024-11-04T07:56:01.384-05:00 level=ERROR source=/var/home/t/src/malcontent/pkg/action/scan.go:338 msg="error with processing 16 matching capabilities in ../malcontent-samples/python/2021.DiscordSafety/DiscordSafety-0.1.tar.gz archive: anti-static/obfuscation/python/rename_imports anti-static/unmarshal/marshal c2/addr/php collect/databases/leveldb exec/program exec/remote_commands/code_eval exfil/stealer/browser fs/path/users impact/remote_access/py_setuptools net/url/request\n"

I don't quite understand the error, but the hit result was never shown. If I specify a subdir, it just exits quietly:

% go run ./cmd/mal --min-risk=medium --err-first-hit analyze ../malcontent-samples/python/2024.yocolor/
🔎 Scanning "../malcontent-samples/python/2024.yocolor/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant