हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
नेटवर्क की सुरक्षा के सबसे सही तरीके
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस सेक्शन में, Android डिवाइसों से नेटवर्क पर होने वाले कम्यूनिकेशन की सुरक्षा को पक्का करने के लिए सुझाव दिए गए हैं.
सुरक्षित सुनने के सॉकेट
सुनने वाले सॉकेट का इस्तेमाल सावधानी से करें. आम तौर पर, डिवाइसों पर कोई भी खुली हुई लिस्निंग सॉकेट नहीं होनी चाहिए. ऐसा इसलिए, क्योंकि ये रिमोट से हमला करने वाले को डिवाइस का ऐक्सेस पाने का एक वेक्टर उपलब्ध कराती हैं.
- Android डिवाइसों को इंटरनेट पर सुनने वाले सोकेट की संख्या कम करनी चाहिए. ऐसा खास तौर पर, डिवाइस के चालू होने या डिफ़ॉल्ट रूप से होना चाहिए. डिफ़ॉल्ट रूप से, कोई भी सॉकेट, बूट होने पर इंटरनेट पर सुनने की सुविधा नहीं देना चाहिए.
- रूट प्रोसेस और सिस्टम यूनीक आइडेंटिफ़ायर (यूआईडी) के मालिकाना हक वाली प्रोसेस को, किसी भी लिस्निंग सॉकेट को एक्सपोज़ नहीं करना चाहिए.
- ओटीए अपडेट के बिना, सुनने की सुविधा वाले सॉकेट बंद किए जा सकते हैं. इसे
सर्वर या उपयोगकर्ता के डिवाइस के कॉन्फ़िगरेशन में बदलाव करके किया जा सकता है.
- स्थानीय आईपीसी का इस्तेमाल करने वाली सॉकेट के लिए, ऐप्लिकेशन को किसी ग्रुप के लिए सीमित ऐक्सेस वाले यूनिक्स डोमेन सॉकेट का इस्तेमाल करना होगा. IPC के लिए फ़ाइल डिस्क्रिप्टर बनाएं और किसी खास UNIX ग्रुप के लिए इसे
+RW बनाएं. सभी क्लाइंट ऐप्लिकेशन उस UNIX ग्रुप में होने चाहिए.
- एक से ज़्यादा प्रोसेसर वाले कुछ डिवाइस (उदाहरण के लिए, ऐप्लिकेशन प्रोसेसर से अलग रेडियो/मोडेम), प्रोसेसर के बीच कम्यूनिकेट करने के लिए नेटवर्क सॉकेट का इस्तेमाल करते हैं. ऐसे मामलों में, इंटर-प्रोसेसर कम्यूनिकेशन के लिए इस्तेमाल किए जाने वाले नेटवर्क सॉकेट को, डिवाइस पर अनुमति के बिना काम करने वाले ऐप्लिकेशन के ऐक्सेस को रोकने के लिए, अलग नेटवर्क इंटरफ़ेस का इस्तेमाल करना चाहिए. उदाहरण के लिए, डिवाइस पर मौजूद अन्य ऐप्लिकेशन के ऐक्सेस को रोकने के लिए, iptables का इस्तेमाल करना.
- सुनने वाले पोर्ट को मैनेज करने वाले डेमन, गलत फ़ॉर्मैट वाले डेटा के लिए मज़बूत होने चाहिए. आपको बिना अनुमति वाले क्लाइंट और जहां तक हो सके, अनुमति वाले क्लाइंट का इस्तेमाल करके, पोर्ट के लिए फ़ज़ टेस्टिंग करनी चाहिए. क्रैश के बारे में जानकारी पाने के लिए,
गड़बड़ियों की शिकायत करें.
Android Compatibility Test Suite (CTS) में ऐसे टेस्ट शामिल होते हैं जिनसे यह पता चलता है कि सुनने के लिए उपलब्ध पोर्ट खुले हैं या नहीं.
adb बंद करना
Android Debug Bridge (adb) एक अहम डेवलपमेंट और डीबगिंग टूल है. हालांकि, इसे कंट्रोल किए गए और सुरक्षित माहौल में इस्तेमाल करने के लिए डिज़ाइन किया गया है. इसे सामान्य इस्तेमाल के लिए चालू नहीं किया जाना चाहिए.
- पक्का करें कि adb डिफ़ॉल्ट रूप से बंद हो.
- पक्का करें कि कनेक्शन स्वीकार करने से पहले, उपयोगकर्ता को adb को चालू करना पड़े.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. 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,["# Network security best practices\n\nThis section contains recommendations to ensure the security of network\ncommunications from Android devices.\n\nSecure listening sockets\n------------------------\n\nUse listening sockets with caution. There should generally\nnot be any open listening sockets on devices as these provide a vector for a\nremote attacker to gain access to the device.\n\n- Android devices should minimize the number of internet listening sockets they expose, especially on boot or by default. No socket should be listening on the internet at boot by default.\n - Root processes and processes owned by the system unique identifier (UID) shouldn't expose any listening sockets.\n- Listening sockets must be able to be disabled without an OTA update. This can be performed using either a server or user-device configuration change.\n- For local IPC-using sockets, apps must use a UNIX domain socket with access limited to a group. Create a file descriptor for the IPC and make it +RW for a specific UNIX group. Any client apps must be within that UNIX group.\n- Some devices with multiple processors (for example, a radio/modem separate from the app processor) use network sockets to communicate between processors. In such instances, the network socket used for inter-processor communication must use an isolated network interface to prevent access by unauthorized apps on the device (i.e. use iptables to prevent access by other apps on the device).\n- Daemons that handle listening ports must be robust against malformed data. You should conduct fuzz-testing against the port using an unauthorized client, and, where possible, authorized client. File bugs to follow up on crashes.\n\nThe [Android Compatibility Test Suite](/docs/core/tests)\n(CTS) includes tests that check for the presence of open listening ports.\n\n### Disable adb\n\nAndroid Debug Bridge (adb) is a valuable development and debugging tool, but\nis designed for use in a controlled, secure environment and shouldn't be\nenabled for general use.\n\n- Ensure that adb is disabled by default.\n- Ensure that adb requires the user to turn it on before accepting connections."]]