Skip to content
AdminKit

Is port 5683 (CoAP) exposed, and why does it matter for DDoS?

AdminKit explains why an exposed port 5683 is a DDoS risk, not just a privacy one: CoAP, the IoT protocol that defaults to this UDP port, supports optional DTLS encryption that many devices skip, and because a small CoAP request can trigger a much larger response, exposed devices get abused to flood unrelated third parties.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • CoAP is a small, HTTP-like protocol for sensors and other constrained devices. It runs over UDP on port 5683, and on 5684 when secured with DTLS.
  • The standard defines four security modes, and “NoSec” (no protection at all) is one of the two that every implementation must support. Many deployed devices run in it.
  • An exposed CoAP service answers spoofed requests with larger replies, so it can be used to flood someone else. Researchers measured average amplification of about 27x to 34x.
  • AdminKit’s port check lists 5683 as “not scanned” because it tests TCP only. Test UDP 5683 from outside with a CoAP client, then firewall it or turn on DTLS.

What is CoAP, and why is 5683 reachable at all?

CoAP (RFC 7252) is a lightweight, RESTful protocol built for constrained devices — sensors, actuators and other low-power IoT hardware — modeled on HTTP’s GET/PUT/POST semantics but running over UDP for a much smaller footprint. Like several other machine-to-machine protocols covered on this site, it supports an optional secure transport (DTLS) but ships, and is frequently deployed, without it turned on.

Port 5683 is not just a default; it is where discovery happens. RFC 7252 says the default port “MUST be supported by a server that offers resources for resource discovery”, while the DTLS-secured port 5684 “MAY be supported”. In practice that makes 5683 the port a device is most likely to answer on, whatever else it runs. CoAP also has a TCP and TLS binding (RFC 8323) that reuses 5683 and 5684 on TCP, but the measurements cited on this page scanned the UDP form.

What answers on 5683 varies. CoAP was designed for sensors and actuators and for the hubs and gateways that talk to them, but measurements find it in other places too. The Shadowserver Foundation’s 2020 scan found most responses came from QLC Chain (Qlink) software in the Philippines and China, plus “NDM Systems” embedded software in Russia and Ukraine. That mix is a reminder that a CoAP listener can arrive as part of an app or firmware you never chose to run.

Which security modes does CoAP support?

RFC 7252 section 9 defines four modes, set when a device is provisioned. It also states that “the NoSec and RawPublicKey modes are mandatory to implement”, so every compliant device can run with no protection at all:

ModeWhat it meansOn an exposed port 5683
NoSec“There is no protocol-level security (DTLS is disabled)”Anyone can send requests and get answers; usable for amplification
PreSharedKeyDTLS with pre-shared keys; a key shared by several devices only proves group membershipOnly peers holding a key can talk; served on DTLS, normally port 5684
RawPublicKeyDTLS with a raw key pair validated out of bandOnly peers with a known key can talk
CertificateDTLS with an X.509 certificate signed by a common trust rootOnly peers with a valid certificate can talk

A newer option, OSCORE (RFC 8613), protects CoAP messages end to end at the application layer, so protection survives proxies. Both DTLS and OSCORE need support in the device and its hub. If your device’s settings have no security option at all, assume it runs NoSec.

Why is an exposed CoAP service a DDoS risk, not just a privacy one?

Because UDP has no handshake, and CoAP replies can be much larger than requests. RFC 7252’s own security section explains the problem: amplification “is particularly a problem in nodes that enable NoSec access, are accessible from an attacker, and can access potential victims (e.g., on the general Internet), as the UDP protocol provides no way to verify the source address given in the request packet.” An attacker puts the victim’s address in the request, and your device sends its larger answer to the victim.

This isn’t theoretical. NETSCOUT’s ASERT research team documented a spike in real-world DDoS attacks abusing CoAP starting in January 2019, measuring an average amplification factor of roughly 34x — a 21-byte request to a device’s /.well-known/core resource-discovery endpoint produced a response of around 720 bytes, letting an attacker spoof a victim’s IP address and multiply a small amount of outbound traffic into a much larger flood hitting the victim. The Shadowserver Foundation’s 2020 internet-wide scan found 464,159 hosts answering the same request on 21 June 2020, with an average reply of 569 bytes to a 21-byte request (about 27x). It also warned that many exposed services leak information, including credentials for services such as Wi-Fi networks.

The /.well-known/core resource is defined in RFC 6690 as the default entry point for discovery: a GET there “returns a payload in the CoRE Link Format” listing the device’s resources. The more resources and attributes a device lists, the bigger the reply. RFC 7252 says “large amplification factors SHOULD NOT be provided in the response if the request is not authenticated”, and gives a worked example of block-wise transfer: for a 1,000-byte resource, a 10-byte request “might result in an 80-byte response (with a 64-byte block) instead of a 1016-byte response”. That is an 8x reply instead of a roughly 100x one.

SourceRequestReply (average for measurements)Amplification
NETSCOUT ASERT, January 201921-byte GET for /.well-known/core720 bytesabout 34x
Shadowserver, 21 June 202021-byte GET for /.well-known/core569 bytesabout 27x
RFC 7252 example, full reply10-byte request for a 1,000-byte resource1,016 bytesabout 100x
RFC 7252 example, 64-byte blocksthe same 10-byte request80 bytes8x

What else can someone do with an exposed CoAP device?

