2015. 11. 26. 01:35
원본출처 : http://www.cmsfactory.net/node/10407
리눅스에도 바이러스가 있습니다. 윈도우즈처럼 많지는 않아도 있죠.
특히 파일을 주고 받는 작업을 많이 한다면 그 파일을 통해 감염되기도 합니다.
그래서 리눅스에도 바이러스 백신 프로그램이 있습니다.
대표적인 것은 ClamAV로, 리눅스와 마찬가지로 Free 입니다.
우분투(Ubuntu)에 ClamAV를 설치하고 사용하는 방법을 메모합니다.
설치
우분투 패키지에 포함되어 있으므로 apt-get으로 설치할 수 있습니다.
apt-get install clamav
바이러스 정의 업데이트
바이러스 정의를 업데이트하려면 다음과 같이 합니다.
freshclam
검사
바이러스 검사는 clamscan으로 합니다.
home 디렉토리와 그 하위 디렉토리를 검사하려면 다음과 같이 합니다.
clamscan -r \home
clamscan 결과를 로그 파일로 남기고 싶으면 다음과 같이 합니다.
clamscan -r /home -l clamscan.log
감염된 파일을 특정 디렉토리로 이동하려면 다음과 같이 합니다.
clamscan -r /home --move=DIRECTORY
자세한 옵션은 다음 명령어로 확인할 수 있습니다.
clamscan --help
내용은 다음과 같습니다.
Clam AntiVirus Scanner 0.97.8 By The ClamAV Team: http://www.clamav.net/team (C) 2007-2009 Sourcefire, Inc. --help -h Print this help screen --version -V Print version number --verbose -v Be verbose --debug Enable libclamav's debug messages --quiet Only output error messages --stdout Write to stdout instead of stderr --no-summary Disable summary at end of scanning --infected -i Only print infected files --bell Sound bell on virus detection --tempdir=DIRECTORY Create temporary files in DIRECTORY --leave-temps[=yes/no(*)] Do not remove temporary files --database=FILE/DIR -d FILE/DIR Load virus database from FILE or load all supported db files from DIR --official-db-only[=yes/no(*)] Only load official signatures --log=FILE -l FILE Save scan report to FILE --recursive[=yes/no(*)] -r Scan subdirectories recursively --cross-fs[=yes(*)/no] Scan files and directories on other filesystems --follow-dir-symlinks[=0/1(*)/2] Follow directory symlinks (0 = never, 1 = direct, 2 = always) --follow-file-symlinks[=0/1(*)/2] Follow file symlinks (0 = never, 1 = direct, 2 = always) --file-list=FILE -f FILE Scan files from FILE --remove[=yes/no(*)] Remove infected files. Be careful! --move=DIRECTORY Move infected files into DIRECTORY --copy=DIRECTORY Copy infected files into DIRECTORY --exclude=REGEX Don't scan file names matching REGEX --exclude-dir=REGEX Don't scan directories matching REGEX --include=REGEX Only scan file names matching REGEX --include-dir=REGEX Only scan directories matching REGEX --bytecode[=yes(*)/no] Load bytecode from the database --bytecode-unsigned[=yes/no(*)] Load unsigned bytecode --bytecode-timeout=N Set bytecode timeout (in milliseconds) --detect-pua[=yes/no(*)] Detect Possibly Unwanted Applications --exclude-pua=CAT Skip PUA sigs of category CAT --include-pua=CAT Load PUA sigs of category CAT --detect-structured[=yes/no(*)] Detect structured data (SSN, Credit Card) --structured-ssn-format=X SSN format (0=normal,1=stripped,2=both) --structured-ssn-count=N Min SSN count to generate a detect --structured-cc-count=N Min CC count to generate a detect --scan-mail[=yes(*)/no] Scan mail files --phishing-sigs[=yes(*)/no] Signature-based phishing detection --phishing-scan-urls[=yes(*)/no] URL-based phishing detection --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found --phishing-ssl[=yes/no(*)] Always block SSL mismatches in URLs (phishing module) --phishing-cloak[=yes/no(*)] Always block cloaked URLs (phishing module) --algorithmic-detection[=yes(*)/no] Algorithmic detection --scan-pe[=yes(*)/no] Scan PE files --scan-elf[=yes(*)/no] Scan ELF files --scan-ole2[=yes(*)/no] Scan OLE2 containers --scan-pdf[=yes(*)/no] Scan PDF files --scan-html[=yes(*)/no] Scan HTML files --scan-archive[=yes(*)/no] Scan archive files (supported by libclamav) --detect-broken[=yes/no(*)] Try to detect broken executable files --block-encrypted[=yes/no(*)] Block encrypted archives --max-filesize=#n Files larger than this will be skipped and assumed clean --max-scansize=#n The maximum amount of data to scan for each container file (**) --max-files=#n The maximum number of files to scan for each container file (**) --max-recursion=#n Maximum archive recursion level for container file (**) --max-dir-recursion=#n Maximum directory recursion level (*) Default scan settings (**) Certain files (e.g. documents, archives, etc.) may in turn contain other files inside. The above options ensure safe processing of this kind of data.
주의할 점
ClamAV는 바이러스에 감염된 파일을 치료하여 사용 가능하게 만들지는 않습니다. 감염된 파일이 있다면 삭제해야 합니다.