SlideShare a Scribd company logo
1 of 2
Download to read offline
Using Splunk for APT
Detecting Advanced Persistent Threats
T E C H B R I E F
Seeing Malware
Host Based Evidence of Possible Malware – According to
Mandiant – Monitor for the following changes to hosts (assumes
a Splunk Universal Forwarder is resident on the host):
Potential email theft
•	Monitor hosts for the existence of executable named with
a single letter (g.exe or m.exe)
•	Watch for the creation or changes to C:WindowsHelp
help<user>
•	Watch for the creation or rapid growth in size of files
and directories in the C:WindowsHelpHelpuser
subdirectory
•	Watch for changes to the Windows registry file
Watching for the spread of malware
•	Watch for changes to enablement or changes to Wireless
Zero Configuration Service (wzcsvc)
•	Watch for changes to enablement or changes to RIP
Listener Service (IPRIP)
•	Watch for changes to enablement or changes to
Background Intelligent Transfer Service (BITS)
•	Watch for changes to the task list for at.exe. (SchedLau.
txt)
Other indicators of system compromise
•	Watch for changes to Services.exe
•	Monitor that Windows File Protection is enabled
•	Monitor for changes to the group policy object at C:
WindowsSystem 32GroupPolicyUserScriptsscripts.ini
•	 Network based evidence of Malware – Mandiant’s report
is less specific here so we’ve come up with a few of our own:
DNS (If using Active Directory’s DNS functionality, turn
on debug mode to get the URLs into the log data.)
•	Baseline DNS requests and watch for too many from a
particular client. The malware may be network mapping
from the inside out
•	Monitor for hosts that are making the same DNS request
at a consistent interval (watching for ‘beaconing hosts’)
•	Monitor for the same sized DNS requests from internal
hosts
Web Proxy
•	Monitor for mismatches between the extension of a
requested file and the mime type of the file returned
•	Monitor and investigate visits to sites that are listed to be
of a ‘None’ or ‘unknown’ category by a reputation service
or category filter
What is an Advanced Persistent Threat?
An advanced persistent threat (APT) is a targeted effort to
obtain or change information by means that are difficult to
discover, difficult to remove and difficult to attribute.
So, what’s the data that attackers are after, how are they looking
to obtain or change it and why are their attacks so difficult to
discover, remove and attribute?
How Attacks are Perpetrated
In Search of Victim Zero – Using data from social networks
such as LinkedIn or Facebook, attackers can craft an email to
a targeted user containing some attachment (PDF or ZIP) that
entices the user to open it.
This attachment could be named “Organizational Changes”
insert boss’s name here. The employee clicks on the
attachment, the malware is inserted onto the users system and
sends a signal outbound to a specific domain. This process is
continuously repeated with slight differences tailored to the
individual receiving the email.
High Value Targets
Email – Emails (and attachments) are a rich source of data that
may be of high value. Emails can contain discussion threads that
can point to other high value targets in the IT infrastructure.
The emails can be a source of intelligence that can lead to spear-
phishing emails that contain malicious attachments or links to
attacks. Windows users keep a significant amount of email on
their machines in a local .PST file—in many instances this file can
be as large as a gigabyte.
Attachments can contain financial data or other highly sensitive
information. In addition to going after the emails on a users local
machine, attacks can also target the email server itself.
Public Key Infrastructure Data – According to Mandiant™ Inc.’s
M-Trends Report 2011, while the majority of APT cases started
with an email as an attack vector, “Attackers have increasingly
focused on obtaining PKI-related data resident within a
compromised network.” PKI data can be used to authenticate to
a client VPN as well as decrypt SSL traffic from servers.
Mandiant’s investigations discovered that “victim zero in a
current investigation was actually victim 127 in an intrusion
dating back several years.”
The Spread of APT – The proliferation of APT is accomplished
in a variety of ways but the most prevalent is via Windows
services. Again according to Mandiant, RIP Listener Service
(IPRIP), the Wireless Zero Configuration service (wzcsvc) and
Background Intelligent Transfer Service (BITS) are all either used
or replaced by a rogue service. Victim zero uploads the malware
to a remote computer file share, which is executed using the
at.exe command.
T E C H B R I E F
www.splunk.com
250 Brannan St, San Francisco, CA, 94107 info@splunk.com | sales@splunk.com 866-438-7758 | 415-848-8400 www.splunkbase.com
listen to your data
Copyright © 2012 Splunk Inc. All rights reserved. Splunk Enterprise is protected by U.S. and international copyright and intellectual property laws.
Splunk is a registered trademark or trademark of Splunk Inc. in the United States and/or other jurisdictions. All other marks and names mentioned
herein may be trademarks of their respective companies. Item # TB-Splunk-Persistent Threats-101
SOFTWAREMicrosoftWindowsCurrentVersionRun.
Here the attacker wants to restart his code each time
Windows starts.
•	createKey | stats count(process_image) by process_
image key_path host
Network Based
Too many DNS lookups occurring from a particular client.
•	sourcetype=dns | stats count(clientip) AS Requests
by clientip | sort - Requests
Too many same-sized DNS requests from an internal host,
indicating a possible exfiltration.
•	sourcetype=dns | eval Length=len(query) | stats
count(clientip) by Length | sort - Length
Watch for hosts that talk to the same URL at the same interval
every day (“Beaconing” of servers to websites). Sites with a low
var(gap) value are discovered.
•	… | streamstats current=f last(_time) as next_time by
site | eval gap = next_time - _time | stats count avg(gap)
var(gap) by site
Site visits that are listed as a ‘none’ or ‘unknown’ by a reputation
service or category filter.
•	source=proxy sc_filter_category=None OR sc_filter_
category=unknown| stats count(clientip) by s_hostname,
clientip
Fast requests following the download of a .PDF, java, or exe. If a
download is proceeded by rapid requests for more files this is a
potential indicator of a dropper.
•	source=proxy [search file=*.pdf OR file=*.exe | dedup
clientip | table clientip] | transaction maxspan=60s
maxpause=5s clientip | eval Length=len(_raw) | sort
-Length
The internal systems identified during an investigation that were
communicating with a malicious IP address.
•	source=firewall action=Permit | lookup malicious clientip
as dst | stats sum(byes) by dst
•	Monitor for fast requests following the download of a
PDF, java, or exe. If a download is preceded by rapid
requests for more files this is a potential indicator of a
dropper
•	Monitor accesses to web mail services – watch for IPs
outside of your allowed pool accessing outbound –
possible exfiltration of data
Firewall
•	Use ‘allowed’ ingress and egress traffic to determine
how many internal systems may be communicating with
a malicious IP addresses to know how much data was
transferred and the time(s) the activity occurred
•	Monitor for abnormal amounts of out-bound traffic to
certain domains. Use a ‘look-up’ to a watch-list (see
Splunkbase for information on how to perform a look-up
to a database or .CSV file of ‘bad sites’).
•	Watch for mismatches of a known protocol to an
uncommon port or unknown protocol on a common port
(e.g., FTP traffic on TCP 22 should at least initiate on TCP
21 or unknown protocol on TCP 22 – TCP 22 is generally
used for SSH). Watch for potential false positives for
Skype and streaming media.
Using Splunk
Monitoring a combination of network data and host file integrity
monitoring data can be key for detecting APTs. Unlike many
current solutions, Splunk Enterprise is uniquely suited to monitor
patterns of activity in data over the very long periods of time
required to see a potential attack. In addition, Splunk’s analytics
and numeric functions can be used to create complex searches
that employ user defined risk-based thresholds customized to
the enterprise architecture.
The information contained in search suggestions and examples
below represents only a starting point for observing anomalous
activity on hosts and on the networks and is not meant as a
complete APT program. The searches have not been tested in
an active environment. Attack vectors are constantly changing
and it is up to the reader to stay abreast of conditions that may
warrant changes in APT strategy.
Splunk: Sample Searches for APT
Host based (Splunk Universal Forwarder on Host)
Monitor hosts for particular executables.
•	 …| eval file_length=len(file) | where file_length == 4
•	Watch for the creation or rapid growth in size of files
and directories in the C:WindowsHelpHelpuser
subdirectory.
•	index=helpchanges | delta filesize AS Size_Change |
•	table _time filesize Size_Change | sort - _time
Watch for changes to the HKEY_LOCAL_MACHINE
Free Download
Download Splunk for free. You’ll automatically get all of
the Enterprise features of Splunk for 60 days and you
can index up to 500 megabytes of data per day. Or if you
want to get started right away with an Enterprise license
contact sales@splunk.com.

