Connecting the Dots in Cyber Threat Campaigns, Part 2: Passive DNS

This is the second part of our series on “connecting the dots,” where we investigate ways to link attacks together to gain a better understanding of how they are related. In Part 1, we looked at how domain WHOIS information can be used to identify connections between malicious domains and potentially the actors who own them. In Part 2 we dive into Passive DNS (PDNS), which allows analysts to look back in time and discover how a domain has been used in the past.

Why Passive DNS?

Before we jump into PDNS, we need to understand DNS, or the Domain Name System.  DNS is often described as the phonebook of the Internet (For our younger readers who may be wondering what a phonebook is, Wikipedia can explain.) Rather than ask users to remember individual IP addresses, DNS instead maps numerical addresses to easy-to-remember domain names, much like a person’s name might be associated with a specific phone number. So instead of memorizing that Google hosts their search engine on 65.199.32.22, you simply need to remember http://www.google.com. The system solved an enormous usability issue at the onset of the Internet, but unfortunately left room for abuse as well.

Unlike a paper phonebook, which remains static until a new version is published, DNS allows for constant dynamic updates that allow the system to be more flexible. Domain name owners can update their Domain-> IP mapping as often as they like and users will always be able to get the correct results because the lookups are dynamic.

When your computer needs to find the IP address associated with a domain, it sends a query to a recursive DNS server, which reaches out to a series of DNS servers to retrieve a response. A DNS response contains an answer to the query, which contains the information your computer needed. Below is a simplified answer for a query for http://www.google.com.

http://www.google.com  A    65.199.32.22

First we have the queried name, followed by “A” the record type, and finally an IPV4 address which Google has associated with the domain. This answer is good for a set period of time (known as a time to live or TTL), which can be days or longer, but is often quite short.

As the system is dynamic, the mapping of a domain to an IP is ephemeral; there’s no way for a DNS server to tell you what IP address a domain name resolved to five minutes ago, let alone five years ago. Additionally, there’s no way to perform the reverse mapping, where one can find all of the domain names that have resolved to a specified IP address. Passive DNS was introduced to solve these and other problems with investigating DNS abuse.

How PDNS Works

PDNS was created in 2004 by Florian Weimer and introduced widely at the FIRST conference in 2005. The technology is a fairly simple concept: a network device (sensor) captures all DNS answer messages and forwards them into a central database that logs the relevant information, the queried domain, the answer and a timestamp of when the request occurred. This creates a historical index of IP to domain and domain to IP mappings that have occurred on the monitored network.

The fact that the database only contains information from the network your sensor monitors is one of the major challenges for users of PDNS. Unless the data from these systems is melded into a single query interface, the analysts using them will have different data sets. If a domain has never been queried inside your network, you’ll have no data on it at all. There are multiple partial solutions to this problem, which we’ll discuss in later sections.

What can PDNS do for you?

For an intelligence analyst, making a connection between two components in an attack can provide new insight into an investigation. You may find that two previously unlinked attacks actually share a command and control server, or find out about infrastructure that may have been used in attacks you have not yet discovered.

In July 2015, we published an article describing an attack on the US government by an APT group known as UPS a.k.a. APT3. Our data showed that two subdomains of a seemingly legitimate website, rpt.perrydale[.]com and report.perrydale[.]com had been involved in the attack. DNS queries for these subdomains compared to the legitimate “www” domain (www.perrydale[.]com) revealed that “www” was hosted on an IP address in the United States, where the other subdomains mapped to an IP address in Ukraine.

We used PDNS to search for any other domains associated with the Ukrainian IP, which immediately produced three additional subdomains with suspect names (such as wwww) that may have been part of the attack campaign.

Additional analysis was required at this point to confirm these subdomains were also malicious, but PDNS allowed us to discover the fact that these subdomains existed and were associated with a the Ukrainian IP.

PDNS Pitfalls

Now that you have seen the benefits of using PDNS to connect attacks, it’s critical to understand that not every connection is valid.

Here are some of the situations to be weary of when using PDNS to make connections in your analysis.

  • Domain Names Change Hands: A domain used in an attack three years ago has likely expired and been re-registered by a completely unrelated entity. This could be a domain name reseller or just a regular individual. You can use WHOIS data to discover when these changes happened, which will help you gauge the validity of these connections.
  • IP Addresses Change Hands (and may be shared): In the same way that a domain name can be transferred from one individual to another, IP addresses are often used by many different entities, sometimes at the same moment. This has become especially important in the era of cloud services, where a server can be created and destroyed with the press of a button. Without knowledge of when the IP address was in an actor’s control to back you up, an IP->domain connection may be invalid.
  • Sinkholes (and parking websites) are everywhere: In the course of your analysis, you may come across an IP address hosting thousands of domain names. One common scenario is that the domain name has expired and an individual has re-registered it in case someone else purchases it in the future for a higher price. These domains are typically “parked” on a server that states the domain name is for sale, and this IP address should be considered invalid for all connections. The second common scenario is when security researchers create a “sinkhole” to which many previously malicious domain names point in order to collect data. Similar to the parking websites, these sinkholes are not useful for making connections, but should be a clear indication that someone else is investigating your subject.

How can I get started?

As mentioned above, you could run your own passive DNS sensor (like dnslogger), which will give you information about your own network, but that’s only going to show you a small section of the world. Having insight into your own DNS requests is certainly valuable, but from an intelligence perspective you may want a broader view.

There are many PDNS sources on the web, which can be queried to expand the amount of information available, here are just a few:

You may also consider the FarSight Passive DNS service, which aggregates data from a large number of PDNS sensors. Finally, if you want to make your life as easy as possible you should take a look at PassiveTotal, which aggregates many of these sources into a single interface with additional features.

Regardless of how you may choose to implement PDNS in your workflow, it is an important tool to have during intelligence analysis and collection. You can leverage this tool to not only identify active, real time threats, but also begin visualizing and mapping out adversary infrastructure to help answer the questions of who, what, when, why, and how.

[Palo Alto Networks Blog]

New on SecurityRoundtable.org: Considerations When Hiring a CISO and More!

This week on SecurityRoundtable.org, Kal Bittianda, who leads the cybersecurity practice at global executive search and assessment firm Egon Zehnder, discusses what boards and C-level executives need to consider when hiring a CISO.

In a highly competitive market, Kal notes, even organizations that can effectively evaluate candidates must be prepared from the start to sell the CISO opportunity and understand the mentality from which qualified CISO candidates approach the job.

We also have a new video featuring Brian Kelly, Chief Security Officer at Rackspace. He advises that organizations should have outside experts in place to help with everything from incident response to crisis communications. Watch his video to hear him share more lessons learned around cybersecurity.

Palo Alto Networks partnered with the New York Stock Exchange to produce Navigating the Digital Age: The Definitive Cybersecurity Guide for Directors and Officers. We intend this book to be both a how-to guide and an anthology, and it includes advice and cybersecurity best practices from some of the community’s sharpest minds.

Join us at SecurityRoundtable.org to get your copy of the guide and help us keep the conversation going.

Follow us for the latest on SecurityRoundtable.org:

[Palo Alto Networks Blog]

Keep your Data and Applications Safe from CSA Top Threats

The cloud presents all kinds of opportunities for today’s enterprise, from anywhere access to anything-as-a-service. Cloud computing imposes significant security risks on the corporation, network, IT and the day to day activities of the business. How do they maintain compliance, control and ownership of sensitive data as they move from the physical environment to a cloud world? The distribution of data onto devices may not be completely controlled by the data owner, and there is liability confusion as cloud service providers take on a larger role. As a result CIOs are looking at technologies and strategies to assure security while delivering the required services.

Fortunately, this model of enterprise computing doesn’t have to be the high-risk proposition. By thinking of security as an enabler, instead of an obstacle for cloud adoption, you can easily protect and maintain control of data across multi-cloud environments while maximizing the business potential of the cloud. During this webcast we will discuss ways to address the key security challenges you’re facing as you move to the cloud.

See the webinar

 [Cloud Security Alliance News]

CSA Guidance V.4: Domain 1 now available for review and comments

The Cloud Security Alliance’s Security Guidance for Critical Areas of Focus in Cloud Computing seeks to establish a stable, secure baseline for cloud operations. It acts as a practical, actionable roadmap to individuals looking to safely and securely adopt the cloud paradigm.

Since it’s last revision in 2011, the cloud landscape, tools and technologies have changed and so we want to reflect that in an updated version of the CSA Guidance (which would be version 4). A draft of Domain 1 is now available for review. Domain 1 covers Cloud Computing Concepts and Architecture and it provides the conceptual framework for the rest of CSA’s guidance. The domain describes and defines cloud computing, sets our baseline terminology and details the overall logical and architectural frameworks used in the rest of the document.

Experts are needed that can invest their time in providing feedback. Although we have a dedicated writing team, this is still a community project. All feedback and edits will be managed via GitHub so that all parts of the process are open and public.

Contribute now

 [Cloud Security Alliance News]

Eleven Essential Findings from Skyhigh’s Q4 2015 Cloud Report

Our Latest Research Reveals Opportunities and Threats As Business-Critical Data Moves to the Cloud

By Cameron Coles, Sr. Product Marketing Manager, Skyhigh Networks

Cloud services are now an integral part of corporate life. Companies use, on average, 1,154 cloud services ranging from enterprise-ready services procured by the IT department such as Office 365 to far lesser known and riskier services such as FreakShare. It’s not uncommon for sensitive corporate data to make its way to the cloud, with 15.8% of documents in file sharing services containing some form of sensitive content.

Our latest Cloud Adoption & Risk Report (download a copy here) examines the cloud usage of over 23 million users at companies spanning all major industries worldwide. Across more than 16,000 cloud services, they generate in excess of 2 billion events each day including logins, uploads, edits, shares, deletes, etc. We’ve analyzed this activity and distilled some important facts about how companies are using the cloud today. Here are 11 of the most interesting findings from the report.

15.8% of files in the cloud contain sensitive data
The most common type of sensitive content found in the cloud is confidential data (e.g. financial records, business plans, source code, trading algorithms, etc.) with 7.6% of documents in file sharing services containing this data. Next, 4.3% of documents contain personally identifiable information, 2.3% contain payment data such as credit card numbers, and 1.6% contain protected health information. Sensitive data uploaded to the cloud, in and of itself, is not necessarily a bad thing, but we’ve found that data can be placed at risk if it’s misused internally or shared externally outside of policy.

1,156 files contain the word “password” in the filename
A common theme in recent data breaches is that cyber criminals use compromised passwords to execute attacks. In the Anthem breach, it’s been reported that passwords belonging to five IT employees were used to access sensitive patient data. While it’s recommended users store passwords in a safe place, such as a secure password vault, unencrypted Excel and Word documents uploaded to file sharing services are a poor place to store passwords.

1,753 Excel documents contain the word “salary” in the filename
Recent headline-making data breaches have also involved documents containing employee salaries, Social Security numbers, home addresses, and bank account numbers. Many of these files include the word “salary” or “salaries” in the filename, making it even easier for a cyber criminal to identify them. The average company has 6,097 files containing these keywords in the filename stored in cloud-based file sharing services, and 1,753 are Excel spreadsheets.

File sharing hit an all-time high this quarter
The percentage of files in cloud-based file sharing services that are shared hit an all-time high of 37.2% in Q3. Files can be shared with multiple users inside and outside the company. The most common type of collaboration is with internal users, with 71.6% of shared files shared with individual users within the company. Of shared files, 28.2% are shared with business partners, and 5.4% are visible to anyone with the link. Of the 37.2% of files shared, we’ve broken down who they are shared with here:

9.2% of files shared externally contain sensitive data
Of files in cloud-based file sharing services that are shared externally (with business partners, personal emails, or publicly on the web) 9.2% contain sensitive data, defined as confidential, personal, payment, or health data. While this number is lower than the overall average of all files that contain sensitive data (15.8%), which indicates that users are more selective with what they share externally, these sharing events can expose organizations to risk if data falls into the wrong hands.

File sharing services are a shadow code repo
Despite the popularity of code repositories such as GitHub and SourceForge, users also store files containing code in file sharing services and rely on these services to send large code files to other users. The most common programming languages found in file sharing services include JavaScript, Objective-C, and Python. The average organization has thousands of code-containing files stored in the cloud, and 14.8% of these files are shared externally.

Data is under siege by internal and external threats
Insider threats, which include both accidental and malicious high-risk user behaviors, occur at least once a month at 89.6% of companies, with the average company experiencing 9.3 incidents per month. On average, companies experience 2.8 privileged user threats per month, which include administrators accessing data they shouldn’t. And, organizations experience 5.1 incidents each month in which an unauthorized third party exploits stolen account credentials to gain access to corporate data stored in a cloud service. A breakdown of companies experiencing at least one insider threat, compromised account, and privileged user threat per month is shown here:

 

Cloud usage in Q3 grew 38.9% over the same period last year
Cloud usage continues to grow exponentially. The average company in Q3, 2015 used 1,154 cloud services, including 174 distinct collaboration services, 61 file sharing services, 57 development services, and 45 content sharing services. The average user actively uses 30 cloud services. On average, organizations upload 14.7 TB of data to the cloud each month, but only 8.1% of cloud services offer enterprise-ready security controls, which is lower than the 9.5% this time last year.

 

iOS has more apps in use per device, Android users upload more data
The average iOS device accesses 11.05 cloud services, compared with 9.96 for Android, and 6.82 for Windows Phone. Cloud usage on iOS is soaring, it’s now 88.1% higher than this same period last year. Across mobile platforms, cloud usage grew 62.9% in the last 12 months. However, users of Android devices upload over three times more data compared with the average iOS user.

Cloud usage is surging on Windows and stagnant on the Mac
On average, Windows desktop users use a greater variety of cloud services than users of any other platform. The average Windows device accesses 18.3 cloud services, an increase of 47.6% in the last 12 months. Today, Windows devices on average access 77.7% more cloud services than Mac devices.

 

Enterprise cloud services account for 72.9% of cloud usage
A common misconception among corporate IT departments is that the bulk of their cloud usage is made up of employees accessing consumer apps. However, we found the opposite is true. On average, 72.9% of the cloud services in use by a company are defined as enterprise cloud services and 71.8% of data uploaded to the cloud went to these services. Not all of these apps are approved, and companies can reduce their risk by migrating to enterprise-ready services. From a security standpoint, the top 20 enterprise cloud services are significantly more likely to have robust security controls than the average enterprise cloud service (85% vs 9.9%).

[Cloud Security Alliance Blog]

 

English
Exit mobile version