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

Detec malware DNS-blocks #36

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Detec malware DNS-blocks #36

merged 1 commit into from
Sep 27, 2024

Conversation

aitorvs
Copy link
Collaborator

@aitorvs aitorvs commented Sep 26, 2024

Task/Issue URL: https://app.asana.com/0/1198194956794324/1208368538104397/f

Description

Add detection for when the DNS blocks requests to domains that serve malware.

The library also calls back into JVM with the blocked domain, if the JVM callback is present

Steps to test this PR

Test

  • checkout this branch and cd into the android folder
  • run ./gradlew assemble publishToMavenLocal
  • go to the Android app repo, develop branch and apply the following patch
commit 40e3568897a31e8c603490f5f49a519773aff8c9
Author: Aitor Viana <[email protected]>
Date:   Sun Jun 4 20:49:52 2023 -0400

    Maven local use

diff --git a/build.gradle b/build.gradle
index de22b7abb..aee98799a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,6 +42,7 @@ allprojects {
         google()
         mavenCentral()
         maven { url 'https://jitpack.io' }
+        mavenLocal()
     }
     configurations.all {
         resolutionStrategy.force 'org.objenesis:objenesis:2.6'
diff --git a/versions.properties b/versions.properties
index d092a0163..5f58ba46a 100644
--- a/versions.properties
+++ b/versions.properties
@@ -77,7 +77,7 @@ version.com.airbnb.android..lottie=5.2.0
 
 version.com.android.installreferrer..installreferrer=2.2
 
-version.com.duckduckgo.netguard..netguard-android=1.6.12
+version.com.duckduckgo.netguard..netguard-android=1.7.0-SNAPSHOT
 
 version.com.duckduckgo.synccrypto..sync-crypto-android=0.3.0
  • build Android app, ./gradlew assembleID, install and run the app
  • enable the VPN
  • filter the logcat with MID_RECORD_MALWARE_BLOCK and another logcat with tag:WireGuard/GoBackend/Write
  • with VPN enabled, go to "vpn-malware.goduckgo.com"
  • verify DNS malware was blocked for domain: vpn-malware.goduckgo.com. due to 'blocked:m' TXT record log appears
  • verify MID_RECORD_MALWARE_BLOCK method not found error log appears
  • smoke test VPN and browsing

@aitorvs aitorvs force-pushed the feature/dns/malware branch from 1be66f3 to 6c65b22 Compare September 27, 2024 11:24
@aitorvs aitorvs merged commit 35cc8b7 into main Sep 27, 2024
1 check passed
@aitorvs aitorvs deleted the feature/dns/malware branch September 27, 2024 14:28
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.

2 participants