More Related Content

More from Greg Hanchin

Administering splunk 43 course
Administering splunk 43 courseAdministering splunk 43 course
Administering splunk 43 courseGreg Hanchin
 
Using splunk43course
Using splunk43courseUsing splunk43course
Using splunk43courseGreg Hanchin
 
Using Splunk course outline
Using Splunk course outline Using Splunk course outline
Using Splunk course outline Greg Hanchin
 
Advanced Splunk Administration
Advanced Splunk AdministrationAdvanced Splunk Administration
Advanced Splunk AdministrationGreg Hanchin
 
Splunk Advanced searching and reporting Class description
Splunk Advanced searching and reporting Class descriptionSplunk Advanced searching and reporting Class description
Splunk Advanced searching and reporting Class descriptionGreg Hanchin
 
Administering Splunk course
Administering Splunk courseAdministering Splunk course
Administering Splunk courseGreg Hanchin
 
Splunk Searching and Reporting Class Details
Splunk Searching and Reporting Class DetailsSplunk Searching and Reporting Class Details
Splunk Searching and Reporting Class DetailsGreg Hanchin
 
Splunk FISMA for Continuous Monitoring
Splunk FISMA for Continuous Monitoring Splunk FISMA for Continuous Monitoring
Splunk FISMA for Continuous Monitoring Greg Hanchin
 
