Machine / Machines

Connected

State: target-state.json - Notes: notes.md The sections below are merged from companion Markdown notes for the same case. They are rendered after sanitization so the article stays precise without publishing raw flags, credentials, or target-specific secrets....

DocumentedPublished 2025-12-14Sanitized local writeup

Scenario

Connected attack path

State: target-state.json - Notes: notes.md The sections below are merged from companion Markdown notes for the same case. They are rendered after sanitization so the article stays precise without publishing raw flags, credentials, or target-specific secrets....

Objective

Machine walkthrough focused on Machines evidence, validation, and reusable operator lessons.

Connected sanitized attack graph

Walkthrough flow

01

Manually verify in the HTB UI that the machine name...

02

If HTB still shows , use the HTB controls to...

03

After respawn, rerun only the minimal baseline (ping...

Source coverage

High source coverage

Status: complete. This article is generated from 7 sanitized Markdown sources and keeps raw flags, credentials, keys, cookies, and reusable secrets out of the rendered blog.

100% coverage
Evidence verdict

High confidence: the page is reconstructed from a primary walkthrough plus multiple supporting notes or evidence sources. Treat the chain as source-backed, while still checking the listed source files for sensitive values.

  • <TARGET>-Connected/walkthrough.md
  • HTB/<TARGET>-Connected/notes.md
  • HTB/<TARGET>-Connected/attack-map.md
  • HTB/<TARGET>-Connected/session-resume.md
  • HTB/<TARGET>-Connected/dead-ends.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/machine__<TARGET>-Connected__attack-map.md.53c4e0a462.md
  • HTB/_knowledge/exports/ctf-lightrag-latest-203412/documents/machine__<TARGET>-Connected__memory-summary.md.5139810e01.md

Technical Walkthrough

Connected Walkthrough

Raw flags and reusable secrets are stored only under loot/.

Summary

Evidence

  • State: target-state.json
  • Notes: notes.md

Source-Backed Dossier

The sections below are merged from companion Markdown notes for the same case. They are rendered after sanitization so the article stays precise without publishing raw flags, credentials, or target-specific secrets.

Notes

Scope

FieldValue
PlatformHack The Box / simulated lab
TargetConnected
DifficultyEasy
OSLinux
Active target IP<TARGET>
Hostname/domainunknown
Pwnbox<TARGET> (profex0r)
Attacker/VPN IP<TARGET>
Local workspace<local workspace><TARGET>-Connected
Pwnbox workspace~/htb/<TARGET>-Connected
Started2026-06-07T05:20:21Z

Evidence Ledger

Time UTCPhaseCommand/ActionOutput fileFindingConfidenceNext action
2026-06-07T05:20:21Zsetuphtbctl inittarget-state.jsonWorkspace initialized by deterministic harness.HighValidate route and start baseline recon.
2026-06-07T05:20:21ZsetupManual runbook createdmanual-runbook.md, session-resume.mdCollaboration will be manual execution by user with Codex reviewing outputs and maintaining notes.HighRun Phase 0 route check and Phase 1 baseline TCP recon.
2026-06-07T05:20:21ZsetupOutput workflow revisedChat plus workspace notesOperator will paste outputs directly into chat; Codex will update workspace files.HighRun Phase 0 route check and Phase 1 baseline TCP recon.
2026-06-07T05:31:00ZreconManual route check and full TCP sweep from Pwnboxenum/manual-phase0-phase1-20260607.mdPwnbox/VPN is live as <TARGET>, but target <TARGET> returns Destination Host Unreachable from <TARGET>; full TCP scan found no open ports and all ports filtered.HighVerify target IP/spawn state and route before any service scan or exploitation.
2026-06-07T05:36:00ZreconManual route debugenum/manual-route-debug-20260607.mdOpen port variable is empty; route to target correctly uses tun0 via <TARGET>; tracepath is unavailable on Pwnbox.HighRun host-discovery and common-port checks; if still negative, verify machine spawn/IP in HTB UI.
2026-06-07T05:39:00ZreconHost discovery and common-port attemptenum/manual-host-discovery-20260607.mdHost discovery reports 0 hosts up; common-port scan did not run because shell was in ~ and nmap/ did not exist there.HighRe-run common-port check from the target workspace; if negative, verify/reset target in HTB UI.
2026-06-07T05:42:00ZreconCommon Easy Linux port checkenum/manual-common-port-check-20260607.mdPorts 22, 80, 443, 3000, 5000, 8000, 8008, 8080, and 8081 are all filtered with no-response; -Pn host-up status is user-forced.HighStop scanning and verify machine name/IP/spawn state in HTB UI; reset/re-spawn if needed.
2026-06-07T05:45:00ZresearchSafe public metadata reviewresearch.mdConnected appears to be a newly active/free Easy Linux machine released 2026-06-06; no credible full walkthrough found and machine-specific spoiler research is inappropriate while active.HighUse HTB UI/spawn/VPN checks; resume live enumeration only after target responds.
2026-06-07T05:55:00ZhandoffHTB agent handoff preparedagent-handoff-2026-06-07.md, handoffs.mdHandoff captures current blocker, tried commands, evidence files, research boundary, and exact next actions for the HTB agent.HighPass handoff prompt to HTB agent; agent should verify UI/IP/spawn before scanning further.
2026-06-07T05:51:22ZmemorySanitized CTF LightRAG export/ingest started_knowledge/exports/ctf-lightrag-20260607-155117, remote track scan_20260607_055122_61cf71a1Summary-only strict export created 273 local documents; remote ingest accepted and queued with no errors in latest status check.HighTreat local workspace files as source of truth; RAG is advisory only.
2026-06-07T06:03:00Zui-checkRead-only HTB UI verification via copied local Chrome profilesenum/htb-ui-check.json, enum/htb-ui-network-log.json, screenshots/htb-ui-default-connected-small.png, screenshots/htb-ui-profile1-connected-small.pngHTB session shell loaded and page title/path matched Connected, but the machine panel showed Network Error; a second profile hit HTB rate limiting, so assigned IP/spawn/region were not authoritatively confirmed.HighStop UI automation and use only minimal Pwnbox baseline recheck.
2026-06-07T06:08:13ZrouteFresh Pwnbox route recheck via htbctlenum/route-recheck-20260607.txtPwnbox user and tun0=<TARGET> remain valid; route to <TARGET> still goes via <TARGET>.HighRerun only ping and common-port baseline.
2026-06-07T06:08:20ZreconFresh ping baseline via htbctlenum/ping-recheck-driver-20260607.txt, enum/ping-recheck.txtping -c 3 <TARGET> still returns Destination Host Unreachable from <TARGET>.HighRecheck common ports once; stop if still no response.
2026-06-07T06:08:27ZreconFresh common-port baseline via htbctlnmap/recheck-common-driver-20260607.txt, nmap/recheck-common.nmap, nmap/recheck-common.gnmap, nmap/recheck-common.xmlPorts 22,80,443,3000,5000,8000,8080 remain filtered with no-response; no reachable service surface recovered.HighStop and treat as target/lab state until manual HTB reset/re-spawn is completed.
2026-06-07T06:49:09ZsetupRebound continuity workspace to new Pwnbox via direct SSH health checkchat-only validation, target-state.jsonNew Pwnbox <TARGET> is reachable as profex0r; tun0=<TARGET>; route to <TARGET> still uses <TARGET>; remote workspace exists at ~/htb/<TARGET>-Connected.HighRebind state and rerun only the minimal baseline through htbctl.
2026-06-07T06:50:21ZrouteRebound Pwnbox route recheck via htbctlenum/route-recheck-20260607-rebind.txtNew Pwnbox remains healthy and routes <TARGET> over tun0 via <TARGET> with source <TARGET>.HighRerun only ping and common-port baseline on the rebound Pwnbox.
2026-06-07T06:50:34ZreconRebound ping baseline via htbctlenum/ping-recheck-driver-20260607-rebind.txt, enum/ping-recheck.txtPing no longer shows gateway Destination Host Unreachable, but still returns 0/3 replies and 100% packet loss.HighRecheck common ports once on the rebound Pwnbox.
2026-06-07T06:50:39ZreconRebound common-port baseline via htbctlnmap/recheck-common-driver-20260607-rebind.txt, nmap/recheck-common.nmap, nmap/recheck-common.gnmap, nmap/recheck-common.xml, enum/recheck-common-nmap-copy-20260607-rebind.txt, enum/recheck-common-gnmap-copy-20260607-rebind.txt, enum/recheck-common-xml-copy-20260607-rebind.txtPorts 22,80,443,3000,5000,8000,8080 remain filtered with no-response; no open port emerged after rebinding to the new Pwnbox.HighStop and treat as target/spawn/lab state until manual HTB UI verification/reset confirms a live instance.

Synthesis

Current completion state: BASELINE.

Current blocker: continuity has been rebound to the new Pwnbox <TARGET>, and the new VPN source <TARGET> routes correctly to <TARGET> over tun0, but the target still exposes no reachable service surface. HTB UI verification remains inconclusive because prior automated checks hit HTB-side Network Error and rate limiting, so assigned IP/spawn/region still require manual HTB verification. Do not proceed to exploitation or broader service research until the machine is manually verified/reset and at least one port becomes reachable.

Raw flags and reusable secrets must be stored only under loot/.

Attack Map

Current State

  • Target: <TARGET>
  • Difficulty/OS: Easy / Linux
  • Completion state: BASELINE
  • Services: none reachable after fresh baseline recheck
  • Hostname/domain: unknown
  • Credentials: none
  • Shells: none
  • Pwnbox/VPN: profex0r@<TARGET>, tun0=<TARGET>
  • Current blocker: HTB machine-page verification is still inconclusive and the target still has no reachable service surface after rebinding to a new Pwnbox.

Working Hypotheses

IDHypothesisEvidenceMissing proofCheapest validationStatus
H1Easy Linux path will likely be service-exposure driven.Machine difficulty and OS only.Open ports and versions.Recover lab state, then run full TCP + service scan only if a port opens.Blocked
H2The assigned lab instance for <TARGET> is absent, unspawned, or otherwise unreachable even though the VPN route exists.After rebinding to a new Pwnbox, route recheck still uses tun0 via <TARGET>; rebound ping returns 100% packet loss; rebound common-port scan shows 22,80,443,3000,5000,8000,8080 all filtered with no-response.Stable HTB UI confirmation of assigned IP/spawn state and a post-respawn target response.Manually verify/reset/re-spawn in HTB, then rerun the minimal baseline.Active
H3Local automated HTB UI checks are currently unreliable for authoritative machine-state confirmation.The authenticated Connected page loaded with title/path match, but the machine panel showed Network Error; a second profile hit HTB rate limiting; the captured network log did not yield usable machine-state details.Stable manual UI confirmation of exact IP, spawned state, and lab region.Use a normal browser session to verify and reset/re-spawn once the rate-limit window clears.Active

Decision Rule

Do not exploit until services and likely path are synthesized from live enumeration. Current live enumeration has no reachable service surface, so the next step is manual HTB UI verification and reset/re-spawn, not deeper scanning.

Session Resume

Last updated: 2026-06-07T06:52:37Z

Current Access

  • Completion state: BASELINE.
  • Target IP expected from user scope: <TARGET>.
  • Machine: Connected.
  • Difficulty/OS: Easy / Linux.
  • Safe public metadata indicates Connected is active/free and newly released on 2026-06-06. Avoid machine-specific writeups/hints unless explicitly switching to spoiler mode.
  • Pwnbox is active as profex0r@<TARGET>.
  • HTB VPN interface is tun0 with attacker IP <TARGET>.
  • Fresh rebound Pwnbox recheck confirms the route to <TARGET> still goes via <TARGET> over tun0.
  • The target is still not reachable enough for enumeration:

- rebound ping returned 100% packet loss with no replies.

- rebound common-port baseline left ports 22,80,443,3000,5000,8000,8080 filtered with no-response.

- no open TCP ports have been validated.

  • HTB UI automation was only partially useful:

- the official page path/title matched Connected, but the machine panel showed Network Error.

- a second local browser profile hit HTB rate limiting.

- assigned IP, spawned state, and lab/Pwnbox region remain inconclusive and still require manual UI verification.

  • No user flag, root flag, shell, credential, hostname, or service path has been validated yet.

Collaboration Model

  • Codex used htbctl for minimal remote baseline checks from the local Mac to the Pwnbox.
  • Browser automation was limited to read-only HTB UI confirmation attempts and stopped once rate limiting and HTB-side errors appeared.
  • No exploitation or deeper enumeration should proceed until HTB machine state is manually verified and recovered.

Next Three Actions

  1. Manually verify in the HTB UI that the machine name is Connected, the assigned IP is still <TARGET>, and the instance is fully spawned.
  2. If HTB still shows <TARGET>, use the HTB controls to reset/release and re-spawn the machine, then confirm the lab/Pwnbox region matches before scanning again.
  3. After respawn, rerun only the minimal baseline (ping plus common ports) from the rebound Pwnbox; continue to full TCP and service enumeration only if at least one port opens.

Blockers

  • HTB machine-page automation could not fully confirm assigned IP/spawn/region because the page returned Network Error and rate limiting was triggered on a secondary profile.
  • Service surface remains unavailable on the rebound Pwnbox because no open TCP ports are reachable and common ports stay filtered with no-response.
  • Current blocker is target/spawn/lab state, not an exploit path.
  • Research blocker: do not use machine-specific walkthroughs while the box appears active.

Session Registry

NameHostCommandStatusEvidence
nonen/an/ainactiven/a

Dead Ends

Time UTCBranchWhy closedEvidenceRevisit condition
2026-06-07T06:03:00ZAutomated HTB UI confirmation from copied local Chrome profilesClosed for now because the official Connected machine page returned Network Error in the machine panel and a second profile hit HTB rate limiting, so automated UI output is not authoritative for assigned IP/spawn/region.enum/htb-ui-check.json, enum/htb-ui-network-log.json, screenshots/htb-ui-default-connected-small.png, screenshots/htb-ui-profile1-connected-small.pngRevisit only after cooldown or manual browser verification exposes stable machine controls.
2026-06-07T06:08:27ZDirect service enumeration before lab-state recoveryClosed because a fresh baseline still showed Destination Host Unreachable on ping and all rechecked common ports filtered with no-response, so there is no live service surface to enumerate yet.enum/route-recheck-20260607.txt, enum/ping-recheck-driver-20260607.txt, enum/ping-recheck.txt, nmap/recheck-common.nmap, nmap/recheck-common.gnmapRevisit only after HTB reset/re-spawn and a successful reachability baseline.
2026-06-07T06:50:39ZMinimal re-enumeration after rebinding continuity to a fresh PwnboxClosed because the new Pwnbox <TARGET> with tun0=<TARGET> still routes through <TARGET>, ping still gets 100% packet loss, and the rechecked common ports remain filtered with no-response, so rebinding alone did not recover a live service surface.enum/route-recheck-20260607-rebind.txt, enum/ping-recheck-driver-20260607-rebind.txt, enum/ping-recheck.txt, nmap/recheck-common-driver-20260607-rebind.txt, nmap/recheck-common.nmap, nmap/recheck-common.gnmap, nmap/recheck-common.xmlRevisit only after manual HTB UI verification confirms assigned IP/spawn/region and the machine has been reset/re-spawned.

Attack Map

Completion State

COMPLETE

Known Facts

FactEvidenceConfidence
Machine is Connected.Operator scope and official HTB metadata.High
Current active target IP is <TARGET>.Operator update plus enum/pwnbox-preflight-respawn.txt.High
Prior stale target IPs are <TARGET> and <TARGET>.Historical workspaces and operator update.High
Current Pwnbox is <<secret redacted>>@<TARGET>.Operator update plus enum/pwnbox-preflight-respawn.txt.High
The new Pwnbox has tun0 and a valid route to <TARGET>.enum/pwnbox-preflight-respawn.txtHigh
The respawn exposes 22/tcp, 80/tcp, and 443/tcp.enum/ping-common-respawn.txtHigh
connected.htb still redirects to /admin.enum/web-base-curl-respawn.txtHigh
The web product on the respawn is still FreePBX <TARGET>.enum/admin-source-respawn.txtHigh
/ucp, cxpanel, and the userman asset reference are still present.enum/admin-source-respawn.txtHigh
The exact <secret redacted> endpoint route still resolves on the respawn.enum/endpoint-watchtowr-shape-probe-respawn.txtHigh
The respawned foothold again lands as asterisk.loot/webshell-baseline.txt, loot/post-foothold-baseline.txt, loot/user.txtHigh
incrond runs as root and watches /usr/local/asterisk/incron with <secret redacted>.enum/incron-watcher-source.txt, enum/local-incron-path-check.txtHigh
sysadmin_manager passes watched-filename params into system("$hookfile $params") and does not block pipe ``.enum/sysadmin-hook-sources-live.txt, enum/sysadmin-contents-pipe-manual-asterisk.txt
A watched filename `sysadmin.dump-iptables.touch <secret redacted> created /<secret redacted> as root`.enum/local-incron-filename-pipe-marker.txt
A watched filename `sysadmin.dump-iptables.tar cf ROOTTAR root created /ROOTTAR` as a readable root-owned tar archive.enum/root-tar-seed.txt
root/root.txt was extracted from /ROOTTAR into local loot/root.txt.loot/root.txtHigh
The final webshell file was removed and the old URL returns 404 Not Found.loot/webshell-post-clean-status.txt, enum/webshell-body-after-cleanup.txtHigh
asterisk.cron_jobs has zero remaining watchTowr rows.enum/cron-jobs-cleanup-check.txtHigh

Ranked Hypotheses

RankPathEvidenceMissing proofCheapest validationStatus
1Reuse the validated endpoint <secret redacted> chain to regain transient asterisk execution on <TARGET>.enum/endpoint-watchtowr-shape-probe-respawn.txt, enum/admin-source-respawn.txt, enum/ping-common-respawn.txtActual foothold and recaptured user.txt on the respawn.Run the same public CVE chain from the new Pwnbox and confirm id; hostname; pwd as asterisk.Closed - succeeded
2Abuse the root-side sysadmin_manager watcher through watched-filename params that include an unfiltered shell pipe.enum/incron-watcher-source.txt, enum/sysadmin-hook-sources-live.txt, enum/sysadmin-contents-pipe-manual-asterisk.txt, enum/local-incron-filename-pipe-marker.txtA safe copy-out form that creates a readable root-owned artifact from /root.Use a single-command payload `tar cf ROOTTAR root, then read root/root.txt from the archive through the asterisk` foothold.
3If the pipe injection failed, revisit the dnsmasq/sysadmin mutation branch for a copy-out primitive.enum/sysadmin-selected-hooks.txt, enum/dnsmasq-hook-rootwatch-current-post.txtProof that a root-side restart path can execute a readable copy-out rather than only mutate permissions.Only revisit on a fresh respawn if the stronger filename-pipe branch no longer works.Closed - superseded
4Revisit aiovega, amportal, or localhost services only if the root-side filename injection disappears on a later respawn.Historical workspace plus local source-backed root hook evidenceFresh live proof on the active respawn that the stronger branch is gone.Keep as fallback only on future respawns.Closed - unnecessary

Decision Rule

The current target is the respawned <TARGET> instance. Historical work from <TARGET> remained advisory only until revalidated. The final active chain on <TARGET> was:

  1. Revalidate FreePBX endpoint route anchors.
  2. Reuse the endpoint CVE to regain transient asterisk execution.
  3. Prove the root-side sysadmin_manager watched-filename pipe injection with a harmless marker.
  4. Use the same root-side filename pipeline to create /ROOTTAR from /root.
  5. Read root/root.txt from that archive into loot/root.txt.
  6. Remove /ROOTTAR and validation artifacts.
  7. Verify there are no remaining watchTowr cron rows and remove the active webshell.

Memory Summary

Connected (<TARGET> respawn) reached COMPLETE by revalidating the FreePBX <TARGET> endpoint CVE foothold and then pivoting to a stronger local privesc than the earlier amportal/dnsmasq ideas. The durable lesson is that /usr/bin/sysadmin_manager on this image concatenates watched-filename params into system("$hookfile $params") while missing pipe |, and root-owned incrond watches /usr/local/asterisk/incron with <secret redacted>. A harmless watched filename proved root-side command execution, and a watched filename |tar cf ROOTTAR root produced a readable root-owned tar archive that allowed root/root.txt recovery through the existing asterisk foothold. Cleanup mattered: remove /ROOTTAR and validation markers, confirm no leftover watchTowr cron rows, delete the active webshell, and verify the old URL returns 404.