Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 22:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Adding Lua to ollyDbg with mmBBQ (example poc)

Discussion on Adding Lua to ollyDbg with mmBBQ (example poc) within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 15
Received Thanks: 9
Adding Lua to ollyDbg with mmBBQ (example poc)

Heya,
i would like to show our new mmBBQ API with a nice prove of concept.
We will add Lua scripting to ollyDbg. First of all download:
. Unzip it and youll get a bunch of files. Youre able to use START.bat without changing anything to get a list of processes in your system that you could inject our mmbbq into.

Just select the index or pid of the process.

Youre able to define a new target in config.lua that mmbbq will injects into if the process is available. Our new Target looks like:
Code:
{
   ["name"] = "ollydbg",
   ["title"] = "OllyDbg",
   ["ver"] = "2.01 (alpha 4)",
   ["exe"] = "ollydbg.exe",
   ["md5"] = "782d1e92f58fac5ee91274ab65e6e49f",
   ["lua"] = "olly_target.lua",
},
The ["lua"] part defines the entry to the lua script for the new target. Just create olly_target.lua and add your
lua code that will be executed when you inject mmbbq into ollyDbg 2.0. Now its time for some reversing stuff.
Just start ollyDbg and attach another to it, search in the attaching olly for "Names". There you can find the exported olly functions:



There you can find for example Setint3breakpoint, if we set a breakpoint there and set a breakpoint in the other olly we will see how this function will be called.



A call from our lua API to Setint3breakpoint will now look like this:
Code:
function setBp(address)
  asmcall.cdecl(getProcAddress(0, "Setint3breakpoint"), address, 0x3001000, 0, 0, 0, 0x53E4B7, 0x53E4B7, 0x53E4B7);
end
I have done some additional functions:
Code:
function removeBp(address)
  asmcall.cdecl(getProcAddress(0, "Removeint3breakpoint"), address, 0x1000);
end

function findLabel(address)
  local buffer = new("wchar_t[255]");
  asmcall.cdecl(getProcAddress(0, "Findlabel"), address, buffer, 0);
  local label = dbg.readWStr(buffer_ptr, true);
  print(label);
end

function addLabel(label, address)
  local wlabel = char2wchar(label);
  asmcall.cdecl(getProcAddress(0, "InsertnameW"), address, 0x21, wlabel);
end
So we are able to find labels for a specific address, set labels, set and remove INT3 breakpoints from lua

Our POC in action:


Additional information about mmBBQ:

Feel free to ask or visit us at irc.freenode.net #duschkumpane

greetz defragger
defragger is offline  
Thanks
2 Users
Old 08/03/2012, 23:04   #2


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Really nice project, but you need a backlink on your site to post a link to it here.
MrSm!th is offline  
Old 08/06/2012, 11:33   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 15
Received Thanks: 9
Hiho

1. backlink done
2. is it possible to unban user: willsteel ?
defragger is offline  
Reply


Similar Threads Similar Threads
Adding NPC's and Adding Items in Shopping Mall
03/19/2015 - CO2 Private Server - 21 Replies
Hello there, I have an 5518 source; Albetros Source. Now I have a few questions about it. 1. How do you add new NPC's and where can I find them in the Source? 2. How to add items in the Shopping Mall. I tried a few things but that didn't helped me alot. 3. How to set game char to GM. I tried to give it 5 but that didn't helped either. I looked in the Commands file and that was 5. But it didn't helped. Thanks...
[Request Help] In adding new Uniques Spawn + adding its notice
03/14/2013 - SRO Private Server - 13 Replies
Hello ... I am learning some DB Editing .. i wanted any one to explain HOW TO , add new unique spawn at one place , like add a Devil shitan at jangan door ever 2 hours from last kill .. ++ i wanted to know how to add Unique Notice .. like " Demon shitan has appeared in Roc Mt. "
Which Mod Ollydbg could we use ?
07/15/2010 - Battle of the Immortals - 4 Replies
Hello all I've used many and many mod ollydbg to attach BOI, but its useless...Is there anyway to make ollydbg lile undetecable ?:handsdown:



All times are GMT +1. The time now is 22:18.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.