TigerDemon

2차 - Active Directory 공격 기법 본문

2024-SWLUG/Active Directory

2차 - Active Directory 공격 기법

호랑2D 2024. 1. 28. 22:29

공격 기법

1. 공통 진입점

초기 위반 대상 또는 진입점은 공격자가 IT 인프라에 가장 쉽게 진입할 수 있는 영역이다. 진입점은 일반적으로 공격자가 인프라 내의 시스템에 액세스하기 위해 악용할 수 있는 보안 또는 업데이트의 격차이다. 공격자는 일반적으로 한 번에 하나 또는 두 개의 시스템으로 시작한 다음, 탐지되지 않은 더 많은 시스템에 영향력을 퍼뜨리면서 공격을 확대한다.

가장 일반적인 취약성은 다음과 같다.

  • 바이러스 백신 및 맬웨어 방지 배포의 간격
  • 불완전한 패치
  • 오래된 애플리케이션 및 운영 체제
  • 잘못된 구성
  • 보안 애플리케이션 개발 사례 부족

1. Common entry points

Initial breach targets, or entry points, are areas where attackers can most easily enter your IT infrastructure. Entry points are usually gaps in security or updates that attackers can exploit to gain access to a system within your infrastructure. Attackers usually start with one or two systems at a time, then escalate their attack as they spread their influence across more systems undetected.

The most common vulnerabilities are:

  • Gaps in antivirus and antimalware deployments
  • Incomplete patching
  • Outdated applications and operating systems
  • Misconfiguration
  • Lack of secure application development practices

 

2. 자격 증명 도용

자격 증명 도용 공격은 공격자가 도구를 사용하여 현재 로그인한 계정 세션에서 자격 증명을 추출하여 네트워크의 컴퓨터에 대한 권한 있는 액세스 권한을 얻는 것이다. 공격자들은 이미 높아진 권한을 가진 특정 계정을 찾는 경우가 많다. 공격자는 이 계정의 자격 증명을 도용하여 시스템에 대한 액세스 권한을 얻기 위해 해당 계정의 ID를 모방한다.

일반적으로 자격 증명 도둑은 다음과 같은 종류의 계정을 대상으로 한다.

  • 영구적인 권한을 가진 계정
  • VIP계정
  • 권한이 연결된 Active Directory 계정
  • 도메인 컨트롤러
  • PKI(Public Key Infrastructure) 서버 또는 시스템 관리 서버와 같이 ID, 액세스 및 구성 관리에 영향을 미치는 기타 인프라 서비스

권한이 높은 계정을 가진 사용자는 다음과 같은 작업을 수행하여 자격 증명을 도난당할 위험이 있다.

  • 보안되지 않은 컴퓨터에서 권한 있는 계정에 로그인
  • 권한 있는 계정에 로그인한 동안 인터넷 검색

또한 시스템의 자격 증명 보안을 보호하기 위해 다음과 같은 부실하고 위험한 구성을 피해야 한다.

  • 모든 시스템에서 동일한 자격 증명을 사용하여 로컬 권한 있는 계정 구성
  • 권한 있는 도메인 그룹에 너무 많은 사용자를 할당하여 과도하게 사용
  • 도메인 컨트롤러 보안 관리가 불충분

2. Credential theft

Credential theft attacks are when an attacker gains privileged access to a computer on a network by using tools to extract credentials from sessions of accounts that are currently signed in. Attackers often go for specific accounts that already have elevated privileges. The attacker steals the credentials of this account to mimic its identity to gain access to the system.

Credential thieves usually target these kinds of accounts:

  • Permanently privileged accounts
  • VIP accounts
  • Privilege-attached Active Directory accounts
  • Domain controllers
  • Other infrastructure services that affect identity, access, and configuration management, such as public key infrastructure (PKI) servers or systems management servers

Users with highly privileged accounts raise the risk of having their credentials stolen by engaging in the following behaviors:

  • Signing into their privileged accounts on unsecured computers
  • Browsing the internet while signed in to a privileged account

You should also avoid poor and risky configurations to protect the credential security of your system, such as:

  • Configuring local privileged accounts with the same credentials across all systems.
  • Assigning too many users to privileged domain groups, encouraging overuse.
  • Insufficiently managing domain controller security.

