Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[VB.net] Small 'MemoryEngine' for Duming and and Writing

Really nicely done, will definitely try this out
(Dec 22, 2010 07:51 AM)6e756c6c Wrote:  I never noticed the Process.MainModule.ModuleMemorySize property. Nice post Proto, thanks.

same here. good job posting.
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.
(Dec 27, 2010 12:35 PM)SIM-99212 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.
Thanks proto. gonna look through it and if its too hard for me yet, I'll retry it later =)
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.
FR1908
(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.
(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.
FR1908


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by UbernoobNov 20, 2013 10:14 AM 32 546 Nov 20, 2013 10:14 AM
Last Post: CyberTechnologyInc
[.NET] by PrecisioηJul 6, 2013 10:51 PM 3 121 Jul 6, 2013 10:51 PM
Last Post: Precisioη
[.NET] by deiskiDec 7, 2012 04:43 PM 2 140 Dec 7, 2012 04:43 PM
Last Post: Tidas