Source Code Review: Dominion Democracy Suite 4.14-A.1 Voting System With Adjudication
Source Code Review: Dominion Democracy Suite 4.14-A.1 Voting System With Adjudication
The introduction to this report describes the basis of the source code review performed. In Chapter 3, we
present the detailed results of the analysis.
2.2 Inputs
The reviewers were provided with a set of documents associated with the system that were used to
support the results described in this report. These documents are listed in the References chapter below.
These documents were examined during the source code review in order to understand the voting
system’s architecture and design and to support the identification of any discrepancies between the
documentation and the source code.
The reviewers were also provided with the source code for the following Adjudication components.
◦ Adjudication Services (server) version 2.4.1.3201
◦ Adjudication (client) version 2.4.1.3201
1
The system was previously examined by the EAC with certification ID: EAC Certification Number:
DemSuite-4-14-A.1:
http://www.eac.gov/testing_and_certification/certified_voting_systems.aspx#Dominion_DemocracySuite414A.1Mod
2.4 Methodology
The atsec team used the following methodology for the source code review.
2.4.3 Design
The source code review team utilized the provided usage and installation guidance, source code, and any
other provided material as well as publicly available information in order to construct an understanding of
the architecture and design of the voting system. This included discovering the external interfaces and their
associated security mechanisms and controls, particularly as much information as possible was gathered
to support conclusions regarding the ability for a threat agent to tamper with or circumvent security
controls.
The provided design description also provided a mapping of the high-level features and interfaces of the
product to the features and interfaces implementation.
Interfaces represent the primary attack surface of the voting system. Interfaces can include web-based
interfaces, native graphic user interfaces, command line interfaces, or technical interfaces that are not
designed for direct user interaction (e.g., database connections). Each of these interfaces was examined to
identify the security controls that counter the threats.
Secure interfaces also depend on filtering out poorly structured or corrupt data. The review team
specifically checked for input validation mechanisms and determined if related attacks, such as command
injection are possible.
2.4.4 Cryptography
While cryptography is often the hardest security mechanism to break directly by brute-force, misuse of
cryptographic primitives or implementation errors can render that protection weak or non-existent. The
review team identified use sites of cryptography throughout the source code and determined if its use is
appropriate for the given purpose. For example, using a cryptographic hash function to protect passwords
is appropriate while using an encryption algorithm with a hard-coded key is not. The cryptographic
primitives used in the source code are AES, HMAC-SHA-256, SHA-1, MD5, and RSA key generation.
Note that in a code review, there is no effective way to test the correctness of implementation of any
cryptographic algorithm. We recommend that all cryptographic algorithms be functionally tested, such as
with the Cryptographic Algorithm Validation System (CAVS) test which is part of the NIST Cryptographic
Algorithm Validation Program.
2.4.5 Backdoors
Those with malicious intent who also have access to the Adjudication System during development may be
able to place backdoors into the source code so that they could gain unauthorized access to the
Adjudication System during operation.
Backdoors are extremely hard to find because a seasoned programmer can obfuscate code to look benign.
The atsec team would like to stress that, when facing a competent and sufficiently motivated malicious
developer, it is extremely difficult to prove that all backdoors in a system have been identified. The famous
Turing award lecture by Ken Thompson in 1984 entitled Reflections on Trusting Trust [TRUST]
demonstrated how fundamentally easy it is to undermine all security mechanisms when the developers
cannot be trusted. This voting system is no exception. The current scope of the project is the Adjudication
System, which consists of total 617 C# source files.
A full backdoor analysis is also impractical in a short period of time because a deep understanding of the
data structures and code design is required to be able to recognize functionality that is out of place.
Penetration test on a running system and observation of data modification and movement is also helpful.
For this report, the reviewers are only able to examine the source code and look for signs of obfuscation or
strange functionality.
◦ Medium severity.
Medium severity implies either the impact of exploitation to the product would be significant, or
the difficulty in exploitation would likely require extended access to the systems, informed
knowledge of the system, or would require significant resources.
◦ High severity.
High severity implies either the impact of exploitation to the product would result in complete
compromise of security, or the difficulty in exploitation would likely require little to no access or
knowledge of the systems or little to no resources.
3 Switch statements do not When no default cases exist, Type: Weakness; VVSG
have default cases. control may pass through the nonconformity
switch statement without Severity: Low
proper processing.
4 Code extends beyond 80- The source code often Type: VVSG nonconformity
character width limit exceeds the limit by only a few Severity: Low
specified by VVSG. characters. In some more rare
cases, it extends further. The
reviewers do not consider this
a security related issue and did
not find that it detracts from
readability.
5 Initialize every variable upon Instances were found where Type: VVSG nonconformity
declaration, and comment its variables are not initialized. Severity: Low
use.
6 Member variables of a class Instances were found where Type: VVSG nonconformity
must be initialized in the the member variables are not Severity: Low
class constructor(s), either initialized.
directly or indirectly
8 No detection of overflows in The source code does not Type: Weakness, VVSG
arithmetic performed on vote appear to check for arithmetic nonconformity
counters. overflows anywhere within the Severity: Low
source tree.
9 Restriction on code size by For the current scope of code, Type: VVSG nonconformity
VVSG requirement stating: the reviewer found that 435 Severity: Low
no more than 50% of all files (70%) are greater than 60
modules exceeding 60 lines lines (VVSG limit is 50%), 267
in length, no more than 5% files (43%) are greater than
of all modules exceeding 120 120 lines (VVSG limit is 5%),
lines in length, and no and 139 files (23%) are greater
modules exceeding 240 lines than 240 lines (VVSG limit is
in length. 0%).
10 SA1501: A statement that is An instance was found where Type: StyleCop nonconformity
wrapped in opening and the statement and the curly Severity: Low
closing curly brackets must braces are on the same line.
be written on a single line.
11 SA1124: Do not place a Code containing ‘#region’ was Type: StyleCop nonconformity
region anywhere within the found. Severity: Low
code.
12 SA1120: When the code An instance was found where Type: StyleCop nonconformity
contains a C# comment it only comment ‘//’ was present Severity: Low
must contain text. without any text.
13 SA1122: The code cannot Two instances were found Type: StyleCop nonconformity
contain empty strings. where a variable was set to “”. Severity: Low
14 The MD5 is not a FIPS One instance of use of MD5 Type: Potential vulnerability, FIPS
Approved algorithm and was found. nonconformity
should not be used. Severity: Low
15 The SHA-1 and MD5 are not One instance of use of SHA-1 Type: Potential vulnerability, FIPS
FIPS Approved Key and MD5 for key generation nonconformity
Generation methods and was found. Severity: Low
should not be used.
16 The Rijndael implementation Several uses of the Rijndael Type: Weakness, FIPS
in Microsoft Cryptographic algorithm were found. nonconformity
library is in non-conformance Severity: Low
to FIPS-197, AES
implementation should be
used instead.