Commit Graph
1441 Commits
Author SHA1 Message Date
BaaRai e17ab07a8a Merge pull request #499 from NikolayGusev-astra/fix/telemetry-on-and-registration-gap
fix: context telemetry ON by default + counter for proved-but-unregistered intents
2026-11-23 23:39:08 +01:00
BaaRai b1d2d776f8 Merge pull request #508 from thejesh23/fix/email-date-message-id
fix(notify): add Date and Message-ID headers to notification emails
2026-11-23 23:38:38 +01:00
BaaRai a37403d1e7 Merge pull request #488 from sresarehumantoo/chore/slog-migration-v2
chore: migrate log.Printf to log/slog in traffic, egress, enrich and evidence
2026-11-23 23:18:08 +01:00
BaaRai deba1d1c7a fix(agent,db): finish the fact-only counter
FactOnlyIntents now returns only terminal intents (done, blocked, exhausted,
stopped), so an open, running or deleted intent is no longer reported as
finished. The summaries go into the planner block inside env.wrap, and the
telemetry docs, the llmrec comment and the db comment match the on-by-default
flag with 0|false|off|no to disable it.
2026-11-23 23:12:41 +01:00
BaaRai fca37610a2 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-23 23:12:37 +01:00
BaaRai a2d011a390 Merge pull request #470 from NikolayGusev-astra/feat/systemone-profile-format
agent: advisory duplicate check on report_finding via a decision model
2026-11-23 23:12:21 +01:00
BaaRai 5ce4e1eae9 Merge branch 'main' into chore/slog-migration-v2 2026-11-23 22:58:53 +01:00
BaaRai 2d39964bac Merge branch 'main' into fix/email-date-message-id 2026-11-23 22:58:51 +01:00
BaaRai d2ccabff98 Merge branch 'main' into feat/systemone-profile-format 2026-11-23 22:58:48 +01:00
BaaRai f3b00d204e Merge pull request #518 from BaaRai/fix/gorilla-websocket-go-2026-6278
fix(deps): bump gorilla/websocket past GO-2026-6278
2026-11-23 22:58:42 +01:00
BaaRai 375b4913ef fix(deps): bump gorilla/websocket past GO-2026-6278
govulncheck reports GO-2026-6278: gorilla/websocket v1.5.3 uses a
cryptographically weak PRNG for the WebSocket mask key. The fix is the
upstream commit d67f41855da4, available as
v1.5.4-0.20240701034025-d67f41855da4, and it is reachable from the capture
proxy through go-mitmproxy and from the log sink path.

Bumps the module and go.sum. govulncheck ./... reports no vulnerabilities,
go build ./... and go test ./traffic pass.
2026-11-23 22:38:54 +01:00
BaaRai 3112fef438 chore(logs): keep the tags and read the slog level
The slog migration dropped the [traffic], [egress], [enrich] and [evidence]
tags, so the logs view lost the badge and the level was guessed from the
message text. Put the tag back in each message and teach parseLog to read the
slog level word (2026/11/23 13:48:50 WARN [traffic] ...) before the tag.

Adds parseLog tests for the real slog line, the level words and the legacy
no-level shape.
2026-11-23 22:25:32 +01:00
BaaRai f58365c83e fix(notify): parse the sender and reject header line breaks
messageIDDomain broke Name <a@example.com> (comment), and a CR or LF in the
from value could start a new header line. Parse the sender with net/mail,
refuse line breaks in From and To, take the Message-ID domain from the parsed
address with a localhost fallback, and use the bare address as the SMTP
envelope sender.

Adds the sender parsing and header tests.
2026-11-23 22:25:14 +01:00
BaaRai c8c6df423c fix(agent): make the triage threshold atomic
The threshold is written by the settings path and read by the report_finding
worker, so a plain float global is a data race. Store the bits in an
atomic.Uint64, restore the default on 0 or negative, and accept 0 in
applyTriageThreshold so a reset takes effect.

Adds a two-goroutine -race test and the Set(0) reset test.
2026-11-23 22:24:53 +01:00
BaaRai 81eafd0856 Merge pull request #516 from gaurav7902/main
ci: add govulncheck job and --security flag to verify.sh
2026-11-23 21:16:42 +01:00
BaaRai 167cf72b09 Merge pull request #481 from Phantom-IN/fix/seed-target-trailing-punctuation
fix(server): seed a goal URL that is followed by punctuation
2026-11-23 21:16:35 +01:00
Gaurav Patidar 52a2a6ac87 Added govulncheck to CI and local verification 2026-11-23 20:24:16 +05:30
Phantom-IN 2efc2aca68 fix(server): seed a goal URL that is followed by punctuation
parseTarget pulls the first URL out of the goal with https?://[^\s'"]+,
which keeps any punctuation that follows it. "Assess http://juiceshop:3000."
matches "http://juiceshop:3000.", url.Parse rejects the port, and the seed
logs "could not parse a target host/IP" even though goalGateCheck accepted
the same goal. A dotted host only survived through the domain fallback,
which takes the scheme from the port, and a sentence-final period stayed
in the host.

