gchq / gchq/CyberChef

Operation request: Decode/Encode DNS Wire Format

Open
#940 0 comments 1 reaction 0 assignees View on GitHub
operation
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

## Summary

A dns wire format encoder and decoder would be great. This would be useful, when using dns over https (DoH) without json support or dns over tls (DoT). The binary format is specified in RFC 1035. The plaintext format can be something similar to the format used by dig.

### Decode

#### Example Input

```
00 00 01 00 00 01 00 00 00 00 00 00 03 77 77 77
07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00
01
```

#### Example Output

```
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 0
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.example.com. IN A
```

### Encode

For encoding I would suggest a format similar to the DNS over HTTPS operation.

Contributor guide

Open the contributing guide

Research direction

Start by reading RFC 1035 and the example input and output in this issue; no implementation files or tests are named. Review the closed linked pull request #2256 for prior work. Done would require agreeing on the plaintext decode format and the suggested encode format, then supporting both DNS wire-format operations.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.