Interaction through chat commands - detectable? menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Bogie's Avatar Member
    Reputation
    11
    Join Date
    Apr 2020
    Posts
    17
    Thanks G/R
    8/3
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Interaction through chat commands - detectable?

    Hi,

    I'm trying to write up a small external, memory read-only bot.
    By nature of being passive only, I can't directly execute any LUA functions. At the same time, invoking some basic lua functions would be immensely helpful of course.

    I'm contemplating executing nearly any and all (inter)actions through chat-based LUA commands. E.g. copy a command (say "/run CastSpellById(...)") to clipboard, then just paste it into chat through the ususal SendKeys.

    Obviously, if anyone were to notice all interactions are done this way, the ban hammer would likely hit hard and fast. So I'm curious to get some thoughts on detectability.
    For a start, has anyone ever looked into whether such chat-based commands are sent to the server (my gut feeling from a network optimization point of view would be no, but who knows..)? Is there any other known detection mechanism that would commonly pick up such behaviour?

    Thanks!

    Interaction through chat commands - detectable?
  2. #2
    Hazzbazzy's Avatar wannabe hackerlol Authenticator enabled
    Reputation
    1335
    Join Date
    Aug 2011
    Posts
    1,206
    Thanks G/R
    243/484
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Bogie View Post
    Hi,

    I'm trying to write up a small external, memory read-only bot.
    By nature of being passive only, I can't directly execute any LUA functions. At the same time, invoking some basic lua functions would be immensely helpful of course.

    I'm contemplating executing nearly any and all (inter)actions through chat-based LUA commands. E.g. copy a command (say "/run CastSpellById(...)") to clipboard, then just paste it into chat through the ususal SendKeys.

    Obviously, if anyone were to notice all interactions are done this way, the ban hammer would likely hit hard and fast. So I'm curious to get some thoughts on detectability.
    For a start, has anyone ever looked into whether such chat-based commands are sent to the server (my gut feeling from a network optimization point of view would be no, but who knows..)? Is there any other known detection mechanism that would commonly pick up such behaviour?

    Thanks!
    Off-topic perhaps, but SendKeys is certainly detectable.
    "HOLY TIME MACHINE BATMAN! it's 1973!"
    https://youtube.com/Hazzbazzy

  3. Thanks Bogie (1 members gave Thanks to Hazzbazzy for this useful post)
  4. #3
    Bogie's Avatar Member
    Reputation
    11
    Join Date
    Apr 2020
    Posts
    17
    Thanks G/R
    8/3
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hazzbazzy View Post
    Off-topic perhaps, but SendKeys is certainly detectable.
    Thanks, yes -- mostly based on event source being implicitly sent from what I know?

    I'm not sure if there have been many bans because of that, but since I won't sell this / will just use if privately (except for maybe sharing specific bits and pieces on these boards here), I'm not too concerned there given there's a few legitimate tools using similar APIs. I'm admittedly a bit more concerned about mouse events, I'm not sure if any non-botting tools propagate those.

    But anyways, if push really comes to shove I have a few ideas in mind that should hopefully circumvent this (maybe running win7 in a VM, I think the input event source is win10 only? or otherwise, just fake a hardware keyboard through an Arduino or so). So all in all, I'm currently a bit more concerned about what I'm sending.

  5. #4
    charles420's Avatar Contributor
    Reputation
    315
    Join Date
    Jun 2009
    Posts
    329
    Thanks G/R
    25/119
    Trade Feedback
    0 (0%)
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    you Should be fine for sending stuff like that as for sendkey.. hook windows function they hook and fake return info if paranoid but so far they are not detecting you this way

  6. Thanks Bogie (1 members gave Thanks to charles420 for this useful post)
  7. #5
    Corthezz's Avatar Elite User Authenticator enabled
    Reputation
    386
    Join Date
    Nov 2011
    Posts
    325
    Thanks G/R
    183/98
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone remember farmer john bot? Farmer John Bot - YouTube
    Check my blog: https://zzuks.blogspot.com

  8. #6
    Bogie's Avatar Member
    Reputation
    11
    Join Date
    Apr 2020
    Posts
    17
    Thanks G/R
    8/3
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Corthezz View Post
    Anyone remember farmer john bot? Farmer John Bot - YouTube
    Brilliant I'm getting the strange feeling this isn't exactly a prime example of a great bot these days, but truth be told, that does actually look somewhat close to what I'm aiming for.

    Originally Posted by charles420 View Post
    you Should be fine for sending stuff like that as for sendkey.. hook windows function they hook and fake return info if paranoid but so far they are not detecting you this way
    Thanks, appreciate it. I'm not too paraoid about SendKeys so far to be honest (unless you guys convince me otherwise, of course ). Has anyone actually discovered they check for the source of SendKeys anywhere in the client, or is it more of a theoretical issue so far?

  9. #7
    Narache's Avatar Member
    Reputation
    13
    Join Date
    Dec 2007
    Posts
    36
    Thanks G/R
    6/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you can start by sending lua commands to cast spells, it's fine nowdays.
    It's just that one day or an other they might ban you for it as it it could be very easily be detected that a character cast all its spells this way!!!

    As you have access to wow memory, you could do this is a more human fashion aka :
    - Read the action bars memory to know where the spells are on the action bars
    - Press the key corresponding to the actionbar slot.

    Later on, you can even read the spell book to know if their is a usefull spell that is not present on your actionbars!!!
    Even one more step ahead, retrieve the key binds corresponding to each action bars slot (so you don't have to manually keep a map of key binds!)

    This is how players interact with the game to cast spells, so it's probably the best way to do as it replicate a normal human playing the game.

    The second problematic is to "sendKey" in a non detectable way, as for now it looks perfectly safe.
    Many people use a kernel driver to emulate a real keyboard (so it prevent "fake events" that are generated via sendKey api) but even this could possibly be detected in the future.


    Don't forget to wrap your CastSpell in a nice class so you can change your implementation anytime without breaking your bot
    Last edited by Narache; 04-21-2020 at 04:23 AM.

  10. Thanks Corthezz, Bogie (2 members gave Thanks to Narache for this useful post)
  11. #8
    Bogie's Avatar Member
    Reputation
    11
    Join Date
    Apr 2020
    Posts
    17
    Thanks G/R
    8/3
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Narache View Post
    Yes you can start by sending lua commands to cast spells, it's fine nowdays.
    It's just that one day or an other they might ban you for it as it it could be very easily be detected that a character cast all its spells this way!!!

    As you have access to wow memory, you could do this is a more human fashion aka :
    - Read the action bars memory to know where the spells are on the action bars
    - Press the key corresponding to the actionbar slot.

    Later on, you can even read the spell book to know if their is a usefull spell that is not present on your actionbars!!!
    Even one more step ahead, retrieve the key binds corresponding to each action bars slot (so you don't have to manually keep a map of key binds!)

    This is how players interact with the game to cast spells, so it's probably the best way to do as it replicate a normal human playing the game.
    Thanks mate, appreciate the input!

    I'm a bit torn there to be honest. I've implemented something similar for e.g. questing now, but that was a lot of digging and reverse engineering. And even worse - I'm developing for 1.12.1 right now, because I can test that locally (and well, because I'm a rookie I'd get banned instantly if I attempted that stuff on live). But I do plan to port this over to classic when it's done. Meaning, whatever I do in terms of memory reads now, I'll probably have to dig through for the classic client again to at very least update all offsets (and while I don't want to think about it just yet, given the classic client is vastly more recent than the 1.12.1 one - I'm not even sure if just changing offsets will do, I could imagine that many core implementations of their data structures might have changed).

    So if I can do things without needing to implement specifics about the client, I usually try to take these shortcuts at the moment, hoping it will save some work later on. But it's certainly a big tradeoff..!


    Originally Posted by Narache View Post
    The second problematic is to "sendKey" in a non detectable way, as for now it looks perfectly safe.
    Many people use a kernel driver to emulate a real keyboard (so it prevent "fake events" that are generated via sendKey api) but even this could possibly be detected in the future.
    Hmm yes, I've been reading up a little bit about driver based implementations. I don't have extensive knowledge there, so I might be off track, but from what I understand, these don't sound super safe to me either. The driver itself might be, but loading it up .. I'm thinking, running Windows in test mode, or having some known vulberable driver (Capcom etc) installed etc. would probably look at lot more suspicious to me, if I was an anticheat dev, than receiving "fake" input by itself. I'm sure smarter people have better way of doing that in a stealthy way though

  12. #9
    Hazzbazzy's Avatar wannabe hackerlol Authenticator enabled
    Reputation
    1335
    Join Date
    Aug 2011
    Posts
    1,206
    Thanks G/R
    243/484
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Bogie View Post
    The second problematic is to "sendKey" in a non detectable way, as for now it looks perfectly safe.
    Many people use a kernel driver to emulate a real keyboard (so it prevent "fake events" that are generated via sendKey api) but even this could possibly be detected in the future.
    Writing your own kernel driver for this is a bit of a rabbit hole, there's a lot of ways you can do it but not a lot of *specific* documenation. There's a lot of talk about it on OSR however, example:
    Simulate keystroke — OSR
    "HOLY TIME MACHINE BATMAN! it's 1973!"
    https://youtube.com/Hazzbazzy

  13. Thanks Bogie (1 members gave Thanks to Hazzbazzy for this useful post)
  14. #10
    Narache's Avatar Member
    Reputation
    13
    Join Date
    Dec 2007
    Posts
    36
    Thanks G/R
    6/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyway it doen't really matter, sending events to the game is not what will take you the most time, just do a simple one for now and keep going on on your bot where you'll have fun implementing stuffs !!!

    or you can bot on linux ! Wine and DXVK are open source so you just OWN the Win API and DirectX layer... Hook yourself wherever you want, send whatever events you need to the game...

Similar Threads

  1. Replies: 4
    Last Post: 03-18-2013, 11:03 PM
  2. [Lua Script] Chat Commands For Players, Buff me!
    By Confucius in forum WoW EMU General Releases
    Replies: 29
    Last Post: 07-13-2010, 03:20 AM
  3. Help with adding a new chat command
    By OverlordMathias in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 05-03-2010, 12:33 PM
  4. [lua]chat commands help and ideas
    By trujillo in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 03-14-2010, 08:23 PM
  5. [Lua] Player & GM Chat Commands!
    By Ground Zero in forum WoW EMU General Releases
    Replies: 18
    Last Post: 01-09-2010, 05:06 PM
All times are GMT -5. The time now is 07:32 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search