Detection stack
- AIDR
- Alert
- ETL
- Query
요약
ShadowHS는 무기화된 해크셸을 메모리 내에서 완전히 실행하는 파일리스 리눅스 사후 침투 프레임워크입니다. 작은 로더가 AES-256-CBC 페이로드를 해독하고, 익명의 파일 서술자를 통해 복원한 후 디스크에 접근하지 않고 실행합니다. 실행 중에는 상호작용 쉘과 자격 증명 도용, 횡적 이동, 크립토마이닝, 조용한 데이터 유출을 위한 모듈을 제공합니다. 설계는 스텔스, 운영자 제어, 다양한 리눅스 환경에서의 지속적인 유지에 우선순위를 둡니다.
조사
Cyble 분석가들이 스테이지드 로더를 분해하고, 암호화된 쉘 스크립트를 복구하고, Perl 기반의 해독 체인을 매핑했으며, /proc/*/fd/ 경로를 통해 실행을 확인했습니다. 그들은 폭넓은 EDR/AV 확인, 경쟁 방지 로직, SSH 무차별 공격, 커널 익스플로잇, GPU 마이닝을 위한 필요한 모듈들을 문서화했으며, 테스트에서 반복 가능한 결과를 산출했습니다. 보고서에는 하드코드된 C2 엔드포인트와 rsync-over-GSocket 유출 방법도 나열되어 있습니다.
완화
/proc/에서 ELF 실행을 감시하십시오./fd/, 이상한 OpenSSL/Perl 해독 체인 및 argv 스푸핑 아티팩트를 감지하십시오. 삭제되거나 memfd가 뒷받침되는 바이너리, 메모리 덤프 도구 및 비표준 rsync 전송에 대한 가시성을 확보하십시오. 알려진 마이닝 풀을 차단하고 GSocket 터널을 제한하여 남용을 억제하십시오. 대규모의 의심스러운 memfd_create 사용 시 알림을 추가하십시오.
대응
탐지되면 호스트를 격리하고 조사용 메모리를 캡처하며, 메모리 내 프레임워크 및 모든 마이닝 래퍼를 종료하고 참조된 C2 IP/도메인 차단하십시오. 노출된 자격 증명을 인벤토리하고, 키 및 비밀번호를 회전하며 시스템을 강화하십시오. 횡적 이동 시도와 스캐닝 활동을 추적하여 확산 범위를 파악하고 재감염을 방지하십시오.
공격 흐름
우리는 이 부분을 계속 업데이트하고 있습니다. 알림을 받으려면 가입하세요
알림 받기탐지
GDB 배치 모드를 통한 리눅스 메모리 덤프 (via cmdline)
보기
파이프라인을 통한 리눅스 OpenSSL AES-256-CBC 해독 가능성 (via cmdline)
보기
/proc/self/fd를 통한 리눅스 파일리스 실행 가능성 (via cmdline)
보기
IOCs (HashSha256) 탐지: ShadowHS: 무기화된 해크셸로 구축된 파일리스 리눅스 사후 침투 프레임워크 Part 1
보기
IOCs (HashSha256) 탐지: ShadowHS: 무기화된 해크셸로 구축된 파일리스 리눅스 사후 침투 프레임워크 Part 2
보기
IOCs (DestinationIP) 탐지: ShadowHS: 무기화된 해크셸로 구축된 파일리스 리눅스 사후 침투 프레임워크
보기
IOCs (SourceIP) 탐지: ShadowHS: 무기화된 해크셸로 구축된 파일리스 리눅스 사후 침투 프레임워크
보기
ShadowHS 파일리스 리눅스 사후 침투 프레임워크 탐지 [리눅스 프로세스 생성]
보기
AES-256-CBC -nosalt 오용 및 /proc/*/exe 열거 탐지 [리눅스 파일 이벤트]
보기
시뮬레이션 실행
전제 조건: Telemetry & Baseline Pre‑flight Check가 통과되어야 합니다.
이유: 이 섹션은 탐지 규칙을 유발하도록 설계된 적대적 기술(TTP)의 정확한 실행을 자세히 설명합니다. 명령어와 서술은 식별된 TTP를 직접 반영해야 하며, 탐지 논리에 의해 예상되는 정확한 원격 측정을 생성하는 것을 목표로 합니다. 추상적이거나 관련 없는 예는 오진으로 이어질 것입니다.
-
공격 서사 및 명령어:
이미 손상된 리눅스 호스트에 발판을 마련한 공격자는 (1) entropy 검사를 피하기 위해 소금 없이 OpenSSL을 사용하여 이전에 추출된 데이터 블롭을 해독하고, (2) 향후 사용하지 않기 위해 자격 증명을 포함할 수 있는 특권 프로세스나 보안 도구를 식별하기 위해 실행 중인 모든 실행 파일을/proc/*/exe를 통해 열거하고 싶습니다. 공격자는 Bash 세션에서 다음 명령을 실행합니다:-
OpenSSL 해독 (AES‑256‑CBC, no‑salt) – Sigma 규칙이 감시하는 정확한 문자열을 재현합니다:
openssl enc -d -aes-256-cbc -nosalt -in /tmp/stolen.enc -out /tmp/secret.txt -
Proc‑exe 열거 – 모든 숫자 PID 디렉토리를 반복하여 symlink의 대상을 출력합니다:
exe심볼링크:for pid in /proc/[0-9]*; do readlink "$pid/exe" done
이러한 행동은 규칙의
aesandproc_enum조건을 만족시키는 두 가지 프로세스 생성 이벤트를 생성합니다. -
-
회귀 테스트 스크립트:
#!/usr/bin/env bash set -euo pipefail # ==== 1. OpenSSL 해독 (AES-256-CBC, no‑salt) ==== # 테스트를 위한 더미 암호화 파일 생성 echo "SensitiveData123" > /tmp/plain.txt openssl enc -aes-256-cbc -nosalt -salt -out /tmp/stolen.enc -pass pass:TestPass < /tmp/plain.txt # 정확한 탐지 패턴 사용하여 해독 openssl enc -d -aes-256-cbc -nosalt -in /tmp/stolen.enc -out /tmp/secret.txt -pass pass:TestPass # ==== 2. /proc/*/exe 심볼링크 열거 ==== for pid in /proc/[0-9]*; do readlink "$pid/exe" done echo "시뮬레이션 완료. SIEM에서 경고를 확인하십시오." -
정리 명령어:
#!/usr/bin/env bash set -euo pipefail rm -f /tmp/plain.txt /tmp/stolen.enc /tmp/secret.txt echo "정리 완료."
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. |