seph
pemberton:updates seph$ ./osqueryd/5.9.1/osqueryd -S 'SELECT * FROM magic WHERE path="/bin/ls"'
+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------+
| path | magic_db_files | data | mime_type | mime_encoding |
+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------+
| /bin/ls | /usr/share/file/magic.mgc:/usr/share/misc/magic.mgc | Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e] | application/x-mach-binary | (null)(null)binary |
+---------+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------+
pemberton:updates seph$ ./osqueryd/5.10.2/osqueryd -S 'SELECT * FROM magic WHERE path="/bin/ls"'
/usr/share/file/magic.mgc, 1: Warning: offset `?' invalid
Version=' invalidagic.mgc, 2: Warning: offset `
/usr/share/file/magic.mgc, 3: Warning: offset `' invalid
/usr/share/file/magic.mgc, 6: Warning: offset `Firmware v' invalid
/usr/share/file/magic.mgc, 12: Warning: offset `' invalid
Corel Corporation' invalid 13: Warning: offset `
I’m inclined to blame the libmagic upgrade in https://github.com/osquery/osquery/pull/8142Stefano Bonicatti
10/25/2023, 2:38 PMStefano Bonicatti
10/25/2023, 2:38 PMStefano Bonicatti
10/25/2023, 2:39 PMStefano Bonicatti
10/25/2023, 2:39 PMStefano Bonicatti
10/25/2023, 2:40 PMseph
seph
seph
seph
seph
Stefano Bonicatti
10/25/2023, 2:52 PMStefano Bonicatti
10/25/2023, 3:40 PMmagic_db_files
as a constraint, and then joins the system available files.
I think we should just change the system available ones with the ones we shipStefano Bonicatti
10/25/2023, 3:40 PMshare
folder, like with augeasStefano Bonicatti
10/25/2023, 3:53 PMseph