Closed samadpls closed 6 months ago
@samadpls bump. Please let us know if you have any questions running capa locally against a test .NET file. Also, please add an entry to CHANGELOG.md with a short description of the PR when you get a chance.
Hello @mike-hunhoff , while setting up the locally im facing following issue
capa -vv /media/samadpls/ubuntu/download/1c444ebeba24dcba8628b7dfe5fec7c6.exe_
ERROR:capa:[Errno 28] No space left on device: '/home/samadpls/.cache/capa'
ERROR:capa:Make sure your file directory contains properly formatted capa rules. You can download the standard collection of capa rules from https://github.com/mandiant/capa-rules/releases.
ERROR:capa:Please ensure you're using the rules that correspond to your major version of capa (7)
ERROR:capa:Or, for more details, see the rule set documentation here: https://github.com/mandiant/capa/blob/master/doc/rules.md
Are you out of hard-drive space?
Looks good @samadpls . Please verify that the
-vv
output from capa's standalone tool lists.NET
as the format in the metadata section by posting the output here. You can use one of the.NET
samples fromcapa/test-files
.
@mike-hunhoff , Sorry for responding late; I was busy with academic workk. Here the output i got after running the following command
format pe
...
create or open registry key (2 matches, only showing first match of library rule)
...
save image in .NET
...
Are you out of hard-drive space?
Hi @mr-tz , thanks for noticing. Yes, I noticed that my cache was full somehow, so I ran it on Windows and got the log
Looks good @samadpls . Please verify that the
-vv
output from capa's standalone tool lists.NET
as the format in the metadata section by posting the output here. You can use one of the.NET
samples fromcapa/test-files
.@mike-hunhoff , Sorry for responding late; I was busy with academic workk. Here the output i got after running the following command
format pe ... create or open registry key (2 matches, only showing first match of library rule) ... save image in .NET ...
full log
capa -vv -r E:\capa-rules-7.0.1\capa-rules-7.0.1 1c444ebeba24dcba8628b7dfe5fec7c6.exe md5 1c444ebeba24dcba8628b7dfe5fec7c6 sha1 ebdec120fbbdbff28ebd6accc85d05f7ccabf461 sha256 a9f9e5a30cc858dc135ec428cdd68cb06143732e5c62c4dc4b359c8abc11d74b path E:/extraproj/capa/1c444ebeba24dcba8628b7dfe5fec7c6.exe timestamp 2024-03-16 23:55:17.310730 capa version 7.0.1 os any format pe arch any analysis static extractor DnfileFeatureExtractor base address global rules E:/capa-rules-7.0.1/capa-rules-7.0.1 function count 150 library function count 0 total feature count 4309 [...]
Thank you for providing the output. Following the changes that you've made in this PR I'd expect capa's output to list format: dotnet
, not format: pe
e.g. expected output for .NET file:
capa -vv -r E:\capa-rules-7.0.1\capa-rules-7.0.1 1c444ebeba24dcba8628b7dfe5fec7c6.exe
md5 1c444ebeba24dcba8628b7dfe5fec7c6
sha1 ebdec120fbbdbff28ebd6accc85d05f7ccabf461
sha256 a9f9e5a30cc858dc135ec428cdd68cb06143732e5c62c4dc4b359c8abc11d74b
path E:/extraproj/capa/1c444ebeba24dcba8628b7dfe5fec7c6.exe
timestamp 2024-03-16 23:55:17.310730
capa version 7.0.1
os any
format dotnet
arch any
[...]
I'm unsure based solely on the output of command whether you're running the existing capa standalone tool or capa w/ the changes that you've made in this PR. Can you confirm that you have installed capa locally for development and that you are running capa with the changes that you've made in this PR?
@mike-hunhoff, you were right. I was in the master branch and running the command. I apologize for the oversight here is the expected log
capa 1c444ebeba24dcba8628b7dfe5fec7c6.exe_ -vv -r ./rules/
md5 1c444ebeba24dcba8628b7dfe5fec7c6
sha1 ebdec120fbbdbff28ebd6accc85d05f7ccabf461
sha256 a9f9e5a30cc858dc135ec428cdd68cb06143732e5c62c4dc4b359c8abc11d74b
path E:/extraproj/capa/1c444ebeba24dcba8628b7dfe5fec7c6.exe_
timestamp 2024-03-18 23:54:18.048229
capa version 7.0.1
os any
format dotnet
arch any
analysis static
extractor DnfileFeatureExtractor
base address global
rules E:/extraproj/capa/rules
function count 150
library function count 0
total feature count 4309
[ .... ]
Changed format order for .NET files closes #2022
Checklist