Recently, there has been much research on improving automatic vulnerability discovery (e.g., fuzzing and static analysis) by leveraging domain knowledge. Although most of them focused on which domain knowledge to leverage, this dissertation presents that considering how to apply and represent domain knowledge also helps to enhance domain knowledge-based automatic vulnerability discovery. First, we utilize more domain knowledge. We extend the previous JavaScript engine fuzzing, which uses only JavaScript syntax, to leverage a JavaScript type system and show the effectiveness of our approach. Second, we enhance by more advanced adoption of domain knowledge. Particularly, we improve tools for finding a kind of use-after-free bugs caused by compacting garbage collection. For that, we precisely define these use-after-free bugs and implement a new tool with the tailored symbolic execution, which found bugs that the previous tools missed. Lastly, we enhance extensible static binary checking tools, which take domain knowledge as vulnerability patterns, by analysts-friendly representation of domain knowledge. Previous tools only support patterns based on their own low-level intermediate representations, while most analysts work with decompiled code, which have high-level information such as value types. We thus propose an extensible static checking tool based on decompiled code, which can support diverse patterns and find several bugs in COTS binaries such as Windows kernel.
퍼징과 정적 분석과 같은 취약점 자동 탐지의 효율성을 높이기 위해 대상과 관련된 도메인 지식들을 활용 하는 연구들이 최근 많이 진행되고 있다. 특히, 어떤 도메인 지식들을 사용해서 효율성을 높일 것인가에 집중되어왔다. 본학위논문에서는이뿐만아니라도메인지식적용방법과표현방법을개선하는것또한 도메인 지식 기반 취약점 자동 탐지 연구를 개선하는 방법임을 보인다. 첫째로, 이전 연구들처럼 새로운 도메인 지식을 활용하는 개선 방법에 주목한다. 자바스크립트 문법만을 고려하는 기존 방식에 타입 시스 템을 추가적으로 고려한 자바스크립트 엔진 퍼징을 제시, 보다 효율적인 퍼징이 가능함을 보인다. 둘째로, 기존의 도메인 지식을 좀 더 체계적으로 적용하여 개선한다. 특히, 압축 기반의 메모리 수거를 사용하여 구현되어 있는 프로그램에서 발생할 수 있는 해제 후 사용 취약점을 탐지하는 도구들을 개선한다. 해당 취약점을 정의하고 최적화된 기호 실행을 이용하여 좀 더 체계적인 도구를 구현, 기존 도구들이 탐지하지 못하는 취약점을 탐지하여 그 효용성을 보인다. 마지막으로, 바이너리 분석 프레임워크와 같이 패턴화 된 도메인 지식들을 입력으로 받아 취약점을 찾는 도구들에서 도메인 지식들을 분석가 친화적으로 표현하여 개선한다. 분석가들은 주로 타입 정보와 같은 고수준의 정보를 포함하고 있는 디컴파일된 코드에서 분석을 진행하는 반면, 기존의 바이너리 분석 프레임워크들은 저수준의 정보들만 나타내는 그들만의 중간 언어로 작성된 패턴만 지원한다는 단점이 있다. 따라서, 본 연구에서는 디컴파일된 코드 기반의 바이너리 분석 프레임워크를 제시, 여러 패턴을 예시로 그 사용성을 보이고 윈도우즈 커널 등에서 다수의 취약점을 찾아 그 효용성을 보인다.