Извлечь сохраненный pre shared key l2tp windows

So I have set up L2TP VPN connection which uses preshared key. I remember both login and password but not preshared key. Is there any way in Windows XP/7 to recover it?

So I have set up L2TP VPN connection which uses preshared key. I remember both login and password but not preshared key. Is there any way in Windows XP/7 to recover it?

asked Feb 3, 2015 at 11:32

seeker's user avatar

2

This is a old question, but on Windows 7, if you used the OS to create the VPN, the information is stored there in a .Pbk’s file.

C:Users\AppDataRoamingMicrosoftNetworkConnectionsPbk

Other vendor(s) VPN software would use there own path/file format.

Like an example from the Sonicwall GVC client, which save it’s settings there in a .RCF file

C:UsersusernameAppDataRoamingSonicWallGlobal VPN Client
AppDataRoamingSonicWallGlobal VPN Client

answered Nov 27, 2018 at 13:22

yagmoth555's user avatar

yagmoth555yagmoth555

16.5k4 gold badges28 silver badges49 bronze badges

1

If you are using SonicWall’s Global VPN Client, as mentioned in @yagmoth555’s answer, you can find the Connections.rcf file at C:UsersusernameAppDataRoamingSonicWallGlobal VPN Client (source) which contains an encrypted version of the Pre-Shared Key.

The key is encrypted with the currently logged in user account and can be decrypted with the following python snippet:

import binascii
import win32crypt

psk_encrypted = "01000000D08C9DDF0..."

print(win32crypt.CryptUnprotectData(
    DataIn=binascii.unhexlify(psk_encrypted),
    OptionalEntropy=None,
    Reserved=None,
    PromptStruct=None,
    Flags=0))

Dependencies: pip install pywin32

Docs: http://timgolden.me.uk/pywin32-docs/win32crypt.html

answered Jan 20, 2020 at 8:12

Al Johri's user avatar

1

You might check whether it comes up with Nirsoft’s Dialupass utility which «enumerates all dialup/VPN entries on your computer» when you log in as an administrator.

answered Feb 3, 2015 at 22:42

fencepost's user avatar

fencepostfencepost

9726 silver badges10 bronze badges

1

I made a tool i can insert/start windows VPNS, i found vpns are stored in:

AppDataRoamingMicrosoftNetworkConnectionsPbkphonebook.bak

This tool works great, amazing even. but now i found that it doensn’t save the L2TP preshared key in this phonebook.

The key can normally found in adapter settings:

enter image description here

Is there any place in windows where i can find this stored key? and would there be a way to use a command to save/add this key to windows before i make the connection?

asked Oct 26, 2017 at 9:59

Joel Harkes's user avatar

I Havent found an answer so far. starting the pbk creates an adapter but you can’t really seem to change anything.

The alternative solution i found was using Powershell for this: https://technet.microsoft.com/en-us/library/jj554824(v=wps.630).aspx

Here you seem to be able to specify everything.

I Guess the program routine will be:

  • Check if vpn with same name installed: delete it
  • Create new vpn
  • Start vpn, wait until done
  • Delete vpn.

Powershell command will be like:

Add-VpnConnection test -L2tpPsk <PreSharedKeyHere>

answered Oct 29, 2017 at 13:51

Joel Harkes's user avatar

Joel HarkesJoel Harkes

1311 gold badge1 silver badge7 bronze badges

by Vlad Constantinescu

Vlad might have a degree in Animal Husbandry and Livestock Management, but he’s currently rocking anything software related, ranging from testing programs to writing in-depth reviews about them…. read more


Published on September 21, 2020

  • Nowadays, VPNs have become somewhat of an epitome of privacy and security. But that would’ve been impossible without strong security protocols.
  • For instance, certain VPN protocols involve using a Pre-Shared Key (PSK), which can be a great extra layer of security.
  • Check out our VPN Section for the latest VPN news, tools, and guides.
  • Visit our Security Hub to learn more about keeping your online identity safe.

Pre-Shared Key (PSK)

Nowadays, VPNs have become somewhat of an epitome of privacy and security. Of course, this type of service wouldn’t have reached this level of trust, was it not for strong security measures.

If you’re familiar with VPNs, you probably know that they encrypt traffic. More so, you can’t just waltz yourself inside a VPN server, as you’d most likely need some sort of authentication.

Most services tackle this issue by making you create accounts, which are subsequently whitelisted, so you can access the VPN without an issue. But there’s way more to it than sees the eye.

Pre-shared keys (PSK), for instance, are a great example of additional security measures that you’ve probably never even heard of.

What is a Pre-Shared Key?

A Pre-Shared Key (PSK) is a string of characters (so basically a password) that various services, including VPNs, rely on as an authentication method. However, note that PSKs are not exactly secure by themselves.

After its creation, the PSK needs to be shared with every device that has to use it. However, great caution must be practiced upon sharing the PSK, as revealing it to third-parties might easily jeopardize the security of your connection.

Furthermore, since the PSK needs to be exactly the same on all devices, it’s like a password that you use for multiple accounts (bad idea). All it takes is one device to be compromised for the PSK to become useless, or rather dangerous.

