Plit00's Story

[Windows FileSystem] - ADS(Alternate Data Stream) 기법 본문

Security/Forensic

[Windows FileSystem] - ADS(Alternate Data Stream) 기법

plit00 2023. 2. 11. 23:13

1. ADS ?

파일에 사용되는 기본 스트림외에 다른 데이터 스트림을 추가로 저장할 수 있는 NTFS 파일 시스템에서 제공하는 기능
MFT Entry의 속성을 보면 $Data가 1개가 아닌 2개이상인 경우가 존재하며 저장되는 데이터는 Zone Identifer가 있음

 

텍스트 데이터를 은닉시키고 실행 파일의 데이터 또한 은닉할 수 있기 때문에 악의적인 목적으로 사용되는 기능

 

Windows ::DATA Alternate Data Stream | OWASP Foundation

Windows ::DATA Alternate Data Stream on the main website for The OWASP Foundation. OWASP is a nonprofit foundation that works to improve the security of software.

owasp.org

2. ADS 존재 여부 확인 

dir /r

이 명령어를 이용하여 현재 경로에 있는 파일과 ADS영역을 확인할 수 있습니다. 


그리고 more < filename:adsname을 사용하여 ADS내에 있는 데이터를 확인 가능합니다.

또한 Get-Item 명령어를 통해 파일에 있는 스트림에 대한 정보도 확인 가능합니다. 

 

3. calc.exe/notepad.exe 실행

  • type C:\Windows\System32\calc.exe > "test2.txt:calc.exe" 
  • wmic process call create "C:\Forensic\ADS\test2.txt:calc.exe"
  • wmic를 이용하여 ADS에 저장된 calc.exe를 실행할 수 있습니다. 
Comments