Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2004, 22:44
taos's Avatar
taos taos is offline
The Art Of Silence
 
Join Date: Aug 2004
Location: In front of my screen
Posts: 580
Rept. Given: 65
Rept. Rcvd 54 Times in 19 Posts
Thanks Given: 69
Thanks Rcvd at 137 Times in 36 Posts
taos Reputation: 54
adding a pe section problem

Hi!!

I'm testing several apps to add a new section in its header but I have a problem.
When I add a new section in SOME APP's I have a error.
I use IIDKING, TOPO, or Snippet creator to add a new section in CALC.EXE (popular calculator from Windows XP SP1) and when I run the app I have a error msg. Only IIDKING tell me that "...has no room in its PE section header to add new sections...).
In other apps I can add new sections but in calc.exe NO

can anyone explain why and how I can do it?

Regards.
Reply With Quote
  #2  
Old 10-21-2004, 14:38
LaDidi LaDidi is offline
VIP
 
Join Date: Aug 2004
Posts: 222
Rept. Given: 2
Rept. Rcvd 11 Times in 10 Posts
Thanks Given: 64
Thanks Rcvd at 54 Times in 29 Posts
LaDidi Reputation: 11
Have you tried with lordPE ?

If not, try it....
Or send it to me CALC.EXE cause I haven't XP_SP1 to try.
Best regards.
Reply With Quote
  #3  
Old 10-21-2004, 21:18
taos's Avatar
taos taos is offline
The Art Of Silence
 
Join Date: Aug 2004
Location: In front of my screen
Posts: 580
Rept. Given: 65
Rept. Rcvd 54 Times in 19 Posts
Thanks Given: 69
Thanks Rcvd at 137 Times in 36 Posts
taos Reputation: 54
thanks for your reply...

yes I've tried Lord Pe too, it have not add imports function but I have used its function that let me make bigger the sizeofheader but the exe make a GPF.

I have attached the EXE file.

Regards.
Attached Files
File Type: rar calc.rar (41.4 KB, 9 views)

Last edited by taos; 10-21-2004 at 21:21.
Reply With Quote
  #4  
Old 10-22-2004, 04:09
MaRKuS-DJM's Avatar
MaRKuS-DJM MaRKuS-DJM is offline
Cracker + Unpacker
 
Join Date: Aug 2003
Location: Virtual World / Network
Posts: 553
Rept. Given: 7
Rept. Rcvd 6 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 16 Times in 10 Posts
MaRKuS-DJM Reputation: 6
LordPe has function to add imports.
PE Editor > Directories
click the "..." in the line of Import Table
add any imports you want
i don't have problems adding sections.
Reply With Quote
  #5  
Old 10-22-2004, 06:52
tbone
 
Posts: n/a
I'm still pretty "newbie" so I may be way off-base here, but I think I see the problem. The section table in calc.exe starts at file offset 0x1EB. Each section header is 40 (dec) bytes long. There are 3 sections, so the last byte of the section table is at offset 0x25F. If you look at the data directory, the bound import table starts at offset 0x260. So there's literally no space at the end of the section table to add another section header unless you move the bound import table further down.

After the BIT, there's a whole bunch of null bytes until you get to the first section at 0x400, so you have a little space to do that. When I tried tacking on another section using LordPE, it automatically moved the BIT to 0x288 and updated the data directory. Which I must say, is pretty slick . The BIT is only 128 bytes long, so there's more than enough room for it before hitting the first section. I don't know what LordPE does if it can't make room for the extra section headers, though. I'll have to test this some time.
Reply With Quote
  #6  
Old 10-22-2004, 20:51
taos's Avatar
taos taos is offline
The Art Of Silence
 
Join Date: Aug 2004
Location: In front of my screen
Posts: 580
Rept. Given: 65
Rept. Rcvd 54 Times in 19 Posts
Thanks Given: 69
Thanks Rcvd at 137 Times in 36 Posts
taos Reputation: 54
to MaRKuS-DJM:

tHANK YOU, Lord PE add sections without problem, is not in a very intuitive place but it works perfectly.


to tbone:
thank you for you reply too, you're right and with your answer I understand why there's not room in the EXE.

Regards
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
Adding Menu to Photoshop NoneForce General Discussion 1 05-20-2006 19:02
RE : Adding mouse functionality LOUZEW General Discussion 7 04-26-2005 01:29
Adding section to windows programs Hero General Discussion 6 01-17-2005 11:52


All times are GMT +8. The time now is 02:42.


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