Click here to Skip to main content
15,887,428 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to retrieve username and password of pppoe internet connection using WinAPI? which functions should be used to do this?
Posted
Comments
Sergey Alexandrovich Kryukov 23-Oct-14 2:05am    
There is no such function. To start with, there are no cases when a password can be retrieved or even known to anyone except the person who created it. It would be too unsafe and absolutely not needed for authentication. Surprised? :-)
—SA
Igor-84 23-Oct-14 2:23am    
And how Dialupas program gets the username and password in this case?
Richard MacCutchan 23-Oct-14 4:16am    
You can't; it would be a serious breach of security to allow anyone to access this information.

 
Share this answer
 
I don't think you'll find anything on MSDN. It is possible to do this but the mechanism for storing username and password varies by modem.

Here's a blog that describes several utilities to do this:

How to recover lost ADSL password or other ISP password

Edit: the previous draft contained a link to a similar utility on a web site with domain named "hack-tools". I think Richard was objecting to this (see comments below).

The assumption is the username / password is stored on the host PC in a file or the registry. It might not be.

The following exercise should locate the information:

Export your registry to a text file.

Change your PPPoE user name or password through the PPPoE client software.

Re-Export your registry to a different text file.

Compare the two files (eg. use a tool like WinMerge).

Search your disk for any files with a modified time stamp in between the time stamps of the two exported registry files.

If the information was found in a file, use the Windows file I/O or standard C I/O functions.

Opening a File for Reading or Writing

If the information is in the registry, use this API:

Registy Reference

Good luck.
 
Share this answer
 
v2
Comments
Richard MacCutchan 27-Oct-14 13:59pm    
Please do not post information about hacking.
[no name] 27-Oct-14 18:36pm    
Hi Richard;

Define hacking. Is this a bad thing?

You replied above this can't be done. I've posted a link that shows it can be done. Maybe you're offended that link contains the work "hack" in the domain name. Here's another link that doesn't.

http://www.nirsoft.net/utils/router_password_recovery.html

The OP asked how this might be done in Windows API. If the data is in the registry or file system, it most certainly falls under the Windows API.

If you're implying the OP has ill intent, take that up with OP.
Richard MacCutchan 28-Oct-14 4:31am    
No, I object to your answer. If people are asking how to recover passwords then they may well be wanting that information for illegal purposes. This site does not condone such activities.
[no name] 28-Oct-14 18:21pm    
Sounds like you are judging myself and the OP to have criminal intent. That's very offensive, Richard. I strongly disagree with your logic.

People who shy away from security issues are doomed to suffer from poor security. There are plenty of articles here to underscore that point.

http://www.codeproject.com/Articles/11443/DPAPI-and-Triple-DES-A-powerful-combination-to-sec

Do you know how safely store data on your personal device? Unless you're an expert in cryptography, that can be very difficult. Here's an API you and the OP can use to protect your data. It's what some of these lazy vendors should be using.

http://msdn.microsoft.com/en-us/library/ms995355.aspx

It's super easy. Look for CryptProtectData and CryptUnprotectData.

The resulting file is effectively DRM'd to the local machine (or local machine and logged in user). Switch to a different user id, or copy to a different machine and the file won't work.

Please don't go around insinuating your fellow CPers are crooks. It's rude, offensive, and just plain wrong.
Richard MacCutchan 29-Oct-14 4:23am    
I'm not judging. I am just saying that people who ask for methods to find or decrypt passwords may have innocent intent, but publishing that information makes it available to those who do not. And if the OP is innocent, and owns the system in question, then why does he (or she) need some code to discover the username and password? Questions like this are always suspicious.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900