Lesson 8.2

Following lateral movement

Follow an attacker from one host to the next in Arcsentry: trace an account across hosts, resolve source addresses to hosts, and confirm the hop from both sides.

15 minEveryone
At a glance for experienced analysts
  • Start from the account: filter Sessions by user and set the scope to All evidence.
  • A source address is resolved to a host only when an evidence item recorded that address as its own. Otherwise it stays an address.
  • Confirm from the other side in Hunt: the source host's outgoing connection at the same time.

On the practice case the attacker reached web01 through the website. The data they took was on db01. This lesson follows the hop.

1. Follow the account

In Sessions, set the scope to All evidence and filter to the user deploy. The graph draws the path:

deploy's sessions across both hosts
deploy on web01, then on db01, with 10.20.1.10 and 192.0.2.10 as sources.
Time (UTC) Host What
02:58:06 web01 su from www-data to deploy
02:58:37 web01 deploy runs sudo to root
03:14:03 db01 SSH logon as deploy, from 10.20.1.10, inbound
03:14:40 db01 sudo mkdir -p /tmp/.d
03:15:02 db01 sudo mysqldump --all-databases

2. Resolve the source

The logon on db01 came from 10.20.1.10. Arcsentry links a source address to a host only by an exact match with something the host recorded about itself: its interface addresses, names, or a DHCP lease. Here, web01’s /etc/hosts says 10.20.1.10 is web01.halden.internal.

When no evidence item claims an address, it stays an address in the graph. That is correct: you have not collected the machine it belongs to.

3. Confirm from the other side

A hop is strongest when both hosts record it. Pivot to web01 in Hunt around the time of the logon and look for the outgoing side. Search for db01’s address:

search_all "10.20.1.20"

Patterns to look for

Move Target side Source side
SSH sshd logon in auth or syslog outgoing connection, ssh in shell history or auditd
RDP Logon type 10, RDP session events mstsc, outgoing 3389
SMB and remote services Logon type 3, service installation outgoing 445, admin share access
Stolen credentials Logon from an unusual source or at an unusual time the place the credentials were found

Check yourself

1. A logon to db01 comes from 10.20.1.10. How do you know which machine that is?
2. You see the logon on the target but nothing on the source host. What do you write?

Try it

Confirm the hop from web01 to db01 from web01's side. What does web01 record about connections to db01 (10.20.1.20) that night, and at what time?

Show the answer

web01's kern.log has a UFW audit line at 03:05:03 UTC: an outgoing TCP SYN from 10.20.1.10 to 10.20.1.20 on port 3306, the MySQL port. Then at 03:14:03 db01 records deploy's SSH logon from 10.20.1.10. Search web01 with search_all "10.20.1.20" to find it.

Progress is saved in this browser only.