ing should be applied in an organized and systematic
way in order not to alter the original functionalities of
the software. This is done by providing an abstraction
over the actions required to improve the security of
the program and adopting AOP to build and develop
our solutions. The developers are able to specify the
hardening plans that use and instantiate the security
hardening patterns using the proposed language SHL.
The abstraction of the hardening plans is bridged
by concrete steps defined in the hardening patterns us-
ing also SHL. This dedicated language, together with
a well-defined template that instantiates the patterns
with the plan’s given parameters, allow to specify the
precise steps to be performed for the hardening, tak-
ing into consideration technological issues such as
platforms, libraries and languages. We built SHL on
top of the current AOP languages because we believe,
after a deep investigation on the nature of security
hardening practices and the experimental results we
got, that aspect orientation is the most natural and ap-
pealing approach to reach our goal.
Once the security hardening solutions are built,
the refinement of the solutions into aspects or low
level code can be performed using a tool or by pro-
grammers that do not need to have any security exper-
tise. Afterwards, an AOP weaver (e.g. AspectJ, As-
pectC++) can be executed to harden the aspects into
the original source code, which can now be inspected
for correctness. As a result, the approach constitutes
a bridge that allows the security experts to provide the
best solutions to particular security problems with all
the details on how and where to apply them, and al-
lows the software engineers to use these solutions to
harden FOSS by specifying and developing high level
security hardening plans.
4 SHL LANGUAGE
Our proposed language, SHL, allows the description
and specification of security hardening patterns and
plans that are used to harden systematically security
into the code. It is a minimalist language built on
top of the current AOP technologies that are based on
advice-pointcut model. It can also be used in conjunc-
tion with them since the solutions elaborated in SHL
can be refined into a selected AOP language (e.g. As-
pectC++) as illustrated in Section 5. We developed
part of SHL with notations and expressions close to
those of the current AOP languages but with all the
abstraction needed to specify the security hardening
plans and patterns. These notations and expressions
are programming language independent and without
referring to low-level implementation details. The
following are the main features provided by SHL:
• Automatic code manipulation such as code addi-
tion, substitution, deletion, etc.
• Specification of particular code join points where
security code would be injected.
• Modification of the code after the development
life cycle since we are dealing with already ex-
isting open source software.
• Modification of the code in an organized way and
without altering its functional attributes.
• Description and specification of security.
• Dedicated to describe and specify reusable secu-
rity hardening patterns and plans.
• Parameterized language to allow the instantiation
of the security hardening patterns through the se-
curity hardening plans.
• Programming language independent.
• Highly expressive and easy to use by security non
experts.
• Intermediary abstractness between English and
programming languages.
• Easily convertible to available AOP languages
(e.g. AspectJ and AspectC++).
4.1 Grammar and Structure
In this section, we present the syntactic constructs and
their semantics in SHL. Table 1 illustrates the
BNF
grammar of SHL. The language that we arrived at can
be used for both plans and patterns specification, with
a specific template structure for each of them. We im-
plemented this language specification using ANTLR
V3 Beta 6 and its associated ANTLRWorks develop-
ment environment. We were also able to validate the
syntax of different plan and pattern examples within
this tool. The work on the language implementation
is still in progress. Examples of security hardening
plans and patterns are elaborated using SHL and pre-
sented in Section 5.
Hardening Plan Structure. A hardening plan
starts always with the keyword
Plan
, followed by
the plan’s name and then the plan’s code that starts
and ends respectively by the keywords
BeginPlan
and
EndPlan
. Regarding the plan’s code, it is com-
posed of one or many pattern instantiations that al-
low to specify the name of the pattern and its pa-
rameters, in addition to the location where it should
be applied. Each pattern instantiation starts with the
keyword
PatternName
followed by a name, then the
A HIGH-LEVEL ASPECT-ORIENTED BASED LANGUAGE FOR SOFTWARE SECURITY HARDENING
365