[Question] API Protection 3.3.2 menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, damn. I don't think I can use VEH to bypass code, only hook..which doesn't help me. Back to the drawing board.

    [Question] API Protection 3.3.2
  2. #17
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not only register your own LUA function, which call Lua_Execute, and call it from game?

  3. #18
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what Cypher suggested, but I wasn't sure how to do that :/

  4. #19
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's super simple. Look at the xrefs to the start of the array of Lua functions(there's multiple arrays- any will do). Register your function have it just pop your string off the lua stack and feed it into FrameScript_Execute. Ignore the actual LuaState parameter, pass zero. If you want to get return values, use lua_pcall/call and grab them after you call it. Look at how lua works somewhere.

  5. #20
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies guys. I know it must get tiresome with the questions from new guys, but I really do appreciate the help. I've been scouring the forum off and on for the past 10 hours, but with no prior ASM, it's challenging to say the least. I'm sure I'll have my 'a ha' moment.
    Last edited by noctural; 04-03-2010 at 11:34 PM. Reason: typo

  6. #21
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pro tip:
    don't pass the actual address of your lua callback, find something that'll cause an exception when executed in the wow.exe module and pass that adress, install a VEH to catch the exception and redirect the execution to your callback, that way you can trick the IsFunctionPtrInRange check without any further hooks.

    I wont explain in detail how a vectored handler needs to look like to deal with this task, this is something you should be able to find out yourself easily, you'd even find some copy pasta code with google but I'd suggest you to write it on your own using msdn, so you actually understand what you're doing.

    And about your asm knowledge, you can learn the basics of asm rather quickly there are dozens of tutorials on this subject, you'll have to search for X86 assembler and I'd suggest you to use a tutorial with intel style syntax, because that's what most disassmblers use, reading some tutorials on debugging won't hurt btw
    I hacked 127.0.0.1

  7. #22
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Xarg0. I have been debugging..even written my own apps and debugged them to understand what was going on in asm.

    I've been able to setup a VEH to fire on a function of mine, by setting the memory of the function to PAGE_NOACCESS. When my func runs, the exception is thrown and my handler is called. My handler returns EXCEPTION_CONTINUE_EXECUTION, which appears to continue execution of the function. Is it possible to make my VEH, change the EIP or something to skip over my function entirely?

  8. #23
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Guess what's in the context structure that the pcontext pointer in the exception structure points to
    Last edited by Xarg0; 04-04-2010 at 02:25 PM.
    I hacked 127.0.0.1

  9. #24
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Xarg0 View Post
    Guess what's in the context structure that the pcontext pointer in the exception structure points to
    Thanks! So, would this change the EFlags for the next executed instruction after the handler returns to continue execution?

    Code:
    ULONG VEHandler(PEXCEPTION_POINTERS exc)
    {
         if (exc->ExceptionRecord->ExceptionCode != STATUS_ACCESS_VIOLATION && exc->ExceptionRecord->ExceptionCode != STATUS_SINGLE_STEP)
         {
             return (EXCEPTION_CONTINUE_SEARCH);
         }
         else if (exc->ExceptionRecord->ExceptionCode == STATUS_SINGLE_STEP)
         {
             exc->ContextRecord->EFlags |= 0x40;
         }
    
         return (EXCEPTION_CONTINUE_EXECUTION);
    }

  10. #25
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to change the EIP value so that your code is executed

  11. #26
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    You might want to change the EIP value so that your code is executed
    I thought that my code is executing in the VEH. Or are you saying the exception handler modifies a different CONTEXT than that of the main thread?

  12. #27
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, set the EIP in the PCONTEXT structure and then return EXCEPTION_CONTINUE_EXECUTION and it will jump to your Eip value. You can do your magic there. Make sure to be careful with stack corruption though, make a stub __declspec(naked) function to call your actual code.

  13. #28
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    Yes, set the EIP in the PCONTEXT structure and then return EXCEPTION_CONTINUE_EXECUTION and it will jump to your Eip value. You can do your magic there. Make sure to be careful with stack corruption though, make a stub __declspec(naked) function to call your actual code.
    My Exception Handler seems to be in an infinite loop. I set the breakpoint on the function address correctly, the Exception Handler fires...then continues execution..but the breakpoint is hit again, firing the exception handler again, to infinity.

    I thought if I set the RF(bit 16) in the EFLAGS, that it would cause the breakpoint to be disabled for one instruction. Here's my exception handler code.. does anyone know what I might be doing wrong here, thanks again!

    Code:
    ULONG HookHandler(PEXCEPTION_POINTERS exc)
    {
    	if (exc->ExceptionRecord->ExceptionCode != STATUS_SINGLE_STEP)
    	{
    		MessageBoxA(NULL,"Handler was not single step, continuing.","NOT STATUS_SINGLE_STEP",MB_OK);
    		return (EXCEPTION_CONTINUE_SEARCH);
    	}
    	
    	MessageBoxA(NULL,"Hit the BP!","STATUS_SINGLE_STEP",MB_OK);
    	exc->ContextRecord->EFlags |= (DWORD)0x10000;
    	return (EXCEPTION_CONTINUE_EXECUTION);
    }

  14. #29
    noctural's Avatar Active Member Captain Copypasta CoreCoins Purchaser
    Reputation
    26
    Join Date
    Apr 2009
    Posts
    76
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm.. It seems I have to clear the debug register when the VEH is called the first time and set the TF. Then continue execution, and the next time the VEH is called.. restore the debug register. Does this RF flag not do what I think it does? Which is to say this:

    "Controls the processor’s response to instruction-breakpoint
    conditions. When set, this flag temporarily disables debug exceptions
    (#DB) from being generated for instruction breakpoints (although other
    exception conditions can cause an exception to be generated). When clear,
    instruction breakpoints will generate debug exceptions."
    Last edited by noctural; 04-06-2010 at 08:21 AM. Reason: typo

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [QUESTION] client files protection. signature structure.
    By VX2 in forum World of Warcraft General
    Replies: 7
    Last Post: 11-06-2018, 02:36 AM
  2. [Question] LUA protection disabler for 4.0.6a
    By vabatta in forum WoW Memory Editing
    Replies: 18
    Last Post: 02-25-2012, 03:51 PM
  3. Dragon Soul ExtraActionButton Question(API)
    By Omgwtfowned in forum World of Warcraft General
    Replies: 5
    Last Post: 12-23-2011, 09:46 AM
  4. 2.4.3 Api Protection
    By Shockah in forum WoW Memory Editing
    Replies: 13
    Last Post: 04-02-2010, 06:15 AM
All times are GMT -5. The time now is 05:25 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