3. sAMAccountName 보안 우회

sAMAccountName은 모든 액티브 디렉토리 도메인에 영향을 미치는 취약점으로, 2021년 11월 또는 이후 업데이트가 설치된 모든 시스템에 영향을 미친다. 마이크로소프트가 수정 사항(CVE-2021-42278)을 배포한 액티브 디렉토리 보안 계정 관리자(Security Accounts Manager)의 보안을 우회한다.

 

4. 커버로스트 골든 티켓 공격

 

커버로스트(Kerberoast)는 위협 행위자가 자주 사용하는 또 다른 공격 시퀸스다. 공격자가 골든 티켓을 획득하고 공격이 종료될 때까지 도메인에서 로깅 작업이 전혀 수행되지 않는다. 골든 티켓에 대한 요청을 사전 티켓 증명 서비스(Ticket-Granting Service, TGS) 요청과 일치시키고, 시간 내에 티켓 증명 티켓(Ticket-Granting Ticket, TGT) 요청이 없거나 일치하지 않는 TGS 요청이 있다면 골든 티켓 공격과 관련이 있을 수 있다.

아래 링크로 들어가면 더 자세하게 알 수 있다. 

https://kr.sentinelone.com/blog/how-kerberos-golden-ticket-attacks-are-signaling-a-greater-need-for-identity-based-security/

 

Kerberos 골든 티켓 공격에서 배우는 ID 기반 보안 조치의 중요성

공격자는 Kerberos 인증 프로토콜을 통해 Active Directory를 제어할 수 있습니다. 이 블로그에서는 이러한 공격의 위험을 줄이고 조직을 보호하는 최선의 방법을 설명합니다.

kr.sentinelone.com

 

해결 방법

1. 과도한 권한 부여 방지

자격 증명 도난 공격은 관리자가 특정 계정에 과도한 권한을 부여하는 것에 따라 달라진다. 이러한 공격을 방지할 수 있는 방법은 다음과 같다.

  • Active Directory에는 기본적으로 가장 높은 권한을 가진 3개의 기본 제공 그룹(엔터프라이즈 관리자, 도메인 관리자, 관리자)이 있다. 조직에서 권한을 부여한 다른 그룹과 함께 이 세 그룹을 보호하기 위한 조치를 취해야 한다.
  • 최소 권한 관리 모델을 구현한다. 일상적인 관리 작업에 높은 권한을 가진 계정을 사용하면 안된다. 또한 관리자 계정에 필요하지 않은 추가 권한 없이 작업을 수행하는 데 필요한 기본 권한만 있는지 확인해야 한다. 필요 없는 사용자 계정에 과도한 권한을 부여하면 안된다. 계정이 절대적으로 필요하지 않는 한 실수로 시스템 전반에 걸쳐 동일한 권한을 부여하지 않도록 해야 한다.
  • 인프라의 다음 영역을 확인하여 사용자 계정에 과도한 권한을 부여하지 않는지 확인한다.
    • Active Directory
    • 회원서버
    • 워크스테이션
    • 적용들
    • 데이터 저장소

1. Avoid granting excessive privileges

Credential theft attacks depend on admins granting certain accounts excessive privileges. You can prevent these attacks is to do the following things:

  • Remember there are three built-in groups that have the highest privileges in Active Directory by default: Enterprise Admins, Domain Admins, and Administrators. Make sure you take steps to protect those three groups, along with any other groups your organization gave elevated privileges to.
  • Implement a least-privilege administrative model. Don't use highly privileged accounts for everyday administrative tasks if you can avoid it. Also, make sure your admin accounts only have the baseline privileges required to do their jobs, with no extra privileges they don't need. Avoid giving excessive privileges to user accounts that don't need them. Make sure you don't accidentally give an account the same privileges across systems unless they absolutely need them.
  • Check the following areas of your infrastructure to make sure you aren't granting excessive privileges to user accounts:
    • Active Directory
    • Member servers
    • Workstations
    • Applications
    • Data repositories

 

2. 보안 관리 호스트 사용

