## 1 Introduction
### Summary of Contributions and Structure of the Paper  
This paper provides the following contributions to the field of large language model (LLM)-based detection of malicious office documents:  
* We propose **LLM-Sentinel**, a novel methodology for detecting malicious Microsoft Office documents using LLMs. * We introduce a data extraction pipeline based on Office2 JSON, which transforms OOXML content into structured textual input suitable for LLM analysis. * We demonstrate that Claude 3.5 Sonnet is capable of identifying fine-grained malicious indicators within several hundred pages of raw document data, achieving an average F1-score of 0.929. * We provide a detailed cost-performance evaluation, showing an average analysis time of 5-9 s and a mean cost of USD 0.19 per analysis. * We evaluate the resilience of the proposed method against obfuscation techniques, including prompt injection and encrypted file payloads. * We discuss regulatory implications and future directions, including the use of self-hosted LLMs and multi-format applicability. The paper is organised as follows. In Section 1, we introduce the severity of malicious documents in Section 1.1, the structure of office documents in Section 1.2, and the cybersecurity risks posed by Microsoft Office documents in Section 1.3. We detail common attack vectors in Section 1.4, with an emphasis on luring victims to accept malicious documents in Section 1.4.1, as well as macros and template injection techniques in Section 1.4.2. In Section 1.5, we summarise the main aim and contributions of this article, namely, to provide an approach for the LLM-based based assessment of malicious office documents. Section 2 provides more insights into the background of the topic and surveys related work for the detection of malicious office files. We discuss the limitations of traditional static and dynamic analysis methods in Sections 2.1 and 2.2, and examine how prior malware detection approaches fall short when addressing novel threats in Section 2.3. LLMs also have promise in being able to detect prior unknown malware types; therefore, we provide an overview on LLMs in Section 2.4 and review LLM-based detection strategies in Section 2.5. The overview on the background and related work concludes with the identification of the research gap and a clear problem statement in Section 2.6. As a preparation step for our LLM-based office document assessment, the office document is advised to be converted into a more accessible JSON file. Our dataset construction and extraction methodology are presented in Section 3. Here, we outline the OOXML structure in Section 3.1, introduce the Office2 JSON tool in Section 3.2, and describe our collection process for actual malware files in Section 3.3. Our core methodology for office document assessment is described in Section 4. We present the LLM-Sentinel pipeline in Section 4.1--it provides an interface for the user to pass an office document, which is then converted to JSON and, with further information on the file, is passed to a general LLM for an input for a final assessment on the file. Implementation strategies are elaborated in Section 4.2. The essential prompt engineering is discussed in Section 4.3. We close the Section with a discussion on various risks, such as prompt injection, in Section 4.5, and a discussion in Section 4.6 on limitations in handling encrypted content. In Section 5, we provide an empirical analysis of our system through a thorough evaluation. After introducing our data setup, we declare the relevant performance metrics and F1-scores in Section 5.2, the monetary costs per query in Section 5.4, and the costs in terms of processing time in Section 5.5. The evaluation demonstrates that the LLM-based office file assessment method can detect individual malicious indicators in an average of five to nine seconds and produce a detailed static analysis report, achieving an average cost of USD 0.19 per request and an F1-score of 0.929.