[File] Magic for FRITZ!Box router configuration *.export

Jörg Jenderek joerg.jen.der.ek at gmx.net
Wed Aug 19 18:02:18 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
some weeks ago i saved the configuration of my routers produced by
avm.de and called FRITZ!Box with file name extension "export" like in
example fritzbox.export. These backups have "export" as file name
extension. When running file command version 5.39 on such backups
these are described as "ASCII text".

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). This identifies such
samples as FRITZ!Box configuration backup. It list with -v option the
related URL pointing to site with some information about such backups
.

Unfortunately from the company avm there exist no official file
specification. A few information about that router type can be
found on Wikipedia. That is expressed by comment line like:
 # URL:		https://en.wikipedia.org/wiki/Fritz!Box
Apparently these people like china government believe in wrong
philosophy "security by obscurity". But luckily Michael Engelke has
developed some tools to handle such export files. So i add this
site as reference by line:
 # Reference:	http://www.mengelke.de/Projekte/FritzBoxTools2

Unfortunately my magic lines are based on observations on the two
router models 4040 and 6490 Cable (lgi). So i do not know if lines
are always true.

All my backup files starts with characteristic phrase. By this such
backup are recognized by line like
 0 string ****\ FRITZ!Box\ 	FRITZ!Box configuration backup
Afterwards show user defined mime type and file name extension by lin
es
 !:mime	application/x-avm-export
 !:ext	export

Afterwards the router model name like "4040" or "6490 Cable (lgi)"
is stored followed by " CONFIGURATION EXPORT". This is shown by line
 >15	string		x			of %-.4s

On third line firmware version like 141.06.24, 141.06.50, 141.07.10
or 155.06.83 is stored in form of variable assignment line. This
information is shown by lines
 >41	search/172	FirmwareVersion=	\b, firmware version
 >>&0	string		x			%s

In the same manner show OEM information, language, date and time
information. That is normally also pert of the file name.

After applying the above mentioned modifications by magic lines
appended as avm.txt then i get an output like:

fritzbox.export:
	FRITZ!Box configuration backup of 6490,
	firmware version 141.06.24, oem lgi,
	language de, Sun Jul  5 18:17:07 2015
FRITZ.Box 4040 155.06.83i_01.01.70_0512.export:
	FRITZ!Box configuration backup of 4040,
	firmware version 155.06.83, oem avme,
	language de, Thu Jan  1 05:12:09 1970
FRITZ.Box 6490 Cable (lgi) 141.06.24_30.08.15_1721.export:
	FRITZ!Box configuration backup of 6490,
	firmware version 141.06.24, oem lgi,
	language de, Sun Aug 30 17:21:04 2015
FRITZ.Box 6490 Cable (lgi) 141.06.24_04.06.15_2225.export:
	FRITZ!Box configuration backup of 6490,
	firmware version 141.06.24, oem lgi,
	language de, Thu Jun  4 22:25:19 2015
FRITZ.Box 6490 Cable (lgi) 141.07.10_01.01.20_1721.export:
	FRITZ!Box configuration backup of 6490,
	firmware version 141.07.10, oem lgi,
	language en, Wed Jan  1 17:21:26 2020

I hope my magic lines file can be applied in future version of
file utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek
















-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXz1pCAAKCRCv8rHJQhrU
1m4eAJ0b9ugLwWpnp5HsXEJHy6crCqlTSgCfVcBR/guh9KWz1pxQanoWWLR3Jkg=
=21lP
-----END PGP SIGNATURE-----
-------------- next part --------------

# Summary:	FRITZ!Box router configuration backup
# From:		Joerg Jenderek
# URL:		https://en.wikipedia.org/wiki/Fritz!Box
# Reference:	http://www.mengelke.de/Projekte/FritzBoxTools2
# Note:		only tested with models 4040 and 6490 Cable (lgi)
0	string		****\ FRITZ!Box\ 	FRITZ!Box configuration backup
#!:mime	text/plain
!:mime	application/x-avm-export
!:ext	export
# router model name like "4040" , "6490 Cable (lgi)" followed by " CONFIGURATION EXPORT"
>15	string		x			of %-.4s
# on 2nd line hashed password
#>41	search/54	Password=		\b, password
# on 3rd line firmware version like: 141.06.24 141.06.50 141.07.10 ... 155.06.83
>41	search/172	FirmwareVersion=	\b, firmware version
>>&0	string		x			%s
# on 5th line oem like: avme lgi
>41	search/285	OEM=			\b, oem
>>&0	string		x			%s
# on 7th line language like: de en
>41	search/305	Language=		\b, language
>>&0	string		x			%s
# on 10th line cfg file name like: /var/tmp.cfg
>41	search/349	tmp.cfg
# on 11th line date inside c-comment like: Thu Jun  4 22:25:19 2015
>>&4	string		x			\b, %s
#

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avm.txt.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20200819/81b6d014/attachment.obj>


More information about the File mailing list