INSIDE PLAYBOOK A HACKER'S

INSIDE
A HACKER's
PLAYBOOK
TEN TARGETED TECHNIQUES that
WILL BREAK YOUR security
Look inside
for notes
on how to
stop ‘em!
Targeted attacks are successful because they
are stealthy, specific and disarmingly personal. If they
do it right, advanced attackers can quietly infiltrate
a network and steal data or information at will for
months or even years.
Learn how to stop them by taking a page from
their playbook—literally. Trustwave presents a
never-before-seen copy of an advanced attacker’s
technique manual. Use it well to design security that
counters their plays perfectly.
A Playbook On Profiting
From Targeted Attacks
Before we tackle the finer techniques of building a
money-making cyber scam, let’s talk a little about the
basics of this gig, shall we?
First of all here’s what we are not trying to do. We’re
not trying to blanket the internet with malicious V1agrow
spam or mass SQL inject a zillion websites.
We’re narrowing our work down to a specific company
or industry based on vulnerability opportunities that we
scare up. The broadest we’ll get is hitting a range of
companies vulnerable to one precise vulnerability — either
never discovered by security researchers or just recently
patched by a vendor.
Do it right and you’ll get your hands on huge caches
of valuable customer data, and maybe even hit the
jackpot with the target’s most important intellectual
property. With that, you can blackmail people or sell to
competitors — or even to nation states.
You won’t just be buying a new Ferrari.
You’ll be buying a fleet of ‘em.
Know Your Adversary
With a little bit of research,
some crafty writing and the
right technology, crooks make
a good living running targeted
attacks to steal corporate
and government data. The
more we can learn about their
techniques, the better we can
counter them.
As we sneak a look at
each of the plays inside
this bad guy instruction manual,
let’s look for ways to turn this
inside knowledge on its head.
We’ll also offer advice on how
to block each attack technique.
Play 1: Staging
Your Attack
Let’s get to easy money! Most times, there are five
stages to a really gnarly targeted attack:
Research: Start by doing recon on the anticipated
target. Dig for publicly available information and socially
engineer your way to exploitable info about their IT
systems
Intrude: Use that information to find the right employee
to spearphish and the right vulnerability to target with
your malicious payload—once the bait’s taken you’ll have
your initial toehold in the target’s network
Propagate: When you pwn one machine, use its network
connections to spread malware onto other machines so
even if you’re detected in one place you’ve got control of
other machines
Infect: Once you get the lay of the land through your
different connections, install more tools to really start
to steal and aggregate data
Exfiltrate: Finally, you’ve got to get all that data
out of there. Among other options, public web traffic
works well
e K
ted
st targe
n
i
a
g
a
t
figh
e in the ng executive
n
o
p
e
t
S
ally are
velopi
e
e
r
d
s
s
k
i
c
s
a
t
e at
attack
hat thes
acks are
t
t
t
s
a
s
e
e
s
n
e
e
th
,
awar
Because void detection
.
g
n
i
n
e
to a
happ
recisely u’re not being
p
d
e
n
g
yo
e
desi
pretend But chances ar
o
t
y
s
a
.
it’s e
attacked mpromised.
r
o
d
e
t
e
targ
y be co
d
a
e
r
l
a
y
you ma
76%
of breached
organizations
needed
someone
else to tell them
they'd been
compromised
48%
were told by
regulatory bodies
25%
by law enforcement
1%
2%
by the public
by a third party
Play 2: Specialize and
Outsource
It’s not what you know, it’s who you know. Put together
your own little mafia with specialists who work together
to keep your multi-step campaign running. Just like cave
men split labor into hunting and gathering, you just have
to break it up into hacking and scamming.
Build the team however you like. Hire people, outsource to
malware kit vendors, even work in an equal partnership.
Just remember what they say about honor among
thieves…
Just think: no n00bs allowed. If they can’t spell or find
the caps lock, or code better than your average script
kiddie can, it’s hasta la vista, baby.
w
The FBIs List of Cyber Crime Specialties
Targeted attackers are
building a business around
stealing from your business.
Just as you’d dedicate a lot
of specialized employees
and vendors to solving your
business problem, they’re
sourcing skills necessary to
crack your defenses. Here
are the top five out of 10
common specialties named
by the FBI:
Coders: write malware,
exploits and data theft tools
Vendors: trade and
sell stolen data, malware
kits, footprints into
compromised networks
Criminal IT Guys:
Maintain criminal IT
infrastructure like servers
and bullet-proof ISPs
Hackers: seek and
exploit application, system
and network vulnerabilities
Fraudsters: create and
execute social engineering
ploys like phishing and
domain squatting
Play 3: Scale Your
Attacks
Once you get together that A-team, you’re going to milk
every vulnerability dry.
Developed or bought an exploit for a new vulnerability
in some sorry old company’s retail point of sale (POS)
system? Maybe it's for some small-time grocery store
in San Francisco, but then maybe that same exact
vulnerability and system configuration is going to work in
POS machines at other franchises of the same brand.
Then, son, your meal-ticket is punched. You’ll steal ten
times the data but only really do the work to break into
one location.
In order to stay a step ahead of the
attackers, you’ve got to start thinking
like them. One key way to do that is
to hire penetration testers to barrage
your systems with the same type of
techniques the bad guys use. Doing
so can help you find widespread
vulnerabilities like the POS example
highlighted above.
>1/3
More than
a third of
data breach
investigations
occur within
franchise
businesses
48%
of large
companies have
experienced 25
or more social
engineering
attacks in the
past two years1
70%
of young
workers
regularly
ignore
IT policies2
Play 4: Play The Player,
Not The Game
There’s a good chance your target’s employees will be
oh-so-helpful without even knowing it. They’ll give you
information, help you upload malware on their machine and
even hold the door open for you if you need to sneak into
a building. These peeps should be your best friends during
the first two stages of attack: research and intrusion.
So work this to your advantage. Here are some tips:
• If you want information-about the org chart, location
of a data center, technology they use or whatever—call
someone who would know, pretend to be from another
department and just ask. Nine times out of ten they’ll
freely tell you out of the kindness of their hearts.
• Official-sounding emergencies work every time. Act like
you need help to get a ‘mission-critical’ project done or
else heads will roll. Works best if you know the name of
their boss’ boss.
SOURCES:
1
www.securingthehuman.org/blog/2011/09/22/
justifying-your-awareness-program-withsocial-engineering-survey
2
www.eweek.com/c/a/Security/Younger-Employees-
Ignore-IT-Policies-Dont-Think-About-SecuritySays-Cisco-274940/
3
www.securingthehuman.org/blog/2011/09/22/
justifying-your-awareness-program-withsocial-engineering-survey
• If your target employee is high up the food chain and
too paranoid to take your bait, try working someone
in their entourage. A lot of admins—even temps—are
sitting at workstations that can access the same
systems the boss’ computers are hooked into.
• Congrats—you just got a job in HR. Pretend to be a
recruiter. In this market, people’s judgment tends to get
clouded if they think there’s a new job on the horizon.
0
• Depending on how much you’ve got riding on this
attack, you may even invest in a little in-person social
engineering. Put on a delivery uniform, bring some
flowers and see if someone will let you in the building.
P
pically play a big
Your employees ty
tack and their
role in a targeted at
ed attackers’
response to advanc
tential to make
probes have the po
nization’s chances
or break your orga
guys at bay. In
of keeping the bad
ry estimates
spite of that, indust
that as few as a
show consistently
employees today
of
d
ir
th
a
to
r
te
ar
qu
how to respond
are ever trained on
neering ploys.
to these social engi
n make it much
ca
ng
ni
ai
tr
ee
oy
pl
Em
attacks to ever
harder for targeted
versary who can’t
take shape—an ad
formation will
gather the right in
more difficult to
find it imminently
.
customize an attack
30%
of large
companies
said social
engineering cost
them an average
of $100,000 per
incident3
Play 5:Get Social For
Better Recon
Sometimes you don’t even need to ask employees for
information—they’ll offer it up right on their Twitter
feed. Use social media to find out all sorts of sweet
intel. Here’s what you can find out by making a dummy
Facebook account and tricking someone into friending it:
• Where they went to high school or college
• Their mother’s maiden name
• Their birthday
• Their dog’s name
• Facts about their job: title, promotions, boss’ name, big
projects coming up etc.
All of these are valuable hints at passwords, system
challenge question answers and information that’s gonna
grease the skids of your targeted campaign. Even if you
don’t friend the person directly, you can potentially dig up
info by friending one of THEIR friends. Evil genius, no?
Social media also rules when it comes to building a psych
profile on an employee who might turn out to be the
kind of tool to help you roll out that first intrusion into
a target company. If you know what his or her hobbies
are, what teams they root for or any other personal
information, you can craft the perfect bait that will
get them to visit a site you’ve infected or trick them
into opening a malicious document.
“Elite cybercriminals are
tapping into search engines
and social networks to
help them target specific
employees for socialengineering trickery at a wide range of companies,
professional firms and government agencies.”
— Byron Acohido
USA Today
32.8%
According to recent numbers, more
than half of enterprises today have
seen malware infections rise as a
result of employees’ use of social
media. And that’s just the tip of
the iceberg when it comes to how
a persistent attacker will use social
media to their advantage. Social
media as an intelligence goldmine
is an extremely effective method
for hackers to start planning their
plan. There’s no silver bullet, but a
combination of smart social media
policies, automated enforcement
of these policies and a workforce
well-trained in the ways of social
engineers can help stem the tide of
these attacks.
42 B
of passwords
contain a name
in the top 100
girl and boy
name lists
16.7%
of passwords
contain a name
on the top 100
dog names list
(this is the kind of info
people readily give
away on their social
media feeds)
42%
of organizations
have IT staff
sharing
passwords
or access to
systems or
applications4
48%
don't change
their privileged
passwords
within 90 days5
Play 6: Probe for
Every Weakness
Why break a window when you’ve got the key for the front
door? Look for user credentials at every step of the way.
Goal number two is to find clues about the architecture
of the target company’s IT infrastructure to choose the
right malware kit or custom build something that can
help you pick the proverbial locks if the keys aren’t lying
around. This can be anything from unencrypted password
files to lists of company IP addresses to system version
information of deployed assets.
There are vulnerabilities in just about every corporate
network between here and the moon. If your target
company doesn’t have them, chances are a third party
vendor or partner company with ties into the network
probably does.
Should you exploit zero-day vulnerabilities never before
discovered by the security industry or vulnerabilities that
already have a patch? Uh, yeah. Yeah, you should. If you’re
smart, they’ll both play a part in your plans.
SOURCES:
4
www.liebsoft.com/Password_Security_Survey/
5
www.liebsoft.com/Password_Security_Survey/
40%
or more enterprises
have informal or no
patch management
processes in place7
6
www.trustwave.com/global-security-report
7
https://securosis.com/assets/library/main/
quant-survey-report-072709.pdf
Zero-day vulnerabilities rock. But they’re expensive to find
and exploit, and known vulnerabilities can be pretty wide
open. Most IT departments are too busy to plug their
holes with patches.
In situations where you’re seeking very specific
information—say manufacturing schematics you’re
stealing for a competing company or nation state—and
detection isn’t an option, then shelling out for zero-day
discovery and exploitation makes sense.
But if it is all about propagating malware in a company
you already know (or have a hunch about) has unpatched
systems, it makes more sense to take advantage of old
vulnerabilities.
30%
DEFENSE:
Hackers might not start with a client-sid
e
attack to gain entry into your systems.
Sometimes the first step is to run a SQL
injection on your website to find unencr
ypted
password files. Given users’ propensity
to reuse
passwords, that early work may yield long
term access to accounts across many syst
ems.
Strong password management—includin
g
enforcement of frequent password cha
nges—is
a must to limiting damage in these inst
ances.
On the vulnerability front, organization
s have
got to do a better job patching their syst
em
to limit malicious software’s mojo. Zer
o-day
attacks are a tougher nut to crack and
defense
against exploitation will depend upon
security
mechanisms at other security layers to
prevent
a widespread attack from gaining muc
h
ground within the network or exfiltrat
ing data
elsewhere.
of Apache Tomcat
installations
with accessible
administrative
interface have the
default credentials
The most common corporate
password is Password1,
because it just barely meets
the minimum complexity
requirements of Active
Directory for length,
capitalization and
numerical figures6
50%
of targeted
attacks initially
occur through
web use
48%
of targeted
attacks initially
occur through
e-mail use
2%
enter through
local devices
Play 7: Reinvent old
Web & Email Attacks
Once your crew has done its homework on a target, it’s
time to cast your line and wait for a bite. Some of the
most effective initial intrusion plays are fundamentally
pretty old-school in nature—you’re just phishing people
with fake emails, IMs or social media messages to trick
them into visiting an infected site or downloading
a malicious executable. Now use the information you
gathered to custom fit that interaction! Craft a lure
that’s believable and build a hook that seems so painless
that no one even notices they’ve been landed.
Do it like this:
Example 1: Your hackers just found a killer vulnerability in
a software platform commonly used by entertainment
companies. But you need control of a machine with
access to exploit it. Fortunately for you, there are
more than a few gossip fanatics in the entertainment
community. Since most of the companies you’re targeting
are based in Hollywood, you use SQL injection to
strategically compromise the homepage of a few local
gossip sites with malicious code that downloads on
visitors’ machines. To keep pesky reputation-based filters
from finding your website infection, you set it up so
that it will only interact with machines working within a
block of IP addresses originating from Los Angeles.
Intel About the Enemy
Advanced attackers are
increasingly using
strategic web compromises
to infect their
targets via drive-bydownload:
“The goal is not largescale malware distribution
through mass compromises.
Instead the attackers
place their exploit code
on websites that cater
towards a particular set of
visitors that they might be
interested in.”
--Shadowserver
Example 2: You’ve found some middle manager in
accounting who’s got access to systems that hold tons
of saleable financial and customer data. You chum it up
with him on Facebook, convincing him you met him at an
accounting professional group conference. Through your
friend status you find out his real passion isn’t ledger
books but photography. So, you task your hackers and
coders to build a basic photography buff website with
some hidden drive-by-download payloads. While he looks
at tips on digital SLRs, your malicious payload silently
loads in the background.
k
Example 3: You’ve gotten your
hands on the organizational
chart of a target company
and read in a company blog
about a strategic new hire of
John Smith in the marketing
department. You create a
Gmail account under the
name of the HR manager
and use it to write an email
that looks like HR blew it
and gave everyone info on
Smith’s salary and benefits.
They open the attachment,
“JohnSmithcompensation.xls,”
and bang, curiosity killed the
network.
The examples named at left and
on the previous page are just the
tip of the iceberg in terms of the
type of creativity targeted attacks
are employing to personalize their
intrusion attempts. Secure web
and email gateways are critical
to stopping all manifestations of
blended email and web attacks.
As Example 1 illustrates, old web
filtering technology won't always
work—techniques like initiating IP
address-specific malware downloads
can get around defenses that depend
on reputation filtering. This is where
advanced technology with real-time
code inspection comes into play.
In
76%
of incident response
investigations, a third
party responsible
for system support,
development and/
or maintenance of
business environments
introduced the security
deficiencies.
88%
of targeted
malware remains
undetected
by traditional
anti-virus
Play 8: Think Sideways
One backdoor into a corporate network might be good,
but more is always better. If you want to stay on a
network for a long time, you’ve got to use that initial
client-side pwnage to move sideways through the network.
That way, if your first intrusion is detected and your
malware package is eliminated from that machine, you’ll
still keep your hands on the steering wheel elsewhere.
The secret? You’ve got to propagate with diversity. You
need to use completely different types of payloads on
different systems because once one type is found out,
odds are they’re gonna scan the network looking for
everything that looks like that sample. But if you control
a bunch of endpoints with different types of malware,
they’ll probably never even know they’re still compromised.
F
Intel about the enemy
118+82= 41.2%
140+60= 29.4%
176+24= 11.8%
of malware
uses https to
exfiltrate data
uses FTP
uses SMTP
Targeted attacks are so ingenious
these days that even with the tools
and practices we've suggested already
,
there's still a chance that some attacks
will slip through. Always operate
under the assumption that you've
already been hacked and utilize
practices and technologies that will
seek out existing infections, risky
security configurations and any
suspect file system changes that could
be a red flag of infection.
Play 9: Hide in
plain sight
Stealth is the name of the game in these targeted
attacks. Sometimes you just want to do the old smashand-grab, where you want to get in and out of the
network with as much loot as possible or with a very
specific piece of information. But generally the most
profitable way is to drain the database is a little
at a time for a LONG time.
Put some technical noise dampeners on your intrusions.
You don’t want to knock over any expensive vases while
you digitally cat burgle the place, do you? Every movement
should be planned to avoid setting off any alarms. As you
drop tools on systems to aggregate data and control
backdoors, here are some tips:
• Avoid self-replicating malware
• Hide malware in system folders and get them
to look like common processes
• Make use of webmail accounts to route SSL-encrypted
command-and-control traffic to your backdoors
• Use packer utilities to hide malicious binaries
• If you can, store some malware components
in the cloud
Intel About the Enemy
Because the endgame for
any targeted attack is to
steal data, it only makes
sense to depend on datacentric security tools to
frustrate adversaries. This
can be accomplished by
understanding the context
of the data and detecting
malicious network
application traffic that
is dragging the data out
through application-aware,
next generation firewalls.
The use of encryption to
hide attacks and theft of
data is on the rise. Over
25 percent of all data
exfiltrated by attackers
is encrypted by cyber
criminals. Also critical are
encryption techniques that
render data useless even if it
is exfiltrated.
Play 10: Take data
Quietly
So maybe you’re a l33t spearphisher, you’re wicked good
taking over a network and you’ve got a nose like a
bloodhound for juicy data. It all amounts to nada if
you can’t get the data out of the network. Be patient!
Quiet and slow exfiltration makes it easier to steal
larger stores of information without setting off alarms
that will shut you down midstream.
Lucky for you, most
companies today don’t
set up their firewalls to
block outbound traffic so
you have a lot of options.
Public web traffic can
prove to be one of the
most efficient ways of
slowly leaking data off the
network. HTTPS traffic
can have added benefit of
steering clear of data leak
prevention tools by hiding
data under cloak of SSL.
T
have
Network monitoring tools
er the years to
advanced considerably ov
of attacks, but
better find common signs
ying one step
attackers do a good job sta
gy. One of the
ahead of alerting technolo
nizations have
most effective tools orga
ver malicious
in their struggle to disco
ation—but we
activity is system inform
k for. That
have to know what to loo
events alerts
means correlating small
ture so that
from across the infrastruc
en enough of
one big alarm sounds wh
a specialty
them happen at once. It's
d event
of security information an
and the
management (SIEM) tools
how to use
skilled analyst that know
e in the fight
them—both indispensibl
against targeted attacks.
SECURITY IS A PROCESS,
NOT A PRODUCT
That’s why, through an integrated, automated and agile
approach, Trustwave delivers stronger security, continuous
compliance and fewer headaches. Our broad portfolio of
integrated technologies, compliance and risk services, and elite
SpiderLabs research, testing and threat intelligence can help
you to secure your business, centralize compliance, and gain
the meaningful, actionable intelligence you need to make faster
and proactive decisions. And our unique approach helps you to
seamlessly achieve business continuity and compliance by swiftly
implementing, monitoring, auditing and enforcing protection and
control over your sensitive assets and data. Interested in how
Trustwave can help? Visit www.trustwave.com.