Skip to content

Sysco Walkthrough

Lab Name: Sysco
Difficulty: Medium
Author: lainkusanagi
Lab Link: Sysco

Sysco is a managed service provider that has asked us to test its Active Directory domain from outside the network. We need to gain a foothold, move laterally, and reach Administrator while evading antivirus detection.

We start without credentials, use AS-REP roasting to gain a foothold, move between accounts, and use delegated control of a GPO to run code with elevated privileges.


We scan for open ports to find services we can enumerate.

image.png

  • Several ports are open.
  • The most interesting ports identified are 80 (HTTP), 445 (SMB), and 389 (LDAP).

image.png

  • The domain name and DNS domain name were identified.
  • We can add these entries to /etc/hosts, which is useful for Kerberos-based enumeration and attacks, and also makes it easier to work with hostnames instead of raw IP addresses.

Since port 80 is open, we can enumerate the HTTP service to check for a potential initial foothold.

image.png

The web application reveals useful information:

Employee names:

image.png

  • We can turn the employee names into a username list for password spraying.

Technologies Used:

image.png

image.png

  • Apache version: 2.4.58
  • PHP version: 8.2.12
  • We have identified the web server and its technologies. We can now look for hidden directories.

We use gobuster to look for hidden or sensitive endpoints.

Terminal window
gobuster dir -u http://sysco.local -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-small.txt
Output
===============================================================
Gobuster v3.8.2
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url: http://sysco.local
[+] Method: GET
[+] Threads: 10
[+] Wordlist: /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-small.txt
[+] Negative Status codes: 404
[+] User Agent: gobuster/3.8.2
[+] Timeout: 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
# license, visit http://creativecommons.org/licenses/by-sa/3.0/ (Status: 403) [Size: 300]
assets (Status: 301) [Size: 335] [--> http://sysco.local/assets/]
forms (Status: 301) [Size: 334] [--> http://sysco.local/forms/]
examples (Status: 503) [Size: 400]
licenses (Status: 403) [Size: 419]
*checkout* (Status: 403) [Size: 300]
phpmyadmin (Status: 403) [Size: 419]
webalizer (Status: 403) [Size: 419]
*docroot* (Status: 403) [Size: 300]
* (Status: 403) [Size: 300]
con (Status: 403) [Size: 300]
**http%3a (Status: 403) [Size: 300]
Progress: 41798 / 81642 (51.20%)
aux (Status: 403) [Size: 300]
*http%3a (Status: 403) [Size: 300]
**http%3a%2f%2fwww (Status: 403) [Size: 300]
roundcube (Status: 301) [Size: 338] [--> http://sysco.local/roundcube/]
Progress: 81641 / 81641 (100.00%)
===============================================================
Finished
===============================================================
  • This scan took a hell of a long time. While it ran, I built a username list, performed AS-REP roasting, and recovered valid credentials.
  • It also found forms and Roundcube endpoints to investigate.

Username Preparation:

We need to turn the employee names from the website into possible domain usernames. A small Python script can generate the formats.

Save and run this script:

names = ["Greg Shields", "Sarah Johnson", "Jack Dowland", "Lainey Moore"] ### UserNames
for name in names:
first, last = name.split()
patterns = [
f"{first}",
f"{first}.{last}",
f"{first[0]}.{last}",
f"{first}{last}",
f"{last}.{first}",
f"{first}_{last}"
]
for p in patterns:
print(p)
  • I wrote a quick-and-dirty Python script to generate username formats. We add the employee names to its array and run it to create the list.

image.png

  • The resulting list is used for password spraying attempts.

Executing Password Spray

image.png

  • No luck with the password spray. We can check for AS-REP-roastable users next.

We use nxc to check the username list for AS-REP-roastable accounts. This needs valid usernames, but no password.

image.png

  • Jack.Downland is a valid username with Kerberos pre-authentication disabled. We capture the user’s Kerberos hash and try cracking it.

Let’s save the hash to a text file and use Hashcat with the -m 13100 mode to crack it and obtain our initial foothold.

image.png

image.png

  • We cracked the password!
  • Username: Jack.Dowland
  • Password: musicman1

Verify Access

image.png

  • We can authenticate as Jack.Dowland with the recovered password.

Dumping Domain Objects:

image.png

Let’s ingest this data into BloodHound to visualize any potential attack paths.

  • No interesting attack paths were identified using the recovered credentials.
  • I also tested SMB access with the same password, but it did not provide any additional access or useful information.

While I was still enumerating the environment, the Gobuster scan finished and revealed a Cisco email endpoint with a Roundcube webmail interface.


Using the valid credentials for Jack.Download, we can now access the webmail service.

image.png

image.png

  • We found a new password hash that appears to be MD5. Let’s crack it using Hashcat.

We use Hashcat with -m 500 for this MD5 hash.

Terminal window
hashcat -m 500 hash3.txt ./Wordlist/crackstation-human-only.txt
Output
hashcat (v7.1.2) starting
mERr$isugnYiHsjHT.i.tc2GDY.:Chocolate1

We try the password across our user list. It likely belongs to lainey.moore, but other accounts may reuse it.

image.png

The credentials work for Lainey.Moore!

  • We check Lainey.Moore’s permissions in the nxc data already imported into BloodHound.

image.png

  • We can see that this user is a member of the Remote Management Users group, which allows us to use Evil-WinRM to access the desktop and continue the lab.

image.png

  • We logged in as Lainey.moore and can look for flags.

image.png

  • We found and submitted the user flag!

3.7 Session & User Enumeration as Lainey.Moore

Section titled “3.7 Session & User Enumeration as Lainey.Moore”

Checking for other users currently logged into the system.

image.png

We found another user on the system, greg.shields. Let’s see whether we can perform horizontal escalation.

image.png

image.png

  • We downloaded and analyzed the .lnk and .txt files, which revealed some interesting information. The note contained the following details:

    Notes:

    • SSH to the 10.0.0.1 router using credentials provided by sysadmin to update ACLs for the HS company
    • Fix configuration errors provided by Tier 1 for Minicorp’s new office router

    The note, .lnk file, and putty.exe suggest that the environment uses SSH. We check for SSH private keys.

    No SSH private keys were found on the system.

  • Since .lnk files aren’t natively readable in a Linux environment, I did a quick search and found a helpful reference explaining how to extract information from Windows shortcut files on Linux.

Terminal window
lnkinfo Putty\ -\ HS\ Router\ login.lnk
Output
lnkinfo 20240423
Windows Shortcut information:
Contains a link target identifier
Contains a relative path string
Contains a working directory string
Contains a command line arguments string
Number of data blocks : 2
Link information:
Creation time : Oct 18, 2025 05:24:50.324874400 UTC
Modification time : Oct 18, 2025 05:24:54.226696600 UTC
Access time : Oct 18, 2025 05:24:54.226696600 UTC
File size : 1709672 bytes
Icon index : 0
Show Window value : 0x00000001
Hot Key value : 0
File attribute flags : 0x00000020
Should be archived (FILE_ATTRIBUTE_ARCHIVE)
Drive type : Fixed (3)
Drive serial number : 0x503f9bb2
Volume label :
Local path : C:\\Users\\lainey.moore\\Documents\\putty.exe
Relative path : .\\putty.exe
Working directory : C:\\Users\\lainey.moore\\Documents
**Command line arguments : -ssh netadmin@10.0.0.1 -pw 5y5coSmarter2025!!!**
Link target identifier:
Shell item list
Number of items : 3
Shell item: 1
Item type : Root folder
Class type indicator : 0x1f (Root folder)
Shell folder identifier : 20d04fe0-3aea-1069-a2d8-08002b30309d
Shell folder name : My Computer
Shell item: 2
Item type : Volume
Class type indicator : 0x2e (Volume)
Shell item: 3
Item type : File entry
Class type indicator : 0x32 (File entry: File)
Name : putty.exe
Modification time : Oct 18, 2025 05:24:56
File attribute flags : 0x00000020
Should be archived (FILE_ATTRIBUTE_ARCHIVE)
Extension block: 1
Signature : 0xbeef0004 (File entry extension)
Long name : putty.exe
Creation time : Oct 18, 2025 05:24:52
Access time : Oct 18, 2025 05:24:56
NTFS file reference : MFT entry: 101460, sequence: 3
Data block: 1
Signature : 0xa0000003 (Distributed link tracker properties)
Machine identifier : dc01
Droid volume identifier : 067cc002-d120-431f-a9e5-a0e1c87529af
Droid file identifier : c7fd1387-abd9-11f0-8068-000c296ab891
Birth droid volume identifier : 067cc002-d120-431f-a9e5-a0e1c87529af
Birth droid file identifier : c7fd1387-abd9-11f0-8068-000c296ab891
Data block: 2
Signature : 0xa0000009 (Metadata property store)
Property: {dabd30ed-0043-4789-a7f8-d013a4736622}/100 (PKEY_ItemFolderPathDisplayNarrow)
Value (0x001f) : Documents (C:\Users\lainey.moore)
Property: {b725f130-47ef-101a-a5f1-02608c9eebac}/10 (PKEY_ItemNameDisplay)
Value (0x001f) : putty.exe
Property: {b725f130-47ef-101a-a5f1-02608c9eebac}/15 (PKEY_DateCreated)
Value (0x0040) : Oct 18, 2025 05:24:52.000000000 UTC
Property: {b725f130-47ef-101a-a5f1-02608c9eebac}/12 (Unknown)
Value (0x0015) : 1709672
Property: {b725f130-47ef-101a-a5f1-02608c9eebac}/4 (PKEY_ItemTypeText)
Value (0x001f) : Application
Property: {b725f130-47ef-101a-a5f1-02608c9eebac}/14 (PKEY_DateModified)
Value (0x0040) : Oct 18, 2025 05:24:54.226696600 UTC
Property: {28636aa6-953d-11d2-b5d6-00c04fd918d0}/30 (PKEY_ParsingPath)
Value (0x001f) : C:\\Users\\lainey.moore\\Documents\\putty.exe
Property: {446d16b1-8dad-4870-a748-402ea43d788c}/104 (System.VolumeId)
Value (0x0048) : 17494c6c-6198-4a74-bd1e-2c51cbc27f96
  • We recovered another password for the netadmin account: 5y5coSmarter2025!!!.

Now that we have a new password, let’s spray it across our list of identified usernames.

While checking Lainey.Moore’s sessions, we also noticed a desktop account for greg.shields, giving us another user to investigate.

image.png

image.png

  • BloodHound shows greg.shields has GenericAll over a domain policy. We can abuse that GPO permission to reach Administrator.

Since we now have access to the Default Domain Policy through greg.shields, we can abuse it using pyGPOAbuse to create a new user account and add that account to the Administrators group. This works by creating an immediate scheduled task that runs as SYSTEM for a computer GPO, or as the logged-in user for a user GPO.

Using the permissions available to greg.shields, we executed GPOddity to modify the Default Domain Policy and add a new user with administrative privileges.

image.png

We force a policy update to apply the GPO changes and administrative group membership immediately.

image.png

After the update, the new user belongs to the local Administrators group. We can log in with elevated privileges and retrieve the root flag.

image.png

We retrieved and submitted the root flag.


  • We used public information to generate possible domain usernames, including Jack.Downland, lainey.moore, and greg.shields.
  • Jack.Downland had Kerberos pre-authentication disabled. We used AS-REP roasting and cracked the hash for an initial foothold.
  • Credential reuse and session enumeration led to access as lainey.moore and a path to greg.shields.
  • BloodHound showed greg.shields had GenericAll over Default Domain Policy.
  • We used the GPO to create an administrative account and forced a policy update, giving us Domain Administrator access and the root flag.

Thanks to lainkusanagi and the Hack Smarter Labs team for creating a wonderful lab.