xref: /freebsd/contrib/file/magic/Magdir/fsav (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*43a5ec4eSXin LI# $File: fsav,v 1.22 2021/04/26 15:56:00 christos Exp $
4b6cee71dSXin LI# fsav:  file(1) magic for datafellows fsav virus definition files
5b6cee71dSXin LI# Anthon van der Neut (anthon@mnt.org)
6b6cee71dSXin LI
7b6cee71dSXin LI# ftp://ftp.f-prot.com/pub/{macrdef2.zip,nomacro.def}
8b6cee71dSXin LI0	beshort		0x1575		fsav macro virus signatures
9b6cee71dSXin LI>8	leshort		>0		(%d-
10b6cee71dSXin LI>11	byte		>0		\b%02d-
11b6cee71dSXin LI>10	byte		>0		\b%02d)
12b6cee71dSXin LI# ftp://ftp.f-prot.com/pub/sign.zip
13b6cee71dSXin LI#10	ubyte		<12
14b6cee71dSXin LI#>9	ubyte		<32
15b6cee71dSXin LI#>>8	ubyte		0x0a
16b6cee71dSXin LI#>>>12	ubyte		0x07
17b6cee71dSXin LI#>>>>11	uleshort	>0		fsav DOS/Windows virus signatures (%d-
18b6cee71dSXin LI#>>>>10	byte		0		\b01-
19b6cee71dSXin LI#>>>>10	byte		1		\b02-
20b6cee71dSXin LI#>>>>10	byte		2		\b03-
21b6cee71dSXin LI#>>>>10	byte		3		\b04-
22b6cee71dSXin LI#>>>>10	byte		4		\b05-
23b6cee71dSXin LI#>>>>10	byte		5		\b06-
24b6cee71dSXin LI#>>>>10	byte		6		\b07-
25b6cee71dSXin LI#>>>>10	byte		7		\b08-
26b6cee71dSXin LI#>>>>10	byte		8		\b09-
27b6cee71dSXin LI#>>>>10	byte		9		\b10-
28b6cee71dSXin LI#>>>>10	byte		10		\b11-
29b6cee71dSXin LI#>>>>10	byte		11		\b12-
30b6cee71dSXin LI#>>>>9	ubyte		>0		\b%02d)
31b6cee71dSXin LI# ftp://ftp.f-prot.com/pub/sign2.zip
32b6cee71dSXin LI#0	ubyte		0x62
33b6cee71dSXin LI#>1	ubyte		0xF5
34b6cee71dSXin LI#>>2	ubyte		0x1
35b6cee71dSXin LI#>>>3	ubyte		0x1
36b6cee71dSXin LI#>>>>4	ubyte		0x0e
37b6cee71dSXin LI#>>>>>13		ubyte	>0		fsav virus signatures
38*43a5ec4eSXin LI#>>>>>>11	ubyte	x		size %#02x
39b6cee71dSXin LI#>>>>>>12	ubyte	x		\b%02x
40b6cee71dSXin LI#>>>>>>13	ubyte	x		\b%02x bytes
41b6cee71dSXin LI
42b6cee71dSXin LI# Joerg Jenderek: joerg dot jenderek at web dot de
4348c779cdSXin LI# clamav-0.100.2\docs\html\node60.html
4448c779cdSXin LI# https://github.com/vrtadmin/clamav-faq/raw/master/manual/clamdoc.pdf
4548c779cdSXin LI# ClamAV virus database files start with a 512 bytes colon separated header
46b6cee71dSXin LI# ClamAV-VDB:buildDate:version:signaturesNumbers:functionalityLevelRequired:MD5:Signature:builder:buildTime
4748c779cdSXin LI# + gzipped (optional) tarball files
4848c779cdSXin LI# output can often be verified by `sigtool --info=FILE`
4948c779cdSXin LI0	string		ClamAV-VDB:	Clam AntiVirus
5048c779cdSXin LI# padding spaces implies database
5148c779cdSXin LI>511	ubyte		=0x20		database
5248c779cdSXin LI!:mime	application/x-clamav-database
5348c779cdSXin LI# empty build time
5448c779cdSXin LI>>10	string		=::		(unsigned)
5548c779cdSXin LI# sigtool(1) man page
5648c779cdSXin LI!:ext	cud
5748c779cdSXin LI# display some text to avoid error like:
5848c779cdSXin LI# Magdir/fsav, 78: Warning: Current entry does not yet have a description for adding a EXTENSION type
5948c779cdSXin LI# file: could not find any valid magic files! (No error)
6048c779cdSXin LI>>10	default		x		(with buildtime)
6148c779cdSXin LI#>>10	default		x
62*43a5ec4eSXin LI# clamtmp is used for temporarily database like update process
6348c779cdSXin LI# for pure tar database only cld extension found
6448c779cdSXin LI!:ext	cld/cvd/clamtmp/cud
6548c779cdSXin LI>511	default		x		file
6648c779cdSXin LI!:mime	application/x-clamav
6748c779cdSXin LI!:ext	info
6848c779cdSXin LI>11	string		>\0
6948c779cdSXin LI# buildDate empty or like "22 Mar 2017 12-57 -0400"; verified by `sigtool -i FILE`
7048c779cdSXin LI>>11	regex		\^[^:]{0,23}	\b, %s
7148c779cdSXin LI# version like 25170
7248c779cdSXin LI>>>&1	regex		\^[^:]{1,6}	\b, version %s
7348c779cdSXin LI# signaturesNumbers like 4566249
7448c779cdSXin LI>>>>&1	regex		\^[^:]{1,10}	\b, %s signatures
7548c779cdSXin LI# functionalityLevelRequired like 60
7648c779cdSXin LI>>>>>&1	regex		\^[^:]{1,4}	\b, level %s
7748c779cdSXin LI# X for nothing or MD5
7848c779cdSXin LI#>>>>>>&1	regex	\^[^:]{1,32}	\b, MD5 "%s"
7948c779cdSXin LI>>>>>>&1	regex	\^[^:]{1,32}
8048c779cdSXin LI# X for nothing or digital signature starting like AIzk/LYbX
8148c779cdSXin LI#>>>>>>>&1	regex	\^[^:]{1,255}	\b, signature "%s"
8248c779cdSXin LI>>>>>>>&1	regex	\^[^:]{1,255}
8348c779cdSXin LI# builder like neo
8448c779cdSXin LI>>>>>>>>&1	regex	\^[^:]{1,32}	\b, builder %s
8548c779cdSXin LI# buildTime like 1506611558
8648c779cdSXin LI#>>>>>>>>>&1	regex	\^[^:]{1,10}	\b, %s
8748c779cdSXin LI>>>>>>>>>&1	regex	\^[^:]{1,10}
8848c779cdSXin LI# padding with spaces
89*43a5ec4eSXin LI#>>>>>>>>>>&1	ubequad	x		\b, padding %#16.16llx
9048c779cdSXin LI>510	ubyte		=0x20
9148c779cdSXin LI# inspect real database content
92*43a5ec4eSXin LI#>>512	ubeshort	x		\b, database MAGIC %#x
9348c779cdSXin LI# ./archive handle pure tar archives
9448c779cdSXin LI>>1012	quad		=0		\b, with
9548c779cdSXin LI>>>512	use		tar-file
9648c779cdSXin LI# not pure tar
9748c779cdSXin LI>>1012	quad		!0
98*43a5ec4eSXin LI# one space at the end of text and then handles gzipped archives by ./compress
9948c779cdSXin LI>>>512	string		\037\213	\b, with
10048c779cdSXin LI>>>>512	indirect	x
101b6cee71dSXin LI
102b6cee71dSXin LI# Type: Grisoft AVG AntiVirus
103b6cee71dSXin LI# From: David Newgas <david@newgas.net>
104b6cee71dSXin LI0	string	AVG7_ANTIVIRUS_VAULT_FILE	AVG 7 Antivirus vault file data
105b6cee71dSXin LI
106b6cee71dSXin LI0	string	X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR
107b6cee71dSXin LI>33	string	-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*	EICAR virus test files
10848c779cdSXin LI
10948c779cdSXin LI# From: Joerg Jenderek
11048c779cdSXin LI# URL: https://www.avira.com/
11148c779cdSXin LI# Note: found in directory %ProgramData%\Avira\Antivirus\INFECTED (Windows)
11248c779cdSXin LI# tested with version 15.0.43.23 at November 2019
11348c779cdSXin LI0	string		AntiVir\ Qua	Avira AntiVir quarantined
11448c779cdSXin LI!:mime	application/x-avira-qua
11548c779cdSXin LI#!:mime	application/octet-stream
11648c779cdSXin LI!:ext	qua
11748c779cdSXin LI>156	string		SUSPICIOUS_FILE
11848c779cdSXin LI# file path of suspicious file
11948c779cdSXin LI>>220	lestring16	x		%s
12048c779cdSXin LI>156	string		!SUSPICIOUS_FILE
12148c779cdSXin LI# file path of virus file
12248c779cdSXin LI>>228	lestring16	x		%s
12348c779cdSXin LI# quarantined date
12448c779cdSXin LI>60	ldate		x		at %s
12548c779cdSXin LI# virus/danger name
12648c779cdSXin LI>156	string		!SUSPICIOUS_FILE
12748c779cdSXin LI>>156	string		x		\b, category "%s"
12848c779cdSXin LI
129