HN 표시: AF_ALG를 사용하여 실행 중인 프로세스 감지

hackernews | | 📦 오픈소스
#뉴스
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

AF_ALG 커널 모듈을 안전하게 비활성화하기 위해, 현재 이 모듈을 사용 중인 프로세스들을 식별하는 도구가 개발되었습니다. 이 도구는 프로세스 ID, 파일 디스크립터, 명령어 이름 등의 구체적인 정보를 목록 형태로 제공하며, 마이그레이션이 필요한 대상을 파악할 수 있게 돕습니다. 또한 접근 권한 부족으로 인한 읽기 오류 등 발생 가능한 에러 상황도 함께 확인할 수 있습니다.

본문

Recently the https://copy.fail exploit was released, it uses AF_ALG (aead) to achieve arbitrary page write. If you're looking for a way to determine whether its safe to just turn off the AF_ALG kernel module entirely this tool will give you a list of processes that currently use AF_ALG that may need to be migrated before doing so. sudo go run main.go # Or go build sudo ./detect-running-alg-socket # Or curl -L https://github.com/NHAS/detect-running-alg-socket/releases/download/v1.0.0/detect-running-alg-socket-linux-amd64 -o detect-running-alg-socket-linux-amd64 && chmod +x detect-running-alg-socket-linux-amd64 sudo ./detect-running-alg-socket-linux-amd64 Usage of ./detect-running-alg-socket: -ignore-permissions-errors ignore permission errors -stream enable streaming mode Streaming mode will return the list of processes and their file descriptors that use AF_ALG while the scan is funning. Just a simple json blob. For example (without -stream ) { "alg_sockets": [ { "pid": 1492, "fd": 15, "comm": "bluetoothd" }, { "pid": 1492, "fd": 17, "comm": "bluetoothd" }, { "pid": 5355, "fd": 3, "comm": "test" } ] } Example of an error: { "pid": 999, "fd": -1, "comm": "kworker/R-btrfs-cache", "error": "unable to read pid 999 file descriptors, potentially try root: open /proc/999/fd: permission denied" }

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →