pdfid
pdf 파일 내부의 구조 확인할 수 있는 정적분석 도구
pdfid.py [pdf 파일]
/pdfid로 확인한 이름(예시 : JS)
/pdfid로 확인한 이름(예시 : obj)
/pdfid로 확인한 이름(예시 : endobj)
pdf-parser
pdfid로 확인한 이름을 통해 전체적인 구조나 내부 자바스크립트코드 확인 가능
pdf-parser.py --search [pdfid로 확인한 이름] [pdf 파일명]
pdf-parser.py --object [obj 번호] [pdf 파일명]
pdf-parser.py --object [obj 번호] --raw --filter [pdf 파일명] > ob.js
쉘 코드 복사 붙혀넣기로 txt 파일 생성(예시 :unicode.txt)
cat unicode.txt | unicode2raw > shell.raw
cat shell.raw | sctest -Svs 10000000 > sctest-out.txt
cat sctest.out.txt -> 복호화된 셸 스크립트 확인 가능
셸 코드 생성 방
cat unicode.txt | unicode2hex-escaped > shell.hex
shellcode2exe.py -s shell.hex shell.exe
악성코드 분석 팁
1. 브레이크 포인트 사용하지 않기
2. kernelbase32를 kernelbase로 변경?
여기서부터 세션이 끊겨서 쓴거 다 날아감..ㅠ 기억나는대로 다시 적어보자.
MSOffice 문서 악성코드 분석
docx 파일 분석 시 사용 도구
?
?
2개정도 있었는데 하...(근데 분석할 때 안 쓰심)
VBS 스크립트
MSOffice에서 사용하는 문서 스크립트
주로 해당 코드에서 발생하는 취약점(매크로)으로 악성코드가 실행됨.
oledump
oledump.py [파일명]
oledump.py [파일명] -s 8 -v > s8.vbs
:%s/^'.*\n//g
:%s/UGE//g
위와 같은 vi 명령어랑 정규표현식 많이씀... (이거 두 가지 공부 꼭 하자)
Tips
추가로, 악성코드 샘플 얻을 수 있는 사이트 알려주심
https://app.any.run/submissions/
Free Malware Reports - ANY.RUN
Use our malware sample database to research and download files, hashes, IOC ets.
app.any.run
MalwareBazaar | Malware sample exchange
MalwareBazaar MalwareBazaar is a project from abuse.ch with the goal of sharing malware samples with the infosec community, AV vendors and threat intelligence providers. MalwareBazaar database »
bazaar.abuse.ch
'교육' 카테고리의 다른 글
문서 악성코드 분석 교육 1일차 (0) | 2024.01.05 |
---|---|
문서 악성코드 분석 교육 3일차 (0) | 2024.01.05 |