Web injection vulnerabilities are among the most serious vulnerabilities in web applications, leading to system privilege escalation, data exfiltration, and denial of service. Existing scanners work with a predefined dictionary, which generates an excessive number of out-of-context attacks, and the limited size of the dictionary prevents them from being flexible in responding to different situations. Furthermore, randomly increasing the size of the dictionary to increase the ability to respond to exceptional situations burdens the security professionals using the scanner due to an excessive increase in the number of requests. The tool proposed in this paper extracts partial graphs by tracing the data flow for each function for the graph-transformed source codes, and synthesizes the graph from the dynamically obtained function call stack information, which is passed as input to a graph neural network-based language model. Candidate attack strings are then obtained and passed to the test program to determine the success of the attack. The performance on a benchmark of 132 real-world SQL injection and command injection vulnerabilities was evaluated. As a result, 1,070 attacks against 118 vulnerabilities were found, representing 89.39% of
attack generation with a small number of requests, demonstrating the effectiveness of our method.
웹 인젝션 취약점은 웹 애플리케이션에서 발생하는 가장 심각한 취약점 중 하나로, 시스템 권한 탈취, 데이터 유출, 서비스 거부 등의 피해를 초래한다. 기존 스캐너는 미리 정의된 사전을 참조하는 방식으로 동작하여 맥락에 관계없는 공격을 지나치게 많이 생성하는 문제가 있으며, 사전의 제한된 크기로 인해 다양한 상황에 유연하게 대응하지 못한다. 또한 예외적인 상황에 대한 대응 능력을 높이기 위해 사전의 크기를 무작정 늘리는 것은 요청의 수가 지나치게 늘어나는 문제로 인해 스캐너를 사용하는 보안 전문가에게 부담을 준다. 본 논문에서 제안하는 도구는 그래프 변환한 소스 코드에 대해 각 함수 별로 데이터 흐름을 추적하여 부분 그래프를 추출하고, 동적으로 얻은 함수 호출 스택을 기반으로 그래프를 합성하여 그래프 신경망 - 언어 모델의 입력으로 전달한다. 이후, 공격 문자열의 후보를 얻어 테스트 대상 프로그램에 전달하고 공격의 성공 여부를 판단한다. 이후 실제 세계에서 비롯한 132개의 SQL 인젝션 및 커맨드 인젝션 취약점으로 구성된 벤치마크에 대해 성능을 평가하고 비교 실험을 진행한 결과 그 중 89.39% 에 해당하는 118개 취약점에 대한 1,070 개 공격 생성을 적은 수의 요청으로도 성공하여 본 논문의 방법이 효과적임을 보였다.