콘텐츠로 이동

U-53: FTP 서비스 정보 노출 제한

분류: 01_unix

중요도: 하


개요

점검 내용

FTP 서비스 정보 노출 여부 점검

점검 목적

FTP 서비스 접속 배너를 통한 불필요한 정보 노출을 방지하기 위함

보안 위협

서비스 접속 배너가 차단되지 않을 경우, 비인가자가 FTP 접속 시도 시 노출되는 접속 배너 정보를 수집하여 악의적인 공격에 이용할 위험이 존재함

참고

-

점검 대상 및 판단 기준

대상

SOLARIS, LINUX, AIX, HP-UX 등

판단 기준

✅ 양호: FTP 접속 배너에 노출되는 정보가 없는 경우

❌ 취약: FTP 접속 배너에 노출되는 정보가 있는 경우

조치 방법

  • FTP 서비스를 사용하지 않는 경우 서비스 중지 및 비활성화 설정
  • FTP 서비스 사용 시 FTP 설정 파일을 통해 접속 배너 설정

참고

접속 배너에 서비스 이름이나 버전 정보를 노출하지 않는 것을 권고

조치 시 영향

일반적인 경우 영향 없음

점검 및 조치 사례

SOLARIS, LINUX

vsFTP

  1. 배너 설정 확인

    # cat /etc/vsftpd.conf | grep ftpd_banner
    또는
    # cat /etc/vsftpd/vsftpd.conf | grep ftpd_banner
    
  2. 해당 옵션이 설정되지 않은 경우 주석 제거 및 옵션 설정

    ftpd_banner=<변경할 배너>
    
  3. vsFTP 서비스 재시작

    # systemctl restart vsftpd
    

ProFTP

  1. 배너 설정 확인

    # cat /etc/proftpd.conf | grep ServerIdent
    또는
    # cat /etc/proftpd/proftpd.conf | grep ServerIdent
    
  2. /etc(/proftpd)/proftpd.conf 파일의 ServerIdent 설정값 수정

    ServerIdent off
    또는
    ServerIdent on “<변경할 배너>”
    
  3. ProFTP 서비스 재시작

    # systemctl restart proftpd
    

AIX

FTP

  1. 메시지 카탈로그 파일 추출

    # dspcat -g /usr/lib/nls/msg/en_US/ftpd.cat > /tmp/ftpd.msg
    
  2. 배너 설정 확인

    # cat /tmp/ftpd.msg
    (%s) FTP server (%s) ready.”
    
  3. /tmp/ftpd.msg 파일 내 배너 설정 변경

    “<변경할 배너>”
    
  4. ftpd.cat 파일 생성

    # gencat /usr/lib/nls/msg/en_US/ftpd.cat /tmp/ftpd.msg
    

vsFTP

  1. 배너 설정 확인

    # cat /etc/vsftpd.conf | grep ftpd_banner
    
  2. 해당 옵션이 설정되지 않은 경우 주석 제거 및 옵션 설정

    ftpd_banner=<변경할 배너>
    
  3. vsFTP 서비스 PID 확인

    # ps -ef | grep vsftp
    
  4. vsFTP 서비스 재시작

    # kill -1 <PID>
    

ProFTP

  1. 배너 설정 확인

    # cat /etc/proftpd.conf | grep ServerIdent
    
  2. /etc/proftpd.conf 파일 내 ServerIdent 설정값 변경

    ServerIdent off
    또는
    ServerIdent on “<변경할 배너>”
    
  3. ProFTP 서비스 PID 확인

    # ps -ef | grep proftp
    
  4. ProFTP 서비스 재시작

    # kill –1 <PID>
    

HP-UX

