How not to build an electronic voting system



Similar documents
Chapter 17. Transport-Level Security

Thick Client Application Security

What IT Auditors Need to Know About Secure Shell. SSH Communications Security

Information Security Basic Concepts

Wireless Networks. Welcome to Wireless

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

CrashPlan Security SECURITY CONTEXT TECHNOLOGY

MAXIMUM DATA SECURITY with ideals TM Virtual Data Room

Data Collection and Analysis: Get End-to-End Security with Cisco Connected Analytics for Network Deployment

MIGRATIONWIZ SECURITY OVERVIEW

REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB

Visa U.S.A Cardholder Information Security Program (CISP) Payment Application Best Practices

PUBLIC REPORT. Red Team Testing of the ES&S Unity Voting System. Freeman Craft McGregor Group (FCMG) Red Team

A REVIEW OF METHODS FOR SECURING LINUX OPERATING SYSTEM

Acano solution. Security Considerations. August E

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

Client Server Registration Protocol

Complying with PCI Data Security

High Security Online Backup. A Cyphertite White Paper February, Cloud-Based Backup Storage Threat Models

Web Application Security

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

Internal Penetration Test

DRAFT Standard Statement Encryption

Chapter 7 Transport-Level Security

Security (II) ISO : Security Architecture of OSI Reference Model. Outline. Course Outline: Fundamental Topics. EE5723/EE4723 Spring 2012

A New Era. A New Edge. Phishing within your company

Achieving PCI Compliance: How Red Hat Can Help. Akash Chandrashekar, RHCE. Red Hat Daniel Kinon, RHCE. Choice Hotels Intl.

Design of Secure Electronic Voting System Using Multifactor Authentication and Cryptographic Hash Functions

a) Encryption is enabled on the access point. b) The conference room network is on a separate virtual local area network (VLAN)

Where every interaction matters.

Computer Security. Draft Exam with Answers

MySQL Security: Best Practices

VMware Horizon Workspace Security Features WHITE PAPER

FINAL DoIT v.8 APPLICATION SECURITY PROCEDURE

My FreeScan Vulnerabilities Report

Electronic Voting System : the case of Belgium

USB Portable Storage Device: Security Problem Definition Summary

Cloud Security Overview

How To Manage Web Content Management System (Wcm)

TELE 301 Network Management. Lecture 16: Remote Terminal Services

Security Advice for Instances in the HP Cloud

Topics in Network Security

October P Xerox App Studio. Information Assurance Disclosure. Version 2.0

FileCloud Security FAQ

Overview of the Penetration Test Implementation and Service. Peter Kanters

2: Do not use vendor-supplied defaults for system passwords and other security parameters

SECURITY TRENDS & VULNERABILITIES REVIEW 2015

USB Portable Storage Device: Security Problem Definition Summary

Host Hardening. Presented by. Douglas Couch & Nathan Heck Security Analysts for ITaP 1

Passing PCI Compliance How to Address the Application Security Mandates

05.0 Application Development

ICANWK406A Install, configure and test network security

Secure Shell SSH provides support for secure remote login, secure file transfer, and secure TCP/IP and X11 forwarding. It can automatically encrypt,

The Trivial Cisco IP Phones Compromise

Projectplace: A Secure Project Collaboration Solution

Oracle Solaris Security: Mitigate Risk by Isolating Users, Applications, and Data

RemotelyAnywhere Getting Started Guide

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Le vote électronique : un défi pour la vérification formelle

That Point of Sale is a PoS

SecureAge SecureDs Data Breach Prevention Solution

COMPREHENSIVE SECURITY AUDIT COMMERCIAL TAXES DEPARTMENT, KARNATAKA. Ashish Kirtikar

Pen Test Tips 2. Shell vs. Terminal

Xerox Mobile Print Cloud

Securing your Virtual Datacenter. Part 1: Preventing, Mitigating Privilege Escalation

Assignment # 1 (Cloud Computing Security)

Criteria for web application security check. Version

Summary of Results from California Testing of the ES&S Unity /AutoMARK Voting System

Linux Network Security

December P Xerox App Studio 3.0 Information Assurance Disclosure

DiamondStream Data Security Policy Summary

Did you know your security solution can help with PCI compliance too?

Windows Attack - Gain Enterprise Admin Privileges in 5 Minutes

Guidance Regarding Skype and Other P2P VoIP Solutions

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Rule 4-004G Payment Card Industry (PCI) Remote and Mobile Access Security (proposed)

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

information security and its Describe what drives the need for information security.

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Potential Targets - Field Devices

Cloud Security:Threats & Mitgations

Vulnerability Scanning & Management

Common Pitfalls in Cryptography for Software Developers. OWASP AppSec Israel July The OWASP Foundation

