짤막한 이야기

[2021/02/24][짤막한 이야기 - 안티디스어셈블]

LootNiP 2021. 2. 24. 17:26
728x90
반응형

[2021/02/24][짤막한 이야기 - 안티디스어셈블]
“안티디스어셈블(Anti-Disassemble)”은 말 그대로 디스어셈블을 방해하기 위한 기술이다.
“디스어셈블러”는 기계어를 읽어들여서 어셈블리어를 출력해주는 분석용 도구(Ex: IDA)이다.
그런데 소스코드 앞에 전혀 실행되지 않는 바이트(예시에서는 0xE8)를 삽입하는 것으로 어셈블리어의 출력을 방해할 수 있다.
전혀 실행되지 않는 바이트는 단순히 삽입하는 것이 아니라 JZ(Jump if Zero) 어셈블리어를 추가하여야 한다.
XOR 어셈블리어와 JZ 어셈블리어를 조합하면 “조건분기문”을 “무조건분기문”으로 만들 수 있기 때문에 안티디스어셈블에 많이 활용된다.
소스코드에 단순히 위와 같이 추가하는 것만으로도 디스어셈블러를 방해할 수 있다.
실제로 “Hello World!”라는 문자열이 아래에서는 해석되지 않는 것을 볼 수 있다.
#이야기 #루니프 #안티 #디스어셈블 #어셈블리어 #조건분기 #무조건분기

[2021/02/24][Short Story - Anti-Disassemble]
"Anti-Disassemble" is literally a technique to prevent disassemble.
“Disassembler” is an analysis tool (Ex: IDA) that reads machine language and outputs assembly.
However, inserting a byte that is not executed at all(0xE8 in the example) in front of the source code can interfere with the output of the assembly.
The byte that is not executed at all is not simply inserted, but JZ(Jump if Zero) assembly must be added.
The combination of XOR assembly and JZ assembly makes it possible to make a “Conditional Branch Statement” to “Unconditional Branch Statement”, so it is widely used in anti-disassembly.
Simply adding the above to the source code can interfere with the disassembler.
In fact, you can see that the string “Hello World!” is not interpreted below.
#Story #LootNiP #Anti #Disassemble #Assembly #ConditionalBranch #UnconditionalBranch

728x90
반응형