Table 3: Evaluation with file.
required
*
read, write, close, stat, fstat, lstat, lseek, mmap, mpro-
tect, munmap, brk, ioctl, pread64, access, mremap,
prctl, arch prctl, getdents64, exit group, openat, newf-
statat, utimensat, seccomp, pipe, rt sigaction, vfork, ex-
ecve, wait4, dup2
not found
-
Table 4: Evaluation with diffutils.
required
*
access, arch prctl, brk, clone, close, dup2, ex-
ecve, exit group, fnctl, ioctl, lseek, mmap, mpro-
tect, munmap, newfstatat, openat, pipe, pread64, read,
rt sigaction, sigaltstack, wait4, write, stat, lstat
not found
stat, lstat
7 CONCLUSION AND FUTURE
WORK
In this paper we presented a way to find syscalls in
a SUT using fuzzing techniques. To this end, we
utilized seccomp and auditd to monitor the program
while executing it repeatedly with different inputs
using AFL. We considered command line flags and
fuzzed them separately from additional input to in-
crease coverage using a custom mutator. Our tests
with ls and file have shown that we find most
syscalls in a reasonable amount of time, even if
they are hidden behind different command line flags.
However, some problems exist: If the SUT itself uses
seccomp filters (e.g. file), the nested filter may
cause crashes which are difficult to distinguish from
newfound syscalls. Similarly, complex requirements,
such as flags that require compressed files as input,
cannot easily be treated with our approach.
In the future, working on these issues would be
the next step. Combinatory command line flags can
already be mitigated by a longer amount of testing.
However a smarter setup for specific formats, such
as the aforementioned compressed file flag, either
requires manual work, or a more sophisticated ap-
proach to the fuzzer. Nested seccomp filters might
be overcome by using other tracing methods. It
might also be possible to resolve this issue using
SECCOMP RET ERRNO to disallow the seccomp syscall
while tricking the SUT into thinking that is has suc-
ceeded.
*
The required syscalls were determined by a manual
analysis.
Currently, our approach requires the source code
to be available and to be compiled with AFL instru-
mentation. An experimental feature of AFL using
QEMU can be used to instrument binaries. The sym-
bolic execution in the beginning relies on the source
code as well. It would be interesting to investigate,
how well the analysis works in black-box settings,
where symbolic execution does not run and a first set
of CLI flags is instead determined using static analy-
sis.
REFERENCES
B
¨
ohme, M., Pham, V.-T., and Roychoudhury, A.
(2019). Coverage-based greybox fuzzing as markov
chain. IEEE Transactions on Software Engineering,
45(5):489–506.
Canella, C., Werner, M., Gruss, D., and Schwarz, M.
(2021). Automating seccomp filter generation for
linux applications. In Proceedings of the 2021 on
Cloud Computing Security Workshop, CCSW ’21,
page 139–151, New York, NY, USA. Association for
Computing Machinery.
DeMarinis, N., Williams-King, K., Jin, D., Fonseca, R., and
Kemerlis, V. P. (2020). Sysfilter: Automated system
call filtering for commodity software. In 23rd Interna-
tional Symposium on Research in Attacks, Intrusions
and Defenses (RAID 2020), pages 459–474.
Fioraldi, A., Maier, D., Eißfeldt, H., and Heuse, M. (2020).
AFL++ : Combining incremental steps of fuzzing re-
search. In 14th USENIX Workshop on Offensive Tech-
nologies (WOOT 20). USENIX Association.
Ghavamnia, S., Palit, T., Mishra, S., and Polychronakis, M.
(2020). Temporal system call specialization for attack
surface reduction. In 29th USENIX Security Sympo-
sium (USENIX Security 20), pages 1749–1766.
Lopes, N., Martins, R., Correia, M. E., Serrano, S., and
Nunes, F. (2020). Container hardening through auto-
mated seccomp profiling. In Proceedings of the 2020
6th International Workshop on Container Technolo-
gies and Container Clouds, WOC’20, page 31–36,
New York, NY, USA. Association for Computing Ma-
chinery.
Rizzi, E. F., Elbaum, S., and Dwyer, M. B. (2016). On
the techniques we create, the tools we build, and their
misalignments: A study of klee. In Proceedings of the
38th International Conference on Software Engineer-
ing, ICSE ’16, page 132–143, New York, NY, USA.
Association for Computing Machinery.
Zeng, L., Xiao, Y., and Chen, H. (2015). Linux auditing:
Overhead and adaptation. In 2015 IEEE International
Conference on Communications (ICC), pages 7168–
7173.
SECRYPT 2022 - 19th International Conference on Security and Cryptography
512