Write to Read Only Memory ( C# )? menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Amrok's Avatar Banned
    Reputation
    4
    Join Date
    Apr 2009
    Posts
    59
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Write to Read Only Memory ( C# )?

    Is there a way to write to read only memory in Black Magic?

    If not could you please recommend one where this is possible?

    Normal memory write works perfect but writing action fails if i write to readonly memory...

    Write to Read Only Memory ( C# )?
  2. #2
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1441
    Join Date
    Apr 2006
    Posts
    3,999
    Thanks G/R
    294/585
    Trade Feedback
    1 (100%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I have never used BlackMagic before, but don't you have to put the process into debug mode?

  3. #3
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Look at the last post http://www.ownedcore.com/forums/gene...g-pointer.html (Writing To a Pointer)

    My example is a little bad b/c I don't include hProcess.


    Edit...


    Imports
    Code:
            [DllImport("kernel32.dll")]
            public static extern bool VirtualProtectEx(
                IntPtr hProcess,
                uint dwAddress, //IntPtr lpAddress,
                int nSize,      //UIntPtr dwSize,
                uint flNewProtect,
                out uint lpflOldProtect);
    
            public enum Protection : uint
            {
                PAGE_NOACCESS = 0x01,
                PAGE_READONLY = 0x02,
                PAGE_READWRITE = 0x04,
                PAGE_WRITECOPY = 0x08,
                PAGE_EXECUTE = 0x10,
                PAGE_EXECUTE_READ = 0x20,
                PAGE_EXECUTE_READWRITE = 0x40,
                PAGE_EXECUTE_WRITECOPY = 0x80,
                PAGE_GUARD = 0x100,
                PAGE_NOCACHE = 0x200,
                PAGE_WRITECOMBINE = 0x400
            }
    memory
    Code:
            public static bool WriteProtectedMemory(IntPtr hProcess, uint dwAddress, int dwSize, uint flNewProtect, uint lpflOldProtect)
            {
                if (!Imports.VirtualProtectEx(hProcess, dwAddress, dwSize, flNewProtect, out lpflOldProtect))
                    return true;
    
                return false;
            }
    main
    Code:
            public bool WriteProtected(uint dwAddress, int dwSize, uint flNewProtect, uint lpflOldProtect)
            {
                return Memory.WriteProtectedMemory(WowProcessHandle, dwAddress, dwSize, flNewProtect, lpflOldProtect);
            }
    flNewProtect = 0x40

    lpflOldProtect = &old

    I think that's how you would add it to BM, I dont remember what it looks like really lols. BM is open source so just add this in.
    Last edited by DarkLinux; 08-24-2011 at 11:26 AM.

  4. #4
    Amrok's Avatar Banned
    Reputation
    4
    Join Date
    Apr 2009
    Posts
    59
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarkLinux View Post
    Look at the last post http://www.ownedcore.com/forums/gene...g-pointer.html (Writing To a Pointer)

    My example is a little bad b/c I don't include hProcess.


    Edit...


    Imports
    Code:
            [DllImport("kernel32.dll")]
            public static extern bool VirtualProtectEx(
                IntPtr hProcess,
                uint dwAddress, //IntPtr lpAddress,
                int nSize,      //UIntPtr dwSize,
                uint flNewProtect,
                out uint lpflOldProtect);
    
            public enum Protection : uint
            {
                PAGE_NOACCESS = 0x01,
                PAGE_READONLY = 0x02,
                PAGE_READWRITE = 0x04,
                PAGE_WRITECOPY = 0x08,
                PAGE_EXECUTE = 0x10,
                PAGE_EXECUTE_READ = 0x20,
                PAGE_EXECUTE_READWRITE = 0x40,
                PAGE_EXECUTE_WRITECOPY = 0x80,
                PAGE_GUARD = 0x100,
                PAGE_NOCACHE = 0x200,
                PAGE_WRITECOMBINE = 0x400
            }
    memory
    Code:
            public static bool WriteProtectedMemory(IntPtr hProcess, uint dwAddress, int dwSize, uint flNewProtect, uint lpflOldProtect)
            {
                if (!Imports.VirtualProtectEx(hProcess, dwAddress, dwSize, flNewProtect, out lpflOldProtect))
                    return true;
    
                return false;
            }
    main
    Code:
            public bool WriteProtected(uint dwAddress, int dwSize, uint flNewProtect, uint lpflOldProtect)
            {
                return Memory.WriteProtectedMemory(WowProcessHandle, dwAddress, dwSize, flNewProtect, lpflOldProtect);
            }
    flNewProtect = 0x40

    lpflOldProtect = &old

    I think that's how you would add it to BM, I dont remember what it looks like really lols. BM is open source so just add this in.
    Thanks for this!

    Switched over to iHook but i cant find a documentation how his MakeMemoryWriteable<>(IntPtr address, IntPtr handle) function works...

  5. #5
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Just take the 5min and implement it into your code or BM...

Similar Threads

  1. [discussion] Dangers of memory-read(-only) tools
    By KillerJohn in forum Diablo 3 General
    Replies: 19
    Last Post: 01-06-2013, 06:20 AM
  2. Navicat tables are "read only"
    By gangstagreen in forum WoW EMU Questions & Requests
    Replies: 8
    Last Post: 12-12-2008, 09:35 PM
  3. [Guide] WARNING! Read only if you want to make gold...
    By sykopath70 in forum Age of Conan Exploits|Hacks
    Replies: 11
    Last Post: 10-30-2008, 05:36 AM
  4. a little bit of c++ and reading process memory..
    By arynock in forum WoW Memory Editing
    Replies: 10
    Last Post: 05-22-2008, 04:12 AM
  5. read only if your cool
    By Cryt in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-03-2007, 03:24 PM
All times are GMT -5. The time now is 10:12 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search