Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Unreleased
### Features
### Fixes
- Match the live API in `pyhatching.testing`'s task report: DNS record types include their class (`"IN A"`), and `orig` is set on every process in the sample's tree.

## v1.0.0 - 2026-11-01
### Features
Expand Down
3 changes: 3 additions & 0 deletions src/pyhatching/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ class Process(TriageModel):
ppid: Optional[int] = None
cmd: Any = None
image: Optional[str] = None
# Whether the process is in the sample's process tree. It's set on the sample's children
# too, and sometimes on none of the processes, so it doesn't find the process that ran it.
orig: Optional[bool] = None
started: Optional[int] = None
terminated: Optional[int] = None
Expand Down Expand Up @@ -628,6 +630,7 @@ class DNSEntry(TriageModel):
"""A DNS question or answer."""

name: Optional[str] = None
# The record class and type, ex. "IN A" or "IN CNAME".
type: Optional[str] = None
value: Optional[str] = None

Expand Down
9 changes: 6 additions & 3 deletions src/pyhatching/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@
"resource": "win10v2004-20260901-en",
"platform": "windows10-2004_x64",
},
# Like the live API, orig is set on every process in the sample's process tree, not
# only on the process that ran the sample.
"processes": [
{
"procid": 1,
Expand All @@ -309,7 +311,7 @@
"ppid": 2044,
"cmd": ["C:\\Windows\\System32\\cmd.exe", "/c", "whoami"],
"image": "C:\\Windows\\System32\\cmd.exe",
"orig": False,
"orig": True,
"started": 3400,
"terminated": 3900,
},
Expand Down Expand Up @@ -349,7 +351,8 @@
"at": 4900,
"dns_request": {
"domains": ["evil.example.com"],
"questions": [{"name": "evil.example.com", "type": "A"}],
# Like the live API, record types include the class ("IN A").
"questions": [{"name": "evil.example.com", "type": "IN A"}],
},
},
{
Expand All @@ -359,7 +362,7 @@
"dns_response": {
"domains": ["evil.example.com"],
"ip": ["198.51.100.7"],
"answers": [{"name": "evil.example.com", "type": "A", "value": "198.51.100.7"}],
"answers": [{"name": "evil.example.com", "type": "IN A", "value": "198.51.100.7"}],
},
},
{
Expand Down
Loading