HIPAA: MANAGING ACCESS TO SYSTEMS STORING ephi WITH SECRET SERVER

The Risks that Pen Tests don t Find. OWASP 13 April The OWASP Foundation

Standard: Event Monitoring

A Decision Maker s Guide to Securing an IT Infrastructure

Absolute Backdoor Revisited. Vitaliy Kamlyuk, Kaspersky Lab Sergey Belov, Kaspersky Lab Anibal Sacco, Cubica Labs

Djigzo encryption. Djigzo white paper

NetBrain Security Guidance

Network-Enabled Devices, AOS v.5.x.x. Content and Purpose of This Guide...1 User Management...2 Types of user accounts2

ABC LTD EXTERNAL WEBSITE AND INFRASTRUCTURE IT HEALTH CHECK (ITHC) / PENETRATION TEST

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

CA Performance Center

Visa Asia Pacific Account Information Security (AIS) Program Payment Application Best Practices (PABP)

Securing Data on Microsoft SQL Server 2012

Transcription:

Hacklu 2015 October 21, 2015

$ whoami Security Engineer Penetration Tester wwwquentinkaiserbe contact@quentinkaiserbe QKaiser

Disclaimer This research was prepared and accomplished in my personal capacity The opinions expressed in this talk are my own and do not reflect the view of past, current, or future employer

Outline Introduction Evoting Systems in Belgium Building Secure Voting Systems CODI Polling stations Network infrastructure Web Applications Smartmatic Election Configuration Manager PV-VM Conclusions

Introduction

Evoting Systems in Belgium Historical Background I think your crypto is broken - King Albert II

Evoting Systems in Belgium Historical Background 1991 - first experiment in two townships 1994 - expanded to 20% of electorate 1999 - expanded to 44% of electorate, introduction of OCR counting 2003 - first experiment with ticketing in two townships 2007 - BeVoting report 2012 - Introduction of Smartmatic systems

Cryptographically Secure Voting Systems Building secure voting systems is complex Confidentiality Non repudiation Authenticity Integrity Non coercion Uniqueness Audit trail Simplicity Equity Verifiability

Threat Model And people are out there to get you 1 1 Security Analysis of the Estonian Internet Voting System

CODI CODI

CODI CODI encompass multiple evoting components: Jites Digivote PGM2 PGM3 Election Management System

CODI Voting booths Authentication & Authorization polling station president initialize software with a password password verified with checksum 0 1 2 3 4 5 6 7 8 9 fullpasswordvalue extension Password checksum

CODI Voting booths Integrity Protection floppy disk content integrity is checked

CODI Voting booths Vote casting bug2505 explored by @doegox 2 1 http://wwwpourevabe/spipphp?article853

CODI Ballot boxes Magnetic card layout token (5 bytes) - uniquely identify a polling station passage (1 byte) - boolean for vote casting MAC 3 (4 bytes) - ensure integrity and authenticity of vote test (1 byte) - identify voter type (N, E, S) vote (2 + x bytes) - vote value 3 ISO-9797-1, Algo 2 / Padding 2

CODI Ballot boxes Fraud detection Byte length - Sanity check Token - Ensure vote was cast in same polling station MAC - Ensure integrity and authenticity of vote

CODI - Ballot boxes Bypassing fraud detection Step 1 - Byte length

CODI - Ballot boxes Bypassing fraud detection Step 2 - Token recovery

CODI - Ballot boxes Bypassing fraud detection Step 3 - MAC key recovery

CODI - Ballot boxes Bypassing fraud detection Step 3 - MAC key recovery

CODI - Ballot boxes Bypassing fraud detection Step 3 - MAC key recovery read MAC and vote values off a magnetic card foreach 10 4 possible password combinations 1 derive key from password combination 2 compute MAC with derived key 3 compare computed MAC with magnetic card s MAC Byproduct of MAC key recovery: you also recovered 6 bytes out of 10 of the polling station s president password

CODI Ballot boxes Fraud detection Byte length - Done Token - Done MAC - Done Being able to create rogue magnetic cards breaks: non-coercion (vote buying activities) uniqueness (ballot stuffing)

CODI - Ballot boxes Secure vote storage Votes are stored in temporary file during election process temporary file encrypted with AES on polling station closing

CODI - Ballot boxes Secure vote storage Temporary file encrypt each vote with XOR cipher randomness of vote position is heavily questionned

CODI - Ballot boxes Secure vote storage Temporary file XOR filter easily recoverable by brute force or offline attack (see fraud detection bypass)

CODI - Ballot boxes Secure vote storage

