19 Attacks - Attacking the User Interface
UI Overview.
The user interface is usually the most comfortable bug hunting
ground for security testing. It’s the way we are accustomed to
interacting with our applications, and the way application
developers expect us to. The attacks discussed here focus on inputs
applied to software through its user interface. Most security bugs
result from additional, unintended, and undocumented user behavior.
From the UI, this amounts to handling unexpected
input from the user in a way that compromises the application, the
system it runs on, or its data. The result could be privilege
escalation (a normal user acquiring administrative rights) or
allowing secret information to be viewed by an unauthorized user.
Attack 6: Overflow input buffers
Buffer overflows are by far the most notorious security problems in
software. They occur when applications fail to properly constrain
input length. Some buffer overflows don’t present much of a security
threat. Others, however, can allow hackers to take control of a
system by sending a well-crafted string to the application. This
second type is referred to by the industry as “exploitable,” because
parts of the string may get executed if they are interpreted as
code. What sometimes happens is that a fixed amount of memory is
allocated to hold user input. If developers then fail to constrain
the length of the input strings entered by the user, data can
overwrite application instructions, allowing the user to execute
arbitrary code and gain access to the machine.
Attack 7: Examine all common switches
and options
Some applications are tolerant to varying user input under a default
configuration. Most default configurations are chosen by the
application developers, and most tests are executed under these
conditions, especially if options are obscure or are entered using
command-line switches. When these configurations are changed, the
software is often forced to use code paths that may be severely
under-tested and thus results can be unpredictable. Obviously, to
test a wide range of inputs under every possible set of
configurations is impossible for large applications; instead, this
attack focuses on some of the more obscure configurations, such as
those in which switches are set through the command line at startup.
Attack 8: Explore escape characters,
character sets, and commands
Some applications may treat certain characters as
equivalent when they are part of a string. For most purposes, a
string with the letter a in a certain position is not likely to be
processed any differently from a similar string with the letter z in
that same position. With this in mind, the question,“ Which
characters or combinations of characters are treated differently?”
naturally
follows. This is the driving question behind this attack. By forcing
the application to process special characters and commands, we can
sometimes force it to behave in ways its designers did not intend.
Factors that affect which characters and commands might be
interpreted differently include the language the application was
written in, the libraries that user data is passed through, and
specific words and strings reserved by the underlying operating



