xref: /freebsd/contrib/file/magic/Magdir/fsav (revision 48c779cdecb5f803e5fe5d761987e976ca9609db)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*48c779cdSXin LI# $File: fsav,v 1.19 2019/04/19 00:42:27 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
38b6cee71dSXin LI#>>>>>>11	ubyte	x		size 0x%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
43*48c779cdSXin LI# clamav-0.100.2\docs\html\node60.html
44*48c779cdSXin LI# https://github.com/vrtadmin/clamav-faq/raw/master/manual/clamdoc.pdf
45*48c779cdSXin 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
47*48c779cdSXin LI# + gzipped (optional) tarball files
48*48c779cdSXin LI# output can often be verified by `sigtool --info=FILE`
49*48c779cdSXin LI0	string		ClamAV-VDB:	Clam AntiVirus
50*48c779cdSXin LI# padding spaces implies database
51*48c779cdSXin LI>511	ubyte		=0x20		database
52*48c779cdSXin LI!:mime	application/x-clamav-database
53*48c779cdSXin LI# empty build time
54*48c779cdSXin LI>>10	string		=::		(unsigned)
55*48c779cdSXin LI# sigtool(1) man page
56*48c779cdSXin LI!:ext	cud
57*48c779cdSXin LI# display some text to avoid error like:
58*48c779cdSXin LI# Magdir/fsav, 78: Warning: Current entry does not yet have a description for adding a EXTENSION type
59*48c779cdSXin LI# file: could not find any valid magic files! (No error)
60*48c779cdSXin LI>>10	default		x		(with buildtime)
61*48c779cdSXin LI#>>10	default		x
62*48c779cdSXin LI# clamtmp is used for temporily database like update process
63*48c779cdSXin LI# for pure tar database only cld extension found
64*48c779cdSXin LI!:ext	cld/cvd/clamtmp/cud
65*48c779cdSXin LI>511	default		x		file
66*48c779cdSXin LI!:mime	application/x-clamav
67*48c779cdSXin LI!:ext	info
68*48c779cdSXin LI>11	string		>\0
69*48c779cdSXin LI# buildDate empty or like "22 Mar 2017 12-57 -0400"; verified by `sigtool -i FILE`
70*48c779cdSXin LI>>11	regex		\^[^:]{0,23}	\b, %s
71*48c779cdSXin LI# version like 25170
72*48c779cdSXin LI>>>&1	regex		\^[^:]{1,6}	\b, version %s
73*48c779cdSXin LI# signaturesNumbers like 4566249
74*48c779cdSXin LI>>>>&1	regex		\^[^:]{1,10}	\b, %s signatures
75*48c779cdSXin LI# functionalityLevelRequired like 60
76*48c779cdSXin LI>>>>>&1	regex		\^[^:]{1,4}	\b, level %s
77*48c779cdSXin LI# X for nothing or MD5
78*48c779cdSXin LI#>>>>>>&1	regex	\^[^:]{1,32}	\b, MD5 "%s"
79*48c779cdSXin LI>>>>>>&1	regex	\^[^:]{1,32}
80*48c779cdSXin LI# X for nothing or digital signature starting like AIzk/LYbX
81*48c779cdSXin LI#>>>>>>>&1	regex	\^[^:]{1,255}	\b, signature "%s"
82*48c779cdSXin LI>>>>>>>&1	regex	\^[^:]{1,255}
83*48c779cdSXin LI# builder like neo
84*48c779cdSXin LI>>>>>>>>&1	regex	\^[^:]{1,32}	\b, builder %s
85*48c779cdSXin LI# buildTime like 1506611558
86*48c779cdSXin LI#>>>>>>>>>&1	regex	\^[^:]{1,10}	\b, %s
87*48c779cdSXin LI>>>>>>>>>&1	regex	\^[^:]{1,10}
88*48c779cdSXin LI# padding with spaces
89*48c779cdSXin LI#>>>>>>>>>>&1	ubequad	x		\b, padding 0x%16.16llx
90*48c779cdSXin LI>510	ubyte		=0x20
91*48c779cdSXin LI# inspect real database content
92*48c779cdSXin LI#>>512	ubeshort	x		\b, database MAGIC 0x%x
93*48c779cdSXin LI# ./archive handle pure tar archives
94*48c779cdSXin LI>>1012	quad		=0		\b, with
95*48c779cdSXin LI>>>512	use		tar-file
96*48c779cdSXin LI# not pure tar
97*48c779cdSXin LI>>1012	quad		!0
98*48c779cdSXin LI# one space at the end of text and then handles gziped archives by ./compress
99*48c779cdSXin LI>>>512	string		\037\213	\b, with
100*48c779cdSXin 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
108*48c779cdSXin LI
109*48c779cdSXin LI# From: Joerg Jenderek
110*48c779cdSXin LI# URL: https://www.avira.com/
111*48c779cdSXin LI# Note: found in directory %ProgramData%\Avira\Antivirus\INFECTED (Windows)
112*48c779cdSXin LI# tested with version 15.0.43.23 at November 2019
113*48c779cdSXin LI0	string		AntiVir\ Qua	Avira AntiVir quarantined
114*48c779cdSXin LI!:mime	application/x-avira-qua
115*48c779cdSXin LI#!:mime	application/octet-stream
116*48c779cdSXin LI!:ext	qua
117*48c779cdSXin LI>156	string		SUSPICIOUS_FILE
118*48c779cdSXin LI# file path of suspicious file
119*48c779cdSXin LI>>220	lestring16	x		%s
120*48c779cdSXin LI>156	string		!SUSPICIOUS_FILE
121*48c779cdSXin LI# file path of virus file
122*48c779cdSXin LI>>228	lestring16	x		%s
123*48c779cdSXin LI# quarantined date
124*48c779cdSXin LI>60	ldate		x		at %s
125*48c779cdSXin LI# virus/danger name
126*48c779cdSXin LI>156	string		!SUSPICIOUS_FILE
127*48c779cdSXin LI>>156	string		x		\b, category "%s"
128*48c779cdSXin LI
129