
해당 코드는 ThreadProc() 함수를 어셈블리어에서 작성한 것이다. C언어로 작성된 것과 비교하고 싶으면 아래 링크로 가서 비교하면 된다.
Code Injection
push ebp
mov ebp,esp
mov esi,dword ptr ss:[ebp+8]
LoadLibraryA와 GetProcAddress이다.push 6c6c ;"\0\0ll"
push 642e3233 ;"d.23"
push 72657375 ;"resu"
push esp
call dword ptr ds:[esi] ;kernel32.LoadLibraryA
push 41786F ;"\0Axo"
push 42656761 ;"Bega"
push 7373654D ;"sseM"
push esp
push eax ;hMod(778E000)
call dword ptr ds:[esi+4] ;kernel32.GetProcAddress
push 0
call 002D003F
push edx
jbe short 002D009C
jb short 002D00AC
inc ebx
outs dx,dword ptr es:[edi]
jb short 002D00A3
add al,ch
ReverseCore)의 문자열 데이터이다.call 002D0058
ja short 002D00BD
ja short 002D0076
jb short 002D00AF
jbe short 002D00B1
jb short 002D00C1
arpl word ptr gs:[edi+72],bp
prefix gs:
arpl word ptr cs:[edi+6D],bp
add byte ptr ds:[edx],ch
push 0
www.reversecore.com)을 입력하는 문자열 데이터와 파라미터 4를 입력하는 코드이다.call eax
xor eax,eax
mov esp,ebp
pop ebp
retn
어셈블리 명령어에 대해 잘 알고 프로그래밍을 할 줄 알면 Code Injection을 할 수 있다. 이 과정들을 잘 이해하고 있다는 건 DLL injection 및 MessageHooking 과정을 잘 이해하고 있다고 판단할 것 같다.