Funny QNX6 file system magic
See original GitHub issueI’ve been looking at an issue why a Samsung FW blob has a QNX6 FS in it.
I am sure this is not true, since the magic doesn’t align while the blob is huge and likely to be a false positive. So I looked into the QNX6 magic as defined in the latest filesystems file:
# QNX6 filesystem
0 string \xEB\x10\x90\x00 QNX6 filesystem
However, after reading this Forensic Focus article and looking at the corresponding QNX6 extractor, it seem that there is a different magic available, namely \68\19\11\22
.
class QNX6FS:
PARTITION_MAGIC = {'QNX4':0x002f,'QNX6':0x68191122}
FILE_TYPE = {'DIRECTORY':0x01,'DELETED':0x02,'FILE':0x03}
QNX6_SUPERBLOCK_SIZE = 0x200 #Superblock is fixed (512 bytes)
QNX6_SUPERBLOCK_AREA = 0x1000 #Area reserved for superblock
QNX6_BOOTBLOCK_SIZE = 0x2000 #Boot Block Size
QNX6_DIR_ENTRY_SIZE = 0x20 #Dir block size (32 bytes)
QNX6_INODE_SIZE = 0x80 #INode block size (128 bytes)
QNX6_INODE_SIZE_BITS = 0x07 #INode entry size shift
QNX6_NO_DIRECT_POINTERS = 16 #Max Direct iNodes
QNX6_PTR_MAX_LEVELS = 5 #Max Indirect iNodes
QNX6_SHORT_NAME_MAX = 27 #Short Name Max Length
QNX6_LONG_NAME_MAX = 510 #Long Name Max Length
def __init__(self, source):
self.TARGET_ = source
def GetPartitions(self):
with open(self.TARGET_, "rb") as handle:
DataBlock = handle.read(512);
##Split DataBlock into parts
BootCode = DataBlock[0:446]
MasterPartitionTable = DataBlock[446:510]
BootRecordSignature = DataBlock[510:512]
##Detect if MBR is valid.
BootRecordSignature = unpack('H', BootRecordSignature)[0]
if BootRecordSignature == 0xAA55:
print "[-] BootRecordSignature Detected."
else:
raise IOError('[ERROR] BootRecordSignature Missing; Invalid Disk Image')
exit()
return self.parsePartitionMBR(handle,0)
...
I think we need to change this and include it. Also, there are no references in the magic file, as to where this info was obtained.
Any ideas how to proceed?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
- Power-Safe (fs-qnx6.so) filesystem
The limits for Power-Safe filesystems (supported by fs-qnx6.so) include: Physical disk sectors: 32-bit (2 TB), using the devb API.
Read more >The QNX6 Filesystem - The Linux Kernel documentation
qnx6fs shares many properties with traditional Unix filesystems. It has the concepts of blocks, inodes and directories. On QNX it is possible to...
Read more >Diff - kernel/common - android Git repositories
+On QNX it is possible to create little endian and big endian qnx6 filesystems. +This feature makes it possible to create and use...
Read more >If Kali Linux doesn't use file extensions, how then does it ...
This command uses several sets of tests, namely filesystem test, magic test, a ... openpromfs orangefs overlayfs proc pstore qnx4 qnx6 quota ramfs...
Read more >BUILDING EMBEDDED SYSTEMS
The OS image as a filesystem ... Actually, it's not magic — mkifs simply looked for the environment variable MKIFS PATH. ... Have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Gerd,
merci!
-peter
Hi,
Hope This Helps.
On Wed, Oct 17, 2018 at 7:11 PM E:V:A notifications@github.com wrote: