Trustwave's 2024 Retail Report Series Highlights Alarming E-Commerce Threats and Growing Fraud Against Retailers. Learn More

Trustwave's 2024 Retail Report Series Highlights Alarming E-Commerce Threats and Growing Fraud Against Retailers. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

mDNS - Telling the world about you (and your device)

Luiz Eduardo ( @effffn) and Rodrigo Montoro ( @spookerlabs ) have presented "Mobile Snitch -Devices telling the world about you" at conferences around the world. Today we share a bit about the mDNS protocol and how it impacts the security landscape.

From the talk abstract:

"In the past few years, we have not only seen a significant growth in use of mobile devices, but also it is not uncommon to see people using more than one mobile device at the same time. The combination of the nature of mobile WiFi device operations along with the lack of user awareness, could lead someone to know things about your life, where've you been, where you work, and even who you are."

One protocol heavily investigated during testing was Multicast DNS (mDNS). This protocol works by creating a device-unique identifier to register as a hostname via a multicast service on local networks. Although Apple is not the only vendor using mDNS, by default all Apple devices(iPad, iPod, iPhone, Mac Book) have the protocol enabled for their applications.

A read through the IETF draft for mDNS reveals some protocol features that also act as attractive targets from a security perspective:

The primary benefits of mDNS names are that (i) they require little or no administration or configuration to set them up, (ii) they work when no infrastructure is present, and (iii) they work during infrastructure failures.

mDNS makes network configuration easier for home and small business users. Access to devices is intuitive, their hostnames based on identifiable information such as the user's or computer's name, device type, or some combination. While this ease of use is a competitive advantage in the market place, the result is identifiable information being broadcast on any network to which an mDNS enabled device attaches.

Ease of use is also popular in the corporate setting, as the rising interest in Bring Your Own Device (BYOD) policies demonstrates. It is also not uncommon to find consumer-grade devices for use in personal offices or branch locations, devices that may also be equipped with mDNS abilities. As users move from the internal corporate network and into the wider wireless world, they continue to broadcast this identifiable information, at coffee shops, airports, malls, or any other place they jump on a hotspot.

The use of identifiable information is not a strict part of the mDNS protocol, but is the consequence of generating easy-to-use hostnames; remembering random names would be no better than IP addresses. As can be seen in a packet capture of mDNS traffic, Apple devices are particularly open in their default hostname choice of the users' first and last names.

Basic tshark (wireshark text version) command line

$ tshark -n -T fields -e dns.qry.name -r file.pcap udp.srcport == 5353

Geraldine-Sbragias-iPad.local,Geraldine-Sbragias-iPad.local

Mary-Jane-Longrichs-iPhone.local,Mary-Jane-Longrichs-iPhone.local

Jeffrey-Heines-iPhone.local,Jeffrey-Heines-iPhone.local

Ian-Moffats-iPhone.local,Ian-Moffats-iPhone.local

Alex Shuker?\x80\x99s MacBook._afpovertcp._tcp.local,Alex Shuker?\x80\x99s MacBook._smb._tcp.local,Alex Shuker?\x80\x99s MacBook._ssh._tcp.local,Alex Shuker?\x80\x99s MacBook._sftp-ssh._tcp.local,Bluetooth DUN @ Alex Shuker?\x80\x99s MacBook._ipp._tcp.local,Alex-Shukers-MacBook.local,Alex-Shukers-MacBook.local

iPad-de-Jhon-Gomez.local,iPad-de-Jhon-Gomez.local

Using users' first and last names as the hostnames simplifies discovery of more information on them by making basic Internet searches. Plenty can be discovered from information posted at LinkedIn, Twitter, and Facebook. This cannot be overlooked as a valuable source of intelligence for penetration testers, especially for social engineering. Exposure is not limited to the corporate network, but extends to the coffeeshop down the block, on to busses and trains, and into the users' homes.

Also notice, in the above packet capture, the inclusion of service and protocol information, sent in the clear. That's right; mDNS even provides Passive Port-scanning!

12523_ed46299b-9a9f-4dd2-b353-59149b0e21cd
Perl script reading a pcap file

<snipped>

Hostname: Rodrigo.Lab.local with Port Listening: 22
Hostname: Rodrigo.Lab.local with Port Listening: 5900

<snipped>

Care must always be taken to maintain security when using mobile devices in the public spaces. TheNSA Security Configurations Guide for OS X recommends disabling the mDNS protocol, and offers a command line method to do so. Apple offers an alterative method in their Knowledge Base. At a minimum, no matter the operating system, mDNS advertisement should be disabled.

Penetration testers may be interested in mDNS Tools, an open source set of tools for exploring Multicast DNS.

12851_fc36cb67-0216-4adf-86bd-ce2639d712f0

11821_cb3556fe-1807-4a07-9c5d-2ee31dd90a8e
Research for Mobile Snitch continues, with a new focus on using mDNS to impersonating different types of information, services, and servers. Look forward to future updates, and provide your feedback on the security implications of mDNS.

Rodrigo "Sp0oKeR" Montoro & Luiz Eduardo

ABOUT TRUSTWAVE

Trustwave is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo