flat assembler
Message board for the users of flat assembler.

Index > Windows > minimal size of fasm program

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
e4key



Joined: 30 Jul 2009
Posts: 8
e4key
hi all. please write minimal (size) program on fasm Smile for example, program, who move 1 into eax Smile thanks.
Post 13 Oct 2009, 15:52
View user's profile Send private message ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17344
Location: In your JS exploiting you and your system
revolution
Code:
mov eax,1    
Post 13 Oct 2009, 15:53
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
Do you mean size of source or size of binary? Smile
revolution wrote:
Code:
mov eax,1    

Code:
xor eax,eax
inc eax    


However, since it is posted in "Windows" forum, I think he really meant the smallest PE program.
Post 13 Oct 2009, 15:59
View user's profile Send private message Visit poster's website Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22
Windows PE has EAX at 0 to start.
Code:
inc eax    
Smile
Post 13 Oct 2009, 16:23
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17344
Location: In your JS exploiting you and your system
revolution
Code:
include 'win32ax.inc'
.code
x:mov eax,1
ret
.end x    
Ugly, but small.
Post 13 Oct 2009, 16:31
View user's profile Send private message Visit poster's website Reply with quote
e4key



Joined: 30 Jul 2009
Posts: 8
e4key
mmm... inc eax don't compile Sad not errors, but the binary file does not appear.

revolution, your code compiled... 1.5kb. is the smallest?

thanks Smile
Post 13 Oct 2009, 17:57
View user's profile Send private message ICQ Number Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael
Code:
format PE GUI
times 508 nop
xor eax, eax
inc eax
ret    
Post 13 Oct 2009, 18:16
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu
Use the Google Very Happy

Someone made a Win32 program only like 100 bytes that downloads and executes a remote file and works on most versions of Windows.

_________________
Post 04 Nov 2009, 17:43
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Raw PE format again (Grom PE)

700 byte Win32 PE GUI (handcoded) file. Is that what you wanted??
Post 04 Nov 2009, 17:52
View user's profile Send private message Visit poster's website Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael
It's not a valid PE.
Post 04 Nov 2009, 18:50
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu
Whoops I was wrong, 133 bytes actually. But still, way smaller than anything in this thread.

_________________
Post 04 Nov 2009, 18:56
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
narada



Joined: 15 Feb 2008
Posts: 77
Location: Ukraine, Dnepropetrovsk
narada
LOL 1 byte. nop
Post 04 Nov 2009, 20:04
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu
LOL, nope.
Windows won't run a program that doesn't even start with MZ. Try again.

_________________
Post 04 Nov 2009, 20:21
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael
So I'm still ahead, nobody posted a valid PE smaller than mine.
Post 04 Nov 2009, 20:52
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu
Guess you missed the link.

_________________
Post 04 Nov 2009, 20:58
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael
I didn't. Minimal file alignment is 512 bytes, minimal section alignment is 4096 bytes, that file isn't actually a valid PE.
Post 05 Nov 2009, 07:40
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
If you're worried about valid PE, i read one of the reasons why AVs FP all over fasm made programs and fasm itself is that fasm generates invalid PE files. So, until you make a PE from scratch, your PE's probably invalid too.
Post 05 Nov 2009, 10:32
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu
Fanael wrote:
I didn't. Minimal file alignment is 512 bytes, minimal section alignment is 4096 bytes, that file isn't actually a valid PE.
It is according to the Windows operating system developed by Microsoft Corporation.

_________________
Post 05 Nov 2009, 14:50
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Azu wrote:
It is according to the Windows operating system developed by Microsoft Corporation.
It didn't work.

_________________
Previously known as The_Grey_Beast
Post 05 Nov 2009, 18:52
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1159
Azu
Borsuc wrote:
Azu wrote:
the Windows operating system
It didn't work.
It never will.

_________________
Post 05 Nov 2009, 18:55
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.