시스템 보안 · 취약점 › I. 지속성 · 재침투 징후 · 50/50편 (전체 450/450) 학습 단계: 실전 시나리오·종합 실습 표기: 이 글의 명령어·출력·로그는 로컬 VMware 테스트 VM(Rocky Linux 9 / Ubuntu 22.04) 기준의 「실습 예시」 이며, IP·계정·호스트명은 가상의 값입니다. 선행 학습 449. 지속성·재침투 — 실전 시나리오 — 침투부터 지속성 설치·재침투까지 400. 방어 회피·흔적 삭제 — 방어 회피·흔적 삭제 징후 종합 정리(H영역) 1. 개념 I영역 50편을 한 편으로 정리합니다. 지속성·재침투 대응은 "무엇이 남아 있는가(인벤토리)", "언제 생겼는가(타임라인)", "다시 돌아올 수 없는가(근절 검증)" 세 질문으로 요약됩니다. I영역 50편 지도 [기초 I01~08] 개념·감사 기반·기준선·분류(MITRE)·재침투 경로·정상 구분·판정 6축 [계정·인증 I09~18] 백도어 계정·UID 0·휴면·SSH 키·sshd·PAM·sudoers·자격증명·CA [스케줄·부팅 I19~28] cron·at·service·timer·drop-in·rc.local·셸·udev·preload [통로·거점 I29~38] 리버스·리스너·웹셸·비컨·터널·신뢰 관계·커널 모듈·바이너리·복귀 [분석·SOC I39~50] 인벤토리·정기 diff·타임라인·정규화·상관·Wazuh·ELK·근절·대응·룰·시나리오 세 질문 무엇이 남았나 → 인벤토리(I39) 언제 생겼나 → 타임라인(I41) 돌아올 수 없나 → 근절 검증·감시 기간(I46·I37) 이 세 질문은 Linux 지속성뿐 아니라 Windows·클라우드 환경에서도 그대로 쓸 수 있는 범용 사고 대응 틀 입니다. 2. 왜 중요한가 지속성은 사고 대응의 마지막 관문이며, 놓치면 사고가 반복됩니다. I영역은 앞선 A~H영역(하드닝·인증·정찰·권한·접근·프로세스·회피)의 결과가 모이는 곳입니다. 범용 틀로 정리해 두면 새로운 지속성 기법에도 같은 방식으로 대응할 수 있습니다. 3. 핵심 명령어 / 설정 질문 도구 산출물 무엇이 인벤토리·기준선 diff 지속성 목록 누가·어떻게 auditd·FIM whodata 주체·방법 언제·순서 타임라인·상관 설치 순서·재생성 관계 얼마나 넓게 IOC·키 지문 상관 영향 호스트 끝났는가 재부팅 재수집·감시 기간 근절 증명 4. 실습 (실습 예시) # I영역 최종 점검 루틴 (분석 방법) — 한 호스트 15분 점검 sudo /usr/local/sbin/persist-inventory | tee /root/ir/inv_$(hostname).tsv | grep -cP '\t미소유\t' awk -F: '$3==0{print $1}' /etc/passwd ls /etc/ld.so.preload 2>/dev/null; cat /proc/sys/kernel/tainted sudo rpm -Va 2>/dev/null | grep -cE '^..5.* /(usr/)?s?bin/' sudo ss -lntup | wc -l; sudo ss -tnp | grep -cE '"(bash|sh|python[0-9.]*|nc|ssh)"' sudo atq; systemctl list-timers --all --no-legend | wc -l 5. 정상 상태 미소유 지속성 0 · UID 0 = root · preload 없음 · tainted 0 바이너리 불일치 0 · 셸 외부 연결 0 · atq 비어 있음 15분 점검 결과가 모두 기준값이면 해당 호스트에 알려진 지속성·재침투 경로가 없다고 판단하고, 결과를 기준선으로 보관합니다. 6. 이상 상태 미소유 지속성 4 · UID 0 = root, backup · tainted 12288 → 계정·부팅·커널 층 동시 이상 → 깊은 거점 의심 여러 층에서 동시에 이상 → 단일 항목 제거로는 불충분 커널 taint + UID 0 → 호스트 신뢰 불가, 재설치 검토 I47 플레이북으로 즉시 전환 7. 로그 분석 (분석 방법) 「시스템 보안 · 취약점」 450편 전체 흐름입니다(가상의 예시). A 서버 보안 설정(001~050) 기준선을 만든다 ↓ B 계정·인증(051~100) 누가 들어오는지 본다 ↓ C 정보 노출·수집(101~150) 들어와서 무엇을 살피는지 본다 ↓ D 권한 변경(151~200) 어떻게 권한을 얻는지 본다 ↓ E 중요 정보 접근(201~250) 무엇을 가져가는지 본다 ↓ F 프로세스·지속성(251~300) 무엇을 실행하는지 본다 ↓ G·H 로그 변조·방어 회피(301~400) 어떻게 숨는지 본다 ↓ I 지속성·재침투(401~450) 어떻게 남고 돌아오는지 보고, 끊는다 단계 관제 질문 하드닝(A) 정상은 무엇인가 침투·상승(B~D) 누가 어떻게 들어와 권한을 얻나 행위(E~F) 무엇을 가져가고 실행하나 은폐·잔존(G~I) 어떻게 숨고 남고 돌아오나 450편은 결국 "정상을 알고(A), 이상을 단계별로 보고(B~H), 끝까지 끊는다(I)"는 하나의 관제 흐름입니다. 다음 학습은 이 흐름을 실제 SIEM 데이터와 사고 대응 보고서로 연결하는 것입니다. 8. SOC 관제 포인트 지속성 점검 15분 루틴을 사고 대응 초기 표준 절차로 씁니다. 인벤토리·타임라인·근절 검증 세 산출물을 모든 지속성 인시던트에 남깁니다. A I영역 룰셋(100100 108499)을 하나의 저장소로 관리하고 회귀 시험합니다. 9. 탐지 규칙 <!-- 실습 예시 룰: 적용 전 wazuh-logtest 및 테스트 환경 검증 필요 --> <group name="local,syssec_i,persistence,"> <rule id="108490" level="3"> <if_sid>108000</if_sid> <field name="audit.key" type="pcre2">^(persist_|account_persist|reentry_)</field> <description>I영역 지속성·재침투 감시 이벤트(종합 대시보드 집계용)</description> <mitre><id>TA0003</id></mitre> </rule> </group> 종합 대시보드 집계용 저레벨 룰입니다. 상세 판정은 108080~108480 하위 룰이 담당하고, 이 룰은 호스트별·분류별 전체 추이를 보는 데 씁니다. 10. 대응 방법 초기 확인 — 15분 점검 루틴으로 호스트 상태를 확인합니다. 범위 확인 — 이상 층이 여러 개면 상관·인벤토리로 범위를 확정합니다. 증거 확보 — 인벤토리·타임라인·로그를 원격 보존합니다. 차단/조치 — I46 순서로 근절하거나 깊은 거점이면 재설치합니다. 재발 방지 — 감시 기간 0건 확인 후 기준선을 갱신하고 절차를 개선합니다. 11. 핵심 정리 축 핵심 무엇이 인벤토리 언제 타임라인 끝났나 근절 검증·감시 기간 범용성 Linux 외 환경에도 적용 면접 포인트 "지속성 대응은 세 질문 — 무엇이 남았나, 언제 생겼나, 다시 돌아올 수 없나" 12. 다음 편 예고 「시스템 보안 · 취약점」 시리즈 450편이 이 글로 마무리됩니다. 처음부터 다시 보려면 001. Linux 서버 보안 — 기본 보안 점검 항목과 하드닝 로드맵 에서 시작하면 되고, 전체 목록은 아래 시리즈 링크에서 확인할 수 있습니다. 이전 편: 449. 지속성·재침투 — 실전 시나리오 — 침투부터 지속성 설치·재침투까지 📚 시리즈 전체 보기: 시스템 보안 · 취약점
시스템 보안 · 취약점 › I. 지속성 · 재침투 징후 · 46/50편 (전체 446/450) 학습 단계: SOC 탐지 연계 실습 표기: 이 글의 명령어·출력·로그는 로컬 VMware 테스트 VM(Rocky Linux 9 / Ubuntu 22.04) 기준의 「실습 예시」 이며, IP·계정·호스트명은 가상의 값입니다. 선행 학습 445. 지속성·재침투 — ELK/SIEM 기반 지속성 탐지와 정탐·오탐 판단 396. 방어 회피·흔적 삭제 — 중앙 로그 수집으로 로컬 삭제 무력화(H영역) 1. 개념 근절(eradication)은 "보이는 것을 지우는 일"이 아니라 "다시 돌아올 수 없게 만드는 일" 입니다. 그래서 순서가 중요하고, 끝났다는 것을 검증 할 수 있어야 합니다. 근절 순서 (재생성 관계 기준) 0. 증거 확보 (인벤토리·이미지·로그) ← 지우기 전에 1. 통로 차단 : C2·터널 목적지 차단, 리스너 포트 차단 2. 재생성 장치 : cron·at·timer 중지·제거 3. 기동 장치 : 서비스·drop-in·rc.local·udev·preload 비활성화·제거 4. 실행 대상 : 공통 바이너리·스크립트 격리 5. 접근 수단 : 키·CA·PAM·sudoers·백도어 계정·비밀번호 정리 6. 최초 경로 : 취약점 패치·웹셸 제거 7. 재부팅 → 인벤토리 재수집 → 전후 diff 8. 감시 기간 : IOC·비컨·재접속 0건 확인 핵심: 통로 → 재생성 → 기동 → 실행 → 접근 → 최초 경로 → 검증 깊은 거점(커널 모듈·바이너리 교체, I35·I36)이 확인되면 이 순서 대신 재설치 가 원칙입니다. 그때도 접근 수단 정리와 최초 경로 패치는 똑같이 필요합니다. 2. 왜 중요한가 순서를 지키지 않으면 지운 지속성이 다른 장치에 의해 다시 생깁니다. 통로를 먼저 막지 않으면 근절 중에 공격자가 반응(삭제·확산)할 수 있습니다. 전후 인벤토리 diff와 감시 기간이 있어야 근절 완료를 증명할 수 있습니다. 3. 핵심 명령어 / 설정 단계 대표 조치 검증 통로 방화벽 차단 DROP 로그 재생성 crontab -r -u , atrm , systemctl disable --now *.timer atq·list-timers 기동 systemctl disable --now , preload 제거 systemd-delta 실행 대상 격리 디렉터리 이동·해시 기록 재생성 여부 접근 키·계정·sudoers 정리, 비밀번호 교체 인벤토리 검증 재부팅·재수집·감시 IOC 0건 4. 실습 (실습 예시) # 근절 검증 (분석 방법) # 1) 근절 직후·재부팅 후 인벤토리 재수집 sudo /usr/local/sbin/persist-inventory > /root/ir/inv_after.tsv diff <(cut -f1-4 /root/ir/inv_before.tsv | sort) <(cut -f1-4 /root/ir/inv_after.tsv | sort) # 2) 격리 대상이 다시 생겼는지 sudo find / -xdev -path '*/.x/*' 2>/dev/null; ls /etc/ld.so.preload 2>/dev/null # 3) 감시 기간 IOC 재출현 확인 (I37 IOC 목록) sudo journalctl -k --since "-1d" | grep -c 'DST=198.51.100.7' 5. 정상 상태 inv_before 대비 inv_after: 미소유 지속성 9건 → 0건 재부팅 후 재생성: 없음 감시 14일: IOC·비컨·재접속 0건 → 근절 완료 근절 후와 재부팅 후 인벤토리에서 판정된 항목이 모두 사라지고, 감시 기간 동안 IOC가 재출현하지 않으면 근절 완료로 판단합니다. 6. 이상 상태 재부팅 후: /usr/lib/.x/agent 재생성, /etc/ld.so.preload 재생성 원인: udev 규칙(75-net-tune.rules) 미제거 → 부팅 시 재설치 스크립트 실행 재부팅 후 재생성 → 기동 장치 하나가 남음 udev가 근절 목록에서 누락 → 인벤토리 범위 공백 재근절 후 감시 기간을 처음부터 다시 시작 7. 로그 분석 (분석 방법) 근절 검증 흐름입니다(가상의 예시). [근절 실행] 순서대로 · 단계별 기록 ↓ [재수집] 직후 인벤토리 → diff ↓ [재부팅] 부팅 트리거 잔존 확인 → 재수집 ↓ [감시 기간] IOC·비컨·재접속·재생성 0건 ├─ 0건 → 근절 완료 보고 └─ 발생 → 원인(누락 항목) → 재근절 → 감시 재시작 검증 시점 확인 근절 직후 목록 제거 재부팅 후 부팅·이벤트 트리거 잔존 감시 기간 재생성·재침투 재부팅 검증을 생략하면 부팅·이벤트 트리거(rc.local·udev·generator)가 남아 있어도 알 수 없습니다. 운영상 재부팅이 어렵다면 그 사실과 위험을 보고서에 명시합니다. 8. SOC 관제 포인트 근절 단계마다 수행자·시각·명령을 기록합니다. 감시 기간 동안 해당 호스트 Alert 레벨을 한 단계 올려 운영합니다. 근절 완료 기준(인벤토리 0건·감시 0건)을 사전에 합의해 둡니다. 9. 탐지 규칙 <!-- 실습 예시 룰: 적용 전 wazuh-logtest 및 테스트 환경 검증 필요 --> <group name="local,syssec_i,persistence,"> <rule id="108450" level="14"> <if_group>persistence</if_group> <list field="agent.name" lookup="match_key">etc/lists/ir-eradicated-hosts</list> <description>근절 감시 기간 호스트에서 지속성 이벤트 재발생(근절 실패 의심)</description> <mitre><id>TA0003</id></mitre> </rule> </group> 근절을 마친 호스트를 CDB 리스트로 관리하고, 감시 기간 동안 그 호스트에서 지속성 이벤트가 다시 나오면 높은 레벨로 경보합니다. 감시 기간이 끝나면 목록에서 제외합니다. 10. 대응 방법 초기 확인 — 인벤토리·타임라인으로 근절 대상과 순서를 확정합니다. 범위 확인 — 통로·재생성·기동·실행·접근·최초 경로 순으로 범위를 정리합니다. 증거 확보 — 근절 전 증거를 확보하고 단계별 기록을 남깁니다. 차단/조치 — 순서대로 근절하고 재부팅 후 재점검합니다. 재발 방지 — 감시 기간 동안 재발 0건을 확인한 뒤 근절 완료를 보고합니다. 11. 핵심 정리 원칙 내용 먼저 증거 확보 → 통로 차단 순서 재생성 → 기동 → 실행 → 접근 검증 재부팅 재수집·감시 기간 예외 깊은 거점은 재설치 면접 포인트 "근절은 지우는 게 아니라 못 돌아오게 하는 것 — 순서와 검증이 핵심" 12. 다음 편 예고 다음 편 447. 지속성·재침투 — 지속성·재침투 Alert 대응 절차 에서는 지속성·재침투 Alert 수신부터 분류·조사·판정·봉쇄·근절·보고까지 관제원이 따르는 표준 플레이북과 단계별 체크리스트를 다룹니다. 이전 편: 445. 지속성·재침투 — ELK/SIEM 기반 지속성 탐지와 정탐·오탐 판단 📚 시리즈 전체 보기: 시스템 보안 · 취약점
Buy Old Snapchat Accounts – A Complete Guide to Account History, Quality, Security, and Responsible Management WELCOME TO OUR WEBSITE — 24/7 📲 Telegram ➜ @smmhubpva 📧 Email ➜ smmhubpva@gmail.com 🎮 Discord ➜ smmhubpva 🌐 Website ➜ smmhubpva.com Meta Title: Buy Old Snapchat Accounts – Account Quality, Safety and Management Guide Meta Description: Learn about Snapchat account history, security, privacy, recovery access, ownership, account quality, platform compliance, and responsible long-term account management. Introduction The growing importance of social media has encouraged individuals, creators, and businesses to explore different ways of managing their online presence. Among the topics attracting attention is the idea of established social media profiles. People searching for buy old Snapchat accounts often want to understand the significance of account history, profile quality, accessibility, security, and long-term usability. However, an account's age should never be the only factor used to determine its value. A profile that has existed for several years may still have security weaknesses, outdated recovery information, or other problems that affect its reliability. Similarly, a newer account can provide a dependable experience when it is properly maintained and used responsibly. This guide explores the major considerations involved in evaluating established Snapchat accounts. It explains why account history matters, how security influences account management, why privacy deserves attention, and what users should understand before making decisions about their digital presence. Understanding the Meaning of an Old Snapchat Account An old Snapchat account generally refers to a profile created significantly earlier than a newly registered account. Its history may include previous activity, profile configurations, account settings, and other characteristics associated with the time since registration. Nevertheless, account age does not provide a complete picture of quality. Two profiles created years ago can have very different histories. One might have been used regularly, while another remained inactive for an extended period. Their security settings, recovery options, and current conditions may also differ considerably. For this reason, account history should be viewed as one element of a broader evaluation rather than proof of reliability. When examining an established profile, important considerations include its current accessibility, security configuration, ownership information, privacy settings, previous activity, and compliance with applicable platform requirements. Why Account History Attracts Attention Account history can provide useful background information about a digital profile. People researching established accounts may be interested in understanding how long a profile has existed and whether its configuration is suitable for their intended activities. However, historical information should not be confused with guaranteed benefits. An older creation date does not automatically provide greater visibility, additional features, special privileges, or protection from restrictions. The practical value of an account depends on several factors working together. Security, appropriate use, accurate information, and consistent management remain essential regardless of registration date. Anyone considering an established profile should therefore approach account age realistically and avoid making assumptions based solely on how old the account appears. Evaluating Overall Account Quality Account quality is a combination of several characteristics rather than a single number. Accessibility is important because an authorized owner needs a legitimate way to manage the profile. Security is equally important because unauthorized access can undermine the reliability of even a long-established account. Ownership clarity helps prevent misunderstandings about who controls the profile. Privacy protection ensures that personal information is treated responsibly, while compliance helps users understand the platform's applicable requirements. These characteristics should be considered together when assessing digital account management. A profile with a long history but unclear ownership may create significant uncertainty. Likewise, an account with outdated recovery information may be difficult to manage if access problems occur. A balanced evaluation focuses on the complete condition of the account instead of relying on marketing descriptions or registration dates alone. Security Should Always Come First WELCOME TO OUR WEBSITE — 24/7 📲 Telegram ➜ @smmhubpva 📧 Email ➜ smmhubpva@gmail.com 🎮 Discord ➜ smmhubpva 🌐 Website ➜ smmhubpva.com Security is one of the most important considerations when managing any social media profile. An account may depend on several security elements, including passwords, recovery methods, authentication settings, active sessions, and connected devices. If these elements are not properly managed, unauthorized access may remain possible. Account owners should use strong, unique credentials and review the security controls available through official Snapchat settings. They should also pay attention to unfamiliar login notifications and other unusual account activity. Security is not a one-time task. Regular reviews help account owners recognize potential issues and maintain better control over their digital presence. A responsible approach to account security supports reliability and helps reduce avoidable risks. The Importance of Recovery Information Recovery information plays an essential role in maintaining legitimate account access. When recovery details are outdated, inaccessible, or controlled by someone else, resolving a future login problem may become difficult. This is why recovery arrangements deserve attention alongside ordinary login credentials. Users should understand which recovery options are available and ensure that the information associated with their accounts is accurate and appropriately controlled. Authentication codes and recovery credentials should remain private. Sharing them unnecessarily can increase the possibility of unauthorized access. A dependable account-management process includes reviewing recovery arrangements periodically and understanding the official procedures for restoring access when needed. Reviewing the Current Account Condition An established profile may have existed for years without necessarily remaining in good condition. Previous activity, security incidents, account settings, and platform decisions can all influence its present status. Before depending on a profile, users should understand whether it is accessible through legitimate means and whether any known restrictions or unresolved issues exist. It is also useful to review available privacy settings, profile information, security notifications, connected services, and account-management options. These checks help establish a clearer understanding of the account's current condition. The objective should be to make informed decisions based on available information rather than assuming that an older profile is automatically dependable. Previous Activity and Account History Previous activity can help explain the background of an established account, but that history may not always be fully visible or independently verifiable. Some profiles may have experienced long periods of inactivity. Others may have been accessed through multiple devices or undergone several configuration changes. These differences can affect how an account should be evaluated and managed. Users should avoid assuming that every established profile has the same history or characteristics. Descriptions should be assessed carefully, and claims that cannot be verified should not be treated as established facts. Understanding the limitations of historical information makes it easier to develop realistic expectations about account quality. Why Old Does Not Automatically Mean Trusted One of the most important principles in social media account management is that age and trust are not interchangeable. An older profile may have weak security, unclear ownership, outdated recovery information, or a history of problems. A newer profile may have strong security controls and be maintained responsibly. The creation date provides historical context, but it cannot independently establish present reliability or future performance. Users should therefore avoid treating account age as proof of authenticity, safety, or special platform treatment. A careful assessment considers several characteristics together and recognizes that long-term account reliability depends heavily on responsible management. Protecting Privacy and Personal Information Privacy deserves particular attention when dealing with established digital profiles. Historical accounts may contain personal information, previous profile details, contact information, conversations, or connections associated with earlier activity. Such information should not automatically be considered appropriate for access, transfer, or distribution. Responsible account management involves minimizing unnecessary exposure of private information and respecting the rights of other individuals. Users should avoid requesting or sharing sensitive information that is not necessary for legitimate account management. They should also review available privacy settings and use official controls to manage what information is visible. Protecting privacy helps create a more responsible digital environment and reduces unnecessary risks for everyone involved. Connected Devices and Active Sessions Social media accounts may be accessed through different phones, tablets, browsers, or other devices over time. Depending on the platform's available controls, some sessions or device associations may require review when account access arrangements change. Authorized account owners should familiarize themselves w
시스템 보안 · 취약점 › I. 지속성 · 재침투 징후 · 41/50편 (전체 441/450) 학습 단계: SOC 탐지 연계 실습 표기: 이 글의 명령어·출력·로그는 로컬 VMware 테스트 VM(Rocky Linux 9 / Ubuntu 22.04) 기준의 「실습 예시」 이며, IP·계정·호스트명은 가상의 값입니다. 선행 학습 440. 지속성·재침투 — 지속성 기준선 diff 자동화와 정기 점검 391. 방어 회피·흔적 삭제 — 흔적 삭제 타임라인 재구성(H영역) 1. 개념 지속성 대응의 핵심 질문은 "무엇이 있는가"(인벤토리)와 "언제, 어떤 순서로 생겼는가" (타임라인)입니다. 타임라인을 보면 공격자가 무엇을 먼저 설치했고 무엇이 무엇을 되살리는지 알 수 있습니다. 지속성·재침투 타임라인 소스 인증 : secure/auth.log (로그인·sudo) 감사 : auditd (persist_* · account_persist · reentry_*) 파일 : FIM·stat (생성·수정 시각) — timestomping 주의(H16) 실행 : cron CMD · journal(유닛 기동) · execve 네트워크: 방화벽·conntrack·proxy ↓ UTC 기준 정규화 → 시간순 정렬 → 단계 태깅 핵심: 파일 시각은 변조 가능 — 감사·중앙 로그 시각을 우선한다 H영역에서 본 것처럼 파일 시각은 조작될 수 있으므로, 타임라인의 뼈대는 중앙에 수집된 로그 시각 으로 세우고 파일 시각은 보조 근거로 씁니다. 2. 왜 중요한가 설치 순서를 알면 근절 순서(재생성 장치 먼저)를 정할 수 있습니다. 재침투 시점을 알면 그 이후 행위 전체를 조사 범위로 확정할 수 있습니다. 보고서·면접에서 사고를 설명하는 가장 명확한 형식입니다. 3. 핵심 명령어 / 설정 단계 태그 대표 이벤트 침투 웹 POST·SSH 로그인 상승 sudo·setuid·sudoers 사용 지속성 persist_* 감사·FIM ADD 통로 reentry_* 연결·리스너 은폐 로그 삭제·timestomp(H영역) 재침투 근절 후 IOC 재출현 4. 실습 (실습 예시) # 여러 소스를 하나의 타임라인으로 (분석 방법, 가상 데이터) sudo ausearch -k persist_cron -k persist_svc -k persist_boot -k account_persist -k reentry_net -ts 10/08/2026 02:30:00 -te 10/08/2026 04:00:00 --format csv 2>/dev/null \ | awk -F, 'NR>1{print $2" "$3" AUDIT "$7" "$14}' > /tmp/tl_audit.txt sudo awk '/Oct 8 0[23]:/{print "2026-10-08 "$3" AUTH "$0}' /var/log/secure > /tmp/tl_auth.txt sort /tmp/tl_audit.txt /tmp/tl_auth.txt | less 5. 정상 상태 (정상 기간 타임라인) 09:40 AUTH admin01 로그인(관리망) 09:42 AUDIT account_persist useradd kim.dev (티켓 ACC-0331) 정상 기간의 타임라인은 승인된 작업자·관리망 출발지·업무 시간의 이벤트로 구성되고, 각 변경에 티켓이 대응됩니다. 6. 이상 상태 02:41 침투 POST /uploads/thumb.php (203.0.113.50) 02:49 상승 webadmin sudo -i 02:51 지속성 passwd 직접 편집(sysadm) 02:57 sudoers.d/99-sys 03:00 지속성 apache crontab(curl|bash) 03:02 dbus-helper.service enable 03:04 지속성 ld.so.preload 03:12 통로 ssh -R 2222 (autossh) D+9 재침투 oldsvc 로그인 (203.0.113.80) 23분 만에 계정·권한·스케줄·서비스·부팅·통로 지속성 설치 cron(03:00)이 이후 항목을 재생성하는 구조 → 근절 시 최우선 제거 D+9 재침투 → 휴면 계정 재활성화가 근절에서 누락 7. 로그 분석 (분석 방법) 타임라인 재구성 절차입니다(가상의 예시). [수집] 중앙 로그(UTC) + 감사 + FIM + 네트워크 ↓ [정규화] 시각·호스트·주체(auid)·행위·대상 ↓ [태깅] 침투 / 상승 / 지속성 / 통로 / 은폐 / 재침투 ↓ [관계] 재생성 관계 화살표 (cron → agent → preload) ↓ [결론] 최초 침투 시각 · 설치 순서 · 조사 범위 시작점 산출물 활용 설치 순서 근절 순서 재생성 관계 제거 우선순위 재침투 시점 조사 범위 타임라인의 각 줄에는 근거 로그 위치(파일·Alert ID)를 함께 적어 두어야 검토자가 같은 결론에 도달할 수 있습니다. 8. SOC 관제 포인트 SIEM에서 auid·세션 기준으로 이벤트를 묶어 타임라인 초안을 자동 생성합니다. 모든 시각을 UTC로 통일하고 표시 시에만 현지 시각으로 바꿉니다. 타임라인을 인시던트 티켓의 첫 첨부물로 관리합니다. 9. 탐지 규칙 <!-- 실습 예시 룰: 적용 전 wazuh-logtest 및 테스트 환경 검증 필요 --> <group name="local,syssec_i,persistence,"> <rule id="108400" level="12"> <if_matched_group>persistence</if_matched_group> <same_field>audit.ses</same_field> <timeframe>3600</timeframe> <description>동일 로그인 세션 1시간 내 복수 지속성 이벤트(설치 단계 타임라인 묶음)</description> <mitre><id>TA0003</id></mitre> </rule> </group> auditd 세션 ID(ses)가 같은 지속성 이벤트를 묶어 경보합니다. 이 묶음이 곧 타임라인의 "지속성 설치 단계" 초안이 됩니다. 10. 대응 방법 초기 확인 — 중앙 로그·감사·FIM·네트워크 소스를 수집합니다. 범위 확인 — 주체·세션 기준으로 이벤트를 묶어 단계를 태깅합니다. 증거 확보 — 타임라인과 근거 로그 위치를 함께 보존합니다. 차단/조치 — 설치 순서·재생성 관계에 따라 근절 순서를 정합니다. 재발 방지 — 최초 침투 시각 이후 전체를 조사 범위로 확정하고 보고서에 반영합니다. 11. 핵심 정리 요소 기준 뼈대 중앙 로그 시각(UTC) 보조 파일 시각(변조 주의) 태깅 침투~재침투 6단계 산출 설치 순서·재생성 관계·범위 면접 포인트 "인벤토리는 무엇이, 타임라인은 언제·어떤 순서로 — 순서가 근절 순서를 정한다" 12. 다음 편 예고 다음 편 442. 지속성·재침투 — 지속성·재침투 로그의 정규화와 수집 에서는 auditd·FIM·인증·cron·네트워크 로그를 공통 필드(host·actor·action·target·method·trigger)로 정규화해 SIEM에서 지속성을 조회하는 파이프라인을 다룹니다. 이전 편: 440. 지속성·재침투 — 지속성 기준선 diff 자동화와 정기 점검 📚 시리즈 전체 보기: 시스템 보안 · 취약점
시스템 보안 · 취약점 › I. 지속성 · 재침투 징후 · 42/50편 (전체 442/450) 학습 단계: SOC 탐지 연계 실습 표기: 이 글의 명령어·출력·로그는 로컬 VMware 테스트 VM(Rocky Linux 9 / Ubuntu 22.04) 기준의 「실습 예시」 이며, IP·계정·호스트명은 가상의 값입니다. 선행 학습 441. 지속성·재침투 — 지속성·재침투 타임라인 작성 392. 방어 회피·흔적 삭제 — 방어 회피 이벤트 상관분석(H영역) 1. 개념 지속성 이벤트는 auditd, FIM, secure, cron, journal, 방화벽처럼 형식이 제각각인 로그 에 흩어져 있습니다. 이를 같은 필드로 맞추는 정규화 가 되어야 상관분석과 대시보드가 가능합니다. 지속성 이벤트 공통 스키마(예시) @timestamp : UTC 시각 host.name : 호스트 actor : auid(원래 로그인 사용자) / euid session : audit.ses action : create / modify / enable / connect / listen target.path : 지속성 위치 (/etc/cron.d/x) persist.trigger : time / boot / login / event / exec / network persist.class : account / auth / schedule / service / boot / shell / channel method : 실행 파일(exe) · 명령(proctitle) source : auditd / fim / secure / cron / fw 핵심: "trigger·class" 필드를 붙이면 I05 분류표가 그대로 검색 조건이 된다 감사 키를 persist_cron , persist_svc 처럼 설계해 둔 이유가 여기서 드러납니다. 키 이름만으로 trigger·class를 매핑 할 수 있기 때문입니다. 2. 왜 중요한가 형식이 다른 로그를 같은 질의로 조회할 수 있게 됩니다. actor(auid)를 통일하면 sudo 이후 행위도 원래 사용자로 추적됩니다. 분류 필드가 있으면 커버리지·추이를 바로 집계할 수 있습니다. 3. 핵심 명령어 / 설정 원본 매핑 근거 정규화 필드 auditd key·auid·exe·name class·actor·method·target Wazuh FIM syscheck.path·event action·target secure sshd·useradd 메시지 action·actor cron CMD·REPLACE trigger=time 방화벽 DST·DPT class=channel 4. 실습 (실습 예시) # 감사 키 → 분류 매핑 표 (Logstash/Ingest 파이프라인 입력용, 분석 방법) cat > /etc/logstash/persist_map.yml <<'Y' "persist_cron": "schedule|time" "persist_svc": "service|boot" "persist_boot": "boot|boot" "persist_shell": "shell|login" "persist_preload": "boot|exec" "persist_ssh": "auth|network" "persist_pam": "auth|login" "account_persist": "account|login" "reentry_net": "channel|network" "reentry_listen": "channel|network" Y # Logstash translate 필터 예: field => "[data][audit][key]" dictionary_path => ".../persist_map.yml" # destination => "[persist][map]" 후 dissect로 class|trigger 분리 5. 정상 상태 {"host.name":"web01","actor":"admin01","action":"create","target.path":"/etc/cron.d/backup", "persist.class":"schedule","persist.trigger":"time","method":"/usr/bin/ansible-playbook","source":"auditd"} 모든 지속성 이벤트가 공통 필드를 갖고, actor가 원래 로그인 사용자(auid)로 채워지며 분류 필드가 비어 있지 않은 상태가 정상입니다. 6. 이상 상태 {"host.name":"web01","actor":"unset","persist.class":null,"source":"auditd", "data.audit.key":"persist_udev"} → auid 미설정(4294967295), 매핑표에 없는 키 actor=unset → 데몬·부팅 중 이벤트 또는 auid 미설정 경로(추가 확인 필요) 매핑표에 없는 키 → 분류 누락으로 대시보드·상관 룰에서 빠짐 정규화 실패 이벤트는 탐지 사각이 되므로 별도 모니터링 7. 로그 분석 (분석 방법) 정규화 품질 점검 흐름입니다(가상의 예시). [수집] Wazuh agent → manager → Filebeat → Elasticsearch ↓ [정규화] 키 매핑 · auid→actor · 시각 UTC ↓ [품질 점검] class·trigger·actor 누락 비율 ↓ [보정] 매핑표·디코더 보강 → 재처리 품질 지표 목표 class 누락률 0% actor=unset 비율 설명 가능한 수준 수집 지연 수 분 이내 auid가 unset 인 지속성 이벤트는 부팅·데몬 동작일 수도 있지만, 웹셸처럼 로그인 없이 실행된 공격일 수도 있습니다. 이 경우 ppid·uid로 보완해 actor를 채웁니다. 8. SOC 관제 포인트 정규화 누락 이벤트 수를 일 단위 품질 지표로 관리합니다. 감사 키 신설 시 매핑표 갱신을 체크리스트에 넣습니다. 원본 로그는 별도 인덱스로 보존해 정규화 오류 시 재처리합니다. 9. 탐지 규칙 <!-- 실습 예시 룰: 적용 전 wazuh-logtest 및 테스트 환경 검증 필요 --> <group name="local,syssec_i,persistence,"> <rule id="108410" level="6"> <if_sid>108000</if_sid> <field name="audit.key" type="pcre2">^(persist_|account_persist|reentry_)</field> <field name="audit.auid" type="pcre2">^(4294967295|unset)$</field> <description>로그인 사용자(auid) 미설정 상태의 지속성 이벤트(actor 보완 필요)</description> <mitre><id>TA0003</id></mitre> </rule> </group> 정규화 품질을 위한 보조 룰입니다. auid가 없는 지속성 이벤트를 별도로 표시해 웹셸·데몬 경유 행위인지 추가 확인하도록 합니다. 10. 대응 방법 초기 확인 — 정규화 누락·actor 미설정 이벤트를 확인합니다. 범위 확인 — 누락이 특정 키·호스트에 집중되는지 확인합니다. 증거 확보 — 원본 로그를 보존해 재처리할 수 있게 합니다. 차단/조치 — 매핑표·디코더를 보강하고 누락 이벤트를 재처리합니다. 재발 방지 — 품질 지표를 정기 점검합니다. 11. 핵심 정리 필드 역할 actor·session 원래 사용자·세션 class·trigger I05 분류 검색 target·method 위치·도구 품질 누락률 관리 면접 포인트 "흩어진 로그를 같은 필드로 — 감사 키 설계가 정규화를 쉽게 만든다" 12. 다음 편 예고 다음 편 443. 지속성·재침투 — 지속성·재침투 이벤트 상관분석 에서는 정규화된 지속성·재침투 이벤트를 세션·주체·실행 대상·호스트 기준으로 상관해 단일 이벤트로는 약한 신호를 공격 체인으로 확정하는 방법을 다룹니다. 이전 편: 441. 지속성·재침투 — 지속성·재침투 타임라인 작성 📚 시리즈 전체 보기: 시스템 보안 · 취약점