decalage2 / oletools

oletools - python tools to analyze MS OLE2 files (Structured Storage, Compound File Binary Format) and MS Office documents, for malware analysis, forensics and debugging.
http://www.decalage.info/python/oletools
Other
2.81k stars 560 forks source link

rtfobj/oleid: Equation Editor objects not detected #858

Open decalage2 opened 1 month ago

decalage2 commented 1 month ago

RTF files mentioned in this article contain OLE objects with an equation editor exploit: https://x.com/_CPResearch_/status/1793642302839431502 / https://research.checkpoint.com/2024/sharp-dragon-expands-towards-africa-and-the-caribbean/

Docx (with remote template pointing to RTF)

RTF (with equation editor exploit and OLE package with DLL)

Several issues to be addressed:

rtfobj output:

rtfobj 0.60.1 on Python 3.11.6 - http://decalage.info/python/oletools
THIS IS WORK IN PROGRESS - Check updates regularly!
Please report any issue at https://github.com/decalage2/oletools/issues

===============================================================================
File: '180f5a0f9210698b54dcafb9a230b12e3eaf199889e5377a2acb7124c2d48d69.rtf' - size: 283670 bytes
---+----------+---------------------------------------------------------------
id |index     |OLE Object                                                     
---+----------+---------------------------------------------------------------
0  |00002B42h |format_id: 2 (Embedded)                                        
   |          |class name: b'PACKage'                                         
   |          |data size: 125952                                              
   |          |OLE Package object:                                            
   |          |Filename: '\x11ࡱ\x1aá'                                       
   |          |Source path: ''                                                
   |          |Temp path = ''                                                 
   |          |MD5 = 'd41d8cd98f00b204e9800998ecf8427e'                       
   |          |File Type: Unknown file type                                   
---+----------+---------------------------------------------------------------
1  |000408A3h |format_id: 2 (Embedded)                                        
   |          |class name: b'Equation.2\x00\x124Vx\x90\x124VxvT2'             
   |          |data size: 8485                                                
   |          |MD5 = 'a0027a66a9081e01907b1fd91ac8613f'                       
---+----------+---------------------------------------------------------------
2  |00040889h |Not a well-formed OLE object                                   
---+----------+---------------------------------------------------------------
===============================================================================
File: '9885b220b9654ac4743fe907e67da38d723fee2abf2dcd5944aa3a00c4a59c31.rtf' - size: 707473 bytes
---+----------+---------------------------------------------------------------
id |index     |OLE Object                                                     
---+----------+---------------------------------------------------------------
0  |0000A3F3h |format_id: 2 (Embedded)                                        
   |          |class name: b'PACKage'                                         
   |          |data size: 325120                                              
   |          |OLE Package object:                                            
   |          |Filename: '\x11ࡱ\x1aá'                                       
   |          |Source path: ''                                                
   |          |Temp path = ''                                                 
   |          |MD5 = 'd41d8cd98f00b204e9800998ecf8427e'                       
   |          |File Type: Unknown file type                                   
---+----------+---------------------------------------------------------------
1  |000A9554h |format_id: 2 (Embedded)                                        
   |          |class name: b'Equation.2\x00\x124Vx\x90\x124VxvT2'             
   |          |data size: 5775                                                
   |          |MD5 = '965783e01d6b29e74528f5c3717e553d'                       
---+----------+---------------------------------------------------------------
2  |000A953Ah |Not a well-formed OLE object                                   
---+----------+---------------------------------------------------------------
===============================================================================
File: 'c1e403dd787f197f928960c723866424e343789a0422dbe8c98ed2214500d151.rtf' - size: 537175 bytes
---+----------+---------------------------------------------------------------
id |index     |OLE Object                                                     
---+----------+---------------------------------------------------------------
0  |00005983h |format_id: 2 (Embedded)                                        
   |          |class name: b'PACKage'                                         
   |          |data size: 246784                                              
   |          |OLE Package object:                                            
   |          |Filename: '\x11ࡱ\x1aá'                                       
   |          |Source path: ''                                                
   |          |Temp path = ''                                                 
   |          |MD5 = 'd41d8cd98f00b204e9800998ecf8427e'                       
   |          |File Type: Unknown file type                                   
---+----------+---------------------------------------------------------------
1  |0007E6E4h |format_id: 2 (Embedded)                                        
   |          |class name: b'Equation.2\x00\x124Vx\x90\x124VxvT2'             
   |          |data size: 8485                                                
   |          |MD5 = '993a0f4852cdca46e9e0ed693c7b3e9a'                       
---+----------+---------------------------------------------------------------
2  |0007E6CAh |Not a well-formed OLE object                                   
---+----------+---------------------------------------------------------------
===============================================================================
File: 'ff35cfed656c0cac5571beae7170a2fec007e75417c1d0c4fd7af4185759ec38.rtf' - size: 1654404 bytes
---+----------+---------------------------------------------------------------
id |index     |OLE Object                                                     
---+----------+---------------------------------------------------------------
0  |0000CD46h |format_id: 2 (Embedded)                                        
   |          |class name: b'Word.Document.12'                                
   |          |data size: 85504                                               
   |          |MD5 = 'ffd84fa2448bb30bb8324d3f2a7c4fdd'                       
   |          |CLSID: F4754C9B-64F5-4B40-8AF4-679732AC0607                    
   |          |Microsoft Word Document (Word.Document.12)                     
---+----------+---------------------------------------------------------------
1  |000F0EE6h |format_id: 2 (Embedded)                                        
   |          |class name: b'PACKage'                                         
   |          |data size: 326144                                              
   |          |OLE Package object:                                            
   |          |Filename: '\x11ࡱ\x1aá'                                       
   |          |Source path: ''                                                
   |          |Temp path = ''                                                 
   |          |MD5 = 'd41d8cd98f00b204e9800998ecf8427e'                       
   |          |File Type: Unknown file type                                   
---+----------+---------------------------------------------------------------
2  |00190847h |format_id: 2 (Embedded)                                        
   |          |class name: b'Equation.2\x00\x124Vx\x90\x124VxvT2'             
   |          |data size: 5775                                                
   |          |MD5 = 'df51041f0410fcb95955c0e9788e841f'                       
---+----------+---------------------------------------------------------------
3  |0019082Dh |Not a well-formed OLE object                                   
---+----------+---------------------------------------------------------------