Virus

바이러스

바이러스의 성질

프로그램을 감염시키는 소프트웨어조각

프로그램에 바이러스가 침투되면 프로그램은 제한되었던 행위들을 실행 할 수 있음

특유의 운영 체제와 하드웨어

전파: 손상된 내용- 바이러스

바이러스의 구성요소

감염 메커니즘

트리거

페이로드

많은 악성코드의 형태는 각 부분에 하나 이상의 변형을 포함

바이러스의 수행 4단계

1. 휴지 단계

2. 전파 단계

3. 트리거 단계

4. 실행 단게

실행 가능한 바이러스 구조

바이러스 로직 예

단순 바이러스

program V  
1234567;  

procedure attach-to-program;  
begin  
  repeat  
    file := get-random-program;  
  until first-program-line ≠ 1234567;  
  prepend V to file;  
end;  

procedure execute-payload;  
begin  
  (* perform payload actions *)  
end;  

procedure trigger-condition;  
begin  
  (* return true if trigger condition is true *)  
end;  

begin (* main action block *)  
  attach-to-program;  
  if trigger-condition then execute-payload;  
  goto main;  
end;

압축 바이러스

program CV  
1234567;  

procedure attach-to-program;  
begin  
  repeat  
    file := get-random-program;  
  until first-program-line ≠ 1234567;  
  compress file;         (* t₁ *)  
  prepend CV to file;    (* t₂ *)  
end;  

begin (* main action block *)  
  attach-to-program;  
  uncompress rest of this file into tempfile;  (* t₃ *)  
  execute tempfile;                           (* t₄ *)  
end;

바이러스 동작 예

Pasted image 20241125222950.png

전제 조건

감염된 P1(=P1)이 실행될 때 다음의 단계를 수행

  1. 감염되지 않은 파일 P2에 대하여 바이러스는 원래의 프로그램보다 바이러스 크기만큼 짧은 P2’파일을 만들기 위해 압축
  2. 복사된 CV 를 압축된 프로그램 앞에 붙임
  3. 감염된 원래의 프로그램의 압축 버전 (P1’)은 압축하지 않음
  4. 압축되지 않은 원래의 프로그램 P1이 실행됨

바이러스 분류웜