CODI PGM PGM2 & PGM3 Microsoft Windows executables rely on obscure software (GuptaSQL, anyone?) did not manage to execute them properly :( Expected behavior: generate minutes as PDF file PDF file signed with polling station president eid encode votes into undocumented Format F format minutes PDF + Format F content sent to central server

CODI Secure Vote Transmission Zipping deeper

CODI Secure Vote Transmission

CODI Secure Vote Transmission

CODI Secure Vote Transmission

CODI Secure Vote Transmission

CODI Secure Vote Transmission

CODI Secure Vote Transmission

CODI Secure Vote Transmission

CODI Election Management System aka OWASP Top 10

CODI Election Management System Web1 : encoding of lists, candidates, polling stations, Web2 : used by belgian ambassies to transmit votes Web3 : Ministry of home affairs intranet webapp holding election results Web4 : logging and monitoring of Websomething Web5 : webapp that hosts results, available to the general public Loc1 : reception of format F files and transmission to Loc2 Loc2 : results verification, loading in database, transmission to Loc3 Loc3 : transmission of results to different partners (mostly press, hopefully)

CODI Election Management System Information leak

CODI Election Management System

CODI Election Management System

CODI Election Management System Keeping your private key private

CODI Election Management System Storing passwords in plaintext

CODI Election Management System Arbitrary file download discovered unauthenticated arbitrary file download on Web1 downloaded the script itself to look at it StackOverflow copy/pasta

CODI Election Management System Arbitrary file download

CODI Election Management System Arbitrary file download

CODI Election Management System Disclosure timeline: 07/2014: first mail to notify Civadis about infoleak 07/2014: second email to notify Civadis about private keys 08/2014: third email to notify Civadis about arbitrary file download 01/09/2014: email again, this time I cc the IBZ 02/09/2014: answer from Civadis, I replied back explaining impact 03/09/2014: no impact, it s a backup server 4 05/09/2014: Civadis deactivate the accounts 10/09/2014: Civadis shutdown those servers 4 but it s not, I can prove it

Smartmatic Speaking of coordinated disclosure

Smartmatic Smartmatic

Smartmatic Smartmatic provides two systems: ECM - Election Configuration Manager PM-VM - Voting machines (vote casting + ballot boxes) Due to limited time, I only managed to look at ECM (for now)

Smartmatic Election Configuration Manager Highlights 3 Ubuntu hosts running Linux 2638-8-generic each host provided as an iso file online ECM DB (PostgreSQL) ECM server (JBoss) ECM client (Java client)

Smartmatic Election Configuration Manager Getting access to those f***ing boxes no credentials in documentation no SSH no shell for saes (default user) I ended up doing this: mount iso copy to get read/write access modify smartmatic seed file to set my own root password repackage iso install in VM, login, usual post exploitation commands

Election Configuration Manager Well thought hardening: no remote access (rsh, telnet, ssh, whatever) file permissions are well set iptables config is not great, but good enough sudoers file limits capabilities of saes user security/accessconf to disable access no password for builtin users (eg postgres) loading of arbitrary remote classes disabled in RMI server access to PostgreSQL limited to whitelisted IP

Election Configuration Manager However PostgreSQL traffic is unencrypted No password on PostgreSQL users (ecm, postgres) Messing with the elections in 4 steps: 1 gain physical access to network 2 ARP spoofing JBoss host and PostgreSQL host 3 connects to PostgreSQL server assuming JBoss host IP 4 dump database, gain RCE as postgres with UDF

Smartmatic PM-VM Maybe for next year!

Conclusions Don t believe the hype CODI system was broken from day 1 Smartmatic system also has its flaws We need a serious audit of the Election Management System

Q&A Thank you for your attention Any questions?

References I Affront, Affront analysis of 2003/2004 versions of digivote, Affront (2004) D Wagner C Karlof, N Sastry, Cryptographic voting protocols: A systems perspective, 14th USENIX Security Symposium Internet Policy Institute, Voting systems design criteria report of the national workshop on internet voting: Issues and research agenda Jason Kitcat Margaret MacAlpine Travis Finkenauer Drew Springall J Alex Halderman, Harri Hursti, Security analysis of the estonian internet voting system LaLibrebe, Le parlement wallon se prononce en faveur de la fin du vote électronique en belgique, 6 2015,

References II Medor Mag, Le jour où la belgique a bugué, 5 2015, Oladiran Tayo Arulogun Olayemi Mikail Olaniyi, Adeoye Oludotun and Elijah Olusayo Omidior, Design of secure electronic voting system using multifactor authentication and cryptographic hash functions, International Journal of Computer and Information Technology (2013) PourEVA, Comment frauder lors d une élection communale sans trop de connaissances informatiques?, 11 2006,, Victoire de la transparence au conseil d etat, 5 2011,, Généalogie du code source des systèmes digivote et jites, 6 2014,, On vous dit tout ce que l on sait du bug2505, 6 2014,