EDRStartupHinder: EDR 시작 프로세스 차단기
Detection stack
- AIDR
- Alert
- ETL
- Query
요약
이 기사는 EDRStartupHinder라는 연구 도구가 Windows Bindlink 메커니즘을 악용하여 중요한 System32 DLL 로드를 리디렉션함으로써 보호된 EDR 프로세스가 시작 시 충돌하도록 한다는 것을 설명합니다. 우선순위가 더 높은 서비스를 설치하고 서명되지 않은 교체 DLL을 제공함으로써 이 방법은 EDR 구성 요소의 초기화를 방지하여 부팅 시 호스트에서 엔드포인트 보호를 효과적으로 제거합니다.
조사
작성자는 Microsoft Defender가 시작 시 msvcp_win.dll을 로드하고 TDI 그룹과 연결된 서비스가 Defender보다 먼저 시작된다는 것을 확인했습니다. 이 도구는 합법적인 DLL을 복사하고 PE 헤더를 수정하여 변조된 버전을 만들고 DusmSVC-01이라는 서비스를 등록하며 Defender 프로세스(MsMpEng.exe)를 모니터링합니다. 그런 다음 Bindlink를 사용하여 DLL 해상도를 리디렉션하여 Defender가 서명되지 않은 DLL을 로드하려고 시도하게 합니다. 이 프로세스는 PPL 보호 하에서 실행되기 때문에, 서명되지 않은 모듈 로드는 Defender 프로세스가 종료되도록 유발합니다.
완화 조치
의심스럽거나 예상치 못한 서비스 생성 이벤트와 bindlink.dll 사용을 나타내는 원격 측정을 모니터링하십시오. System32 DLL의 무결성 확인을 강제하고 예상치 못한 중복, 변형 또는 로드 경로 리디렉션에 대해 경고를 발생시키십시오. DLL 리디렉션을 가능하게 할 수 있는 쓰기 권한을 제한하여 공격 가능성을 줄이고, KnownDLLs 주변의 제어를 강화하며, 운영상 유효한 경우 코드 서명 정책을 시행하십시오.
대응
를 감지하면 새로운 서비스 DusmSVC-01 또는 비정상적인 Bindlink 동작이 감지되면 엔드포인트를 격리하고 주요 System32 DLL의 무결성을 확인하십시오. 신뢰할 수 있는 소스 또는 백업에서 수정된 파일을 복구한 다음 악성 서비스 및 관련 아티팩트를 제거하십시오. 추가적인 지속성, 권한 상승 또는 시작 시간 보호 우회를 위한 후속 활동을 식별하기 위해 포렌식 검토를 완료하십시오.
“graph TB %% 클래스 정의 classDef action fill:#99ccff classDef technique fill:#ffcc99 classDef operator fill:#ff9900 %% 노드 step_create_service[“<b>액션</b> – <b>T1542 Preu2011OS 부트</b><br/>대상 EDR 서비스보다 먼저 시작하도록 설정된 악성 Windows 서비스를 생성합니다 (EDRStartupHinder).”] class step_create_service action step_modify_registry[“<b>액션</b> – <b>T1484 도메인 또는 테넌트 정책 수정</b><br/>레지스트리에서 서비스 그룹 순서와 Bindlink 구성을 수정하여 악성 서비스를 우선시하고 DLL 리디렉션을 활성화합니다.”] class step_modify_registry action step_hijack_dll[“<b>액션</b> – <b>T1574.001 DLL 검색 순서 하이재킹</b> & <b>T1055.001 Dynamicu2011link 라이브러리 인젝션</b><br/>EDR 프로세스가 악성 복사본을 로드하도록 Bindlink를 통해 핵심 DLL(msvcp_win.dll)을 리디렉션합니다.”] class step_hijack_dll action step_corrupt_dll[“<b>액션</b> – <b>T1574.001 DLL 리디렉트 – PE 헤더 손상</b><br/>서명되지 않은 모듈 로드를 유도하여 서명된 PE 헤더를 손상시켜 보호된 EDR 프로세스가 라이브러리를 거부하도록 합니다.”] class step_corrupt_dll action step_dos[“<b>액션</b> – <b>T1499.004 엔드포인트 서비스 거부</b><br/>필수 DLL을 로드하지 못해 EDR 서비스가 종료되어 보안 구성 요소에 대한 서비스 거부를 유도합니다.”] class step_dos action %% 에지 step_create_service u002du002d>|lead to| step_modify_registry step_modify_registry u002du002d>|enable| step_hijack_dll step_hijack_dll u002du002d>|cause| step_corrupt_dll step_corrupt_dll u002du002d>|result in| step_dos “
공격 흐름
시뮬레이션 실행
전제 조건: 원격 측정 및 기준선 사전 비행 점검이 통과되어야 합니다.
공격 서사 및 명령어
적은 엔드포인트 탐지 플랫폼을 불구로 만들고자 하며 변조된 복사본을 전달하려고 합니다. msvcp_win.dll과정은 다음과 같습니다:
- 신뢰할 수 있는 DLL을 찾습니다 in
C:WindowsSystem32. - 복사합니다 이를 “FakeLib”라는 이름이 포함된 숨겨진 공격자 제어 디렉터리(예:
C:ProgramDataFakeLib). - 서명을 손상시킵니다 파일 끝에 임의의 바이트를 추가하여 바이너리 해시가 변경되고 Authenticode 서명이 무효화되도록 합니다.
- EDR의 로드 경로를 트리거합니다 (여기서는 시뮬레이션되지 않음) – 형식이 잘못된 DLL이 존재하면 EDR이 초기화 중에 실패합니다.
회귀 테스트 스크립트
# ---------------------------------------------------------------
# EDRStartupHinder 시뮬레이션 – msvcp_win.dll 복사 및 손상
# ---------------------------------------------------------------
# 1. 원본 및 악성 목적지 정의
$src = "$env:SystemRootSystem32msvcp_win.dll"
$dstDir = "C:ProgramDataFakeLib"
$dst = Join-Path $dstDir "msvcp_win.dll"
# 2. 목적지 폴더 생성 (숨김)
if (-not (Test-Path $dstDir)) {
New-Item -Path $dstDir -ItemType Directory | Out-Null
# 스텔스를 모방하기 위해 폴더 숨기기
(Get-Item $dstDir).Attributes += 'Hidden'
}
# 3. 합법적인 DLL 복사
Copy-Item -Path $src -Destination $dst -Force
# 4. DLL 손상 – 임의의 4바이트 추가
$rand = -join ((65..90) + (97..122) | Get-Random -Count 4 | % {[char]$_})
[IO.File]::OpenWrite($dst).Seek(0, [IO.SeekOrigin]::End) | Out-Null
[IO.File]::WriteAllBytes($dst, [byte[]]($rand.ToCharArray() | ForEach-Object {[byte][char]$_}))
Write-Host "EDRStartupHinder 시뮬레이션 완료. DLL이 $dst에 복사되고 손상됨."
정리 명령어
# 악성 복사본 및 선택적으로 숨겨진 폴더 제거
$dstDir = "C:ProgramDataFakeLib"
if (Test-Path $dstDir) {
Remove-Item -Path $dstDir -Recurse -Force
Write-Host "FakeLib 디렉터리 정리됨."
보고서 끝
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. |