Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,383 Programmers. There are 1,375 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Master Boot Record

 
Reply to this topicStart new topic

Master Boot Record

Dark Demon
post 5 Apr, 2008 - 05:59 AM
Post #1


New D.I.C Head

*
Joined: 5 Apr, 2008
Posts: 4



Hello everyone,

I am not sure whether it is the right place for this post, i hope it is, if not i am sorry.

I want to create very small application and put it in MBR(Master Boot Record) so it should run befor windows and when the process of this tiny application is finished windows should run.

I was wondering if which programing language is more suitable for that, that i should use, and how to put it in MBR.

I apprecaite any help i get.

Thanks in advance.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


baavgai
post 5 Apr, 2008 - 09:07 AM
Post #2


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,078

The magic google words you're looking for are probably boot loader.

Basically, you have 446 whole bytes in which to do something. If you want to do anything at all, you'll want to know assembly. Your best bet is to use a currently available boot loader and redirect from the MBR to your little program. You'll still probably need a some kind of OS to do anything. Then, once you've done your thing, you redirect the boot process to normal boot partition.

Good luck.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

NickDMax
post 5 Apr, 2008 - 12:28 PM
Post #3


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,024

The problem with your idea is that this is a typical virus technique and will generally cause virus protection software to report a problem and possibly overwrite your little program.

If your writing your own OS this is no problem since virus scanners will not generally run on your new OS, and when they do they will know what your boot record looks like.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Dark Demon
post 5 Apr, 2008 - 12:39 PM
Post #4


New D.I.C Head

*
Joined: 5 Apr, 2008
Posts: 4

QUOTE(NickDMax @ 5 Apr, 2008 - 12:28 PM) *

The problem with your idea is that this is a typical virus technique and will generally cause virus protection software to report a problem and possibly overwrite your little program.

If your writing your own OS this is no problem since virus scanners will not generally run on your new OS, and when they do they will know what your boot record looks like.


The problem is that i am not that expert right now to write my own operating system, i just wanted a simple program, something like a little security program that asks for a password before windows if password is ok run windows otherwise restart the computer

This post has been edited by Dark Demon: 5 Apr, 2008 - 12:58 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

baavgai
post 5 Apr, 2008 - 02:29 PM
Post #5


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,078

QUOTE(NickDMax @ 5 Apr, 2008 - 03:28 PM) *

The problem with your idea is that this is a typical virus technique and will generally cause virus protection software to report a problem and possibly overwrite your little program.


Cool, I didn't know that. I multi boot with GRUB to a number of configurations and have never been challenged for it. Good to know, though. Maybe I need better virus software. tongue.gif


QUOTE(Dark Demon @ 5 Apr, 2008 - 03:39 PM) *

i just wanted a simple program, something like a little security program that asks for a password...


Excellent, I'm glad you're not looking to write a rootkit. Most BIOS have the ability to set a password at that level. You'll get a challenge before your computer even starts looking for boot devices. I'd use that. ( http://www.softstack.com/password/cmos_passwords.html )
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Dark Demon
post 6 Apr, 2008 - 04:39 AM
Post #6


New D.I.C Head

*
Joined: 5 Apr, 2008
Posts: 4

QUOTE(baavgai @ 5 Apr, 2008 - 02:29 PM) *


Excellent, I'm glad you're not looking to write a rootkit. Most BIOS have the ability to set a password at that level. You'll get a challenge before your computer even starts looking for boot devices. I'd use that. ( http://www.softstack.com/password/cmos_passwords.html )



Thanks for the reply, I am already using the BIOS password, Syskey passowr, and windows loging password, the problem is that all these three passwords can be bypassed one way or other, that is why i want something of my own for better protection. It is also i think the first step towards system programming.. smile.gif


This post has been edited by Dark Demon: 6 Apr, 2008 - 04:40 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

baavgai
post 6 Apr, 2008 - 07:36 AM
Post #7


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,078

All things can be bypassed in some way, I'm afraid. Secure your Windows box as much as you like, I'll boot up on a LiveCD, do what I like, and even crack all your passwords without breaking a sweat.

Point is, if someone has physical access to a box, there's only so much you can do. BIOS, as I'm sure you know, is only secure until someone yanks the battery for a few minutes. SELinux is the most secure system I've seen, but you first have to use Linux and if anything goes wrong, like disaster recovery wrong, you've hosed yourself.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Dark Demon
post 6 Apr, 2008 - 09:03 AM
Post #8


New D.I.C Head

*
Joined: 5 Apr, 2008
Posts: 4

QUOTE(baavgai @ 6 Apr, 2008 - 07:36 AM) *

All things can be bypassed in some way, I'm afraid. Secure your Windows box as much as you like, I'll boot up on a LiveCD, do what I like, and even crack all your passwords without breaking a sweat.


I know that there is no absolute security in digital world, there are LiveCDs that gives the password in just a matter of minutes, and as you said you can break any password i give to my computer, but it is not something that everyone can do, by putting my own application at least i can prevent the ordinary users.. smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Tom9729
post 6 Apr, 2008 - 06:02 PM
Post #9


D.I.C Addict

Group Icon
Joined: 30 Dec, 2007
Posts: 575

An ordinary user will be stopped at the Windows password screen. Someone who is determined is going to get in.

If you have information that is really that important, store it on an encrypted drive/partition.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

PsychoCoder
post 6 Apr, 2008 - 06:17 PM
Post #10


ToCode || !ToCode

Group Icon
Joined: 26 Jul, 2007
Posts: 5,858

An ordinary user can boot your computer with a LiveCD. Theres nothing you can do to stop that kind sir smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

NickDMax
post 7 Apr, 2008 - 01:23 PM
Post #11


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,024

For you boot program to work the bios must be secure. So really you are still reliant upon the BIOS password.

There are ways to increase the security so that even a LiveCD will not help. Custom BIOS (which I really don't recommend, but there are a few resources out there... this is ok for an older computer you don't mind possibly turning into a paper weight). Encryption Chips/smart cards -- these work at a hardware level and will most definitely be past the abilities of your normal user and most of the run of the mill would be hax0rs.

Generally though if you want to secure things from professionals you will need to get an encryption hardware and religiously use proper key management. Remember that if you have a secure encryption system then the weak point becomes you. There are 100 little ways that users give away passwords. My favorite is using the same password for two different things. Users also tend to download and install programs without checking MD5/Hashes. Ever check your keyboard to see if there is a keylogger (ever checked to make sure your keyboard is actually YOUR keyboard)?

Anyway. Cryptography and security are wonderfully interesting topics that I highly recommend you begin to read up on. Although I find Kevin Mitnick hard to take in large doses his books can really open your eyes to just how insecure your computing experience really is. I am fairly security conscious, but a 12 year old kid could probably hack into my computer and all my records.

"Locks only keep honest people honest."
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 03:49AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month