| Literature DB >> 32933082 |
Yingpei Zeng1,2, Mingmin Lin1, Shanqing Guo3, Yanzhao Shen1,4, Tingting Cui1, Ting Wu1,5, Qiuhua Zheng1, Qiuhua Wang1.
Abstract
The publish/subscribe model has gained prominence in the Internet of things (IoT) network, and both Message Queue Telemetry Transport (MQTT) and Constrained Application Protocol (CoAP) support it. However, existing coverage-based fuzzers may miss some paths when fuzzing such publish/subscribe protocols, because they implicitly assume that there are only two parties in a protocol, which is not true now since there are three parties, i.e., the publisher, the subscriber and the broker. In this paper, we propose MultiFuzz, a new coverage-based multiparty-protocol fuzzer. First, it embeds multiple-connection information in a single input. Second, it uses a message mutation algorithm to stimulate protocol state transitions, without the need of protocol specifications. Third, it uses a new desockmulti module to feed the network messages into the program under test. desockmulti is similar to desock (Preeny), a tool widely used by the community, but it is specially designed for fuzzing and is 10x faster. We implement MultiFuzz based on AFL, and use it to fuzz two popular projects Eclipse Mosquitto and libCoAP. We reported discovered problems to the projects. In addition, we compare MultiFuzz with AFL and two state-of-the-art fuzzers, MOPT and AFLNET, and find it discovering more paths and crashes.Entities:
Keywords: CoAP; IoT; MQTT; Preeny; coverage-based fuzzing; desock; multiparty-protocol fuzzer; network protocol; publish/subscribe; security
Year: 2020 PMID: 32933082 PMCID: PMC7570995 DOI: 10.3390/s20185194
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1A typical publish/subscribe process of the Message Queue Telemetry Transport (MQTT) protocol (some CONNECT and ACK messages are omitted for simplicity).
Fuzzer comparisons. “Partial” means some knowledge or work is needed.
| Fuzzer | Need Spec. | Need Coding | Support Multiparty | Message-aware | Taxonomy |
|---|---|---|---|---|---|
| Boofuzz (Sulley) [ | Yes | Yes |
|
| blackbox |
| AFL [ |
|
| No | No | greybox |
| MOPT [ |
|
| No | No | greybox |
| AFLNET [ | Partial | Partial | No |
| greybox |
| MultiFuzz (this paper) |
|
|
|
| greybox |
MQTT control packet types [21].
| Name | Direction of Flow | Description |
|---|---|---|
| CONNECT | Client to server | Connection request |
| CONNACK | Server to client | Connect acknowledgment |
| PUBLISH | Client to server or server to client | Publish message |
| PUBACK | Client to server or server to client | Publish acknowledgment (QoS 1) |
| PUBREC | Client to server or server to client | Publish received (QoS 2 delivery part 1) |
| PUBREL | Client to server or server to client | Publish release (QoS 2 delivery part 2) |
| PUBCOMP | Client to server or server to client | Publish complete (QoS 2 delivery part 3) |
| SUBSCRIBE | Client to server | Subscribe request |
| SUBACK | Server to client | Subscribe acknowledgment |
| UNSUBSCRIBE | Client to server | Unsubscribe request |
| UNSUBACK | Server to client | Unsubscribe acknowledgment |
| PINGREQ | Client to server | PING request |
| PINGRESP | Server to client | PING response |
| DISCONNECT | Client to server or server to client | Disconnect notification |
| AUTH | Client to server or server to client | Authentication exchange |
Figure 2The architecture of MultiFuzz. It has the same architecture as other coverage-based fuzzers like AFL [3], with the changes highlighted by yellow grids.
Figure 3The new seed format.
Figure 4An example seed in the new format (hex encoding).
Figure 5The design of desock and desockmulti.
Figure 6The paths discovered by different fuzzers.
Figure 7Crashes found in libcoap.
Figure 8Bitmap density comparisons.
Figure 9The paths discovered when disabling both the multi-connection design and the message mutation algorithm (MultiFuzz (SingleConn., NoMsgMuta.)), and disabling only the message mutation algorithm (MultiFuzz (NoMsgMuta.)).
Figure 10Crashes found in libCoAP by MultiFuzz and its variations.
Figure 11The execution speeds of different fuzzers, and the comparisons of MultiFuzz to other fuzzers.