위협 헌팅 루틴에 푸니코드 추가
Detection stack
- AIDR
- Alert
- ETL
- Query
요약
이 기사는 국제 도메인 이름(IDN)이 Punycode를 통해 어떻게 무기화되어 언뜻 보기에 합법적으로 보이는 기만적인 URL을 생성할 수 있는지를 설명합니다. 기본적인 인코딩/디코딩 개념을 설명하고, DNS 원격 감지에서 관찰된 Punycode 문자열의 예를 공유하며, 실용적인 사냥 휴리스틱을 강조합니다: 잠재적인 IDN 기반 스푸핑 또는 오용의 고신호 지표로서의 DNS 쿼리 로그 모니터링. xn-- 접두사는 잠재적인 IDN 기반 스푸핑이나 오용의 고시그널 지표입니다.
조사
저자는 간단한 파이썬 예제를 사용하여 Punycode로 인코딩된 도메인을 디코딩하는 방법을 시연한 후, 동일한 논리를 실제 관찰에 적용합니다. DNS 로그 발췌물은 유기적인 사용자 브라우징이 아닌 자동화되거나 스크립트된 쿼리링을 시사하는 – 접두사가 붙은 도메인에 대한 반복 조회를 보여줍니다. 이 패턴은 공격자들이 대규모로 IDN 유사체를 운영화하면서도 원시 로그에서 발견하기 어렵게 만드는 방법을 보여줍니다. xn---prefixed domains, suggesting automated or scripted querying rather than organic user browsing. The pattern helps illustrate how attackers can operationalize IDN lookalikes at scale while remaining difficult to spot in raw logs.
완화
보안 팀은 DNS 해석기 로그에서 xn-- 을(를) 정기적으로 검색하여 각 매치를 잠재적인 IDN 오용 사례로 삼아 분류해야 합니다. 의심스러운 유니코드 문자(예: 동형 문자)를 찾아 디코딩된 도메인을 검토한 후, URL 검증, 도메인 평판 확인, 엔드포인트/프로세스 원격 감지와의 상관 적용 등의 표준 제어를 적용합니다. 가능한 경우, 환경에서 알고 있는 합법적인 IDN 사용에 대한 허용 목록으로 탐지를 풍부하게 하여 노이즈를 줄이십시오.
응답
Punycode 도메인이 식별되면 분석가는 도메인을 디코딩하고 평판 및 역사적인 맥락을 평가하여 트래픽이 예상 비즈니스 활동과 일치하는지 확인해야 합니다. 악의적인 의도가 확인되면 도메인을 차단하거나 싱크홀로 만들고, 관련 인프라 및 다운스트림 접근 시도를 식별하기 위해 피벗하십시오. 지속적인 위협 사냥의 구성 요소로 IDN/Punycode 오용을 지속적으로 모니터링하고, 시간이 지남에 따라 경계값 및 풍부성을 조정하여 정확도를 높게 유지하십시오.
공격 흐름
이 부분은 아직 업데이트 중입니다. 알림을 받으려면 등록하십시오
알림 받기시뮬레이션 실행
전제 조건: 원격 감지 및 기준선 사전 점검이 통과해야 합니다.
-
공격 서사 및 명령:
적수는 유니코드 도메인 뒤에 숨겨져 일상적인 검사를 피하려는 명령 제어 서버에 연락을 원합니다. 그들은 도메인을 punycode로 인코딩하여 “xn--“로 시작하는 문자열을 생성합니다. 이 인코딩된 이름에 대해 DNS 쿼리를 발행하여 공격자는 규칙이 모니터링하는 정확한 원격 감지를 생성합니다. 공격자는 ‘생활 유지’를 위해 Windows 기본 도구를 사용하여 감염된 호스트에서 조회를 수행합니다.# 악성 punycode 도메인 (예: xn--e1afmkfd.xn--p1ai) $maliciousDomain = "xn--e1afmkfd.xn--p1ai" Resolve-DnsName -Name $maliciousDomain -DnsOnly -
회귀 테스트 스크립트:
<# .SYNOPSIS “Punycode로 인코딩된 도메인” 탐지 규칙을 검증하기 위한 punycode DNS 쿼리를 시뮬레이트합니다. .DESCRIPTION 이 스크립트는 도발적인 punycode 도메인에 대한 단일 DNS 조회를 수행합니다. 동작을 기록하고, 로그 수집을 보장하기 위해 잠시 대기한 후 종료합니다. #> #--- 설정 --- $punycodeDomain = "xn--e1afmkfd.xn--p1ai" # punycode로 인코딩된 FQDN으로 대체 $logFile = "$env:Temppunycode_test.log" #--- 실행 --- "[$(Get-Date -Format o)] $punycodeDomain에 대한 punycode DNS 쿼리 시작" | Out-File -FilePath $logFile -Append try { Resolve-DnsName -Name $punycodeDomain -DnsOnly -ErrorAction Stop | Out-Null "[$(Get-Date -Format o)] 쿼리 성공" | Out-File -FilePath $logFile -Append } catch { "[$(Get-Date -Format o)] 쿼리 실패: $_" | Out-File -FilePath $logFile -Append } #--- SIEM 수집 허용을 위한 선택적 대기 (필요시 조정) --- Start-Sleep -Seconds 5 "[$(Get-Date -Format o)] 스크립트 완료" | Out-File -FilePath $logFile -Append -
정리 명령:
# 로컬 해석기 캐시에서 쿼리를 제거하기 위한 DNS 캐시 플러시 ipconfig /flushdns # 테스트 스크립트에 의해 생성된 임시 로그 파일 제거 Remove-Item -Path "$env:Temppunycode_test.log" -ErrorAction SilentlyContinue
SOC Prime의 Detection as Code 플랫폼에 가입하세요 귀사의 비즈니스에 가장 중요한 위협에 대한 가시성을 개선하세요. 시작을 돕고 즉각적인 가치를 제공하기 위해 지금 SOC Prime 전문가와의 회의를 예약하세요.
Cookie Settings
You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
| Name | Descripiton |
|---|---|
| PHPSESSID | Preserves user session state across page requests. Cookie generated by applications based on the PHP language. This is a general purpose identifier used to maintain user session variables. It is normally a random generated number, how it is used can be specific to the site, but a good example is maintaining a logged-in status for a user between pages. |
| sp_i | Used to store information about authenticated User. |
| sp_r | Used to store information about authenticated User. |
| sp_a | Used to store information about authenticated User. |
All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
| Name | Descripiton |
|---|---|
| tuuid | Collects anonymous data related to the user's visits to the website, such as the number of visits, average time spent on the website and what pages have been loaded. |
| tuuid_last_update | Collects anonymous data related to the user's visits to the website, such as the number of visits, average time spent on the website and what pages have been loaded. |
| um | Collects anonymous data related to the user's visits to the website, such as the number of visits, average time spent on the website and what pages have been loaded. |
| umeh | Collects anonymous data related to the user's visits to the website, such as the number of visits, average time spent on the website and what pages have been loaded. |
| na_sc_x | Used by the social sharing platform AddThis to keep a record of parts of the site that has been visited in order to recommend other parts of the site. |
| APID | Collects anonymous data related to the user's visits to the website. |
| IDSYNC | Collects anonymous data related to the user's visits to the website. |
| _cc_aud | Collects anonymous statistical data related to the user's website visits, such as the number of visits, average time spent on the website and what pages have been loaded. The purpose is to segment the website's users according to factors such as demographics and geographical location, in order to enable media and marketing agencies to structure and understand their target groups to enable customised online advertising. |
| _cc_cc | Collects anonymous statistical data related to the user's website visits, such as the number of visits, average time spent on the website and what pages have been loaded. The purpose is to segment the website's users according to factors such as demographics and geographical location, in order to enable media and marketing agencies to structure and understand their target groups to enable customised online advertising. |
| _cc_dc | Collects anonymous statistical data related to the user's website visits, such as the number of visits, average time spent on the website and what pages have been loaded. The purpose is to segment the website's users according to factors such as demographics and geographical location, in order to enable media and marketing agencies to structure and understand their target groups to enable customised online advertising. |
| _cc_id | Collects anonymous statistical data related to the user's website visits, such as the number of visits, average time spent on the website and what pages have been loaded. The purpose is to segment the website's users according to factors such as demographics and geographical location, in order to enable media and marketing agencies to structure and understand their target groups to enable customised online advertising. |
| dpm | Via a unique ID that is used for semantic content analysis, the user's navigation on the website is registered and linked to offline data from surveys and similar registrations to display targeted ads. |
| acs | Collects anonymous data related to the user's visits to the website, such as the number of visits, average time spent on the website and what pages have been loaded, with the purpose of displaying targeted ads. |
| clid | Collects anonymous data related to the user's visits to the website, such as the number of visits, average time spent on the website and what pages have been loaded, with the purpose of displaying targeted ads. |
| KRTBCOOKIE_# | Registers a unique ID that identifies the user's device during return visits across websites that use the same ad network. The ID is used to allow targeted ads. |
| PUBMDCID | Registers a unique ID that identifies the user's device during return visits across websites that use the same ad network. The ID is used to allow targeted ads. |
| PugT | Registers a unique ID that identifies the user's device during return visits across websites that use the same ad network. The ID is used to allow targeted ads. |
| ssi | Registers a unique ID that identifies a returning user's device. The ID is used for targeted ads. |
| _tmid | Registers a unique ID that identifies the user's device upon return visits. The ID is used to target ads in video clips. |
| wam-sync | Used by the advertising platform Weborama to determine the visitor's interests based on pages visits, content clicked and other actions on the website. |
| wui | Used by the advertising platform Weborama to determine the visitor's interests based on pages visits, content clicked and other actions on the website. |
| AFFICHE_W | Used by the advertising platform Weborama to determine the visitor's interests based on pages visits, content clicked and other actions on the website. |
| B | Collects anonymous data related to the user's website visits, such as the number of visits, average time spent on the website and what pages have been loaded. The registered data is used to categorise the users' interest and demographical profiles with the purpose of customising the website content depending on the visitor. |
| 1P_JAR | These cookies are used to gather website statistics, and track conversion rates. |
| APISID | Google set a number of cookies on any page that includes a Google reCAPTCHA. While we have no control over the cookies set by Google, they appear to include a mixture of pieces of information to measure the number and behaviour of Google reCAPTCHA users. |
| HSID | Google set a number of cookies on any page that includes a Google reCAPTCHA. While we have no control over the cookies set by Google, they appear to include a mixture of pieces of information to measure the number and behaviour of Google reCAPTCHA users. |
| NID | Google set a number of cookies on any page that includes a Google reCAPTCHA. While we have no control over the cookies set by Google, they appear to include a mixture of pieces of information to measure the number and behaviour of Google reCAPTCHA users. |
| SAPISID | Google set a number of cookies on any page that includes a Google reCAPTCHA. While we have no control over the cookies set by Google, they appear to include a mixture of pieces of information to measure the number and behaviour of Google reCAPTCHA users. |
| SID | Google set a number of cookies on any page that includes a Google reCAPTCHA. While we have no control over the cookies set by Google, they appear to include a mixture of pieces of information to measure the number and behaviour of Google reCAPTCHA users. |
| SIDCC | Security cookie to protect users data from unauthorised access. |
| SSID | Google set a number of cookies on any page that includes a Google reCAPTCHA. While we have no control over the cookies set by Google, they appear to include a mixture of pieces of information to measure the number and behaviour of Google reCAPTCHA users. |
| __utmx | This cookie is associated with Google Website Optimizer, a tool designed to help site owners improve their wbesites. It is used to distinguish between two varaitions a webpage that might be shown to a visitor as part of an A/B split test. This helps site owners to detemine which version of a page performs better, and therefore helps to improve the website. |
| __utmxx | This cookie is associated with Google Website Optimizer, a tool designed to help site owners improve their wbesites. It is used to distinguish between two varaitions a webpage that might be shown to a visitor as part of an A/B split test. This helps site owners to detemine which version of a page performs better, and therefore helps to improve the website. |
If you do not allow these cookies then some or all of these services may not function properly.
| Name | Descripiton |
|---|---|
| _hjid | Hotjar cookie. This cookie is set when the customer first lands on a page with the Hotjar script. It is used to persist the random user ID, unique to that site on the browser. This ensures that behavior in subsequent visits to the same site will be attributed to the same user ID. |
| _hjIncludedInSample | This cookie is associated with web analytics functionality and services from Hot Jar, a Malta based company. It uniquely identifies a visitor during a single browser session and indicates they are included in an audience sample. |
| intercom-id-[xxx] | This cookie is used by Intercom as a session so that users can continue a chat as they move through the site. |
| intercom-session-[xxx] | Used to keeping track of sessions and remember logins and conversations. |
| demdex | Via a unique ID that is used for semantic content analysis, the user's navigation on the website is registered and linked to offline data from surveys and similar registrations to display targeted ads. |
| CookieConsent | Stores the user's cookie consent state for the current domain. |
| __cfduid | Used by the content network, Cloudflare, to identify trusted web traffic. |
| ss | These cookies enable the website to provide enhanced functionality and
personalisation . They may be set by us or by third party providers whose
services we have added to our pages. These services may include the Live Chat facility, Contact Us form(s), the Product Quotation forms and submission process, and the Email Newsletter sign up functionality . |
They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
| Name | Descripiton |
|---|---|
| _ga | This cookie name is asssociated with Google Universal Analytics - which is a significant update to Google's more commonly used analytics service. This cookie is used to distinguish unique users by assigning a randomly generated number as a client identifier. It is included in each page. Registers a unique ID that is used to generate statistical data on how the visitor uses the website. request in a site and used to calculate visitor, session and campaign data for the sites analytics reports. By default it is set to expire after 2 years, although this is customisable by website owners. |
| _gat | Used by Google Analytics to throttle request rate. This cookie name is associated with Google Universal Analytics, according to documentation it is used to throttle the request rate - limiting the collection of data on high traffic sites. It expires after 10 minutes. |
| _gid | This cookie name is asssociated with Google Universal Analytics. This appears to be a new cookie and as of Spring 2017 no information is available from Google. It appears to store and update a unique value for each page visited. Registers a unique ID that is used to generate statistical data on how the visitor uses the website. |
| IDE | Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user. |
| r/collect | Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user. |
| test_cookie | Used to check if the user's browser supports cookies. |
| collect | Used to send data to Google Analytics about the visitor's device and behaviour. Tracks the visitor across devices and marketing channels. |
| ads/user-lists/# | These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. |
| c | Registers anonymised user data, such as IP address, geographical location, visited websites, and what ads the user has clicked, with the purpose of optimising ad display based on the user's movement on websites that use the same ad network. |
| khaos | Registers anonymised user data, such as IP address, geographical location, visited websites, and what ads the user has clicked, with the purpose of optimising ad display based on the user's movement on websites that use the same ad network. |
| put_# | Registers anonymised user data, such as IP address, geographical location, visited websites, and what ads the user has clicked, with the purpose of optimising ad display based on the user's movement on websites that use the same ad network. |
| rpb | Registers anonymised user data, such as IP address, geographical location, visited websites, and what ads the user has clicked, with the purpose of optimising ad display based on the user's movement on websites that use the same ad network. |
| rpx | Registers anonymised user data, such as IP address, geographical location, visited websites, and what ads the user has clicked, with the purpose of optimising ad display based on the user's movement on websites that use the same ad network. |
| tap.php | Registers anonymised user data, such as IP address, geographical location, visited websites, and what ads the user has clicked, with the purpose of optimising ad display based on the user's movement on websites that use the same ad network. |