Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2005, 12:35
Android
 
Posts: n/a
Overlay files?

Hi,
I have got a question.
I faced some PE files that have Overlay.
I want to know how it's possible to compile a PE File to have Overlay properties.

Is it something which is connected to the Compiler or is it depended on the style of Coding?

Thanks in advance.

Regards,
Android.
Reply With Quote
  #2  
Old 08-22-2005, 18:06
Newbie_Cracker's Avatar
Newbie_Cracker Newbie_Cracker is offline
VIP
 
Join Date: Jan 2005
Posts: 227
Rept. Given: 72
Rept. Rcvd 26 Times in 12 Posts
Thanks Given: 49
Thanks Rcvd at 25 Times in 18 Posts
Newbie_Cracker Reputation: 26
and how the program reads overlays?
Many programs don't read overlays from a constant offset.
Are they calculate its offset from PE Header (does any body use it? ) or they subtract Overlay_Size from File_Size to calculate its statring offset?
Reply With Quote
  #3  
Old 08-22-2005, 23:25
dj-siba's Avatar
dj-siba dj-siba is offline
Musician Member
 
Join Date: Jun 2003
Location: Outside the dot
Posts: 324
Rept. Given: 34
Rept. Rcvd 43 Times in 21 Posts
Thanks Given: 56
Thanks Rcvd at 159 Times in 43 Posts
dj-siba Reputation: 42
use DOS command copy

Copy /b Main.EXE + Overlay.OVL
Reply With Quote
  #4  
Old 08-24-2005, 12:46
Android
 
Posts: n/a
Quote:
Originally Posted by dj-siba
use DOS command copy

Copy /b Main.EXE + Overlay.OVL
Hi,
Thanks for the reply.
But may I ask you about the way you managed to make this file?

"Overlay.OVL"
The fact is that,the use of this file is unknown to me.

My problem mostly is about the basics of Overlay strcuture and the aim of using it.
Also if someone can cover some information about the principles of Overlay that will be great.

Best Regards,
Android.
Reply With Quote
  #5  
Old 08-26-2005, 21:42
oVERfLOW oVERfLOW is offline
Family
 
Join Date: Jan 2005
Location: Tehran
Posts: 117
Rept. Given: 127
Rept. Rcvd 42 Times in 19 Posts
Thanks Given: 1
Thanks Rcvd at 5 Times in 5 Posts
oVERfLOW Reputation: 42
Hi dear Android

As I remember, we've discussed alot about this topic...
But Ican see that you are not familair with it yet.

Overlay files has NO structure and NO standard.
An overlay file is a simple GIF, JPG, TXT or any other file format that is phisically copied at the end of an executable file.

the main executable file opens itself (by CreateFile API NOT from memory) and finds the offset of appended file.
then reads the information inside like the original GIF, JPG, TXT or ... file format
for example a.exe opens itself and finds the header of a gif file and then shows the content on the screen

as you remember I've used the same technic in Alparysoft Lossless Codec Keygen and other newer Keygens...

When Xoex told me that this is not a safe way to hide files in the main executable...

Ba bye.
Reply With Quote
  #6  
Old 09-03-2005, 23:01
shyokou
 
Posts: n/a
Do you mean resource ...

afaik overlay is an old way of referring resource, for gui, generally ...

for win32 you may find many ways to deal with the resource, or overlay as you talk about it, including console and gui appz. in ms vs, for instance, you may add resource to a project, like dialog, bitmap, font, icon, any kind of file you can imagine ...

do you mean resource when you say overlay ?

Quote:
Originally Posted by Android
Hi,
I faced some PE files that have Overlay.
I want to know how it's possible to compile a PE File to have Overlay properties.

Is it something which is connected to the Compiler or is it depended on the style of Coding?

Regards,
Android.
Reply With Quote
  #7  
Old 09-04-2005, 02:10
oVERfLOW oVERfLOW is offline
Family
 
Join Date: Jan 2005
Location: Tehran
Posts: 117
Rept. Given: 127
Rept. Rcvd 42 Times in 19 Posts
Thanks Given: 1
Thanks Rcvd at 5 Times in 5 Posts
oVERfLOW Reputation: 42
Surely No!

I know he is familiar with resource section and cracking
but Overlay files is not a standard way of storing files
and as he is not a programmer he haven't been working on Overlay technic...

Ba bye
Reply With Quote
  #8  
Old 09-04-2005, 15:03
shyokou
 
Posts: n/a
scope ...

well, the "overlay" in large is the parent of resource, counting the non-standard format, etc ...

but i dont think a big difference between overlay and resource, as you know, the resource stuph is in a standard way, right ?

i presumed android wanted a way to incorporate his/her overlay with pe -

Quote:
Originally Posted by Android
Hi,
I faced some PE files that have Overlay.
I want to know how it's possible to compile a PE File to have Overlay properties.

Is it something which is connected to the Compiler or is it depended on the style of Coding?

