Internet-Draft A Standard for Safe and Reversible Shari April 2025
Grimminck Expires 11 October 2025 [Page]
Workgroup:
Network Working Group
Published:
Intended Status:
Informational
Expires:
Author:
S. Grimminck, Ed.

A Standard for Safe and Reversible Sharing of Malicious URLs and Indicators

Abstract

This document defines a consistent and reversible method for sharing potentially malicious indicators of compromise (IOCs), such as URLs, IP addresses, email addresses, and domain names. It introduces a safe defanging format to prevent accidental execution or activation when IOCs are displayed or transmitted. These techniques aim to standardize the safe dissemination of threat intelligence data. This specification uses the URI syntax defined in RFC 3986 and follows the key word conventions from RFC 2119.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 11 October 2025.

Table of Contents

1. Introduction

The secure sharing of malicious artifacts is vital to threat intelligence, open-source intelligence (OSINT), and incident response efforts. However, sharing raw URLs, IP addresses, and email addresses associated with malware or threat actors poses a risk of accidental activation.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

This document defines a clear and reversible method for defanging and refanging IOCs to support safe sharing across various platforms, formats, and use cases. The requirements language (e.g., "MUST", "SHOULD") follows [RFC2119], and URI syntax adheres to [RFC3986].

2. Terminology

Defanging: The process of altering an indicator so that it cannot be accidentally activated or clicked.

Refanging: The process of restoring a defanged indicator to its original, actionable form.

IOC: Indicator of Compromise - data such as a URL, IP address, domain name, email address, or hash associated with malicious activity.

3. Problem Statement

Inconsistent defanging practices hinder the reliable and automated exchange of threat intelligence. For example:

Such inconsistencies reduce the effectiveness of threat detection and response.

4. Defanging Techniques

The following transformations MUST be consistently applied:

Using encoded characters (such as %2e for ".") SHOULD be avoided to prevent ambiguity.

Examples:

Note: Credentials in URIs (e.g., username:password) are included here for illustrative purposes only. Sharing credentials, even in defanged form, is strongly discouraged in operational contexts.

Note: IPv6 addresses enclosed in square brackets MUST retain their colon-based syntax (e.g., "::") and brackets. These characters are essential to URI parsing and MUST NOT be altered. Defanging should apply only to components such as the scheme ("http") or domains, not to the IPv6 address syntax.

5. Refanging Techniques

Tools designed to ingest defanged data SHOULD automatically reverse these transformations in a deterministic manner:

Refanging MUST maintain the original semantics of the data to avoid misinterpretation. Examples:

6. Example Use Cases

Common scenarios include:

7. Security Considerations

While these defanging techniques reduce the risk of accidental activation of malicious indicators, defanged data SHOULD always be handled with caution. For example:

8. Implementation Guidance

Software designed to parse threat intelligence feeds should explicitly support these defanging and refanging standards. Implementations SHOULD verify correct refanging through unit tests and validation scripts. Example test case:

        Test Input: "hxxp://192[.]0[.]2[.]1"
        Expected Output: "http://192.0.2.1"

9. Edge Cases and Special Handling

**Internationalized Domain Names (IDNs)**: Defang punycode domains similarly (e.g., "xn--example[.]com").

**Non-Standard URI Schemes**: For schemes like "ftp", apply analogous defanging (e.g., "fxp://example[.]com").

**IPv6 Literals in URIs**: Do not alter colon characters (":") or brackets ("[", "]") in IPv6 addresses. For example, "[2001:db8::1]" MUST remain unchanged. Only scheme names or domain elements surrounding them should be defanged.

10. IANA Considerations

This document has no IANA actions.

11. Normative References

[RFC3986]
Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, , <https://www.rfc-editor.org/rfc/rfc3986>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, , <https://www.rfc-editor.org/rfc/rfc8174>.

Author's Address

Stefan Grimminck (editor)