Jump to content

How to obtain reference to object loaded in memory of another process?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
topgun_879

topgun_879

    Newbie

  • Members
  • PipPip
  • 10 posts
Hi guys,

I am newbie. need some help on something that i'm trying to achieve with a purpose.

To make it look simple, let me put it this way:

1. TestDll.dll has TestLib class (public), TestLib has method i.e DisplaySomething() also public.
2. Now test_app.exe has referenced TestDll.dll and executing TestLib class' instance in memory.

Assume i already enumerate and got the ProcessModule like below;

void* ptr = module.EntryPointAddress.ToPointer();

I cannot cast it like this because C# does not allow pointer to class :
TestLib obj = (TestLib)*ptr;

How do i go about with this??

Need to get the address and operate on the obj, like obj.DisplaySomething() etc.

Very frustrating with limited knowledge i have in Reflection and Marshal BCL. Can someone pls help me with this problem, or at least advise :). Thank you very much in advance.

Rgds,
topgun

#2
topgun_879

topgun_879

    Newbie

  • Members
  • PipPip
  • 10 posts
Hi guys,

Is this really out of topic..? No replies since.. :) any advice of post appreciated. TQ.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users