보안 관리 호스트는 Active Directory 및 기타 연결된 시스템에 대한 관리를 지원하도록 구성된 컴퓨터이다. 이러한 호스트는 이메일 애플리케이션, 웹 브라우저와 같은 관리 불가능한 소프트웨어나 Microsoft Office와 같은 생산성 소프트웨어를 실행하지 않는다.

보안 관리 호스트를 구성할 때는 다음과 같은 일반적인 원칙을 따라야 한다.

  • 신뢰할 수 없는 호스트에서 신뢰할 수 있는 시스템을 관리하면 안된다.
  • 권한 있는 계정을 사용하거나 관리 작업을 수행할 때는 여러 가지 인증이 필요하다.
  • 관리 호스트의 물리적 보안은 시스템 및 네트워크 보안만큼 중요하다.

2. Use secure administrative hosts

Secure administrative hosts are computers configured to support administration for Active Directories and other connected systems. These hosts don't run nonadministrative software like email applications, web browsers, or productivity software like Microsoft Office.

When configuring a secure administrative host, you must follow these general principles:

  • Never administer a trusted system from a less-trusted host.
  • Require multifactor authentication when using privileged accounts or doing administrative tasks.
  • Physical security for your administrative hosts is as important as system and network security.

 

3. 도메인 컨트롤러 보안 유지

공격자가 도메인 컨트롤러에 대한 권한 있는 액세스 권한을 얻으면 AD 데이터베이스를 수정, 손상 및 파괴할 수 있다. 도메인 컨트롤러에 대한 공격은 조직 내의 모든 AD 관리 시스템 및 계정을 위협할 수 있다. 따라서 도메인 컨트롤러를 안전하게 유지하려면 다음과 같은 조치를 취하는 것이 중요하다.

  • 도메인 컨트롤러를 데이터 센터, 지사 및 원격 위치 내에서 물리적으로 안전하게 유지한다.
  • 도메인 컨트롤러 운영 체제에 익숙해져야 한다.
  • GPO(Group Policy Object)를 사용하여 적용할 수 있는 보안 구성 기준선을 만들 수 있도록 내장된 자유롭게 사용 가능한 구성 도구를 사용하여 도메인 컨트롤러를 구성한다.

3. Keep your domain controllers secure

If an attacker gains privileged access to a domain controller, they can modify, corrupt, and destroy the AD database. An attack on the domain controller potentially threatens all AD-managed systems and accounts within your organization. Therefore, it's important you take the following measures to keep your domain controllers safe:

  • Keep your domain controllers physically secure within their datacenters, branch offices, and remote locations.
  • Become familiar with your domain controller operating system.
  • Configure your domain controllers with built-in and freely available configuration tools to make security configuration baselines you can enforce with group policy objects (GPOs).

 

4. 의심스러운 활동을 즉각 찾아서 조사

살펴야 할 의심스러운 활동은 다음과 같다.

  • 정상 업무 시간이 끝난 후 민감한 서버로의 비정상적인 로그인
  • 계정 잠김, 여러 번의 실패 후 성공한 로그인
  • 새 AD 계정 생성
  • 강력하거나 민감한 계정의 암호 변경
  • 한 사용자에게 직접적으로 관리 권한 부여
  • 수명이 긴 커버로스(Kerberos) 티켓 사용
  • 과도한 LDAP(Lightweight Directory Access Protocol) 쿼리
  • 암호 해시가 저장된 NTDS.dit 파일의 복사본을 획득하려는 시도
  • 레지스트리 설정 변경

 

출처: https://learn.microsoft.com/ko-kr/windows-server/identity/ad-ds/plan/security-best-practices/best-practices-for-securing-active-directory

 

Active Directory 보안에 대한 모범 사례

자세한 정보: Active Directory 보안 모범 사례

learn.microsoft.com

 

https://www.itworld.co.kr/news/242694

 

해커들이 마이크로소프트 액티브 디렉토리를 공격하는 3가지 방법

마이크로소프트 액티브 디렉토리(Active Directory, AD)는 22년 전 데뷔한 오래된 기술이다. 위협 행위자가 이런 구식 기술을 좋아

www.itworld.co.kr