I am currently working on a project to evaluate whether an uploaded *.xlsx file really is a *.xlsx file only and not a *.xlsm with changed extension.
Since a *.xlsx file is more or less a *.zip file, I extracted the contents and noticed that some files contain a *.bin file, while others don't. Although the excel file might be a legit one without any attempt to inject another extension by tricking the user into renaming it.
Therefore my question: When does a xlsx file contain a *.bin file? And is this method suitable to detect whether a xlsx file contains macros?
I am also checking the content of the [content_types].xml file to contain either one of the strings: application/vnd.ms-office.vbaproject and application/vnd.ms-excel.sheet.macroenabled.
