Hack Forums
[C] Rename the name of a function directly into a DLL - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] Rename the name of a function directly into a DLL (/showthread.php?tid=6134170)



Rename the name of a function directly into a DLL - aude - Jan 16, 2021

Ok so... for example :

dll name : mydll.dll

Inside this dll there a funtion named AAAfunctionName

I would like to rename this function to BBBfunctionName

I'm not talking about changing a type def in my program, i mean changing the name directly inside the dll. I thought i could simply rename it into the dll (there is the string AAAfunctionName) as confirmed by IMAGE_EXPORT_DIRECTORY and then PDWORD *AddressOfNames, but... it seems it dosent work or i failed somewhere.. Any smart idea ? 🐱‍👤


RE: Rename the name of a function directly into a DLL - riu41776 - Jan 17, 2021

lol, of course changing the string won't affect its name from the IAT. it's like changing your home address at an external entity but it's still the same at your local government interior office which doesn't affect where your mail goes to.

anyways, a "smart idea" would be to reconstruct the IAT, don't ask me how, just google.


RE: Rename the name of a function directly into a DLL - aude - Jan 17, 2021

(Jan 17, 2021 01:44 AM)riu41776 Wrote:  lol, of course changing the string won't affect its name from the IAT. it's like changing your home address at an external entity but it's still the same at your local government interior office which doesn't affect where your mail goes to.

anyways, a "smart idea" would be to reconstruct the IAT, don't ask me how, just google.


I know life can often be very rude, but maybe nobody here is responsible for what it made you live. If what i see in you is a remaining light, i'm sure you could make it grows for a better world.

Regarding the way it works, it's not completly stupid to think that simple string name changing could got a chance to work :

[Image: 8zBMu.gif]

BTW, thank you for suggesting to look into the import table for an exported function..


RE: Rename the name of a function directly into a DLL - HFDone - Jan 17, 2021

theoretically yes if you keep the new name length as the old one
if you change the length of the name you will need to update lots of other things (values)