Closed g4ze closed 2 months ago
hey! @mlodic There is some dependency conflict for mobsf dependencies: ERROR: Cannot install -r project-requirements.txt (line 17), geoip2, libsast and mobsfscan because these package versions have conflicting dependencies. 167.7 167.7 The conflict is caused by: 167.7 jsonschema 4.23.0 depends on attrs>=22.2.0 167.7 aiohttp 3.6.2 depends on attrs>=17.3.0 167.7 jschema-to-python 1.2.3 depends on attrs 167.7 semgrep 0.117.0 depends on attrs~=21.3
should i intsall newer versions?
oh nou, dependency conflicts...
I think it makes sense to add this tool in the "malware_tools_analyzers" too with its own python environment. That's the only way to avoid becoming mad
agreed :laughing:
{
"errors": [],
"results": {
"android_logging": {
"files": [
{
"file_path": "/tmp/tmpzpwdglcv/java_vuln.java",
"match_lines": [
19,
19
],
"match_string": " Log.d(\"htbridge\", \"getAllRecords(): \" + records.toString());",
"match_position": [
13,
73
]
}
],
"metadata": {
"cwe": "CWE-532: Insertion of Sensitive Information into Log File",
"masvs": "MSTG-STORAGE-3",
"severity": "INFO",
"reference": "https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05d-Testing-Data-Storage.md#logs",
"description": "The App logs information. Please ensure that sensitive information is never logged.",
"owasp-mobile": "M1: Improper Platform Usage"
}
},
"android_safetynet_api": {
"metadata": {
"cwe": "CWE-353: Missing Support for Integrity Check",
"masvs": "MSTG-RESILIENCE-1",
"severity": "INFO",
"reference": "https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05j-Testing-Resiliency-Against-Reverse-Engineering.md#testing-root-detection-mstg-resilience-1",
"description": "This app does not uses SafetyNet Attestation API that provides cryptographically-signed attestation, assessing the device's integrity. This check helps to ensure that the servers are interacting with the genuine app running on a genuine Android device. ",
"owasp-mobile": "M8: Code Tampering"
}
},
"android_root_detection": {
"metadata": {
"cwe": "CWE-919: Weaknesses in Mobile Applications",
"masvs": "MSTG-RESILIENCE-1",
"severity": "INFO",
"reference": "https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05j-Testing-Resiliency-Against-Reverse-Engineering.md#testing-root-detection-mstg-resilience-1",
"description": "This app does not have root detection capabilities. Running a sensitive application on a rooted device questions the device integrity and affects users data.",
"owasp-mobile": "M8: Code Tampering"
}
},
"android_detect_tapjacking": {
"metadata": {
"cwe": "CWE-200: Information Exposure",
"masvs": "MSTG-PLATFORM-9",
"severity": "INFO",
"reference": "https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05h-Testing-Platform-Interaction.md#testing-for-overlay-attacks-mstg-platform-9",
"description": "This app does not have capabilities to prevent tapjacking attacks. An attacker can hijack the user's taps and tricks him into performing some critical operations that he did not intend to.",
"owasp-mobile": "M1: Improper Platform Usage"
}
},
"android_prevent_screenshot": {
"metadata": {
"cwe": "CWE-200: Information Exposure",
"masvs": "MSTG-STORAGE-9",
"severity": "INFO",
"reference": "https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05d-Testing-Data-Storage.md#finding-sensitive-information-in-auto-generated-screenshots-mstg-storage-9",
"description": "This app does not have capabilities to prevent against Screenshots from Recent Task History/ Now On Tap etc.",
"owasp-mobile": "M2: Insecure Data Storage"
}
},
"android_certificate_pinning": {
"metadata": {
"cwe": "CWE-295: Improper Certificate Validation",
"masvs": "MSTG-NETWORK-4",
"severity": "INFO",
"reference": "https://github.com/MobSF/owasp-mstg/blob/master/Document/0x05g-Testing-Network-Communication.md#testing-custom-certificate-stores-and-certificate-pinning-mstg-network-4",
"description": "This app does not use a TLS/SSL certificate or public key pinning in code to detect or prevent MITM attacks in secure communication channel. Please verify if pinning is enabled in `network_security_config.xml`.",
"owasp-mobile": "M3: Insecure Communication"
}
}
},
"mobsfscan_version": "0.3.9"
},
is there any new procedure to update the usage doc file?
the test fails here is due to this last commit made in the develop branch.
about the doc file, now you need to change it here: https://github.com/intelowlproject/docs/blob/main/docs/IntelOwl/usage.md I'll update the PR template
the test fails here is due to this last commit made in the develop branch.
That was a mistake of mine. You can readd that package
once fixed those, the PR is gtg
what strategy should we opt to update the usage file? can i make a one separate branch with the usage file updated for all the 4 analyzers in process. That way we could just merge it once while updating it with the develop branch.
yes, you can create a PR request in that docs
repository, just once
I think tests are failing cause in the "normal" CI (see here ) we don't execute the malware tools container because it's too heavy.
It would be cool to find some way to have those tests executed if and only when that container is up.
So we need docker analyser tests to run only when the particular container is up? If that's the case then how did the prev docker based analyzers that I implemented pass the tests? Plus we are already mocking the result so it shouldn't be dependent on the container response? Can you please lmk if I'm missing something here in the picture?
So we need docker analyser tests to run only when the particular container is up?
no you are right, I checked again and this is not necessary
If that's the case then how did the prev docker based analyzers that I implemented pass the tests?
can you bring an example? even that time you added a new mimetype?
Plus we are already mocking the result so it shouldn't be dependent on the container response?
Yes
In the Java example that you tried manually, is the file correctly tagged as text/x-java
?
https://github.com/intelowlproject/IntelOwl/pull/2461#issuecomment-2294704260
I've pasted a run here. By tag you mean that the file is identified correctly right?
An analyser with similar case can be https://github.com/intelowlproject/IntelOwl/pull/2401 that was implemented a while ago. It's not exactly the same but can be related.
Any ideas for this? @mlodic
looking at the other goresym analyzer, the only things that changes is that you created 2 different migrations instead of a single one. You can try by adding first a migration for the filetype only and then the analyzer and see if anything changes. Otherwise the filetype, have you tried to run the same test locally? In that way you can start to add some prints and tests here and there to understand the root issue
it was a problem with the mockup response :crying_cat_face:
i think we are gtg here @mlodic
one thing missing: you commented some code while testing, can you remove it? plus, migrations order, let's do that in this order:
ah and remember to update this file: https://github.com/intelowlproject/docs/blob/main/docs/IntelOwl/usage.md
thank you!
another important thing. The test_files.zip
. The droidlys PR should have all the mobsf files too otherwise we would merge a broken PR
all done
great! merged!
closes #2248
Description
Please include a summary of the change and link to the related issue.
Type of change
Please delete options that are not relevant.
Checklist
develop
dumpplugin
command and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zip
and you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERS
playbook by following this guide.url
that contains this information. This is required for Health Checks._monkeypatch()
was used in its class to apply the necessary decorators.MockUpResponse
of the_monkeypatch()
method. This serves us to provide a valid sample for testing.Black
,Flake
,Isort
) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.tests
folder). All the tests (new and old ones) gave 0 errors.DeepSource
,Django Doctors
or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules