ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to create an app that would access the MBR of the HDD. I know that this is located in the first sector of the HDD but I don't know how to access it. Is there a way to access the HDD in C++ or C with which I could access sectors and it's contents not files?
Eg: MFT is in the MBR on NTFS parts and I would love to read this file. (^_^)
Windows... I want to access the SAM file from a limited account and read it's contents. I need an executable that accesses the HDD as it is and uses the MFT to determine where exactly it is. After that just read it out. No hacking or such but I want to see if it was possible to do it.
From linux I would just mount it and copy the SAM file or modify it's rights or attributes and problem would be solved, however there are cases when you can't just boot up a linux.
Windows... I want to access the SAM file from a limited account and read it's contents. I need an executable that accesses the HDD as it is and uses the MFT to determine where exactly it is. After that just read it out. No hacking or such but I want to see if it was possible to do it.
From linux I would just mount it and copy the SAM file or modify it's rights or attributes and problem would be solved, however there are cases when you can't just boot up a linux.
ohh you mean cases like in a virus!
just kidding,
I havent done any C++ coding for quite some time, So sorry but I can't help you there
and if you are hacking then you can use ntpasswordrecovery to overwrite the same file,
and ntpassword recovery also allows you to copy the sam file before overwriting it.
But you can copy it nontheless, is this the kind of function you want?
or would you rather impliment it in your own code?
Windows... I want to access the SAM file from a limited account and read it's contents. I need an executable that accesses the HDD as it is and uses the MFT to determine where exactly it is. After that just read it out. No hacking or such but I want to see if it was possible to do it.
From linux I would just mount it and copy the SAM file or modify it's rights or attributes and problem would be solved, however there are cases when you can't just boot up a linux.
Ok well I remembered the command and did a google on it and heres the command
Ahm... Not exactly. With this you are using the kernel and the NTFS partition to access the files. If you do not have the permissions to do so, you are screwed. Therefore this is not really a functioning solution.
Maybe, what I will do is to grab a runnable linux distro, run it under windows and just hack the file.
I have no intention to write a virus for Windows. This would be only for recovery purposes for my Mom. She always forgets her passwd. (^_^)
The Windows kernel won't allow you to directly access the hard drive (i.e., bypass the filesystem layer). It's intended as a security mechanism to prevent exactly what you are trying to do.
I have no intention to write a virus for Windows. This would be only for recovery purposes for my Mom. She always forgets her passwd.
This may well be your reasoning, but sorry I just don't believe it. For your information the sam file is encrypted so of what use would it be? There are tools and methods all over the net, but I would be very surprised if anybody here posted the methods required. If your reasoning is genuine, create an admin account on your mothers machine, so that you can reset her password.
Come on, man! Why don't you believe it? I don't even understand.
I didn't know that the kernel can prevent me from doing anything. How is it working? Is there a feature like this under linux too? Most likely but I don't know about it.
For your information the sam file is encrypted so of what use would it be?
Hell I know windows is slack on security, but surely you don't think you can just read the password straight out of the file and use it?
Do I have to believe you?
There are easy ways of doing this google is your friend, yet 99.999999999999999% of the time its used to gain illegal access to an account.
Nope... I knew that the file is encrypted but it can be decrypted too. There must be some kind of method to do so.
Dmail... You don't nee to believe me. However I am always supposing of other ppl - at least for the first time - that they are saying the truth. In this case I was sarcastic and you were right that you didn't believe me.
However I am always supposing of other ppl - at least for the first time - that they are saying the truth.
Personally I question everything of people I do not know and this just had alarm bells going off. Read the quotes yourself and see the inconsistencies in them.
Quote:
I am trying to create an app ...I would love to read this file....want to access the SAM file from a limited account...No hacking or such but I want to see if it was possible to do it....however there are cases when you can't just boot up a linux....run it under windows and just hack the file....This would be only for recovery purposes for my Mom. She always forgets her passwd
Quote:
There must be some kind of method to do so.
Sure there is but I am not going to help you and supply the answer, that would be just irresponsible and would probably get me banned.
Doh... As you feel. I didn't expect to get an answer for such question anyway. Or at least I hoped so. I hoped that ppl would say that hey, are you trying to write something that could affect MS Windows users badly? I am sorry, but my moral is too high to help to you.
Inconsistency might have occurred as I didn't really want to let the people know that I want to trick out the system and gain access to information to which I am not supposed to. No matter if it is the SAM file or just the My Documents. The is what police is building on when they are questioning the accused many times and they are looking for inconsistency.
But also I must let you guys all know (either you believe me or not) that I had no intention to harm other people. I am writing such application just to see if I am capable or not. I am just trying to figure out ways that are not that simple, ways that could save my butt some day at work or ways that my boss will be impressed with. I am just learning.
Learning is good. We do encourage learning. Unfortunately, too many people claim to be 'learning' with malicious intent... it's hard for us to find the line, so we have to limit it entirely.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.