및 보안 연구실, Digital Forensic Assistant) 2018 ~ (현재) SW 특성화 대학 주관 교육 사업 – Python Mentor 2016 ~ 2017 디지털 포렌식 관련 강의 다수 (국가 기관, 대학교, 컨퍼런스, …) 2015 ~ 2016 National Security Education Institute (Attack & Defense) • 관심 분야 : Digital Forensic, Incident Response, Malware Analysis • Email : [email protected]
설정이 포함되어 있다. • 가장 큰 Hive 아래에 여러 개의 Key 그에 대응하는 Value와 Data로 이루어져 있다. Hive Key Value Data HKEY_CURRENT_USER Software/Google/Info InstalledVersion 1.0.2.4
reg_path = r"Software\Hnc\Common\9.6\CommonFrame\RecentFile" reg_key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, reg_path) print("[+] HWP RecentFile Viewer") try: count = 0 while 1: value, data, type = winreg.EnumValue(reg_key, count) if isinstance(data, int): pass else : print("[!] " + value + " - " + data.decode('UTF-16')) count = count + 1 except WindowsError: exit() Key 접근 함수 접근 한 키에 대한 데이터 조회 함수 데이터 디코딩
File Name : ") with open(file_name, "rb") as file: file_content = file.read() print("MD5 : %s" % hashlib.md5(file_content).hexdigest()) print("SHA1 : %s" % hashlib.sha1(file_content).hexdigest()) print("SHA256 : %s" % hashlib.sha256(file_content).hexdigest()) 읽어 들인 File Content를 Argument로 Hash 함수 계산 16진수 형태로 표현 대상 함수 계산 예제
: 파일 시스템이 파일에게 사용가능한 영역을 부여하는 것 • (비할당 / 할당 해제) : 다른 파일들이 사용할 수 있는 상태이거나 사용중인 영역을 그러한 상태로 만드는 것 File Create File Delete Allocated Area Unallocated Area
import os dest_folder = "C:\\Users\\Donghyun Kim\\Desktop\\AF100\\" refile = open('report.csv', 'w', encoding='utf-8', newline='') wr = csv.writer(refile) for file_name in os.listdir(dest_folder): real_path = dest_folder + file_name with open(real_path, "rb") as file: file_content = file.read() file_hash = hashlib.sha256(file_content).hexdigest() wr.writerow([real_path, file_hash]) refile.close() CSV 파일 생성 및 작성 관련 객체 리턴 파일 경로 및 Hash 함수 값 기록
: https://github.com/google/grr Link : https://github.com/volatilityfoundation/volatility Link : https://github.com/log2timeline/plaso Link : https://github.com/JPCERTCC/LogonTracer • 과 디지털 포렌식과의 만남은 현재 진행형 일거리가 점점 사라지고 있다