Splunk forwarders tech_brief
Splunk forwarders tech_briefSplunk forwarders tech_brief
Splunk forwarders tech_briefGreg Hanchin
 
Splunk and map_reduce
Splunk and map_reduceSplunk and map_reduce
Splunk and map_reduceGreg Hanchin
 
Splunk for xen_desktop
Splunk for xen_desktopSplunk for xen_desktop
Splunk for xen_desktopGreg Hanchin
 
Splunk for palo_alto
Splunk for palo_altoSplunk for palo_alto
Splunk for palo_altoGreg Hanchin
 
Splunk for db_connect
Splunk for db_connectSplunk for db_connect
Splunk for db_connectGreg Hanchin
 
Splunk for active_directory
Splunk for active_directorySplunk for active_directory
Splunk for active_directoryGreg Hanchin
 
Splunk app for_windows
Splunk app for_windowsSplunk app for_windows
Splunk app for_windowsGreg Hanchin
 
Splunk app for_enterprise_security
Splunk app for_enterprise_securitySplunk app for_enterprise_security
Splunk app for_enterprise_securityGreg Hanchin
 
Splunk guide for_iso_27002
Splunk guide for_iso_27002Splunk guide for_iso_27002
Splunk guide for_iso_27002Greg Hanchin
 

More from Greg Hanchin (20)

Administering splunk 43 course
Administering splunk 43 courseAdministering splunk 43 course
Administering splunk 43 course
 
Using splunk43course
Using splunk43courseUsing splunk43course
Using splunk43course
 
Using Splunk course outline
Using Splunk course outline Using Splunk course outline
Using Splunk course outline
 
Advanced Splunk Administration
Advanced Splunk AdministrationAdvanced Splunk Administration
Advanced Splunk Administration
 
Splunk Advanced searching and reporting Class description
Splunk Advanced searching and reporting Class descriptionSplunk Advanced searching and reporting Class description
Splunk Advanced searching and reporting Class description
 
Administering Splunk course
Administering Splunk courseAdministering Splunk course
Administering Splunk course
 
Splunk Searching and Reporting Class Details
Splunk Searching and Reporting Class DetailsSplunk Searching and Reporting Class Details
Splunk Searching and Reporting Class Details
 
Splunk FISMA for Continuous Monitoring
Splunk FISMA for Continuous Monitoring Splunk FISMA for Continuous Monitoring
Splunk FISMA for Continuous Monitoring
 
Splunk forwarders tech_brief
Splunk forwarders tech_briefSplunk forwarders tech_brief
Splunk forwarders tech_brief
 
Splunk and map_reduce
Splunk and map_reduceSplunk and map_reduce
Splunk and map_reduce
 
Splunk for xen_desktop
Splunk for xen_desktopSplunk for xen_desktop
Splunk for xen_desktop
 
Splunk for palo_alto
Splunk for palo_altoSplunk for palo_alto
Splunk for palo_alto
 
Splunk for ibtrm
Splunk for ibtrmSplunk for ibtrm
Splunk for ibtrm
 
Splunk for fisma
Splunk for fismaSplunk for fisma
Splunk for fisma
 
