DNS

บริการ Google Public DNS ประกาศเพิ่มมาตรการป้องกัน DNS Cache Poisoning ที่คนร้ายสร้าง DNS Reply โดยปลอมไอพีเป็น authoritive server มาตอบไอพีแทนเซิร์ฟเวอร์จริง หากสามารถยิง reply เข้าไปถึงกูเกิลก่อนที่ข้อความจากเซิร์ฟเวอร์จริงไปถึง ก็จะกลายเป็นว่าผู้ใช้จำนวนมากถูกส่งไปยังเซิร์ฟเวอร์ปลอมเป็นระยะเวลาหนึ่ง

ที่จริง IETF พยายามแก้ปัญหานี้แล้ว ด้วยมาตรฐาน DNS Cookies (RFC 7883) ที่เพิ่มค่า cookie ให้เซิร์ฟเวอร์ตอบค่าเดียวกันเท่านั้น ทำให้คนร้ายไม่สามารถเดาค่านี้ได้ แต่ในโลกความเป็นจริงเซิร์ฟเวอร์จำนวนมากไม่ได้รองรับฟีเจอร์นี้ โดยรวมมีคิวรีที่ได้รับการปกป้องจากกระบวนการนี้แค่ 10%

เมื่อปี 2022 กูเกิลจึงทดลองมาตรการที่มีการเสนอกันมาตั้งแต่ปี 2008 คือการสุ่มตัวเล็กใหญ่ในชื่อโดเมน ซึ่งโดยทั่วไปแล้วเซิร์ฟเวอร์ authoritive จะตอบกลับชื่อเดิมที่คิวรีเข้า ในกรณีที่คนร้ายพยายามปลอม DNS reply ก็จะไม่สามารถเดาได้ว่ากูเกิลสุ่มตัวเล็กใหญ่ไว้รูปแบบใด เนื่องจากเซิร์ฟเวอร์ส่วนใหญ่มีพฤติกรรมตรงกันทำให้ป้องกันได้เป็นวงกว้าง และตอนนี้กูเกิลก็เปิดฟีเจอร์นี้เป็นค่าเริ่มต้น ทำให้การคิวรีมากกว่า 90% ได้รับมาตรการปกป้องเพิ่มเติม ลดความเสี่ยงถูกโจมตี cache poisoning ลงแล้ว

มาตรการนี้เซิร์ฟเวอร์ authoritive ไม่ต้องทำอะไรเพิ่ม แต่กูเกิลก็แนะนำให้พยายามเปิดใช้ฟีเจอร์ความปลอดภัยใหม่ๆ

ที่มา - Google Security Blog

ภาพกระบวนการคิวรี DNS จาก Cloudflare

Hiring! บริษัทที่น่าสนใจ

Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand

hisoft Mon, 08/04/2024 - 03:04

ยังงงๆ อยู่ว่าช่วยป้องกันได้ยังไง 🥲

ปกติ bad actors จะใช้วิธีการ flood dns reply โดยใช้ queryid ที่คาดเดาไว้จาก queryid ตัวก่อนๆที่ prime และ sniff ไว้ครับ

ซึ่งหมายความว่า flood dns reply มักจะเป็น domain record ค่าเดียวเสมอ เพื่อพยายามให้ recursive nameserver ได้รับค่าและนำค่านั้นไปใช้ก่อนค่าที่มาจาก authoritative nameserver ของจริง

ดังนั้นถ้า recursive nameserver ร้องขอ BlOgNoNe.CoM
recursive nameserver ask BlOgNoNe.CoM with queryid 1011 >> bad actor authoritative nameserver flood reply blognone.com with queryid 1011 = mismatch

recursive nameserver ask BlOgNoNe.CoM with queryid 1011 >> authoritative nameserver reply BlOgNoNe.CoM with queryid 1011 = match ครับ

เข้าใจว่าถ้าปลอม dns resolver ถ้าสุ่มพิมพ์เล็กพิมพ์ใหญ่ มันต้อง return ที่ถูกต้องกลับมาตามที่สุ่ม

แต่เข้าใจว่าถ้า MIM จะปลอมกลับด้วยพิมพ์เล็กใหญ่ domain ที่เจนมาไม่ถูก ทำให้มาเช็คได้ว่าใครทำ server ปลอมอยู่ เข้าใจถูกไหมนะ

Hoo Mon, 08/04/2024 - 09:05

งงๆ
ถ้าคนร้ายแก้ให้ relay ปลอม ตอบตัวใหญ่เล็ก ตามที่ถูก query ถามมา
ก็หลอกได้แล้วรึเปล่า???

lew Mon, 08/04/2024 - 10:27

In reply to by Hoo

Blognone.com นี่ 11 ตัวอักษร ไม่รวมจุด ความเป็นไปได้ 2^11 ประมาณ 2048 แบบ ถ้าชื่อโดเมนยิ่งยาวรูปแบบยิ่งมาก

เมื่อนำไปร่วมกับมาตรการอื่นๆ ก่อนหน้านี้ เช่น randomized port ที่คนร้ายต้องเดาว่า Google เลือกคิวรีโดเมนใดจากพอร์ตต้นทางพอร์ตไหนอีกประมาณ 30,000 รูปแบบ จะได้ความเป็นไปได้ประมาณ 60 ล้านรูปแบบในกรณขีของ Blognone มัน "เยอะพอ"ที่คนร้ายจะไม่สามารถเดาจนครบ ภายใต้ช่วงเวลาที่ Goolge ยิงคิวรีอออกมาจริงๆ และรอผลลัพธ์อยู่

ผมเข้าใจว่าทำไม่ได้ครับ (ถ้าเข้าใจผิดขออภัย)
เพราะมันไม่ได้ยิงไปถามคนร้าย คนร้ายเลยไม่รู้ว่าคนถาม ถามด้วยตัวใหญ่เล็กรูปแบบใด

ที่ผ่านมาคนร้ายน่าจะใช้วิธียิงคำตอบ ไปหาคนถามโดยไม่สนว่าคนถามถามว่าอะไรครับ
เช่นคนถามอาจจะถามว่า www.blognone.com ip อะไร แต่คนร้ายยิงไปว่า www.google.com ip นี้นะ
แล้วก็รอฟลุค ว่าเมื่อไหรคนถาม จะถามว่า www.google.com ip อะไร

อ๋อ ขอบคุณครับ ค่อยเข้าใจหน่อย

เห็นคำว่า relay เลยนึกว่า เครื่องคนร้ายจะทำได้ระดับ man in middle ซึ่ง ตัวใหญ่-เล็ก มันไม่น่าจะช่วยอะไร เพราะดักคำถามได้