World's smallest Windows program

Programming, for all ages and all languages.
Post Reply
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

World's smallest Windows program

Post by Gigasoft »

I've broken the world record for the world's smallest Windows program. This program is 73 bytes long and the previous world record was 97 bytes.

Inside this zip file is a winhi73.com and a hi73fix.exe. Extract both to the same directory and run hi73fix.exe to patch winhi73.com to work with your version of Windows. Then run winhi73.com. If it works, it should display a message box with 3 OK buttons. It only works in 32 bit versions of Windows.
Attachments
winhi73.zip
(2.02 KiB) Downloaded 134 times
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: World's smallest Windows program

Post by ru2aqare »

Gigasoft wrote:I've broken the world record for the world's smallest Windows program. This program is 73 bytes long and the previous world record was 97 bytes.

Inside this zip file is a winhi73.com and a hi73fix.exe. Extract both to the same directory and run hi73fix.exe to patch winhi73.com to work with your version of Windows. Then run winhi73.com. If it works, it should display a message box with 3 OK buttons. It only works in 32 bit versions of Windows.
I wouldn't call a program that runs in v86 mode (under NTVDM) a Windows program... Be it 73 or whatever bytes long. As I run an x64 Windows, I can't comment of whether it works or not.
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

Re: World's smallest Windows program

Post by Gigasoft »

Well, it manages to jump to arbitrary code in NTVDM, making a NtRaiseHardError call with it's own parameters and then going to ExitProcess. It could easily be expanded to do other things that normal Windows programs can do.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: World's smallest Windows program

Post by Owen »

I wouldn't call it a Windows program, but it's a glorious hack
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: World's smallest Windows program

Post by Combuster »

Gigasoft wrote:Well, it manages to jump to arbitrary code in NTVDM
So it is an DOS program exploiting a security hole in the real mode VM.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: World's smallest Windows program

Post by VolTeK »

alright :) i mean wait, thats a bad thing :? good job?
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

Re: World's smallest Windows program

Post by Gigasoft »

Yeah, technically it starts out as a DOS program. It's not really a security hole, since DOS programs can already launch Windows programs. It's just an unintended way of doing things :P
redoktober
Member
Member
Posts: 109
Joined: Thu Feb 26, 2009 12:58 am
Location: Gurgaon/New Delhi, India
Contact:

Re: World's smallest Windows program

Post by redoktober »

strange.
i used your patch to fix the COM file, and when i run it, a console opens up, and then NTVDM crashes.
what could be the issue?
"Do you program in Assembly?" she asked. "NOP," he said.

"Intel Inside" is a Government Warning required by Law.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: World's smallest Windows program

Post by qw »

redoktober wrote:strange.
i used your patch to fix the COM file, and when i run it, a console opens up, and then NTVDM crashes.
what could be the issue?
Same with me (on XP SP2).
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

Re: World's smallest Windows program

Post by Gigasoft »

That's difficult to say. Could you upload or send me the patched COM file along with your version of NTVDM?
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: World's smallest Windows program

Post by qw »

Gigasoft wrote:That's difficult to say. Could you upload or send me the patched COM file along with your version of NTVDM?
Here it is. NTVDM version is 5.1.2600.2180. I hope this information is enough, the file exceeds the upload limit.
Attachments
WINHI73.ZIP
(193 Bytes) Downloaded 62 times
redoktober
Member
Member
Posts: 109
Joined: Thu Feb 26, 2009 12:58 am
Location: Gurgaon/New Delhi, India
Contact:

Re: World's smallest Windows program

Post by redoktober »

i'll say this.
i looked through the MASM code...nice hack!
:D
"Do you program in Assembly?" she asked. "NOP," he said.

"Intel Inside" is a Government Warning required by Law.
Post Reply