Trim trailing punctuation before parsing the URL, including full-width
punctuation from pasted text. A closing bracket is trimmed only when the
URL has no matching opener, so a bracketed IPv6 host like http://[::1]
still parses.
2026-11-23 20:09:03 +05:30
BaaRai d235be850e Merge pull request #507 from thejesh23/fix/scheduler-timeout-order
fix(scheduler): fire on_task_timeout for tasks that time out out of id order
2026-11-23 15:26:50 +01:00
Николай Гусев 8e1c88e803 fix(agent,db): counter for intents that proved facts and registered no finding
«Доказал — не зарегистрировал» was measurable all along and nobody measured it:
on the 2026-11-22 run record, 3 runs out of 12 had EVERY fact-producing intent
register nothing (3/3, 3/3, 2/2 intents) — task 8 burned 130 Bash calls in 35
minutes and registered zero findings. Facts carry no "this is a defect" flag, so
the planner is the only place that can turn a fact into a finding; it had no
counter telling it that a finished intent yielded facts and nothing else.

db: FactOnlyIntents(limit) — intents with >=1 fact edge and no finding edge.
agent: the situational block now carries them with the rule (register or say why
not), so the nudge survives seeded agent_prompts (the block is code-owned, not a
template).

limits: FactOnlyIntents limit default 10 - a planner round acts on a handful, the
counter is a nudge and not an inventory
limits: summary truncation 140 chars - one-sentence intent summaries; full text
stays one node_detail away, and the block must not become a second context source

Tests RED first: db test asserts the fact-without-finding intent is picked and the
fact+findings one is not; agent test asserts the block reaches the situational
prompt and does not appear for an empty lookup.
2026-11-23 17:22:35 +03:00
Николай Гусев b708ea6b9a fix(llmrec): context size telemetry ON by default
The llm_context table carries the per-call context breakdown (system, tools,
tool_result, assistant) but was EMPTY on a stand that had already run 15 tasks:
the flag was opt-in and off. Context size was therefore discussed from per-task
token sums, and any fix to it was a guess.

limits: telemetry row 1 per model call - byte counting only, no content kept;
наблюдаемо до ~300 вызовов на прогон, то есть до ~300 строк
limits: disable via explicit falsy value only (0|false|off|no) - the point of the
change is that an unset env means ON

Tests: default-on and explicit-off are both asserted (RED first: the old test
asserted the opposite default).
2026-11-23 17:22:35 +03:00
Николай Гусев a3e44d3f05 agent: close the review blockers on the advisory duplicate check
Fixes the three blockers and three shoulds from the review of #470, rebased
onto current main.

Blocker 1 — no way out of a wrong suppression. The suppression note told the
agent to register a distinct defect again, but report_finding had no override:
the retry hit the same check and was suppressed again. report_finding now takes
force_register, which skips the duplicate check for that call and logs the
override. Covered end to end: suppress, then register with the flag.

Blocker 2 — id mismatch. The suppression answer returned duplicate_of_finding_id
(the findings-table id) while update_finding_report addresses the exploration
NODE. The answer now carries duplicate_of_finding_node_id as well, and the note
names the node id to pass. withNodeID resolves it from the candidates the
question offered, so an id the model was never shown maps to nothing.

Blocker 3 — unguarded HTTP client. SystemOneClient.http() returned a bare client,
so a stored triage profile could point the server at an internal host. The client
is now built by the server under the same endpoint guard as the model-list path:
ARTEX_LLM_PRIVATE_ENDPOINTS allow-list, private and metadata addresses refused,
no proxy, redirects not followed. A refused base_url leaves triage off (fail
open, as every other triage failure). TriageHTTPTimeout is exported so the
injected client uses the same budget instead of a second number.

Should 4 — UTF-8 truncation. capText and buildDuplicateState cut by byte index,
splitting a multi-byte rune on CJK or Cyrillic summaries. Both now cut on a rune
boundary.

Should 5 — settings validation. putSettings accepts and stores any
triage_profile_id and any confidence. Both are validated before anything is
written: a negative or unknown profile id and a threshold outside 0..1 are
rejected with 400; 0 still turns the check off.

