Crazy question about execute non-protected lua. menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Tambel's Avatar Member
    Reputation
    6
    Join Date
    Nov 2013
    Posts
    36
    Thanks G/R
    5/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Crazy question about execute non-protected lua.

    Hello. As i know ingame lua not allow IO operations.
    So if we need to call some helpfull non-protected functions we can:
    1) call it directly by injection or CreateRemoteThread.
    2) Reverse it and find related offsets.

    What about something like that?:

    We declare some variables in addon script with values that help us to find them through memory scan.

    Code:
    task=87654321.12345
    result  =87654321.12346
    Then we change the "task" variable on needed command value, and read result from second variable.
    Code:
    function onupdate(self)
        if task==1 then
            result=GetQuestLogLeaderBoard(1) --for example
        end
    end
    Is this no matter for warden which memory in modified?
    I know that any modification or call it is non-out-of-process, but how much risky to change some variables in custom addon, and how much this idea stupid at all? =)
    Thank You.
    Last edited by Tambel; 03-25-2016 at 04:17 PM.

    Crazy question about execute non-protected lua.
  2. #2
    Jadd's Avatar 🐸
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's possible, but I can't see the difference between reading memory from where these Lua variables reside as opposed to reading information about quests, etc. directly.

    Another option would be to transfer information via. images and pixel reading - Lua addon gathers information, displays the info as a bitmap on the screen (RGB = you can fit 3 bytes of information into 1 pixel), then the bot reads pixel colours at that position. This totally saves you from even opening a handle to the WoW process. You could even fit ~30KB of info into a 100x100px bitmap.

    But obviously this is all totally unnecessary, Warden in it's current state does not justify these lengths to hide your bot/tool. Sounds like a fun idea though.

    Edit: Didn't read your post properly, mine does not cover writing memory/information to the client. In my scenario the Lua addon would be in charge of choosing the information which is displayed.
    Last edited by Jadd; 03-26-2016 at 04:09 AM.

  3. Thanks Tambel (1 members gave Thanks to Jadd for this useful post)
  4. #3
    Tambel's Avatar Member
    Reputation
    6
    Join Date
    Nov 2013
    Posts
    36
    Thanks G/R
    5/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's possible, but I can't see the difference between reading memory from where these Lua variables reside as opposed to reading information about quests, etc. directly.
    It can save us from search of many offsets and debugging isn't it? If we for some reason do not want call this functions "in-process".

    About pixel reading, I think its great! And You right, it is not necessary to write memory to control the addon, better put all needed lua functions in loop.

  5. #4
    ioctl's Avatar Active Member
    Reputation
    23
    Join Date
    Jan 2013
    Posts
    35
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using a scheme like you describe for a while. I serialize useful info into a string, stick it in a global variable, and parse it from my bot. Going the other way, I create a giant string in lua, and then clobber the contents with serialized messages from my bot.

    I also did pixel reading for a while -- it's a little trickier than it sounds because the modding api doesn't give you a lot of control over graphics. I ended up making a 1x1 font, and using the text markup language to colorize the "text". It's significantly slower than extracting data from LUA variables, and building the text causes a lot of GC thrash.

  6. Thanks Tambel (1 members gave Thanks to ioctl for this useful post)
  7. #5
    Tambel's Avatar Member
    Reputation
    6
    Join Date
    Nov 2013
    Posts
    36
    Thanks G/R
    5/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also did pixel reading for a while -- it's a little trickier than it sounds because the modding api doesn't give you a lot of control over graphics. I ended up making a 1x1 font, and using the text markup language to colorize the "text". It's significantly slower than extracting data from LUA variables, and building the text causes a lot of GC thrash.
    So we cant change single pixel color directly?

  8. #6
    verysimplenick's Avatar Member
    Reputation
    4
    Join Date
    Feb 2015
    Posts
    7
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    we can create frames and change color of frame.

  9. #7
    Torpedoes's Avatar ★ Elder ★ Doomsayer
    Authenticator enabled
    Reputation
    1147
    Join Date
    Sep 2013
    Posts
    956
    Thanks G/R
    148/415
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    Another option would be to transfer information via. images and pixel reading - Lua addon gathers information, displays the info as a bitmap on the screen (RGB = you can fit 3 bytes of information into 1 pixel), then the bot reads pixel colours at that position. This totally saves you from even opening a handle to the WoW process. You could even fit ~30KB of info into a 100x100px bitmap.
    Ha ha, I wrote a research paper on that very topic during my last year of university It was largely successful but you'll run into issues with string encoding and performance. You're also quite limited to what you can extract, so ensure what you want to extract is actually accessible and can be encoded in an image. But honestly, it's way easier to just read memory directly...

  10. #8
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is properly coded pixel analysis on a tiny image really going to be much more of a performance cost than using ReadProcessMemory? RPM is extremely slow.

  11. #9
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lolp1 View Post
    Is properly coded pixel analysis on a tiny image really going to be much more of a performance cost than using ReadProcessMemory? RPM is extremely slow.
    Which is why you go fully injected and read directly

    Injected or fully OOP, you face the same risks(or will do shortly) so there is no reason not to be injected anymore.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  12. #10
    Torpedoes's Avatar ★ Elder ★ Doomsayer
    Authenticator enabled
    Reputation
    1147
    Join Date
    Sep 2013
    Posts
    956
    Thanks G/R
    148/415
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lolp1 View Post
    Is properly coded pixel analysis on a tiny image really going to be much more of a performance cost than using ReadProcessMemory? RPM is extremely slow.
    Using the standard BitBlt method is actually pretty slow, and less flexible. I'm also not entirely sure how safe it is, in theory Blizz could detect the addon displaying the pixels and axe at.

    Originally Posted by -Ryuk- View Post
    Injected or fully OOP, you face the same risks(or will do shortly) so there is no reason not to be injected anymore.
    Could you please elaborate on the "same risks" statement, is there some new information regarding detection that I'm unaware of?

    Also, despite what people are saying you can get really good RPM speeds with caching. The problem comes from performing too many RPM's, so just reduce the total number of RPM's you do and you can get comparable speeds to injected apps. You can also split the task across multiple cores of the CPU for an even bigger boost. This technique can be seen in Sonar, an OOP application. Even in dense regions, I'm still able to achieve real-time performance.

  13. #11
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Torpedoes View Post
    Using the standard BitBlt method is actually pretty slow, and less flexible. I'm also not entirely sure how safe it is, in theory Blizz could detect the addon displaying the pixels and axe at.
    There are many ways to analyze pixels at much faster speeds.

    Originally Posted by Torpedoes View Post
    Could you please elaborate on the "same risks" statement, is there some new information regarding detection that I'm unaware of?
    As far as I can tell injecting a manual mapped module into a process and only accessing direct memory locations from the module has never been any more dangerous or less safe than an external process calling ReadProcessMemory on a process.
    Originally Posted by Torpedoes View Post
    despite what people are saying you can get really good RPM speeds with caching. The problem comes from performing too many RPM's, so just reduce the total number of RPM's you do and you can get comparable speeds to injected apps.
    I really hope no one looking into programming reads that and believes it and goes on to skip learning C++/related stuff. It's a critical stepping stone to hacking games if you ask me, even if you end up set on external in the end. You simply can not even come with in the realm of the speed of an injected module accessing memory directly with calling ReadProcessMemory. Even with all the caching and parallel multi thread operations in the world you will be massively behind in speed of direct memory access. I honestly would not be shocked if in some cases it is 500-1000x+ faster.
    Last edited by lolp1; 03-28-2016 at 02:21 AM.

  14. #12
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Torpedoes View Post
    Using the standard BitBlt method is actually pretty slow, and less flexible. I'm also not entirely sure how safe it is, in theory Blizz could detect the addon displaying the pixels and axe at.



    Could you please elaborate on the "same risks" statement, is there some new information regarding detection that I'm unaware of?

    Also, despite what people are saying you can get really good RPM speeds with caching. The problem comes from performing too many RPM's, so just reduce the total number of RPM's you do and you can get comparable speeds to injected apps. You can also split the task across multiple cores of the CPU for an even bigger boost. This technique can be seen in Sonar, an OOP application. Even in dense regions, I'm still able to achieve real-time performance.
    You can easily bypass the warden scans(all types) by being injected. It wont be long until warden is updated to get the same scans that Hearthstone & D3 now have.
    Yes its true that they could (and have in the past) add functionality to the client to detect you, however they could also do this for your OOP products as well.

    I seriously don't see the point of being OOP anymore, when its so much easier to manipulate wow from an injected product.


    Originally Posted by lolp1 View Post
    There are many ways to analyze pixels at much faster speeds.


    As far as I can tell injecting a manual mapped module into a process and only accessing direct memory locations from the module has never been any more dangerous or less safe than an external process calling ReadProcessMemory on a process.


    I really hope no one looking into programming reads that and believes it and goes on to skip learning C++/related stuff. It's a critical stepping stone to hacking games if you ask me, even if you end up set on external in the end. You simply can not even come with in the realm of the speed of an injected module accessing memory directly with calling ReadProcessMemory. Even with all the caching and parallel multi thread operations in the world you will be massively behind in speed of direct memory access. I honestly would not be shocked if in some cases it is 500-1000x+ faster.

    Although you are correct that RPM is slow, however Torpedoes is correct. If you choose to stay OOP you can get some very nice speed improvements which would make it equal to what most people do. However you take that method of splitting the work across the entire CPU and make it work with direct reading and writing RPM will lose every time
    Last edited by -Ryuk-; 03-28-2016 at 08:03 AM.
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  15. #13
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree Ryuk but there is a distinct difference between jumping through hoops to get into an acceptable speed range using RPM, and RPM being "close to injected speeds".

    You might be able to bring it to speeds that are acceptable with work, but it will still be 100's of times slower at best than direct memory access. There is no need to split the work of reading direct memory across several cpus. It's ridiculously fast.

  16. #14
    Torpedoes's Avatar ★ Elder ★ Doomsayer
    Authenticator enabled
    Reputation
    1147
    Join Date
    Sep 2013
    Posts
    956
    Thanks G/R
    148/415
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by -Ryuk- View Post
    It wont be long until warden is updated to get the same scans that Hearthstone & D3 now have.
    Even with all this new detection coming out, I'd argue OOP is still safer in the long run. I say that for two reasons, the first is I suspect Windows containers (whenever they come out) will provide the isolation we need to prevent Blizzard from scanning external processes. The second is running your code through some sort of interpreter (e.g. Java, Autoit, etc.) which will make it more difficult for Blizzard to detect without more advanced analysis, which you could easily block.

    Originally Posted by -Ryuk- View Post
    I seriously don't see the point of being OOP anymore, when its so much easier to manipulate wow from an injected product.
    Injected is not that easy, and arguably less flexible, unless you're doing some sort of combo method of injected + OOP.

    Originally Posted by lolp1 View Post
    You might be able to bring it to speeds that are acceptable with work, but it will still be 100's of times slower at best than direct memory access. There is no need to split the work of reading direct memory across several cpus. It's ridiculously fast.
    Sure it's slower but in practice it's comparable. I'm not sure what you're doing that you require such blazing speeds. Even if the bot takes 100ms to read the game, that's still not bad because you're usually 300ms behind when you play the game anyways. It won't make your bot perform any worse is all I'm saying.

  17. #15
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Injected is not that easy, and arguably less flexible, unless you're doing some sort of combo method of injected + OOP.
    It's easier if you ask me. No worries about speeds, and you are working directly with the source you want to access. In which way is it less flexible?

    Sure it's slower but in practice it's comparable.
    I agree all the way. RPM can be made to acceptable levels. There are cases where it is an issue though. What if you want to make a hyper responsive "chicken" based on a large set of dynamic conditions, and since it is a chicken caching the values will not be any good. In this case, the only solution is to actually read the current data on each game tick. If you have 10 ms, you can imagine how easily that could become a mess.

    If the above case used direct memory access and not RPM, you could easily do that with no effort.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Question] About Lua
    By Nilrac in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 06-21-2008, 07:27 PM
  2. Some questions about databases and Lua script
    By Whisperfrost in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 06-18-2008, 08:11 AM
  3. Question about Lua scripting
    By bill45 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-13-2008, 02:49 AM
  4. [Question] About lua files...
    By Ellenor in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-15-2008, 06:26 PM
  5. A simple question about Lua Scripts
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 12-28-2007, 01:57 AM
All times are GMT -5. The time now is 09:06 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