2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
네트워크 보안 권장사항
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 섹션에는 Android 기기의 네트워크 통신 보안을 확립하기 위한 권장사항이 포함되어 있습니다.
수신 소켓 보안 설정
수신 소켓을 사용할 때는 주의가 필요합니다. 일반적으로는 기기에 수신 소켓이 열려있으면 안 되며, 이는 소켓이 원격 공격자가 기기에 쉽게 액세스할 수 있게 해주는 벡터 역할을 하기 때문입니다.
- Android 기기는 기본적으로 또는 특히 부팅 시에 노출시키는 인터넷 수신 소켓의 수를 최소화해야 합니다. 기본적으로 부팅 시에는 인터넷을 수신하는 소켓이 없어야 합니다.
- 루트 프로세스 및 시스템 UID(고유 식별자)가 소유한 루트 프로세스는 어떠한 수신 소켓도 노출시키면 안 됩니다.
- 수신 소켓은 OTA 업데이트 없이 사용 중지할 수 있어야 합니다. 이는 서버 또는 사용자 기기 설정 변경을 통해 실행할 수 있습니다.
- 로컬 IPC를 사용하는 소켓의 경우 앱이 그룹으로 제한된 액세스 권한이 있는 UNIX 도메인 소켓을 사용해야 합니다. IPC의 파일 설명자를 생성하고 이를 특정 UNIX 그룹의 +RW로 지정합니다. 모든 클라이언트 앱은 이 UNIX 그룹 내에 속해야 합니다.
- 여러 개의 프로세스를 가진 일부 기기(예: 앱 프로세서 별도의 라디오/모뎀)는 네트워크 소켓을 사용하여 프로세서 간에 통신합니다. 이러한 경우 프로세서 간 통신에 사용되는 네트워크 소켓은 분리된 네트워크 인터페이스를 사용하여 미승인 앱이 기기에 액세스하지 못하도록 해야 합니다(즉, iptable을 사용하여 다른 앱이 기기에 액세스하지 못하도록 방지).
- 수신 포트를 처리하는 데몬은 잘못된 형식의 데이터에 강해야 합니다. 승인되지 않은 클라이언트를 사용하여 포트에 퍼즈 테스트를 실행해야 하며, 가능한 경우에는 승인된 클라이언트를 사용해야 합니다. 비정상 종료에 관한 후속 조치를 취하려면 버그를 신고합니다.
Android 호환성 테스트 모음(CTS)에는 열린 수신 포트가 있는지 확인하기 위한 테스트가 포함되어 있습니다.
adb 사용 중지
ADB (Android 디버그 브리지)는 중요한 개발 및 디버깅 도구이지만 통제된 보안 환경에서 사용하도록 설계되었기 때문에 일반적인 용도로 사용 설정하면 안 됩니다.
- adb가 기본적으로 사용 중지되어 있는지 확인합니다.
- adb에서 사용자가 연결을 수락하기 전에 이를 사용 설정해야 하는지 확인합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 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."]]