엣지 장치에서 엔터프라이즈 타협으로: F5 및 Confluence를 통한 다단계 Linux 침해
Detection stack
- AIDR
- Alert
- ETL
- Query
요약
위협 행위자는 처음에 노출된 F5 BIG-IP 로드 밸런서를 통해 접근 권한을 얻은 후 내부 Linux 서버로 이동하여 이후 알려진 취약점을 활용하여 내부 Atlassian Confluence 인스턴스를 손상시켰습니다. 그곳에서 공격자는 광범위한 탐색 작업을 수행하고 자격 증명을 훔치고, Kerberos 및 NTLM 릴레이 공격을 Windows 도메인 자산에 대해 수행했습니다. 이 작업은 스캔, 횡적 이동, 데이터 유출을 위해 오픈 소스 도구와 맞춤 스크립트를 혼합하여 사용했습니다.
조사
Microsoft Defender Security Research는 손상된 BIG-IP 장치에서 내부 Linux 호스트로의 침입을 추적했으며, 조사관들은 악성 IP 주소에서 다운로드된 맞춤형 스캐닝 도구를 발견했습니다. 분석에서는 공격 중에 Nmap, gowitness, Responder와 같은 유틸리티가 사용되었음을 기록했습니다. 연구원들은 또한 Confluence 구성 파일에서 자격 증명 탈취가 있었고, 도메인 컨트롤러 및 기타 Windows 리소스를 대상으로 한 릴레이 공격이 이어졌다는 것을 발견했습니다.
완화
조직은 인터넷에 노출된 엣지 장치를 Tier-0 자산으로 간주해야 하며 구형이나 지원되지 않는 장치에 엄격한 패치 및 라이프 사이클 관리를 적용하고 관리 인터페이스의 노출을 제한해야 합니다. 내부 웹 애플리케이션은 강화되고 알려진 취약점에 대해 신속히 업데이트되어야 합니다. 가능한 NTLM 비활성화 및 SMB 서명 강제와 같은 강력한 인증 제어는 릴레이 기반 공격의 영향을 줄이는 데 도움이 됩니다.
대응
수비수는 예상치 못한 IP 주소에서의 비정상적인 SSH 로그인 경고를 주의하고, 허가되지 않은 파일 전송 및 알려진 스캔 유틸리티 실행을 모니터링하며, 의심스러운 ELF 바이너리를 차단해야 합니다. 보안 팀은 노출될 수 있는 자격 증명을 교체하고 서비스 계정에 최소한의 권한을 강제 적용하며 Confluence 및 Active Directory 구성을 확인해야 합니다.
"graph TB %% Class definitions classDef action fill:#99ccff classDef technique fill:#c2e0ff classDef tool fill:#e6e6e6 classDef credential fill:#ffdd99 %% Step 1 u2013 Exploit Publicu2011Facing Application step1_exploit["<b>Technique</b> – <b>T1190 Exploit Publicu2011Facing Application</b><br/><b>Description</b>: Adversary exploits a vulnerability in an Internetu2011exposed service to gain initial access."] class step1_exploit technique %% Tool u2013 Vulnerable F5 BIGu2011IP tool_f5["<b>Tool</b> – <b>Name</b>: F5 BIGu2011IP load balancer (vulnerable)<br/><b>CVE</b>: CVEu20112025u201153521"] class tool_f5 tool %% Step 2 u2013 Exploitation of Remote Services step2_remote["<b>Technique</b> – <b>T1210 Exploitation of Remote Services</b><br/><b>Description</b>: Use the same vulnerability to execute code on the target system and move laterally."] class step2_remote technique %% Step 3 u2013 SSH Remote Services step3_ssh["<b>Technique</b> – <b>T1021.004 SSH</b><br/><b>Description</b>: Authenticate via SSH with a privileged account to an internal Linux host."] class step3_ssh technique %% Step 4 u2013 Remote Service Session Hijacking step4_hijack["<b>Technique</b> – <b>T1563.001 Remote Service Session Hijacking</b><br/><b>Description</b>: Maintain a live interactive SSH session for command execution."] class step4_hijack technique %% Step 5 u2013 Active Scanning (IP Blocks) step5_ipscan["<b>Technique</b> – <b>T1595.001 Scanning IP Blocks</b><br/><b>Description</b>: Run Nmap scripts to discover active hosts and open ports across internal subnets."] class step5_ipscan technique %% Tool u2013 Nmap tool_nmap["<b>Tool</b> – <b>Name</b>: Nmap<br/><b>Purpose</b>: Network discovery and port scanning"] class tool_nmap tool %% Step 6 u2013 Active Scanning (Vulnerability) step6_vulnscan["<b>Technique</b> – <b>T1595.002 Vulnerability Scanning</b><br/><b>Description</b>: Use custom scanner and gowitness to locate vulnerable internal applications such as Confluence."] class step6_vulnscan technique %% Tool u2013 gowitness tool_gowitness["<b>Tool</b> – <b>Name</b>: gowitness<br/><b>Purpose</b>: Capture screenshots of web services for enumeration"] class tool_gowitness tool %% Step 7 u2013 System Network Configuration Discovery step7_netconfig["<b>Technique</b> – <b>T1016 System Network Configuration Discovery</b><br/><b>Description</b>: Collect network configuration details to map the environment."] class step7_netconfig technique %% Step 8 u2013 File and Directory Discovery step8_filedisc["<b>Technique</b> – <b>T1083 File and Directory Discovery</b><br/><b>Description</b>: Enumerate files on the compromised Linux host and Confluence server (e.g., server.xml, confluence.cfg.xml)."] class step8_filedisc technique %% Step 9 u2013 Unsecured Credentials step9_creds["<b>Technique</b> – <b>T1552 Unsecured Credentials</b><br/><b>Description</b>: Extract service account credentials from configuration files."] class step9_creds technique %% Credential node cred_service["<b>Credential</b> – Harvested service account credentials"] class cred_service credential %% Step 10 u2013 Valid Accounts step10_valid["<b>Technique</b> – <b>T1078 Valid Accounts</b><br/><b>Description</b>: Reu2011use harvested Confluence credentials to authenticate to Active Directory services."] class step10_valid technique %% Step 11 u2013 Lateral Movement via Remote Services step11_lateral["<b>Technique</b> – <b>T1021 Remote Services</b><br/><b>Description</b>: Attempt NTLMu2011based lateral movement using enumeration and file sharing tools."] class step11_lateral technique %% Tools u2013 enum4linux, netexec, smbclient tool_enum4linux["<b>Tool</b> – <b>Name</b>: enum4linux<br/><b>Purpose</b>: Gather Windows enumeration data"] class tool_enum4linux tool tool_netexec["<b>Tool</b> – <b>Name</b>: netexec<br/><b>Purpose</b>: Execute commands over SMB"] class tool_netexec tool tool_smbclient["<b>Tool</b> – <b>Name</b>: smbclient<br/><b>Purpose</b>: Access SMB shares"] class tool_smbclient tool %% Step 12 u2013 Pass the Ticket (Kerberos/NTLM Relay) step12_passticket["<b>Technique</b> – <b>T1550.003 Pass the Ticket</b><br/><b>Description</b>: Perform Kerberos and NTLM relay attacks (e.g., PetitPotam) against domain controllers."] class step12_passticket technique %% Tool u2013 PetitPotam tool_petitpotam["<b>Tool</b> – <b>Name</b>: PetitPotam<br/><b>Purpose</b>: NTLM relay via Microsoft RPC"] class tool_petitpotam tool %% Step 13 u2013 Steal or Forge Kerberos Tickets step13_kerb["<b>Technique</b> – <b>T1558 Steal or Forge Kerberos Tickets</b><br/><b>Description</b>: Obtain privileged Kerberos tickets to further compromise AD."] class step13_kerb technique %% Step 14 u2013 Hijack Execution Flow (File Permissions) step14_perm["<b>Technique</b> – <b>T1574.005 Hijack Execution Flow: Executable Installer File Permissions Weakness</b><br/><b>Description</b>: Add executable permissions to malicious ELF binaries before execution."] class step14_perm technique %% Step 15 u2013 Deploy Web Shell step15_webshell["<b>Technique</b> – <b>T1505.003 Server Software Component: Web Shell</b><br/><b>Description</b>: Deploy a web shell on the Confluence server for persistence."] class step15_webshell technique %% Step 16 u2013 Application Layer Protocols (File Transfer & Web) step16_transfer["<b>Technique</b> – <b>T1071.002 Application Layer Protocol: File Transfer Protocols</b> & <b>T1071.001 Web Protocols</b><br/><b>Description</b>: Transfer tools and payloads via FTP and HTTP."] class step16_transfer technique %% Step 17 u2013 Exfiltration Over Alternative Protocol step17_exfil["<b>Technique</b> – <b>T1048 Exfiltration Over Alternative Protocol</b><br/><b>Description</b>: Exfiltrate data and tooling using nonu2011standard application protocols."] class step17_exfil technique %% Connections step1_exploit –>|exploits| tool_f5 step1_exploit –>|leads_to| step2_remote step2_remote –>|uses| step3_ssh step3_ssh –>|maintains| step4_hijack step4_hijack –>|enables| step5_ipscan step5_ipscan –>|uses| tool_nmap step5_ipscan –>|leads_to| step6_vulnscan step6_vulnscan –>|uses| tool_gowitness step6_vulnscan –>|leads_to| step7_netconfig step7_netconfig –>|leads_to| step8_filedisc step8_filedisc –>|leads_to| step9_creds step9_creds –>|produces| cred_service step9_creds –>|leads_to| step10_valid step10_valid –>|uses| cred_service step10_valid –>|enables| step11_lateral step11_lateral –>|uses| tool_enum4linux step11_lateral –>|uses| tool_netexec step11_lateral –>|uses| tool_smbclient step11_lateral –>|leads_to| step12_passticket step12_passticket –>|uses| tool_petitpotam step12_passticket –>|leads_to| step13_kerb step13_kerb –>|leads_to| step14_perm step14_perm –>|leads_to| step15_webshell step15_webshell –>|enables| step16_transfer step16_transfer –>|enables| step17_exfil %% Class assignments class step1_exploit,step2_remote,step3_ssh,step4_hijack,step5_ipscan,step6_vulnscan,step7_netconfig,step8_filedisc,step9_creds,step10_valid,step11_lateral,step12_passticket,step13_kerb,step14_perm,step15_webshell,step16_transfer,step17_exfil action class tool_f5,tool_nmap,tool_gowitness,tool_enum4linux,tool_netexec,tool_smbclient,tool_petitpotam tool class cred_service credential "
공격 흐름
탐지
가능한 C2 통신이 HTTP를 통해 직접 IP로 비정상적인 포트로 발생할 수 있음 (프록시 경유)
보기
가능한 Base64 인코딩 문자열 조작 (명령행 통해)
보기
바이너리/스크립트/폴더에 대한 위험한 권한이 설정됨 (명령행 통해)
보기
표준 도구를 통한 원격 파일 업로드/다운로드 (명령행 통해)
보기
탐지할 IOCs(HashSha256): 에지 장치에서 엔터프라이즈 손상까지: F5와 Confluence를 통한 다단계 Linux 침입
보기
탐지할 IOCs(SourceIP): 에지 장치에서 엔터프라이즈 손상까지: F5와 Confluence를 통한 다단계 Linux 침입
보기
탐지할 IOCs(파일): 에지 장치에서 엔터프라이즈 손상까지: F5와 Confluence를 통한 다단계 Linux 침입
보기
탐지할 IOCs(URL): 에지 장치에서 엔터프라이즈 손상까지: F5와 Confluence를 통한 다단계 Linux 침입
보기
탐지할 IOCs(DestinationIP): 에지 장치에서 엔터프라이즈 손상까지: F5와 Confluence를 통한 다단계 Linux 침입
보기
F5 BIG-IP와 Confluence를 통한 다단계 Linux 침입 [Linux 프로세스 생성]
보기
시뮬레이션 실행
전제 조건: Telemetry & Baseline Pre-flight Check가 통과해야 합니다.
이유: 이 섹션은 탐지 규칙을 촉발하기 위해 설계된 적 바로 기법(TTP)의 정밀한 실행을 설명합니다. 명령과 내러티브는 식별된 TTP를 직접 반영해야 하며, 탐지 논리에 의해 예상되는 정확한 텔레메트리를 생성하는 것을 목표로 해야 합니다. 추상적이거나 관련 없는 예시는 오진을 초래할 것입니다.
-
공격 내러티브 및 명령:
-
단계 1 – F5 BIG-IP에서의 권한 있는 SSH 접근
- 공격자가 권한 있는 계정의 자격 증명을 획득했습니다
privileged_accountF5 BIG-IP 장치에서. - 장치의 관리 SSH 서비스를 사용하여, 공격자는 대상 Linux 호스트에 세션을 열고 환경 변수를 주입합니다
HOSTNAME=F5_BIG-IP_device규칙을 만족시키기 위해SourceHostName일치합니다.
- 공격자가 권한 있는 계정의 자격 증명을 획득했습니다
-
단계 2 – 네트워크 정찰(nmap)
- SSH 세션 내에서 공격자는 내부 서브넷에 대해
nmap를 사용하여 실시간 호스트 및 서비스를 매핑합니다.
- SSH 세션 내에서 공격자는 내부 서브넷에 대해
-
단계 3 – 웹 서비스 정찰(gowitness)
- 웹 서버를 식별한 후, 공격자는
gowitness를 호출하여 HTTP/HTTPS 엔드포인트의 스크린샷을 캡처합니다.
- 웹 서버를 식별한 후, 공격자는
-
회피 방지(규칙별)
- Python의
ftplib를 사용하지 않았으므로exclusion_ftp절이 발동되지 않습니다.
- Python의
-
-
회귀 테스트 스크립트:
#!/usr/bin/env bash # # 다단계 침입 시뮬레이션 – Sigma 규칙을 트리거합니다. # 전제 조건: 실행 사용자에게 해당 세션의 HOSTNAME을 설정하기 위한 sudo 권한이 있어야 합니다. # set -euo pipefail # ------------------------------------------------- # 단계 1 – F5에서 권한 있는 SSH 로그인 시뮬레이션 # ------------------------------------------------- export HOSTNAME="F5_BIG-IP_device" export LOGNAME="privileged_account" export USER="privileged_account" echo "[*] ${HOSTNAME}의 ${USER}로서 권한 있는 SSH 세션 시뮬레이션 중입니다" # ------------------------------------------------- # 단계 2 – nmap 실행 (네트워크 탐색) # ------------------------------------------------- echo "[*] 내부 서브넷 10.0.0.0/24에서 nmap 스캔 실행 중" nmap -sn 10.0.0.0/24 # ------------------------------------------------- # 단계 3 – gowitness 실행 (웹 서비스 열거) # ------------------------------------------------- echo "[*] 발견된 웹 호스트에 대해 gowitness 실행 중" # gowitness가 설치되어 $PATH에 있다고 가정 gowitness file -f /tmp/discovered_web_hosts.txt echo "[+] 시뮬레이션 완료 – 예상 경고 생성되어야 합니다." -
정리 명령어:
#!/usr/bin/env bash # # 다단계 침입 시뮬레이션 정리 # set -euo pipefail # gowitness에 의해 생성된 임시 파일 제거 rm -f /tmp/discovered_web_hosts.txt # 시뮬레이션에 사용된 환경 변수 해제 unset HOSTNAME LOGNAME USER echo "[*] 정리 완료."