DOI QR코드

DOI QR Code

Software Attack Detection Method by Validation of Flow Control Instruction’s Target Address

실행 제어 명령어의 목적 주소 검증을 통한 소프트웨어 공격 탐지 기법

  • Published : 2006.08.01

Abstract

Successful software attacks require both injecting malicious code into a program's address space and altering the program's flow control to the injected code. Code section can not be changed at program's runtime, so malicious code must be injected into data section. Detoured flow control into data section is a signal of software attack. We propose a new software attack detection method which verify the target address of CALL, JMP, RET instructions, which alter program's flow control, and detect a software attack when the address is not in code section. Proposed method can detect all change of flow control related data, not only program's return address but also function pointer, buffer of longjmp() function and old base pointer, so it can detect the more attacks.

소프트웨어 공격이 성공하기 위해서는 공격 코드가 프로그램의 주소 공간에 주입된 후 프로그램의 제어 흐름이 공격 코드 위치로 변경되어야 한다. 프로그램의 주소 공간 중 코드 영역은 실행 중에 변경이 불가능하므로 공격 코드가 주입될 수 있는 곳은 데이터 영역 밖에 없다. 따라서 데이터 영역으로 프로그램의 제어가 변경될 경우 주입된 공격 코드로 제어가 옮겨 가는 공격이 발생한 것으로 판단할 수 있다. 따라서 본 논문에서는 프로그램의 제어 흐름과 관련된 CALL, JMP, RET 명령어의 목적 주소를 검사하여 제어가 옮겨갈 목적 주소가 프로그램의 실행 코드가 저장된 텍스트 영역이 아닌 데이터 영역일 경우 소프트웨어 공격이 발생한 것으로 간주하는 소프트웨어 공격 탐지 기법을 제안하였다. 제안된 방법을 이용하면 함수의 복귀주소뿐만 아니라 함수포인터, longjmp() 버퍼 등 프로그램 제어 흐름과 관련된 모든 데이터가 변경되었는지 점검할 수 있었기 때문에 기존 기법들보다 더 많은 종류의 공격을 탐지할 수 있었다.

Keywords

References

  1. AlephOne, Smashing the Stack for Fun and Profit, Phrack, Volume 7, Issue 49, http://www.phrack.org/phrack/49/P49-14, 1996.11
  2. Matt Conover and w00w00 Security Team, w00w00 on Heap Overflows, http://www.w00w00.org/files/articles/heaptut/txt, 1999.1
  3. Tim Newsham, Format String Attacks - White Paper, http://www.lava.net/~newsham/format-string-attacks.pdf, Setp., 2000
  4. Wikipedia, Return-to-libc attack, http://en.wikipedia.org/wiki/Return-to-libc
  5. CERT Condination Center, http://www.cert.org/advisories
  6. Crispin Cowan, Perry Wagle, Calton Pu, Steve Beattie and Jonathan Walpole, 'Buffer Overflows: Attack and Defenses for the Vulnerability of the Decade,' DARPA Information Survivability Conference and Exposition (DISCEX 2000), Jan., 2000 https://doi.org/10.1109/DISCEX.2000.821514
  7. John Wilander and Mariam Kamkar, 'A Comparison of Publicly Available Tools for Dynamic Buffer Overflow Prevention,' Network and Distributed System Security Symposium (NDSS) '03, Feb., 2003
  8. Crispin Cowan, Calton Pu, Dave Maier, Jonathan Walpole, Peat Bakke, Steve Beattie, Aaron Grier, Perry Wagle, Qian Zhang and Heather Hinton, 'StackGuard: Automatic Adaptive Detection and Prevention of Buffer-Overflow Attacks,' 7th USENIX Security Symposium, Jan., 1998
  9. Vendicator, StakShield: A Stack Smashing Technique Protection Tool for Linux, http://www.angelfire.com/sk/stackshield
  10. Hiroaki Etoh and Kunikazu Yoda, Protecting from Stacksmashing Attacks, http://www.trl.ibm.com/projects/security/ssp/main.html, Jun., 2000
  11. 김종의, 이성욱, 홍만표, '버퍼오버플로우 공격 방지를 위한 컴파일러 기법,' 정보처리학회논문지C, 제9-C권 제4호, pp.453-458, 2002 https://doi.org/10.3745/KIPSTC.2002.9C.4.453
  12. 김윤삼, 조은선, '이진 코드 변환을 이용한 효과적인 버퍼 오버플로우 방지기법,' 정보처리학회논문지C, 제12-C권 제3호, pp.323-330, 2005 https://doi.org/10.3745/KIPSTC.2005.12C.3.323
  13. Microsoft, Microsoft Security Developer Center, http://msdn.microsoft.com/security/
  14. Microsoft, Changes to Functionality in Microsoft Windows XP Service Pack 2 - Part 3: Memory Protection Technologies, http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx
  15. Intel, Intel Architecture Software Developer's Manual Vol. 2: Instruction Set Reference
  16. Daniel Bovet and Marco Cesati, Understanding the LINUX Kernel: From I/O Ports to Process Management, 2nd Ed., pp.670-672, Dec., 2002
  17. Peter Silberman and Richard Johnson, 'A Comparison of Buffer Overflow Prevention Implementations and Their Weaknesses,' Black Hat USA 2004 Briefings and Training, Jun., 2004