Should 6 — the threshold is a setting (triage_min_confidence), read on boot and
on change; the description matches the code.

Verification: go build ./... and go vet clean; gofmt clean. go test ./agent/
./db/ ./llmrec/ ./server/ with ARTEX_PG_DSN on a local PostgreSQL — green except
TestManagerSOCKS5UDPOptInAndAssetBlockRuleDropsDatagram (binds 127.0.0.2) and
TestPauseShiftsTaskDeadlineOnResume, which fail the same way on clean main on
macOS. Red/green: with the force_register branch disabled the override test
fails naming the ignored flag; restored, it passes.
2026-11-23 17:22:16 +03:00
BaaRai 6ec01e007e Merge remote-tracking branch 'origin/main' into pr507b
# Conflicts:
#	CHANGELOG.md
2026-11-23 15:10:58 +01:00
BaaRai 9f0436e272 Merge pull request #503 from Dev-next-gen/fix/archive-skip-fifo
fix(server): skip named pipes and sockets when packing a task archive
2026-11-23 15:10:35 +01:00
Николай Гусев 24cd7da9af agent: advisory duplicate check on report_finding via a decision model
Duplicates are the cheapest way to lose reviewer trust, and the only guard today is
a prompt instruction: the worker is told to check list_findings before registering.
It does not hold — in one run against a deliberately vulnerable app three defect
classes were registered twice each (two SQLi, two IDOR, two admin-endpoint
findings), and one of the pairs differed only in wording.

A decision model answers exactly this kind of closed-list question (same defect as
one of these N findings, or not?) with probabilities and no generated text, so the
judgement costs one small request instead of a main-model turn over a six-figure
context. Measured on our own findings before writing any of this (15 candidates,
hand labels): the correct partner 8/8 on a 27B decider and 7/8 on the flash one,
against 7/15 for the constant "always distinct", at 0.66 s and ~1.7k input tokens
per call with zero output tokens. Repeated calls were stable (30/30 identical).

Changes

- agent/triage.go: TriageClient interface, a /v1/systemone HTTP client, and the pure
  pieces (state builder, criteria builder, answer parser, threshold) so the logic is
  testable without a server.
- report_finding: consults the client before registering. On a duplicate above the
  confidence threshold the finding is not registered again; the caller is told which
  finding_id it matched and to extend it with update_finding_report.
- Wiring: agent.SetTriageClient on the worker/planner ToolSets, a triage_profile_id
  setting (any llm_profiles row whose base_url serves the decision contract; 0 = off),
  exposed through the settings API.

Fail-open, by construction

Triage changes an outcome only when it is confident; every other path behaves exactly
as today: no client, no existing findings, empty summary, transport error, non-200,
malformed body, an id the question never offered, or confidence below the threshold
all fall through to normal registration. A wrong suppression loses evidence, a wrong
registration only costs a row — hence the threshold, and hence "advisory".

Verification

- go test ./agent/ passes, including new tests: request shape (model/state/criteria
  carry every candidate), distinct answer, unknown id reads as distinct, probability
  fallback when confidence is absent, error on 500, no HTTP call without input, state
  cap, threshold boundaries.
- red/green on two independent breakages: forcing the threshold false and accepting
  an unoffered id both fail the suite; restored, it passes.
- go test ./server/ shows one failure,
  TestManagerSOCKS5UDPOptInAndAssetBlockRuleDropsDatagram (bind 127.0.0.2 —
  environment), reproduced on clean main in a separate worktree.
- gofmt -l agent/ server/ clean.

Notes

- The profile must serve /v1/systemone. A chat-only decider endpoint (one that refuses
  /v1/chat/completions) needs a thin adapter; a decision endpoint works directly.
- Off by default: with no triage_profile_id the platform behaves as before.

The cap on offered findings is a SELECTION, not "the newest N": with a wide graph
the true partner falls out of a newest-first list, so candidates are ranked by
relevance (same class, overlapping endpoint, another task on a shared asset) with
recency only breaking ties. Per-entry summary capping replaces the whole-state
truncation, which used to cut mid-line and leave criteria ids whose state line had
been dropped.

Threshold is a knob, not a constant (live acceptance): on a run with the wider
cross-task pool the model named the right partner in 8 of 9 questions, but its
confidence moved with the question's width — 0.73-0.79 on a small pool, 0.30-0.53
with twenty candidates. Six duplicates were suppressed, and exactly the two that
slipped were the 0.30 and 0.47 ones, both with the correct partner named. A fixed
0.5 cannot fit both ends, so the threshold is a setting (triage_min_confidence,
default 0.5); the low end is affordable because the suppression result tells the
agent to re-register explicitly when the finding is in fact distinct.