For those reasons, Pre-Shared Keys are used in conjunction with other similar security measures, such as traditional usernames and passwords.

Also, to increase their level of security, they must be long and random, to prevent them from being cracked by brute-forcing.

How to get a preshared key for your VPN?

There’s a lot of confusion when it comes to PSK. Most users believe that you have to acquire the PSK from a special place, but in fact, the PSK can be anything you want if you’re a VPN host.

On the other hand, if you’re about to connect to a VPN server, you might need a PSK, which you can get by asking the VPN server host.

For instance, your workplace might have a dedicated VPN that you can connect to, in order to be on the same network with your colleagues and share company resources. If that’s the case, just ask the network administrator for the Pre-Shared Key.

Last, but not least, you can use third-party tools such as password generators to create complicated keys. They’re usually more secure than coming up with your own password, which, let’s be serious, is almost always something easy to remember.

How to find Shared Secret VPN Windows

You can configure a Pre-Shared Key easily, especially if you’re using Windows’ built-in VPN feature. We’ll teach you how to find the Pre-Shared Key in a few easy steps:

  1. Press the Win key on your keyboard
  2. Type VPN
  3. Click VPN settingsStart menu VPN settings
  4. Select your secured VPN connection from the list
  5. Click Advanced options
  6. Press the Edit button
  7. Select L2TP/IPsec with pre-shared key from the VPN type menuL2TP edit VPN connection
  8. Type the PSK in the appropriate field

Alternatively: create a new VPN connection, if necessary, but make sure to choose L2TP/IPsec as the VPN type if your network uses a Pre-Shared Key.

If you were looking for ways to reveal a hidden PSK from an existing VPN connection, there’s no way to do that. Back in the day, you could’ve used an asterisk password revealer, or something similar.

However, those tools haven’t been working for a while, so there’s no way to reveal a PSK that’s been already saved to a VPN connection.

The VPN shared secret is incorrect

If your Pre-Shared Key is not typed correctly in the field we’ve mentioned above, you won’t be able to establish the connection. This could happen for two reasons:

  • You didn’t copy/paste the PSK correctly within the appropriate field
  • The VPN server administrator changed the key, and you need to acquire the new one

Can’t connect to L2TP VPN on Windows 10? Check out our guide to fix the issue quickly.


It’s not uncommon to paste your password all wrong, it happens to everyone once in a while. Just make sure you didn’t include any spaces before or after the PSK.

Final thoughts on VPN Pre-Shared Keys

All things considered, PSKs are quite useful tools that can help you secure a server with an additional security layer. Keep in mind that a PSK is not even near enough to secure things, especially given that multiple devices can use it.

However, setting a long, random PSK and changing it on a regular basis can definitely help you increase the security of your VPN server.

Your connection is not secure — websites you visit can find out your details:

  • Your IP
  • Your IP Address:
    loading

Companies can sell this information, alongside your location and internet provider name, and profit from it by serving targeted ads or monitoring your data usage.

We recommend Private Internet Access, a VPN with a no-log policy, open source code, ad blocking and much more; now 79% off.

newsletter icon

Newsletter

by Vlad Constantinescu

Vlad might have a degree in Animal Husbandry and Livestock Management, but he’s currently rocking anything software related, ranging from testing programs to writing in-depth reviews about them…. read more


Published on September 21, 2020

  • Nowadays, VPNs have become somewhat of an epitome of privacy and security. But that would’ve been impossible without strong security protocols.
  • For instance, certain VPN protocols involve using a Pre-Shared Key (PSK), which can be a great extra layer of security.
  • Check out our VPN Section for the latest VPN news, tools, and guides.
  • Visit our Security Hub to learn more about keeping your online identity safe.

Pre-Shared Key (PSK)

Nowadays, VPNs have become somewhat of an epitome of privacy and security. Of course, this type of service wouldn’t have reached this level of trust, was it not for strong security measures.

If you’re familiar with VPNs, you probably know that they encrypt traffic. More so, you can’t just waltz yourself inside a VPN server, as you’d most likely need some sort of authentication.

Most services tackle this issue by making you create accounts, which are subsequently whitelisted, so you can access the VPN without an issue. But there’s way more to it than sees the eye.

Pre-shared keys (PSK), for instance, are a great example of additional security measures that you’ve probably never even heard of.

What is a Pre-Shared Key?

A Pre-Shared Key (PSK) is a string of characters (so basically a password) that various services, including VPNs, rely on as an authentication method. However, note that PSKs are not exactly secure by themselves.

After its creation, the PSK needs to be shared with every device that has to use it. However, great caution must be practiced upon sharing the PSK, as revealing it to third-parties might easily jeopardize the security of your connection.

Furthermore, since the PSK needs to be exactly the same on all devices, it’s like a password that you use for multiple accounts (bad idea). All it takes is one device to be compromised for the PSK to become useless, or rather dangerous.

For those reasons, Pre-Shared Keys are used in conjunction with other similar security measures, such as traditional usernames and passwords.

Also, to increase their level of security, they must be long and random, to prevent them from being cracked by brute-forcing.

How to get a preshared key for your VPN?

