הגדרת DNS לא מאובטחת
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
קטגוריה ב-OWASP: MASVS-NETWORK: Network Communication
סקירה כללית
הגדרות DNS לא מאובטחות יכולות להתרחש כשמפתחים מבצעים התאמה אישית של התנהגות התעבורה של DNS באפליקציה, עוקפים את ברירות המחדל של המכשיר או כשמשתמש מציין שרת DNS פרטי ב-Android 9 ואילך. חריגה מתצורות DNS טובות ומוכרות עלולה להפוך את המשתמשים לפגיעים להתקפות כמו זיוף DNS או הרעלת מטמון DNS, ולאפשר לתוקפים להפנות את תעבורת המשתמשים לאתרים זדוניים.
השפעה
אם תוקף ברשת זדונית מצליח לזייף DNS, הוא יכול להפנות את המשתמש לאתר שהוא שולט בו, בלי לעורר את חשדו של המשתמש. לדוגמה, אתר זדוני כזה יכול לבצע פישינג על המשתמש כדי לגנוב פרטים אישיים מזהים, לגרום למניעת שירות (DoS) עבור המשתמש או להפנות את המשתמש לאתרים אחרים ללא הודעה.
סיכון: אבטחת תעבורה פגיעה של DNS
הגדרות DNS בהתאמה אישית עשויות לאפשר לאפליקציות לעקוף את אבטחת התעבורה המובנית של Android עבור DNS ב-Android מגרסה 9 ואילך.
אמצעי צמצום סיכונים
שימוש במערכת ההפעלה Android לטיפול בתנועת DNS
אפשרות למערכת ההפעלה Android לטפל ב-DNS. מאז SDK ברמה 28, מערכת Android הוסיפה אבטחה להעברת DNS באמצעות DNS over TLS, ולאחר מכן DNS over HTTP/3 ב-SDK ברמה 30.
שימוש ב-SDK ברמה >=28
מעדכנים את רמת ה-SDK ל-28 לפחות. חשוב לציין שהפחתת הסיכון הזו דורשת תקשורת עם שרתי DNS ציבוריים מוכרים ומאובטחים, כמו אלה שמפורטים כאן.
משאבים
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Insecure DNS Setup\n\n\u003cbr /\u003e\n\n**OWASP category:** [MASVS-NETWORK: Network Communication](https://mas.owasp.org/MASVS/08-MASVS-NETWORK)\n\nOverview\n--------\n\nInsecure DNS configurations can occur when developers customize an application's\nDNS transport behavior, bypass device defaults, or when a user specifies a\nprivate DNS server in Android 9 and later. Deviation from known good DNS\nconfigurations can leave users vulnerable to attacks like DNS Spoofing or DNS\ncache poisoning, allowing attackers to redirect user traffic to malicious sites.\n\nImpact\n------\n\nIf a malicious network attacker is able to spoof DNS, they can discreetly\nredirect the user to a website they control, without arousing the user's\nsuspicion. This malicious website could, for example, phish the user for\npersonally identifiable information, cause a denial of service for the user, or\nredirect the user to websites without notification.\n\nRisk: Vulnerable DNS Transport Security\n---------------------------------------\n\nCustom DNS configurations may allow apps to bypass Android's built-in transport\nsecurity for DNS in Android 9 and higher.\n\n### Mitigations\n\n#### Use the Android OS to handle DNS traffic\n\nAllow the Android OS to handle DNS. Since SDK level 28, Android has added\nsecurity to DNS transport through DNS over TLS, and then DNS over HTTP/3 in SDK\nlevel 30.\n\n#### Use SDK level \\\u003e=28\n\nUpdate SDK level to at least 28. It should be noted that this mitigation\nrequires communication with well-known and secure public DNS servers such as can\nbe found [here](https://dnsprivacy.org/public_resolvers/).\n\nResources\n---------\n\n- [Resolve DNS queries](/training/basics/network-ops/connecting#lookup-dns)\n- [Java reference for DnsResolver Class](/reference/android/net/DnsResolver)\n- [Android Security Blog post about DNS-over-HTTP/3](https://security.googleblog.com/2022/07/dns-over-http3-in-android.html)\n- [Overview of secure transport for DNS](https://developers.google.com/speed/public-dns/docs/secure-transports)\n- [Android Developer Blog post about DNS over TLS](https://android-developers.googleblog.com/2018/04/dns-over-tls-support-in-android-p.html)"]]