Android.
i dont see a relationship between these

Quote:
Originally Posted by oVERfLOW
Surely No!

I know he is familiar with resource section and cracking
but Overlay files is not a standard way of storing files
and as he is not a programmer he haven't been working on Overlay technic...

Ba bye
Reply With Quote
  #9  
Old 09-11-2005, 19:44
Android
 
Posts: n/a
Hi,
Thansk for the replies and explanations.
But what I really need, is to compile a file which has overlay attributes.
Imagine this very very simple code in C++

Code:
#include <iostream.h>

int main()
{

	
	cout << "Hello World" << endl;
	
	return 0;
}

I want someone to add the commands and instructions that when I compile it
I can get a file with overlay properties.

Frankly,I need an example of coding that the result is an Overlay file.

So show me how you make it practically.

Thanks in advance.
Best Regards,
Android.
Reply With Quote
  #10  
Old 09-12-2005, 01:52
oVERfLOW oVERfLOW is offline
Family
 
Join Date: Jan 2005
Location: Tehran
Posts: 117
Rept. Given: 127
Rept. Rcvd 42 Times in 19 Posts
Thanks Given: 1
Thanks Rcvd at 5 Times in 5 Posts
oVERfLOW Reputation: 42
Code:
(VB)

Open App.ExeFileName & ".exe" for binary access read as #1

lngHeaderPos = FindBinaryValue ( "oVERfLOW" , #1 ) 'a user defined function
Get #1, lngHeaderPos + 8&, lngMyNumber

Close #1
OK
We must compile this file with default options
and after that we must create a file with the following contents...

Code:
oVERfLOW1234
then we will go to command prompt and type the following command.

Code:
copy /b oVERfLOW.exe+oVERLAY.ovr OVERLAYED.exe
a file named overlayed.exe will be created that opens itself and reads a long integer value then closes itself

is it clear?
hopefully

have a good time ba bye
Reply With Quote
  #11  
Old 09-12-2005, 12:38
Android
 
Posts: n/a
Hi Overflow.
Thanks for the explanation.
I try to understand the idea but you know I don't know VB.
I wish you could make an example in C++ or ASM.

Also another question.
I want to know if what you said is the only way of making Overlay files.
Is there any other method?

Best regards,
Android.
Reply With Quote
  #12  
Old 09-12-2005, 17:53
dj-siba's Avatar
dj-siba dj-siba is offline
Musician Member
 
Join Date: Jun 2003
Location: Outside the dot
Posts: 324
Rept. Given: 34
Rept. Rcvd 43 Times in 21 Posts
Thanks Given: 56
Thanks Rcvd at 159 Times in 43 Posts
dj-siba Reputation: 42
in DOS days there was the limit of memory
so the EXE has it's size limit,
Compiler making big EXE can't fit into memory and can't execute
the was the solution to split the EXE to other modules named .OVL
so only a part of the main EXE are loaded in execution time then
the main modules loads other parts .OVL upon his need... that's All

With Win32 and PE the amont of memory is BIG so no need for overlay

but every addition to the EXE is interpreted as Overlay what ever it is Binary or Resource
Reply With Quote
  #13  
Old 09-13-2005, 02:29
oVERfLOW oVERfLOW is offline
Family
 
Join Date: Jan 2005
Location: Tehran
Posts: 117
Rept. Given: 127
Rept. Rcvd 42 Times in 19 Posts
Thanks Given: 1
Thanks Rcvd at 5 Times in 5 Posts
oVERfLOW Reputation: 42
Very good explenation.

I'd seen that OVL files but it's the first time that I understand the usage.
Very good!

And for you dear Android
you must compile a default exe file that open itself as a usual file.
then it searches for a header or string... or by getting the original exe file size from PE header and reading information after that...

Ba bye
Reply With Quote
  #14  
Old 09-16-2005, 18:19
Android
 
Posts: n/a
Hi,
Thanks for the info.
Now i'm just curious whether it's possible to attach a DLL file to an EXE file and make it Overlay file!

Then the Exe should call for dll file which is overlayed.
Shall the DLL file be extracted info the Temp folder or not?


@dj-siba's
I want to know how it was possible to make OVL files in OLD DAYS.
Is there any Special Command?

Thanks in davnace.
Regards,
Android.
Reply With Quote
  #15  
Old 09-16-2005, 19:26
Unforgiv3N's Avatar
Unforgiv3N Unforgiv3N is offline
Friend
 
Join Date: Aug 2005
Posts: 172
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 3 Times in 3 Posts
Unforgiv3N Reputation: 0
if you have source code you can attach it to your App as a Resource otherwise you can use Appz like MoleBox,Thinstall,PeBundle,.... and attach the *.dll to Root Dir, Your App will read it and run.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Visual C++ 5.0 [Overlay] ? s3ct0r General Discussion 7 08-11-2005 00:49


All times are GMT +8. The time now is 15:39.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )