DB취약진단

DBMS/Oracle

[보안위약진단] DB 서버 history에 sqlplus 사용 제거 하기

보안취약점으로 .history나 .bash_history에 sqlplus is/pw를 이용한 이력을 삭제 하고 싶을때 아래와 같이 스크립트를 만들고 사용방법은 echo에 따라 하시기 바람니다 #!/bin/sh if test $# -lt 1; then echo "usage: $0 [FILE...]" exit 1 fi for f in "$@"; do tmpfile="remove-$$" trap "rm $tmpfile" 1 2 3 15 sed -e '/sqlplus/d' "$f" > $tmpfile mv $tmpfile "$f" chmod 600 "$f" trap "" 1 2 3 15 done

숨표나라
'DB취약진단' 태그의 글 목록