There’s a lot of confusion when it comes to PSK. Most users believe that you have to acquire the PSK from a special place, but in fact, the PSK can be anything you want if you’re a VPN host.

On the other hand, if you’re about to connect to a VPN server, you might need a PSK, which you can get by asking the VPN server host.

For instance, your workplace might have a dedicated VPN that you can connect to, in order to be on the same network with your colleagues and share company resources. If that’s the case, just ask the network administrator for the Pre-Shared Key.

Last, but not least, you can use third-party tools such as password generators to create complicated keys. They’re usually more secure than coming up with your own password, which, let’s be serious, is almost always something easy to remember.

How to find Shared Secret VPN Windows

You can configure a Pre-Shared Key easily, especially if you’re using Windows’ built-in VPN feature. We’ll teach you how to find the Pre-Shared Key in a few easy steps:

  1. Press the Win key on your keyboard
  2. Type VPN
  3. Click VPN settingsStart menu VPN settings
  4. Select your secured VPN connection from the list
  5. Click Advanced options
  6. Press the Edit button
  7. Select L2TP/IPsec with pre-shared key from the VPN type menuL2TP edit VPN connection
  8. Type the PSK in the appropriate field

Alternatively: create a new VPN connection, if necessary, but make sure to choose L2TP/IPsec as the VPN type if your network uses a Pre-Shared Key.

If you were looking for ways to reveal a hidden PSK from an existing VPN connection, there’s no way to do that. Back in the day, you could’ve used an asterisk password revealer, or something similar.

However, those tools haven’t been working for a while, so there’s no way to reveal a PSK that’s been already saved to a VPN connection.

The VPN shared secret is incorrect

If your Pre-Shared Key is not typed correctly in the field we’ve mentioned above, you won’t be able to establish the connection. This could happen for two reasons:

  • You didn’t copy/paste the PSK correctly within the appropriate field
  • The VPN server administrator changed the key, and you need to acquire the new one

Can’t connect to L2TP VPN on Windows 10? Check out our guide to fix the issue quickly.


It’s not uncommon to paste your password all wrong, it happens to everyone once in a while. Just make sure you didn’t include any spaces before or after the PSK.

Final thoughts on VPN Pre-Shared Keys

All things considered, PSKs are quite useful tools that can help you secure a server with an additional security layer. Keep in mind that a PSK is not even near enough to secure things, especially given that multiple devices can use it.

However, setting a long, random PSK and changing it on a regular basis can definitely help you increase the security of your VPN server.

Your connection is not secure — websites you visit can find out your details:

  • Your IP
  • Your IP Address:
    loading

Companies can sell this information, alongside your location and internet provider name, and profit from it by serving targeted ads or monitoring your data usage.

We recommend Private Internet Access, a VPN with a no-log policy, open source code, ad blocking and much more; now 79% off.

newsletter icon

Newsletter

Windows 10 поставляется с собственным VPN-клиентом, который вы можете настроить всего в несколько кликов, указав такие данные как имя подключения, адрес сервера, логин и пароль пользователя, а также при желании протокол безопасности. Всё бы вроде и хорошо, но если вы вдруг забудете пароль, пожелав создать аналогичное VPN-подключение на другом устройстве, то уже не сможете этого сделать.

А всё потому, что Windows 10 предпочитает держать пароль в секрете и, если вы откроете параметры подключения, то вместо пароля увидите скрывающие его точки.

Параметры VPN

Многие, наверное, просто решат создать новое подключение с другим паролем, но если бы они знали, что есть такая утилита как Dialupass, то не стали бы лишний раз морочить себе голову.

Эта маленькая портативная программка от NirSoft позволяет вытаскивать хранящиеся в недрах системы пароли VPN и Dialupass делает это буквально одним кликом мыши.

Скачайте архив с утилитой с сайта разработчика www.nirsoft.net/utils/dialupass.html (там же найдете файл русификатора), распакуйте и запустите ее исполняемый файл.

В открывшемся окошке программа выведет все данные вашего VPN-соединения, среди которых будут логин и пароль в открытом виде, хост, файл адресной книги и прочая дополнительная информация.

Dialupass

Клик по строке с именем элемента открывает компактное окошко с данными, нажатие второй слева кнопки на панели инструментов сохраняет данные в текстовый лог, а нажатием первой вызывает диалоговое окошко извлечение паролей из телефонной книги RBK и списки паролей из кустов реестра удаленного компьютера.

Свойства

Может быть, кому-нибудь из вас пригодится и эта функция.

Дополнительные параметры

И напоследок один маленький совет, скорее даже не совет, а предупреждение.

Забыть пароль VPN-соединения это одно, а удалить VPN-соединение это уже совсем другое. Если вы его удалите, то Dialupass вам никак не поможет, не забывайте об этом.

Загрузка…

Понравилась статья? Поделить с друзьями:
  • Извините не удалось сохранить фото windows 10
  • Избранные фото windows 10 где найти
  • Иероглифы при установке программ windows 10
  • Иероглифы вместо русских букв windows 7 в ворде
  • Иероглифы вместо русских букв windows 10 в играх