Abstract

Randomized testing (fuzzing) is a well-known approach for finding bugs in programs. Fuzzing is typically performed during the finishing stage of quality assurance in order to check the stability of the target program in the face of malformed or unexpected input data. Modern software more than often provides an API for extending its functionality by third-party developers; since an API is an entry point to software internals, its functionality and usage scenarios must be tested as well. Thorough API testing must involve checking a large number of possible scenarios and it is fairly obvious that fuzzing can be applied to this task by generating usage scenarios in an automatic randomized way—which brings us to the concept of API fuzzing. In this paper we describe an automatic approach to randomized testing of API libraries for Android/desktop Java. Proposed method is able to change the sequence of called API functions in order to discover new execution paths. It consists of two basic stages. In the first stage the arguments of currently called API functions are mutated. When mutation of called API functions arguments can’t find new execution path the tool switches to the second stage. In the second stage current sequence of API functions calls is mutated. Mutation can add new API functions calls or remove some of them. After API calls sequence mutation, the tool switches back to the first stage. Switches between the first and the second stages are continued during whole process of fuzzing. During the experimental setup developed method of randomized testing were able to find 15 crashes in SmartThings application developed by Samsung.

Highlights

  • Thorough API testing must involve checking a large number of possible scenarios and it is fairly obvious that fuzzing can be applied to this task by generating usage scenarios in an automatic randomized way—which brings us to the concept of API fuzzing

  • In this paper we describe an automatic approach to randomized testing of API libraries for Android/desktop Java

  • Proposed method is able to change the sequence of called API functions in order to discover new execution paths

Read more

Summary

Введение

Контроль качества программного обеспечения является одной из наиболее важных задач при его разработке. Серверная часть инструмента производит генерацию данных (последовательность вызовов интерфейсных функций с соответствующими аргументами), которые будут выполнены на клиентской стороне. Разработан специальный протокол передачи данных между сервером и клиентами, который позволяет отправлять сгенерированную последовательность вызовов интерфейсных функций и получать необходимое покрытие кода. Можно указать интерфейсные функций, которые будут вызваны перед и после каждой сгенерированной последовательности вызовов для реализации специфического протокола использования программного интерфейса. 2.1 Фаззинг интерфейсных функций на примере библиотеки PluginBase На рис. 2 приводится схема фаззинга интерфейсных функций из библиотеки PluginBase (JAR файл), входящей в состав SmartThings. Второй инструмент генерирует встраиваемый модуль (плагин) для приложений SmartThings, который получает последовательность вызовов интерфейсных функций от сервера и выполняет их на клиенте (мобильном телефоне). Дополнительно инструментируется код самой библиотеки PluginBase для получения покрытия кода в процессе исполнения цепочек вызовов

Генерация вызовов интерфейсных функций
Мутация данных
Генерация последовательности команд выполнения
Интерпретатор команд
Получение покрытия кода
Результаты
Сравнение с аналогичными решениями
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call