Detection stack
- AIDR
- Alert
- ETL
- Query
SesameOp 악성코드 공격
Microsoft 연구원들은 은밀한 명령 및 제어 채널로 OpenAI Assistants API를 사용하는 SesameOp라는 새로운 백도어를 발견했습니다. 이 악성코드는 AppDomainManager 인젝션을 사용하여 .NET 프로세스에 주입되는 악의적인 Netapi64.dll 로더를 통해 전달됩니다. 구성은 DLL의 리소스에 저장되며, OpenAI 엔드포인트와 통신하여 명령을 수신하고 결과를 유출합니다. 이 위협은 Windows 호스트에서의 장기적인 스파이 활동을 위해 설계되었습니다.
조사
조사 결과, Eazfuscator.NET으로 난독화된 로더 DLL(Netapi64.dll)이 마커 파일과 뮤텍스를 생성한 후, OpenAIAgent.Netapi64라는 백도어 컴포넌트를 디코딩 및 실행하는 것을 확인했습니다. 백도어는 OpenAI API 키, 사전 키, 선택적 프록시를 포함하는 파이프 구분 구성파일을 구문 분석합니다. 이것은 명령이나 페이로드를 인코딩하는 벡터 스토어, 어시스턴트 및 메시지를 가져오기 위해 OpenAI Assistants API와 상호 작용하며, 이는 JScript 엔진을 통해 복호화되고 압축 해제되어 실행됩니다.
완화
Microsoft는 방화벽과 프록시 설정을 강화하고, Defender에서 변조 방지와 실시간 보호를 활성화하며, 잠재적으로 원치 않는 응용 프로그램에 대해서 차단 모드를 사용할 것을 권장합니다. api.openai.com으로의 아웃바운드 트래픽을 모니터링하고 특정 뮤텍스 및 임시 파일 생성을 탐지하면 활동을 감지하는 데 도움이 될 수 있습니다. 블록 모드와 자동 수정 작업을 수행하는 EDR을 배포하는 것도 권장됩니다.
대응
탐지 후, 감염된 호스트를 격리하고 악성 프로세스를 종료하며 Netapi64.dll과 관련된 임시 파일을 삭제하고 타협된 OpenAI API 키를 해제합니다. 추가적인 지속성 메커니즘을 위한 전체 포렌식 검토를 수행하고 모든 권한 있는 자격 증명을 변경하십시오. 식별된 뮤텍스, 파일 경로 및 OpenAI Assistants API로의 아웃바운드 연결을 탐지하기 위해 탐지 규칙을 업데이트하십시오.
graph TB %% 클래스 정의 classDef action fill:#99ccff classDef process fill:#ffcc99 classDef tool fill:#cccccc classDef malware fill:#ff9999 classDef operator fill:#ff9900 %% 노드 action_initial_loader[“<b>행동</b> – 초기 로더 배포<br/><b>기법</b>: T1546.010 AppInit DLLs, T1546.009 AppCert DLLs, T1546.007 Netsh Helper DLL”] class action_initial_loader action process_dll_loaded[“<b>프로세스</b> – DLL 로드됨 (Netapi64.dll)”] class process_dll_loaded process action_hijack_flow[“<b>행동</b> – 실행 흐름 하이재킹: AppDomainManager<br/><b>기법</b>: T1574.014 (지속성 및 권한 상승을 위한 실행 흐름 수정)”] class action_hijack_flow action action_inject_code[“<b>행동</b> – 악성 .NET 코드 주입<br/><b>기법</b>: T1027 (난독화된 파일 또는 정보)”] class action_inject_code action malware_backdoor[“<b>악성코드</b> – 난독화된 백도어 (OpenAIAgent.Netapi64)<br/>난독화: Eazfuscator.NET, XOR, Base64, GZIP”] class malware_backdoor malware tool_mavinject[“<b>도구</b> – Mavinject<br/><b>기법</b>: T1218.013 (시스템 바이너리 프록시 실행)”] class tool_mavinject tool action_js_injection[“<b>행동</b> – JScriptEngine(Eval.JScriptEvaluate)를 통한 입력 주입”] class action_js_injection action action_execute_payloads[“<b>행동</b> – 공격자 페이로드 실행”] class action_execute_payloads action action_archive_data[“<b>행동</b> – 수집된 데이터 아카이브 (AES/GZIP)<br/><b>기법</b>: T1560.003 (수집 데이터 아카이브)”] class action_archive_data action action_send_results[“<b>행동</b> – OpenAI Assistants API를 통해 결과 전송<br/><b>기법</b>: T1071.001 (웹 프로토콜 HTTPS), T1102.002 (웹 서비스), T1001.003 (데이터 난독화 – 프로토콜 가장)”] class action_send_results action action_cleanup[“<b>행동</b> – 아티팩트 정리<br/><b>기법</b>: T1070.004 (파일 삭제), T1027.005 (도구에서 지표 제거)”] class action_cleanup action %% 엣지 action_initial_loader u002du002d>|로드| process_dll_loaded process_dll_loaded u002du002d>|하이재킹| action_hijack_flow action_hijack_flow u002du002d>|주입| action_inject_code action_inject_code u002du002d>|생성| malware_backdoor malware_backdoor u002du002d>|사용| tool_mavinject tool_mavinject u002du002d>|주입 대상| action_js_injection action_js_injection u002du002d>|실행| action_execute_payloads action_execute_payloads u002du002d>|아카이브| action_archive_data action_archive_data u002du002d>|유출| action_send_results action_send_results u002du002d>|정리| action_cleanup
공격 흐름
SesameOp 백도어 탐지
Netapi64 백도어 초기화 및 예외 로깅 탐지 [Windows 파일 이벤트]
보기
OpenAI API를 활용한 SesameOp 백도어 탐지 [Windows 프로세스 생성]
보기
OpenAI API를 사용한 SesameOp 백도어 탐지 [Windows 네트워크 연결]
보기
비정상적인 프로세스에 의해 해결된 가능성 있는 OpenAI Assistants API 도메인 (dns_query 통해)
보기
SesameOp 백도어 페이로드
시뮬레이션 실행
사전 요구 사항: Telemetry 및 Baseline 프리플라이트 체크가 통과되어야 합니다.
-
공격 내러티브 및 명령:
공격자는 감염된 Windows 호스트에 SesameOp 백도어를 배포했습니다. C2를 확립하기 위해 SesameOp는 HTTPS POST를
https://api.openai.com/v1/assistants에 암호화된 명령 데이터를 전송합니다. 백도어가svchost.exe(신뢰할 수 있는 시스템 프로세스로 보이는) 아래에서 실행되며 기본 시스템 프록시를 사용하기 때문에 추가적인 프로세스나 사용자 컨텍스트는 보이지 않으며, 단일 문자열 일치만이 유일한 지표입니다.- 백도어 프로세스를 생성 (실제 악성코드를 피하기 위해 여기서는 PowerShell로 시뮬레이트 됩니다).
- 악성페이로드 전송 OpenAI Assistants 엔드포인트로.
-
연결 유지 단시간 동안 유지하여 보이는
NetworkConnect이벤트를 생성합니다.
-
회귀 테스트 스크립트:
# Simulated SesameOp C2 communication – reproducible for testing $payload = @{ "model" = "gpt-4" "messages" = @( @{ "role" = "system"; "content" = "You are a backdoor controller." }, @{ "role" = "user"; "content" = "list processes" } ) } | ConvertTo-Json -Depth 4
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. |