Amplification uses your device against others. Direct access uses it against you. CoAP is request-response like HTTP, so a NoSec device that exposes writable resources accepts PUT and POST from anyone, the same way it accepts them from its hub. The libcoap documentation includes an example of exactly that kind of request, sending mode=on to a resource with coap-client -m put. On a light, a relay or a valve controller, that is a command.

RFC 7252 section 11.4 lists further attacks open to anyone who can send packets to a NoSec network, including spoofed Reset messages that make an endpoint “deaf”, spoofed acknowledgements that drown out real responses, and forged responses that poison caches and resource directories. It adds that “all these attacks can be prevented using a security mode other than NoSec”. Section 11.5 notes a NoSec setup that relies on a firewall must also firewall “all other endpoints that might be incited to send UDP messages to CoAP endpoints”.

How do you read AdminKit’s port check for 5683?

AdminKit’s open ports check only probes TCP ports, and only on the public IP you are browsing from — UDP services like CoAP on 5683 aren’t covered, so the result always shows the line “Not scanned (UDP, not checked by this tool): 47808 (BACnet/IP), 5683 (CoAP)”. That line is a reminder, not a finding. A summary of “0/9 TCP port(s) open” says nothing about UDP 5683, so test it separately.

How do you check port 5683 from outside?

Confirm your public IP with what is my IP. A plain UDP check such as nc -u -vz is not reliable, because UDP has no handshake and silence can mean open, filtered or closed. Send a real CoAP request instead, from a connection outside your network such as a phone hotspot, to your own public IP only. With libcoap’s coap-client, -B sets how many seconds to wait. The address and the reply below are illustrative examples:

$ coap-client -m get -B 5 coap://203.0.113.5/.well-known/core
</sensors/temp>;rt="temperature-c";if="sensor",</actuators/relay>;rt="switch"

Nmap’s coap-resources script does the same request and prints the list: nmap -sU -p 5683 --script coap-resources 203.0.113.5. Read the answer like this:

What comes backWhat it meansWhat to do
A link list (</...>;rt=...)A NoSec CoAP service answers discovery from the internet; it can be used for amplificationFirewall UDP 5683 now, then find the device
An error code such as 4.01 (Unauthorized) or 4.04 (Not Found)Something speaks CoAP on 5683 and is reachable; discovery is restrictedStill an exposed listener; firewall it unless it must be public
Nothing before the timeoutNo CoAP reply reached youLikely not exposed; repeat once, and also test 5684 if devices use DTLS

How do you find the device behind it?

Check your router for a UDP forward or UPnP mapping on 5683, and note the internal address. If there is no forward, the router itself may be the listener, or a device may have a public IPv6 address with no inbound filtering. On a Linux gateway or hub you can log in to, ss -ulnp | grep 5683 shows the process bound to the port. Inside your own LAN, coap-client -m get coap://<device-address>/.well-known/core tells you which device answers and what resources it offers.

How do you fix it?

  • Firewall UDP port 5683 from the internet if the device only needs to talk to a local hub or gateway — most consumer and industrial CoAP use cases don’t need direct internet reachability at all.
  • Turn on DTLS (CoAP’s encrypted, authenticated mode, normally on 5684) or OSCORE if your device or gateway supports it, rather than running plain CoAP. Prefer per-device keys or certificates to one shared key.
  • Disable or restrict the /.well-known/core resource-discovery response if your device software allows it, since that’s specifically the request amplification attacks abuse; block-wise transfer with small blocks limits the rest.
  • Remove software you don’t use. Some CoAP listeners come bundled with apps or firmware features rather than with the IoT device you meant to install.

CoAP shares its core problem — a lightweight protocol that supports security but doesn’t require it — with MQTT; see is port 1883 (MQTT) open on my router for the closely related anonymous-access issue on that protocol. The amplification pattern itself isn’t unique to CoAP either — SSDP, the discovery protocol behind UPnP, has been abused the same way when a router answers it from outside the local network.

Which devices may you test?

Every check this page links to is for assets you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a network or device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

Is my device actually at risk, or is this only about attacking other people?

Both — an exposed CoAP service can be used to flood a third party, which is the documented DDoS risk, and separately, the Shadowserver Foundation warns that many exposed CoAP services leak information, including credentials such as Wi-Fi passwords, and that flaws in CoAP libraries could potentially allow remote code execution on the device itself.

Why does a tiny request produce such a disproportionately large response?

The commonly-abused request asks for /.well-known/core, CoAP's resource-discovery endpoint, which can list a device's full set of available resources — a response many times larger than the request that triggered it.

Does turning on DTLS fully fix this?

It fixes the amplification risk for that specific device, since DTLS requires a handshake an attacker can't complete by just spoofing a source IP — but confirm your gateway or hub actually supports and enforces it, since CoAP's spec makes DTLS optional, not mandatory.

Is CoAP exposure as well known a problem as MQTT or Telnet?

Less publicized to a general audience, but well documented in security research — NETSCOUT and Shadowserver each measured hundreds of thousands of internet-reachable CoAP devices, and NETSCOUT documented real DDoS attacks abusing them from January 2019.

Does AdminKit's port check test port 5683?

No. 5683 is on the check's default list, but CoAP runs over UDP and the check makes TCP connections only, so the result lists 5683 (CoAP) under "Not scanned (UDP, not checked by this tool)". Test it separately with a CoAP client from outside your network.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.