patch-level, etc.) must coercively use a dedicated off-
set vector in order to work purposefully. This strongly
suggests, that when using offset vectoring, it should
be integrated directly into the software build process
to automatically perform vector calculation.
5.3 Security & Usage
The offset-vector technique can be used for any kind
of data, and stored at any place, just like any other
data handled during software development. Examples
for storing the offset-vector would be in-source, in an
external text file or in a database tuple. The best lo-
cation strongly depends on the specific purpose, the
security precautions necessary, and the type of infor-
mation the technique is applied onto.
For credential keys, it is still not recommended to
store the offset-vector directly in the source-code of
the application. It will, however, significantly exac-
erbate the effort necessary to extract the obfuscated
information. For example, deobfuscation does require
actual reverse engineering of the executable assembly,
and is not possible anymore with basic approaches
for credential and/or key extraction (e.g. string ex-
traction, determining and reading variable locations,
etc.).
In cases where user-input is applicable, it is also
possible to make use of an initialization vector for
the β variable. Although β is only of C data type
unsigned char and therefore 8 bits long on almost
all architectures and platforms, an initialization vector
may hold multiple bytes which will be XOR-ed se-
quentially before starting the actual regeneration pro-
cess by reading bytes from π
ts
+θ. Hereby, the initial-
ization vector can represent a user- or authentication-
server-provided key necessary for successful regener-
ation.
Moreover, in order to enhance resistance to mem-
ory forensics, the regeneration function (shown in Al-
gorithm 2) should be called immediately before the
resulting, regenerated portion of information is re-
quired during process execution. It is also of high-
est importance, to securely wipe the memory space
where the deobfuscated information has been placed
temporarily – otherwise, the key vector may still re-
side somewhere in memory.
Even in cases where sensitive information is al-
ready externalized to an on-disk file and subsequently
encrypted with a user-provided passphrase, offset
vectoring can still be used with code-integrity protec-
tion in mind, as outlined above.
Moreover, the technique allows choosing an ar-
bitrary starting offset θ, which will be added to
& executable start. Depending on the size of the
.text section, θ can therefore be used as additional
(possibly secret) value necessary for successful com-
puation.
To enhance secrecy of the information obfus-
cated using the offset-vector technique, using it in
combination with Shamir’s Secret Sharing Scheme
(SSSS) (Shamir, 1979) technique could be benefi-
cial, where the offset-vector obfuscated information
is only one share needed to reconstruct the secret in-
formation. Other shares could be, among others, a
BIOS/UEFI or peripheral serial number, MAC ad-
dress, or a share provided by a remote server. Since
BIOS/UEFI and other hardware serial numbers en-
code vendors and usually also target market a de-
ployment package could target, e.g., a specific com-
bination of HW and group of users. A remote server
could also generate a secret share based on the request
origin, e.g., using its IP address, making such exe-
cutable valid only for certain locations. A potential
attacker would need to invest much more effort to re-
construct a matching environment in order to retrieve
the secret. We are planning to explore this direction
further in our future work, where a secret rest-share
is computed given a secret and a set of pre-existing
shares. Only the pre-existing shares together with the
rest-share should be able to reconstruct the secret in
the same way as SSSS describes. This would sig-
nificantly improve the secrecy and difficulty of unau-
thorized access and use of such package and actually
provide some cryptographic properties, even though
the secret-shares would be publicly reconstructible at
some point.
6 PROOF OF CONCEPT
The proposed offset-vector technique has been fully
implemented in the C programming language, ac-
cording to the specifications given during the previ-
ous sections. It has been tested on 32- and 64-bit
Linux systems, with and without memory protections
schemes which may interfere with the correct regen-
eration of the offset vector.
The source-code for the proof of concept imple-
mentation has been licensed under the General Public
License version 2, and is planned for public release
shortly. The code contains representative functions
for both, creating an offset vector for a particular, ar-
bitrarily sized, given chunk of information on the one
hand, and recreating that very information based on
a given offset vector θ and an optional initialization
vector.
Considering production environments, it is recom-
mended not to include both, the obfuscation and the
SECRYPT 2019 - 16th International Conference on Security and Cryptography
338