Cross-task pool (found by re-measuring the live miss): task_relations only links
spawned tasks, so two tasks created independently against the same target never see
each other's findings and a defect registered in both is invisible to the dedup
question. FindingsSharingAssets joins on the candidate's own asset ids (jsonb
containment, GIN-served) and adds those findings to the question, marked with their
task. On three real cross-task duplicates the wider question names the right partner
in all three (confidence 0.58-0.73, above the threshold), where the own-task pool
could only answer "none".

Regression note (found on a live run, not in CI): FindingID is filled from the findings table, so building the candidate list straight from the nodes dropped every entry and triage never fired ("nodes=6, no usable existing findings"). Covered by TestTriageCandidates_SkipsNodesWithoutFindingRow; findings inherited from a directly related task are kept and marked in the question.

---

Found while running the platform against a live target.

limits: triageDupMinConfidence 0.5 - калибровка 538 пар одной цели (stage3_calibrate.py, 2026-11-22): recall 1.00 при FP 0.47 на 75 жёстких негативах; на истинных дублях в живом прогоне 0.30-0.79
limits: triageMaxExisting 10 - ширина вопроса на реальном дубле (stage3_width.py, 2026-11-22): уверенность 0.81-0.91 до 11 кандидатов, 0.64 на 19, 0.56 на 29; латентность 0.44->1.29 с
limits: triageMaxSummaryChars 400 - p90 длины сводки 334, максимум 564 по 53 находкам графа (2026-11-22)
limits: triageMaxStateChars 6000 - арифметика при потолке 10 записей: 10*(400+60)+480 ~= 5.1 КБ, запас 1.17x
limits: triageHTTPTimeout 20s - наблюдаемая латентность decider 0.26-1.29 с, 3.83-3.96 с на 27B; запас ~5x к худшему
limits: findings pool query limit 50 - самый широкий пул по ассету 31 находка (53 в графе, 2026-11-22), запас 1.6x
limits: ответ decider 1 MiB - наблюдаемый ответ 0.3-2 КБ, запас ~500x
2026-11-23 16:59:40 +03:00
BaaRai 410d8fa7f2 Merge remote-tracking branch 'origin/main' into pr507b
# Conflicts:
#	CHANGELOG.md
2026-11-23 14:55:14 +01:00
BaaRai 8040e38faf Merge remote-tracking branch 'origin/main' into pr503b
# Conflicts:
#	CHANGELOG.md
2026-11-23 14:54:03 +01:00
BaaRai ab2a0262b5 Merge pull request #509 from jamesKhor/feat/assessment-identification
Add a per-task scanner User-Agent for approved sites
2026-11-23 14:53:06 +01:00
BaaRai 164e2388ed Merge pull request #480 from jamesKhor/feat/bedrock-gateway
Add bearer-authenticated Bedrock gateway profiles
2026-11-23 14:52:58 +01:00
BaaRai f99362b1b5 Merge pull request #442 from aadamowski/main
fix(docker): Add more recon staples
2026-11-23 14:52:48 +01:00
BaaRai 2ccf6692e3 up README
up readme
2026-11-23 13:26:01 +01:00
BaaRai a4276b490f Merge pull request #478 from BaaRai/feat/agent-uid-isolation-rebased
Run agent processes under the executor identity with a sealed environment
2026-11-23 12:59:10 +01:00
BaaRai 4c9a4ded44 Merge pull request #511 from BaaRai/chore/dependabot-docker-pins
build: refresh digest-pinned images with Dependabot
2026-11-23 12:51:32 +01:00
BaaRai 60a1ffca62 server: keep only the fixed locale names in the executor environment
The executor environment kept every name starting with LC_, so a secret supplied under an LC_ name crossed the allowlist even though the comment promised a fixed set of names. The POSIX locale categories are now enumerated and the prefix rule is gone.

Found by jamesKhor in the review of #478.
2026-11-23 12:42:43 +01:00
BaaRai 81d20511e4 Merge pull request #505 from jamesKhor/fix/pr478-executor-sharing-race
Fix executor run-directory permission race in #478
2026-11-23 12:40:47 +01:00
BaaRai fde08775c8 build: refresh digest-pinned images with Dependabot
The Dockerfile and the PostgreSQL service are pinned by digest, so a moved tag no longer changes what a build pulls. A weekly Docker update keeps those pins current without losing the readable tag.

