DOI QR코드

DOI QR Code

임베디드 시스템 동적 프로그램 분석을 위한 JTAG API 구현

An Implementation of JTAG API to Perform Dynamic Program Analysis for Embedded Systems

  • 김형찬 (한국전자통신연구원 부설연구소) ;
  • 박일환 (한국전자통신연구원 부설연구소)
  • 투고 : 2013.11.18
  • 심사 : 2014.02.10
  • 발행 : 2014.02.28

초록

임베디드 시스템 소프트웨어의 보안성 분석을 위한 동적 프로그램 분석을 시도하기 위해서는 디버거 체계가 필요하다. 타겟 장비가 범용 운영체제와 비슷한 환경을 지원하는 경우에는 소프트웨어 기반의 디버거 혹은 DBI 프레임웍 등을 장비 내에 설치하여 분석할 수 있으나, 설치 가능성 제한이나 분석 환경의 투명성 문제 등의 어려움이 있을 수 있다. JTAG (IEEE 1149.1)디버거 장비를 이용하여 분석하는 경우에는 분석을 위해 타겟 장비 내의 소프트웨어적 환경을 변경하지 않아도 된다. 타겟 장비의 보안성 분석을 위한 프로그램 동적 분석 기법들을 용이하게 적용하기 위해서는 JTAG 디버거 장비를 제어하기 위한 API가 필요하다. 본 논문에서는 ARM 코어 기반 임베디드 시스템 분석을 위한 JTAG API를 소개한다. 구현된 API는 JTAG 디버거 하드웨어를 직접 제어하며 디버깅 환경 및 동작제어를 위한 함수 세트를 제공한다. API의 활용 용이성을 확인하기 위하여 커널 함수 퍼징과 라이브 메모리 포렌식 기법을 적용한 보안 분석 도구의 예제 구현을 제시한다.

Debugger systems are necessary to apply dynamic program analysis when evaluating security properties of embedded system software. It may be possible to make the use of software-based debugger and/or DBI framework if target devices support general purpose operating systems, however, constraints on applicability as well as environmental transparency might be incurred thereby hindering overall analyzability. Analysis with JTAG (IEEE 1149.1) debugging devices can overcome these difficulties in that no change would be involved in terms of internal software environment. In that sense, JTAG API can facilitate to practically perform dynamic program analysis for evaluating security properties of target device software. In this paper, we introduce an implementation of JTAG API to enable analysis of ARM core based embedded systems. The API function set includes the categories of debugger and target device controls: debugging environment and operation. To verify API applicability, we also provide example analysis tool implementations: our JTAG API could be used to build kernel function fuzzing and live memory forensics modules.

키워드

참고문헌

  1. G. Goth, "Addressing the monoculture," IEEE Security & Privacy, Vol.1, No.6, pp.8-10, 2003.
  2. GDB: The GNU Project Debugger [Internet], http://www.gnu.org/software/gdb/.
  3. IEEE Computer Society, "IEEE Standard Test Access Port and Boundary-Scan Architecture," IEEE Std 1149.1-2013, 2013.
  4. G. Chawdhary and V. Uppal, "Cisco IOS Shellcode," BlackHat US, 2008.
  5. J. Zaddach, "Embedded devices' firmware reversing," MOCA 2012, 2012.
  6. C. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi and K. Hazelwood, "Pin: building customized program analysis tools with dynamic instrumentation," Proc. of the ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), pp.190-200, 2005.
  7. N. Nethercote and J. Seward, "Valgrind: a framework for heavyweight dynamic binary instrumentation," SIGPLAN Not., Vol.42, No.2, pp.89-100, 2007. https://doi.org/10.1145/1273442.1250746
  8. F. Bellard, "QEMU, a fast and portable dynamic translator," Proc. of the USENIX 2005 Annual Technical Conference, FREENIX Track, pp.41-46, 2005.
  9. G. Delugre, "Closer to metal: Reverse engineering the Broadcom NetExtreme's firmware," HACK.LU 2010, 2010.
  10. S. Muniz and A. Ortega, "Fuzzing and Debugging Cisco IOS," BlackHat EU, 2011.
  11. N. L. Petroni, Jr., T. Fraser, T. Fraser, and W. A. Arbaug, "Copilot - a coprocessor-based kernel runtime integrity monitor," Proc. of the 13th conference on USENIX Security Symposium, p.13, 2004.
  12. H. Lee, H. Moon, D. Jang, K. Kim, J. Lee, Y. Paek, and B.B. Kang, "KI-Mon: A Hardware-assisted Event-triggered Monitoring Platform for Mutable Kernel Object," Proc. of the 22nd USENIX Security Symposium, pp.511-526, 2013.
  13. R. G. Bennetts, "Boundary-Scan Tutorial," ASSET InterTech, Inc., Version 2.1, 2002.
  14. ARM, "CoreSight Architecture Specification," ARM IHI0029B, 2005.
  15. JndTech, CodeViser [Internet], http://www.jndtech.com/.
  16. Lauterbach, Trace32 [Internet], http://www.lauterbach.com.
  17. Arium [Internet], http://www.arium.com/.
  18. JTAG Finder [Internet], http://elinux.org/JTAG_Finder.
  19. Joe Gran, "JTAGulator: Assisted discovery of on-chip debug interfaces," BlackHat US, 2013.
  20. JndTech, "CVD API Guide," Rev 1.0, 2011.
  21. Lauterbach GmbH, "API for Remote Control and JTAG Access," 2013.
  22. M. J. Eager, Introduction to the DWARF Debugging Format Introduction to the DWARF Debugging Format, http://dwarfstd.org/.
  23. Hardkernel, ODROID-PC [Internet], http://www.hardkernel.com/.
  24. X. Roussel, "In-Memory Fuzzing with Java," High-Tech Bridge, 2012.
  25. CVE-2013-4254 [Internet], http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4254.
  26. The Volatility Framework [Internet], http://code.google.com/p/volatility/.