nighthawk - SecDojo - Talk2me
Description
Two hosts, two different bug classes: an SCF file that leaks NetNTLM over SMB, then IIS short-name disclosure driving an NTLM relay.
Enumerating smb
10.8.0.2 allows anonymous SMB — a share with no authentication in front of it.
Getting files from smb shares


Checking content of the file

Stealing ntlm hash
An NTLM-theft generator builds the .scf file.
The .scf is dropped into the share. When Explorer renders the folder it fetches the icon over SMB and leaks NetNTLM.
Getting ntlm through responder

Administrator::WIN-8EHFSR9B2UL:c4cb33c0b8c678e8:0C07E81A5C0E989E932403EB8C150E3A:0101000000000000009F07E24F0DDC01DF8092E45F7FE3B50000000002000800580037004C00510001001E00570049004E002D0058004200350055004E00360039003500570051004D0004003400570049004E002D0058004200350055004E00360039003500570051004D002E00580037004C0051002E004C004F00430041004C0003001400580037004C0051002E004C004F00430041004C0005001400580037004C0051002E004C004F00430041004C0007000800009F07E24F0DDC010600040002000000080030003000000000000000000000000030000023435054D645F17359EBBA6E9005CAFB4E373D4A2E7543E03BC6B956912D55A70A0010000000000000000000000000000000000009001A0063006900660073002F00310030002E0038002E0030002E003400000000000000000000000000
Crack password

P@ssw0rd
Access

10.8.0.101 — IIS short name and an NTLM relay
10.8.0.101 runs IIS 8.5.
Enumerating using shortscan
Shortscan says the tilde enumeration is exposed.
shortscan recovers the 8.3 names.
Open on browser

Responder up, waiting for an SMB or HTTP callback.
The short name is requested over HTTP, and the DC’s machine account connects back with NTLM.
Check responder
Callback captured — WEB-SERVICE’s NetNTLMv2, with the password in the same output:
WEB-SERVICE::WIN-0CHLK1AJTI8:fa19ffb548a0424e:5a841a603460e7512e9f84d7c3996646:0101000000000000007878cdb764dd013cd96e12d133550f0000000002000800560059005800360001001e00570049004e002d00450036003100370042005700440052005a004700300004003400570049004e002d00450036003100370042005700440052005a00470030002e0056005900580036002e004c004f00430041004c000300140056005900580036002e004c004f00430041004c000500140056005900580036002e004c004f00430041004c0007000800007878cdb764dd010600040002000000080030003000000000000000000000000030000072e76ff7c31b5a9ea91686a21dd0ea78fab6c21fb01af043ddae3b5fae8a7cd50a0010000000000000000000000000000000000009001a0063006900660073002f00310030002e0038002e0030002e003300000000000000000000000000:p@ssw0rdadmin
Cracked: p@ssw0rdadmin.
Administrator on .101.
Takeaways
- SCF/URL/LNK files in a writable share leak NetNTLM the moment a user browses the folder.
- IIS tilde (short name) disclosure enumerates files you cannot list.
- Machine-account NTLM is relayable when signing is not enforced.