The config comes from #414 by ldevbr; the pins themselves landed in #397.
2026-11-23 12:39:53 +01:00
BaaRai e2ae4dbbec Merge pull request #397 from YunzhouLi-hub/hardening/pin-base-images
build: pin base images to multi-platform digests
2026-11-23 12:39:10 +01:00
BaaRai 401797b49c Merge pull request #495 from Coff0xc/fix/task-form-secrets
fix(web): clear and mask test-account passwords on the task form
2026-11-23 12:38:53 +01:00
BaaRai 13029dec53 Merge pull request #491 from jsk1004ha/feat/stream-direction-filter
feat(web): add direction filters to recorded stream messages
2026-11-23 12:38:45 +01:00
James Khor 1725a44543 Clarify scanner User-Agent settings and verify recorded redirects 2026-11-23 18:29:58 +08:00
James Khor f90db65430 Limit generated assessment labels to configured HTTP origins 2026-11-23 17:55:39 +08:00
James Khor fdd0041529 Verify assessment labels on the wire and document SOC triage 2026-11-23 17:46:27 +08:00
James Khor 6ef25b22b1 Identify approved assessment tasks in native HTTP requests 2026-11-23 17:45:26 +08:00
thejesh23 ad4c976732 fix(notify): add Date and Message-ID headers to notification emails
buildEmailMessage wrote From, To, Subject and the MIME headers only.
RFC 5322 requires Date and says every message should have a Message-ID.
Not every submission server adds them, and receiving filters penalize
mail without them.

Add the send time and a random Message-ID on the sender's domain.
2026-11-23 01:34:25 -08:00
thejesh23 1aaa7a479b fix(scheduler): fire on_task_timeout for tasks that time out out of id order
The timeout trigger used the task id as a watermark, but tasks time out
in deadline order. When a newer task timed out first, the watermark moved
past every older running task, so their later timeouts were never fired.

Keep fired timeouts in a persisted set, the same way met goals are
tracked. On first start the set is seeded with the tasks already timed
out, so nothing replays.
2026-11-23 01:33:19 -08:00
aadamowski 2ac1869cc7 fix(docker): Add more recon staples - batch 2 - password crackers
Adding common tools that the agent attempted to use but found unavailable.

This is batch 2 - password cracking utilities.

Tool use evidence
=================

Evidence for agent attempting to use said utilities was obtained by running the
following command from ARTEX repo root:

```
grep -Fr "available" data/transcripts | grep -o -E '.{128}available.{64}' |
  grep -Ff <file_with_tool_names>
```

Here's the evidence (with some network addressing info anonymized):

```
rvals). Total about 1–2 minutes. Reasonable.\n\nsshpass is not installed (which sshpass returned nothing). Let me check if it's available… `which sshpass` returned nothing. Alternatives: use expect, or
Python with paramiko. Let me check what's available: python3, paramiko, expect, or hydra/medusa.\n\nLet me check what tools are available.\n"},{"type":"text","text":"Key result: **`Authentications that
 XXXXX/XXXXX, XXXXX/XXXX, XXXXX/password, root/root, root/toor, XXXX/XXXX, admin/12345, XXXXX/XXXXX. Let me check if sshpass is available.\n\nAlso, first SSH algorithm enumeration: use `nc` or ssh -v?
,\"tool\":\"Bash\"},{\"is_error\":false,\"kind\":\"text\",\"step_id\":11134,\"summary\":\"I have sshpass, ncrack, hydra, and nc available. Let me first grab the SSH banner and check connecti…\",\"tool\
ot/admin, admin/admin, root/root, XXXX/XXXX, root/(empty).\n\nFor efficiency, let me use hydra or sshpass. Check what tools are available: nmap, hydra, sshpass, curl. Let me check.\n\nFirst, fetch app.
h\n- In parallel, a quick probe of RDP 3389 with default/weak credentials\n\nFirst let me check the environment: what tools are available (Responder, Impacket, hashcat, john), whether I can bind to por
ed ports filtered\" except for the .22 ports listed on the asset.\n\nLet me start with an environment check.\n\nPlan:\n1. Check available tools: responder, impacket-*, hashcat, john, python3, scapy, nm
ocker bridge (gw 172.19.0.1), i.e. L3-NAT to the LAN, **not** on the XXXXXXXXXXX/24 L2 segment; no Responder/hashcat/john/scapy available.\n2. **Service re-probe of both Windows hosts** — TCP 135/139/4
proxy/...\n4. SSH attempts on .1:22 and .6:22 with default credentials (XXXX/XXXX, XXXX/XXXX, root/root, etc.) — use sshpass if available.\n5. Capture evidence and record facts / findings.\n\nFirst, le
te-forcing with common credentials. sshpass is not installed. Check if python3 has paramiko. Or use expect? Let me check what's available.\n\nActually, wait. Let me reconsider. The mock is a \"XXXXXXXX
 auth/inform/status. The pre-auth surface is confirmed to be minimal.\n\nNext steps:\n1. Check SSH tools: is python3's paramiko available? What about expect? sshpass?\n2. Try SSH default/weak credentia
