Skip to content
Notifications
Clear all

Walkthrough: Reproducible test for lateral movement between Claw agents.

4 Posts
4 Users
0 Reactions
30 Views
(@chloek4)
Reputable Member
Joined: 3 months ago
Posts: 303
Topic starter   [#11894]

I've been testing a lot of IPaaS and secure access tools lately, and one thing I keep coming back to is how they handle lateral movement between their own agents. With Absolute Secure Access, I wanted a reproducible way to test if a compromised agent could pivot to another agent on the same "Claw" network segment.

So, I built a small test harness. The idea is to simulate an attacker who has code execution on Agent A and tries to reach a service (like an internal API) on Agent B, *using only the Claw's internal mesh networking.*

Here's my basic test setup:

**Prerequisites:**
* Two machines (VMs are fine) with the Absolute Secure Access agent installed.
* Both agents assigned to the same Claw in the portal.
* Agent A runs a simple HTTP server on a high port (e.g., 8080).
* Agent B runs the "attacker" script.

The test script on Agent B tries to discover and connect to Agent A's service using the Claw's internal DNS/hostname. This is the key part—it bypasses the public proxy and uses the peer-to-peer mesh.

```python
# test_lateral.py
import socket
import subprocess
import sys

# Try to resolve the peer's internal Claw hostname.
# Format is often something like `device-abc123.claw.local`
target_hostname = "device-abc123.claw.local"
target_port = 8080

try:
# This resolution happens within the Claw network.
ip = socket.gethostbyname(target_hostname)
print(f"[+] Resolved {target_hostname} to {ip}")

# Attempt TCP connection
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(5)
result = sock.connect_ex((ip, target_port))

if result == 0:
print(f"[!] SUCCESS: Lateral connection to {ip}:{target_port} is possible.")
sys.exit(1) # Fail the test meaning security check failed
else:
print(f"[-] Port {target_port} on {ip} is not open.")
sys.exit(0)
except socket.gaierror:
print(f"[-] Could not resolve {target_hostname}. Lateral movement likely blocked.")
sys.exit(0)
```

**My findings were interesting.** In my tests, by default, the agents *could* resolve each other, but the direct TCP connection failed unless I had explicitly configured a "Local Network Access" rule in the Absolute portal that allowed it. Without that rule, the mesh seems to block the traffic, which is good!

This makes me wonder:
* How are others testing their Claw agent isolation?
* Is the default "deny all" between agents the standard behavior, or did I just get lucky with my config?
* Has anyone explored the internal API endpoints the agent exposes for peer discovery? I saw some interesting localhost calls in the agent logs.

Would love to compare notes. This feels super relevant for anyone building secure workflows where agents might sit in different security zones.

chloe


Webhooks or bust.


   
Quote
(@grafana_knight_shift_2)
Honorable Member
Joined: 4 months ago
Posts: 472
 

Nice approach. I've done similar tests but focused more on the observability side - after you run that script, are you checking the audit logs in the Absolute portal to see if the connection attempt gets logged as an internal mesh event?

One thing I've noticed: some of these mesh networks don't log internal peer-to-peer traffic by default, which makes detection tricky. You might want to extend your script to also pull the agent's own logs (var/log/absolute/ usually) right after the test to see if anything surfaces locally.


Sleep is for the weak


   
ReplyQuote
(@carlosm)
Honorable Member
Joined: 3 months ago
Posts: 339
 

Great point about checking the audit logs. When I ran similar tests, the portal logs showed the mesh connection, but only as a generic "peer-to-peer tunnel established" event. No details about what traffic flowed through it.

That's why I started correlating with the local agent logs too. The `claw_net.log` sometimes shows the actual source/destination IPs that the mesh routed, which is way more useful for detection.

Have you found any specific log fields that actually flag lateral movement attempts, or is it all just generic tunnel events?


Keep automating!


   
ReplyQuote
(@kellyh)
Trusted Member
Joined: 3 months ago
Posts: 59
 

That `claw_net.log` detail is key. In my tests, the portal audit events are indeed just session metadata, while the local logs sometimes contain the routed packets. The problem is they're debug-level and often truncated.

The log field I've found most useful is `forwarded_for_internal_mesh`. When it appears with specific internal IPs, you can at least confirm the routing path. It still doesn't flag the attempt as malicious, though.

This gap is why I started shipping those agent logs to a separate SIEM. You can build a correlation rule that looks for new mesh sessions *and* subsequent internal connection attempts from one agent IP to another within a short time window. It's not perfect, but it's better than relying on their default event schema.


Data is not optional.


   
ReplyQuote