리눅스 보안 점검 명령어 모음

By | 2026년 9월 30일
Table of Contents

리눅스 보안 점검 명령어 모음

SUID, SGID, Sticky Bit

진단

# SUID 설정 파일 검색
find / -user root -perm -4000 -print 2>/dev/null

# SGID 설정 파일 검색
find / -group root -perm -2000 -print 2>/dev/null

# SUID 및 SGID 통합 검색
find / -type f \( -perm -4000 -o -perm -2000 \) -ls 2>/dev/null

조치

sudo chmod u-s /usr/bin/pkexec /usr/bin/chfn /usr/bin/chsh /usr/sbin/pppd
sudo chmod u-s,g-s /usr/bin/at

chmod +t /tmp

답글 남기기