전공영역 공부 기록

[악성코드]코드 인젝션 10가지 유형

악분 2019. 7. 1. 15:16
반응형

2017년 endgame기업에서 윈도우 프로세스 삽입 유형 10가지를 발표했다. 다른 블로그 또는 기업 설명글과 다른 점은 샘플 해시를 제공한다. 샘플은 hybrid-analysis.com 또는 any.run에서 다운로드 할 수 있다. hybrid-analysis.com은 아이디 인증(기업 또는 대학교/대학원)이 필요하다.

https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-process

 

Ten Process Injection Techniques: A Technical Survey of Common and Trending Process Injection Techniques

Process injection is a widespread defense evasion technique employed often within malware and fileless adversary tradecraft, and entails running custom code within the address space of another process. Process injection improves stealth, and some technique

www.endgame.com

 


 

1. dll injection

나중에 

 

 


 

[공부날짜: 2019-07-01]

2. pe injection

2.1 키워드: pe 재배치

삽입한 pe구조를 실행하기 위해서는 pe구조를 재배치해줘야 한다. 그대로 사용할 경우, 기존의 pe구조를 기준으로 다른 임의의 소스코드를 실행할 것이기 때문이다. 

(pe 재배치를 공부하는데 몇 주 공부해야 할 것 같아서, 필요할 때 공부해야 겠다)

 

2.2 정의

pe injection은 pe구조를 타겟 프로세스에 강제로 삽입하고 실행하는 방법이다. dll injection은 dll만 가능하지만 pe injection은 pe구조를 가진 실행파일을 삽입한다. 

많은 설명 글에서 pe injection과 dll injection의 차이를 주입할 파일이 필요한지 필요없는지 유/무로 구분하지만, 내 생각으로는 별도의 pe파일이 필요한 경우도 있을 것 같다.

※ pe injection 정석 글: http://blog.sevagas.com/?PE-injection-explained

 

 

2.3 샘플

윈도우 10환경에서 총 3가지의 샘플을 실행했지만 모두 실패했다. 윈도우 7에서 나중에 실습해야 겠다.

1. 샘플1: https://www.hybrid-analysis.com/sample/ce8d7590182db2e51372a4a04d6a0927a65b2640739f9ec01cfd6c143b1110da2

2. 샘플2: https://github.com/sstokic-tgm/PE-Injection

3. 샘플3: https://github.com/theevilbit/injection

반응형