Splunk for f5
Splunk for f5Splunk for f5
Splunk for f5
 
Splunk for db_connect
Splunk for db_connectSplunk for db_connect
Splunk for db_connect
 
Splunk for active_directory
Splunk for active_directorySplunk for active_directory
Splunk for active_directory
 
Splunk app for_windows
Splunk app for_windowsSplunk app for_windows
Splunk app for_windows
 
Splunk app for_enterprise_security
Splunk app for_enterprise_securitySplunk app for_enterprise_security
Splunk app for_enterprise_security
 
Splunk guide for_iso_27002
Splunk guide for_iso_27002Splunk guide for_iso_27002
Splunk guide for_iso_27002
 

Recently uploaded

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Recently uploaded (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Splunk for apt_tech_brief

  • 1. Using Splunk for APT Detecting Advanced Persistent Threats T E C H B R I E F Seeing Malware Host Based Evidence of Possible Malware – According to Mandiant – Monitor for the following changes to hosts (assumes a Splunk Universal Forwarder is resident on the host): Potential email theft • Monitor hosts for the existence of executable named with a single letter (g.exe or m.exe) • Watch for the creation or changes to C:WindowsHelp help<user> • Watch for the creation or rapid growth in size of files and directories in the C:WindowsHelpHelpuser subdirectory • Watch for changes to the Windows registry file Watching for the spread of malware • Watch for changes to enablement or changes to Wireless Zero Configuration Service (wzcsvc) • Watch for changes to enablement or changes to RIP Listener Service (IPRIP) • Watch for changes to enablement or changes to Background Intelligent Transfer Service (BITS) • Watch for changes to the task list for at.exe. (SchedLau. txt) Other indicators of system compromise • Watch for changes to Services.exe • Monitor that Windows File Protection is enabled • Monitor for changes to the group policy object at C: WindowsSystem 32GroupPolicyUserScriptsscripts.ini • Network based evidence of Malware – Mandiant’s report is less specific here so we’ve come up with a few of our own: DNS (If using Active Directory’s DNS functionality, turn on debug mode to get the URLs into the log data.) • Baseline DNS requests and watch for too many from a particular client. The malware may be network mapping from the inside out • Monitor for hosts that are making the same DNS request at a consistent interval (watching for ‘beaconing hosts’) • Monitor for the same sized DNS requests from internal hosts Web Proxy • Monitor for mismatches between the extension of a requested file and the mime type of the file returned • Monitor and investigate visits to sites that are listed to be of a ‘None’ or ‘unknown’ category by a reputation service or category filter What is an Advanced Persistent Threat? An advanced persistent threat (APT) is a targeted effort to obtain or change information by means that are difficult to discover, difficult to remove and difficult to attribute. So, what’s the data that attackers are after, how are they looking to obtain or change it and why are their attacks so difficult to discover, remove and attribute? How Attacks are Perpetrated In Search of Victim Zero – Using data from social networks such as LinkedIn or Facebook, attackers can craft an email to a targeted user containing some attachment (PDF or ZIP) that entices the user to open it. This attachment could be named “Organizational Changes” insert boss’s name here. The employee clicks on the attachment, the malware is inserted onto the users system and sends a signal outbound to a specific domain. This process is continuously repeated with slight differences tailored to the individual receiving the email. High Value Targets Email – Emails (and attachments) are a rich source of data that may be of high value. Emails can contain discussion threads that can point to other high value targets in the IT infrastructure. The emails can be a source of intelligence that can lead to spear- phishing emails that contain malicious attachments or links to attacks. Windows users keep a significant amount of email on their machines in a local .PST file—in many instances this file can be as large as a gigabyte. Attachments can contain financial data or other highly sensitive information. In addition to going after the emails on a users local machine, attacks can also target the email server itself. Public Key Infrastructure Data – According to Mandiant™ Inc.’s M-Trends Report 2011, while the majority of APT cases started with an email as an attack vector, “Attackers have increasingly focused on obtaining PKI-related data resident within a compromised network.” PKI data can be used to authenticate to a client VPN as well as decrypt SSL traffic from servers. Mandiant’s investigations discovered that “victim zero in a current investigation was actually victim 127 in an intrusion dating back several years.” The Spread of APT – The proliferation of APT is accomplished in a variety of ways but the most prevalent is via Windows services. Again according to Mandiant, RIP Listener Service (IPRIP), the Wireless Zero Configuration service (wzcsvc) and Background Intelligent Transfer Service (BITS) are all either used or replaced by a rogue service. Victim zero uploads the malware to a remote computer file share, which is executed using the at.exe command.
  • 2. T E C H B R I E F www.splunk.com 250 Brannan St, San Francisco, CA, 94107 info@splunk.com | sales@splunk.com 866-438-7758 | 415-848-8400 www.splunkbase.com listen to your data Copyright © 2012 Splunk Inc. All rights reserved. Splunk Enterprise is protected by U.S. and international copyright and intellectual property laws. Splunk is a registered trademark or trademark of Splunk Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Item # TB-Splunk-Persistent Threats-101 SOFTWAREMicrosoftWindowsCurrentVersionRun. Here the attacker wants to restart his code each time Windows starts. • createKey | stats count(process_image) by process_ image key_path host Network Based Too many DNS lookups occurring from a particular client. • sourcetype=dns | stats count(clientip) AS Requests by clientip | sort - Requests Too many same-sized DNS requests from an internal host, indicating a possible exfiltration. • sourcetype=dns | eval Length=len(query) | stats count(clientip) by Length | sort - Length Watch for hosts that talk to the same URL at the same interval every day (“Beaconing” of servers to websites). Sites with a low var(gap) value are discovered. • … | streamstats current=f last(_time) as next_time by site | eval gap = next_time - _time | stats count avg(gap) var(gap) by site Site visits that are listed as a ‘none’ or ‘unknown’ by a reputation service or category filter. • source=proxy sc_filter_category=None OR sc_filter_ category=unknown| stats count(clientip) by s_hostname, clientip Fast requests following the download of a .PDF, java, or exe. If a download is proceeded by rapid requests for more files this is a potential indicator of a dropper. • source=proxy [search file=*.pdf OR file=*.exe | dedup clientip | table clientip] | transaction maxspan=60s maxpause=5s clientip | eval Length=len(_raw) | sort -Length The internal systems identified during an investigation that were communicating with a malicious IP address. • source=firewall action=Permit | lookup malicious clientip as dst | stats sum(byes) by dst • Monitor for fast requests following the download of a PDF, java, or exe. If a download is preceded by rapid requests for more files this is a potential indicator of a dropper • Monitor accesses to web mail services – watch for IPs outside of your allowed pool accessing outbound – possible exfiltration of data Firewall • Use ‘allowed’ ingress and egress traffic to determine how many internal systems may be communicating with a malicious IP addresses to know how much data was transferred and the time(s) the activity occurred • Monitor for abnormal amounts of out-bound traffic to certain domains. Use a ‘look-up’ to a watch-list (see Splunkbase for information on how to perform a look-up to a database or .CSV file of ‘bad sites’). • Watch for mismatches of a known protocol to an uncommon port or unknown protocol on a common port (e.g., FTP traffic on TCP 22 should at least initiate on TCP 21 or unknown protocol on TCP 22 – TCP 22 is generally used for SSH). Watch for potential false positives for Skype and streaming media. Using Splunk Monitoring a combination of network data and host file integrity monitoring data can be key for detecting APTs. Unlike many current solutions, Splunk Enterprise is uniquely suited to monitor patterns of activity in data over the very long periods of time required to see a potential attack. In addition, Splunk’s analytics and numeric functions can be used to create complex searches that employ user defined risk-based thresholds customized to the enterprise architecture. The information contained in search suggestions and examples below represents only a starting point for observing anomalous activity on hosts and on the networks and is not meant as a complete APT program. The searches have not been tested in an active environment. Attack vectors are constantly changing and it is up to the reader to stay abreast of conditions that may warrant changes in APT strategy. Splunk: Sample Searches for APT Host based (Splunk Universal Forwarder on Host) Monitor hosts for particular executables. • …| eval file_length=len(file) | where file_length == 4 • Watch for the creation or rapid growth in size of files and directories in the C:WindowsHelpHelpuser subdirectory. • index=helpchanges | delta filesize AS Size_Change | • table _time filesize Size_Change | sort - _time Watch for changes to the HKEY_LOCAL_MACHINE Free Download Download Splunk for free. You’ll automatically get all of the Enterprise features of Splunk for 60 days and you can index up to 500 megabytes of data per day. Or if you want to get started right away with an Enterprise license contact sales@splunk.com.