Flag: Tornado! Hurricane!

 Forums >>  IDA Pro  >>  IDA plug-in alloc memory

Topic created on: June 3, 2010 09:24 CDT by Nadya .

Hi all,

Im trying to write my first IDA plug-in which allocates some memory for my own use:

  response = AskUsingForm_c(AllocMem_dialog, &alloc_size_in_bytes);

   lpvResult = VirtualAlloc(NULL, alloc_size_in_bytes, MEM_COMMIT, PAGE_READWRITE);
                    
if (lpvResult == NULL )
    {
msg("VirtualAlloc failed.\n");
return;
    }
    
    VirtualProtect(lpvResult, alloc_size_in_bytes, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    msg("%.08X allocated region base address\n", lpvResult);

Memory is allocated successfully but IDA doesn't see this newly allocated memory:( how can I make this memory visible to IDA ?

  cseagle     June 8, 2010 03:24.45 CDT
What do you mean by "make the memory visible to IDA"?  Surely you can read and write this memory within your plugin.  Are you expecting this memory region to show up in the IDA display?  If so, you need to investigate the segment creation functions from segment.hpp

  Nadya   June 8, 2010 05:37.16 CDT
yes, I can read and write this memory within plugin, but after successful allocation I would like to jump to that address from IDA and it fails. OK I'm gonna investigate
segment.hpp thanks for suggestion!

Note: Registration is required to post to the forums.

There are 28,224 total registered users.


Recently Created Topics
Reverse Engineering ...
Jan/23
Career: DoD Agency I...
Jan/22
"Disappearing&q...
Jan/17
Career: Software Sec...
Jan/11
Where is the call st...
Jan/07
IDA Pro 6.1 Breakpoi...
Jan/01
How to create data s...
Dec/30
can i search all mod...
Dec/23
IDA symbol table exp...
Dec/20
An anti-attach trick
Dec/17


Recent Forum Posts
Reverse Engineering ...
NirIzr
"Disappearing&q...
NirIzr
Reverse Engineering ...
charlie
"Disappearing&q...
charlie
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
An anti-attach trick
waleeda...
An anti-attach trick
Bass
Looking for value in...
NirIzr


Recent Blog Entries
cmathieu
Feb/07
Hacker Carnival

waleedassar
Feb/06
OllyDbg v1.10 And Hardware ...

waleedassar
Jan/31
Yet Another Anti-Debug Trick

RolfRolles
Jan/22
Finding Bugs in VMs with a ...

waleedassar
Jan/13
An OllyDbg Bug Disables Sof...

More ...


Recent Blog Comments
waleedassar on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/07
OllyDbg v1.10 And Hardware ...

NirIzr on:
Feb/05
Yet Another Anti-Debug Trick

trolotou on:
Feb/05
Doudoune Moncler -Pennies F...

waleedassar on:
Feb/01
Yet Another Anti-Debug Trick

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit