Hack Forums
[.NET] [VB.net] Small 'MemoryEngine' for Duming and and Writing - 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: [.NET] [VB.net] Small 'MemoryEngine' for Duming and and Writing (/showthread.php?tid=916290)

Pages: Pages 1 2


* - Najgor - Dec 23, 2010

Really nicely done, will definitely try this out


* - GoldStar - Dec 27, 2010

(Dec 22, 2010 07:51 AM)Aeonhack Wrote:  I never noticed the Process.MainModule.ModuleMemorySize property. Nice post Proto, thanks.

same here. good job posting.


* - SIM-99212 - Dec 27, 2010

Code
The WriteToDynamicAddress will write to a specific address that is calcualted using the following formula Baseaddress of the Process + Your Address = ReadAddress. The Buffer Paramter contains the data to write.

Just out of curiosity, would the WriteToDynamicAddress work as a RunPE substitute?

Nice code BTW.


* - pr0t0typ3 - Dec 28, 2010

(Dec 27, 2010 12:35 PM)jawatim Wrote:  
Code
The WriteToDynamicAddress will write to a specific address that is calcualted using the following formula Baseaddress of the Process + Your Address = ReadAddress. The Buffer Paramter contains the data to write.

Just out of curiosity, would the WriteToDynamicAddress work as a RunPE substitute?

Nice code BTW.

You could use it as a part of a RunPE but there are many other things that need to be done, like Setting a new Thread Context etc.


* - RockYy - Jan 4, 2011

Thanks proto. gonna look through it and if its too hard for me yet, I'll retry it later =)


* - The-One - Jan 5, 2011

Okey, I try to write it into a file like this:
Code
Dim id As IntPtr = p.Id
    Dim bt As Byte() = FullDump(id)
    Dim fs As New FileStream("dump.exe", FileMode.Create, FileAccess.Write)
    For i = 0 To bt.Length - 1
    fs.WriteByte(bt(i))
    Next
    fs.Close()

But all it does is nothing, to a file.


* - pr0t0typ3 - Jan 6, 2011

(Jan 5, 2011 03:10 PM)The-One Wrote:  Okey, I try to write it into a file like this:
Code
Dim id As IntPtr = p.Id
    Dim bt As Byte() = FullDump(id)
    Dim fs As New FileStream("dump.exe", FileMode.Create, FileAccess.Write)
    For i = 0 To bt.Length - 1
    fs.WriteByte(bt(i))
    Next
    fs.Close()

But all it does is nothing, to a file.

  1. The ID is a Integer not Intptr

  2. Why don't you use the much simpler IO.File.WriteAllBytes Function ?

  3. Did you try debugging ? Is the Byte Array empty ?


Try to change the things above and test them and then tell me again.



* - The-One - Jan 6, 2011

(Jan 6, 2011 04:39 AM)pr0t0typ3 Wrote:  
  1. The ID is a Integer not Intptr

  2. Why don't you use the much simpler IO.File.WriteAllBytes Function ?

  3. Did you try debugging ? Is the Byte Array empty ?


Try to change the things above and test them and then tell me again.

Tried that all and doesn't work. The file starts at 0x0010, but it has to start at 0x0400.