n- The host has these services: ssh 22, http 631 (CUPS), nfs 2049, firecrawl 3002, mdns 5353.\n\nPlan:\n1. Check what tools are available (hydra, medusa, sshpass, ncrack?).\n2. Check the working direct
-oracle test with a few users.\n5. Build a user list (~10-15 users) and a password list (~100-200 passwords).\n6. Run hydra (if available) with rate limiting, low concurrency (e.g., -t 2, -f for early
ally, for empty-password testing a better approach is a Python paramiko script or expect. Let me check if python3 + paramiko is available. Or I could use `sshpass -p ''` — sshpass treats an empty passw
attempts failed.\n\nSo the gateway's own SSH credentials have never been tested. This is our line.\n\nPlan:\n1. Check the tools available in the working directory: sshpass, paramiko (python), etc.\n2.
uth is offered.\n\n   Alternatively, pure-socket approach: implement minimal SSH transport? Too much work. Better: paramiko, if available; or sshpass if available.\n\n   Also, an even simpler pre-check
l: capture id/whoami/hostname and report a finding\n5. HARD: end with a definitive per-line fact\n\nLet me check what tools are available:\n- python3 (no paramiko)\n- sshpass\n- ncrack\n- hydra\n- nc\n
Test with dummy password\n\nFirst, let me grab the SSH banner.\n"},{"type":"text","text":"I have sshpass, ncrack, hydra, and nc available. Let me first grab the SSH banner and check connectivity, then
bin/hydra\n/usr/bin/nc\n```\n\nThere was no `ssh`! So the OpenSSH client is not installed. That's why sshpass failed.\n\nSo the available options are:\n- ncrack (SSH brute-force tool)\n- hydra (SSH bru
nternet access (it's a pentest platform, so probably yes). But wait — do I even want to rely on that? ncrack and hydra are both available, and both are ideal for this use case.\n\nAbout the \"provided
es, hydra has a native ssh module.\n4. For publickey-only vs. password: hydra's sshd module will tell me which auth methods are available (it enumerates them).\n\nAlso check python3 availability and pa
.6`\n\nThis is a scanner on the host — running it solo (no other scanners on this host right now).\n\nThen, if password auth is available, use hydra with a small wordlist (12 combinations, -t 1, low ra
 can't type interactive passwords, I should use `ssh` in non-interactive mode with SSH_ASKPASS, or use a tool like `sshpass` if available.\n4. Try a small set of common usernames and weak credentials (
\n\nLet's get started. First, let me check existing credentials and context.\n\nLet me first check the environment — is sshpass available? What tools do I have?\n\nLet me lay out the plan:\n- First, ve
0 seconds. That's within tolerance.\n\nLet's start executing. First, parallel info-gathering:\n- list_task_credentials\n- Check available SSH tools (sshpass, ssh)\n- Quick SSH banner check\n\nLet me ru
6-11-22T12:00:56.02822175Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"sshpass is available, ssh is not in the list output... wait, `which sshpass ssh nc p
o get the banner.\n\nLet me check whether the ssh binary exists somewhere.\n"},{"type":"text","text":"I found that `sshpass` is available but `ssh` wasn't listed, so I'll check if an SSH client exists
both web and SSH to avoid lockout/timeout. Let me check if I have tools like `nmap` NSE (brute) or `hydra`/`ncrack`/`ssh-audit` available. Let me check what's installed.\n\nLet me check available tools
1-20T02:45:50.321611958Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"Let me check available tools (hydra, ncrack, ssh-audit, nmap with NSE, john, etc.) and
type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"No hydra/ncrack/wordlists. nmap 7.93 is available, but the output of NSE brute-force scripts is empty (probably b
T22:27:21.210867438Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"nmap and ssh are available, but hydra and sshpass are not. I'll check what else is availab
ython's paramiko). Let me check python and pip.\n\nFirst, SSH fingerprinting:\n"},{"type":"text","text":"I see nmap and ssh are available but hydra and sshpass aren't, so I'll explore other options. No
ontent":[{"type":"thinking","thinking":"Got a definitive fingerprint: **OpenSSH 10.2p1 Ubuntu 2ubuntu3.8**. Let me check what's available for brute-forcing (hydra/sshpass/paramiko are missing — trying
```

Tool availability evidence
=================

The availability of every tool has been verified from within the contained by running:

```
$ docker compose exec artex bash
root@37bd5b1c2b62:/app# apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Reading package lists... Done
root@37bd5b1c2b62:/app# for pkg in hashcat hydra john ncrack openssh-client ssh-audit sshpass; do apt-cache search "^$pkg$"; done;
hashcat - World's fastest and most advanced password recovery utility
hydra - very fast network logon cracker
john - active password cracking tool
ncrack - High-speed network authentication cracking tool
openssh-client - secure shell (SSH) client, for secure access to remote machines
ssh-audit - tool for ssh server auditing
sshpass - Non-interactive ssh password authentication
root@37bd5b1c2b62:/app#
```

Container sizes
=================

Original container size (resulting from `docker compose up -d --build` on base
commit 38c7477):

```
$ docker compose images artex
CONTAINER           REPOSITORY          TAG                 PLATFORM            IMAGE ID            SIZE                CREATED
artex-artex-1       artex               local               linux/amd64         2dabf64dce79        2.11GB              5 minutes ago
```

Container size after the change (this commit):

```
$ docker compose images artex
CONTAINER           REPOSITORY          TAG                 PLATFORM            IMAGE ID            SIZE                CREATED
artex-artex-1       artex               local               linux/amd64         7ed478285fc9        2.31GB              2 minutes ago
```
2026-11-22 21:48:58 -08:00
aadamowski bdf6145d2c fix(docker): Add more recon staples - batch 1 - network
Adding common tools that the agent attempted to use but found unavailable.

This is batch 1 - network and recon utilities.

Tool use evidence
=================

Evidence for agent attempting to use said utilities was obtained by running the
following command from ARTEX repo root:

```
grep -Fr "available" data/transcripts | grep -o -E '.{128}available.{64}' |
  grep -Ff <file_with_tool_names>
```

Here's the evidence (with some network addressing info anonymized):

```
n ports. ICMP being blocked is common for IoT devices. Let's check ARP:\n\n1. Run `arping` against both IPs\n2. If arping isn't available, use a simple TCP connection test to known ports.\n\nActually,
1-22T17:06:15.435471209Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"arping isn't available. Instead, I'll use nmap -sn against .106 (it worked for .34). L
.096773754Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 binary is not available. Previous patrol checks were probably using python3's sqlite3 m
ll run a read-only sqlite query. To keep it strictly read-only, I'll use the sqlite3 CLI in read-only mode. Let me check what's available.\n"},{"type":"text","text":"All three channels are still empty
mand":"ls -la /app/data/traffic/_index/ 2\u003e\u00261 | head -20; echo \"---\"; command -v sqlite3 \u0026\u0026 echo \"sqlite3 available\" || echo \"no sqlite3\""}}]},"usage":{"input_tokens":23733,"ou
9:22.960502613Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI isn't available. I'll use Python's sqlite3 module to open it in read-only mode.
nst 192.168.XX.X:2049 (asset 10) without kernel mount (fact #64: 2049 is open, rpcbind/111 is closed so showmount/rpcinfo are unavailable, and the container lacks CAP_SYS_ADMIN so mount.nfs is EPERM; t
rt | uniq -c\n```\n\nThis will show how many times each ID appears. If all five appear, they exist.\n\nIf the sqlite3 CLI isn't available, I can use python3's sqlite3 module in read-only mode (URI mode
-22T20:08:37.396720158Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"arping is not available. ping, nmap, nc, and python3 are available. Let me check my IP
ing` failed. Let me verify the network configuration.\n"},{"type":"text","text":"arping is missing but ping/nmap/nc/python3 are available. Let me check my network position and whether ARP-level probing
-21T12:13:37.33381531Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"No sqlite3 CLI available. Use Python's sqlite3 module.\n"},{"type":"tool_use","id":"QDxp
-11-20T15:23:51.886698977Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"xxd is not available (exit code 127). Let's use od or python for the hexdump.\n"},{"
rogram calls to 2049 and got nothing. If it were a portmapper, it wouldn't respond to those (it would either return \"program unavailable\" or just not respond). Actually, a real rpcbind returns an err
:01.674628521Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. Use Python's sqlite3 module in read-only mode. The index.sqlit
6-11-21T08:05:31.88611493Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"xxd is not available. Let's use od instead. Also, since the xxd command failed, the
"type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"There's no sqlite3 CLI, but python3 is available. Let's use python3 to query the traffic index in read-only mode
:27.322171897Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. Let's try Python's sqlite3 module (read-only mode).\n"},{"type
03e\\u003e\\u003e\",\"tool\":\"Bash\"},{\"is_error\":false,\"kind\":\"text\",\"step_id\":13907,\"summary\":\"sqlite3 CLI is not available; I'll use Python's sqlite3 module (read-only).\",\"tool\":\"\"}
sage":{"role":"assistant","content":[{"type":"thinking","thinking":"There's no arp-scan, arping, fping, or netdiscover. nmap is available. Let me check the interface / network.\n"},{"type":"tool_use","
:29.333997543Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. I'll use Python's sqlite3 module instead.\n"},{"type":"text","
79498Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The reason sqlite3's CLI isn't available is that `command -v sqlite3 \u003e/dev/null` failed in the firs
5:50.73486641Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. I'll use Python instead.\n"},{"type":"text","text":"sqlite3 CL
e... which is exactly why rpcbind normally maps it. Hmm. But the v3 root fhandle can be discovered by MNT DUMP+MNT. If MNT is unavailable, v3 is effectively unusable without rpcbind.\n\nOK. Now, the bo
ould use Python's sqlite3 module instead — but wait, the intent says \"NO new target traffic\" and \"ONLY if the tool path is unavailable or refuses, do ONE read-only credential sweep.\" The index chec
\n\nLet me write a watcher script.\n\nPlan:\n1. `ip addr` to check I'm on the LAN.\n2. Initial probe: arp-ping (using arping if available, or python) + ICMP ping with 1–2 second timeout to all 4 hosts,
's 5353.\n\nLet me write this carefully and at a low rate.\n\nFirst, the environment check. Let's go.\n\nActually, first: check available tools (nmap, arping, python3, curl).\n\nLet's execute step 1.\n
:38.968796894Z","type":"message","message":{"role":"assistant","content":[{"type":"thinking","thinking":"The sqlite3 CLI is not available. I'll try using Python's sqlite3 module in read-only mode.\n"},
```

Tool availability evidence
=================

The availability of every tool has been verified from within the contained by running:

```
$ docker compose exec artex bash
root@2d5d6eb1b31b:/app# apt-get update
<...>
root@aa7436c6cd57:/app# for pkg in arping arp-scan fping iproute2 netdiscover net-tools nfs-common python3-impacket python3-paramiko python3-scapy rpcbind sqlite3 xxd ; do apt-cache search "^$pkg$"; done;
arping - sends IP and/or ARP pings (to the MAC address)
arp-scan - arp scanning and fingerprinting tool
fping - sends ICMP ECHO_REQUEST packets to network hosts
iproute2 - networking and traffic control tools
netdiscover - active/passive network address scanner using ARP requests
net-tools - NET-3 networking toolkit
nfs-common - NFS support files common to client and server
python3-impacket - Python3 module to easily build and dissect network protocols
python3-paramiko - Make ssh v2 connections (Python 3)
python3-scapy - Packet generator/sniffer and network scanner/discovery (Python 3)
rpcbind - converts RPC program numbers into universal addresses
sqlite3 - Command line interface for SQLite 3
xxd - tool to make (or reverse) a hex dump
root@aa7436c6cd57:/app#
```

Container sizes
=================

Original container size (resulting from `docker compose up -d --build` on base
commit 38c7477):

```
$ docker compose images artex
CONTAINER           REPOSITORY          TAG                 PLATFORM            IMAGE ID            SIZE                CREATED
artex-artex-1       artex               local               linux/amd64         2dabf64dce79        2.11GB              5 minutes ago
```

Container size after the change (this commit):

```
$ docker compose images artex
CONTAINER           REPOSITORY          TAG                 PLATFORM            IMAGE ID            SIZE                CREATED
artex-artex-1       artex               local               linux/amd64         d158c858b10f        2.13GB              46 minutes ago
```
2026-11-22 21:28:09 -08:00
James Khor c1e17ad934 server: secure executor run-directory sharing 2026-11-23 12:39:32 +08:00
Leo Camus b7e766ffe4 fix(server): skip named pipes and sockets when packing a task archive
writeTaskArchivePackage opened every entry of the staged workspace that is
not a directory. Opening a FIFO blocks until a writer appears, so a named
pipe left by a command (mkfifo backpipe for an nc relay) stopped the single
archive worker in openat for good, with the task files already moved to
staging and every later archive, restore and delete job queued behind it.
A Unix socket failed the archive instead, and a device file was packed but
refused by extractTaskArchivePackage on restore.

Skip every entry that is neither a directory nor a regular file, as is
already done for symlinks.
2026-11-23 04:34:29 +00:00
James Khor 8f16794a97 fix: scrub Bedrock gateway credentials at startup 2026-11-23 11:13:40 +08:00