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 %% Class Definitions classDef action fill:#99ccff classDef technique fill:#ffcc99 classDef operator fill:#ff9900 %% Nodes step_create_service[“<b>アクション</b> – <b>T1542 Pre-OS Boot</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 動的リンクライブラリ注入</b><br/>Bindlinkを介して主要なDLL(例:msvcp_win.dll)をリダイレクトし、EDRプロセスが悪意のあるコピーをロードするようにします。”] class step_hijack_dll action step_corrupt_dll[“<b>アクション</b> – <b>T1574.001 DLL リダイレクト – PE ヘッダーの改ざん</b><br/>コピーされたDLLのPEヘッダーを変更して署名を無効にし、保護されたEDRプロセスがライブラリを拒否するようにします。”] class step_corrupt_dll action step_dos[“<b>アクション</b> – <b>T1499.004 エンドポイントサービス拒否</b><br/>EDRサービスが必要なDLLをロードできずに終了し、セキュリティコンポーネントに対するサービス拒否を達成します。”] class step_dos action %% Edges step_create_service u002du002d>|leads_to| step_modify_registry step_modify_registry u002du002d>|enables| step_hijack_dll step_hijack_dll u002du002d>|causes| step_corrupt_dll step_corrupt_dll u002du002d>|results_in| step_dos “
攻撃フロー
シミュレーション実行
前提条件:テレメトリーおよびベースラインの事前チェックが合格していること。
攻撃の流れとコマンド
攻撃者は、改ざんされたコピーを配布することでエンドポイント検出プラットフォームを無力化しようとしています。 msvcp_win.dll。手順は次の通りです。
- 信頼できるDLLを見つける in
C:WindowsSystem32. - コピー 攻撃者が制御する隠しディレクトリ(例:
C:ProgramDataFakeLib). - 署名の改ざん ファイル末尾に任意のバイトを追加することで、バイナリハッシュが変更され、オーセンティコード署名が無効になります。
- 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. |