FTP

  1. FTP 설정 파일 경로 확인

    # cat /etc/inetd.conf | grep ftp
    
  2. ftpaccess 설정 확인

    # cat /etc/ftpd/ftpaccess
    
    • Wu-ftpd v2.4 미만: suppresshostname, suppressversion, banner <파일 경로> 설정 확인
    • Wu-ftpd v2.4 이상: greeting, banner <파일 경로> 설정 확인
  3. 배너 설정 확인

    # cat <기본 FTP 배너 설정 파일 경로>
    
  4. /etc/inetd.conf 파일 설정값 변경

    ftp stream tcp nowait root /usr/lbin/ftpd ftpd –a /etc/ftpd/ftpaccess
    
  5. 배너 파일 수정

    vi 편집기를 이용하여 배너 파일을 열어 변경할 배너 작성

  6. /etc/ftpd/ftpaccess 파일의 suppresshostname, suppressversion, greeting 옵션 설정값 변경

    • Wu-ftpd v2.4 미만
      suppresshostname yes
      suppressversion  yes
      banner <경고 메시지가 작성된 파일 경로>
      
    • Wu-ftpd v2.4 이상
      greeting  terse
      banner <경고 메시지가 작성된 파일 경로>
      
  7. inetd 설정 적용

    # inetd –c
    

참고

해당 파일이 존재하지 않는 경우 # cp /usr/newconfig/etc/ftpd/examples/ftpaccess /etc/ftpd/ftpaccess 명령으로 파일 생성

vsFTP

  1. 배너 설정 확인

    # cat /etc/vsftpd.conf | grep ftpd_banner
    
  2. /etc/vsftpd.conf 파일의 ftpd_banner 설정값 변경

    ftpd_banner=<변경할 배너>
    
  3. vsFTP 서비스 PID 확인

    # ps -ef | grep vsftp
    
  4. vsFTP 서비스 재시작

    # kill -1 <PID>
    

ProFTP

  1. 배너 설정 확인

    # cat /etc/proftpd.conf | grep ServerIdent
    
  2. /etc/proftpd.conf 파일의 설정값 변경

    ServerIdent off
    또는
    ServerIdent on “<변경할 배너>”
    
  3. ProFTP 서비스 PID 확인

    # ps -ef | grep proftp
    
  4. ProFTP 서비스 재시작

    # kill -1 <PID>
    
  5. FTP 서비스 비활성화

    # svcadm disable proftpd
    

LINUX

inetd

  1. /etc/inetd.conf 파일 내 FTP 서비스 활성화 여부 확인

  2. /etc/inetd.conf 파일의 설정값 변경(주석 처리)

    # ftp  stream  tcp  nowait  root  /usr/sbin/tcpd /usr/sbin/in.ftpd
    
  3. inetd 서비스 재시작

    # service inetd restart
    

xinetd

  1. /etc/xinetd.d/ftp 파일 내 FTP 서비스 활성화 여부 확인

    service ftp 단락 확인

  2. /etc/xinetd.d/ftp 파일의 설정값 변경

    service ftp{
        disable = yes
        ...
    }
    
  3. 설정 적용 및 재시작

    # systemctl restart xinetd
    

vsFTP

  1. FTP 서비스 활성화 여부 확인

    # systemctl list-units --type=service | grep vsftpd
    
  2. FTP 서비스 중지

    # systemctl stop vsftpd
    
  3. FTP 서비스 비활성화

    # systemctl disable vsftpd
    

ProFTP

  1. FTP 서비스 활성화 여부 확인

    # systemctl list-units --type=service | grep proftp
    
  2. FTP 서비스 중지

    # systemctl stop proftpd
    
  3. FTP 서비스 비활성화

    # systemctl disable porftpd
    

AIX, HP-UX

FTP

  1. /etc/inetd.conf 파일 내 FTP 서비스 활성화 여부 확인

    # cat /etc/inetd.conf
    
  2. /etc/inetd.conf 파일의 설정값 변경(주석 처리)

    # ftp  stream  tcp  nowait  root  /usr/sbin/tcpd /usr/sbin/in.ftpd
    
  3. inetd 설정 적용

    # refresh -s inetd
    

vsFTP

  1. vsFTP 서비스 활성화 여부 확인

    # ps -ef | grep vsftp
    
  2. vsFTP 서비스 PID 확인

    # ps -ef | grep vsftp
    
  3. vsFTP 서비스 중지

    # kill -9 <PID>
    

ProFTP

  1. ProFTP 서비스 활성화 여부 확인

    # ps -ef | grep proftp
    
  2. ProFTP 서비스 PID 확인

    # ps -ef | grep proftp
    
  3. ProFTP 서비스 중지

    # kill -9 <PID>