Giter Club home page Giter Club logo

hackerminesweeper's Introduction

HackerMinesweeper

作为一位外挂初学者如何用od和ida pro ce来写一份扫雷外挂 首先猜测一下扫雷的算法 自定义布局的时候会改变雷的数量和宽高
废话不多说 打开CE查询数值 发现宽保存在0x10056A8而这是个全局变量(CE为绿色基址) 用相同的方法也能找到雷的数量和高度都是基址

  • 第一步找到初始化函数遂转到od在0x10056A8上下内存访问断点 断在如图所示的地方往上找 找函数开始的地方分析得到函数头应该是 0x0100367A
    Image text
  • 遂转到ida中查看 F5大法
    Image text
    关键算法应该在这里
 while ( *(&byte_1005340[32 * v2] + v1) & 0x80 );
    *(&byte_1005340[32 * v2] + v1) |= 0x80u;
    --dword_1005330;


我们可以得到1005340保存是一张表 一张整个雷的表 而且在这个地方 标志雷的位置

  • 在od中用db的方式查看这张表并且加0x20(即是32) 发现这是以32为一个轮 排开开头10 就是31个 读到这里有人就可能会问了要是大于31怎么办这岂不是这个程序就会出错吗
    后来发现这个宽度最大只有30(完美避开了bug)
    Image text 显而易见0x8F就是代表着雷 这样算法就很简单了 只要开头读出这张表就能获得雷的位置 然后通过mouse_event就能开外挂了
  • 怎么写一个外挂 假设我们是新手
    • 第一步我们得获取进程句柄就是这样的素质三连 handle就是我们所需
hwnd=FindWindow(L"扫雷",nullptr);
GetWindowThreadProcessId(hwnd, &lppid);
handle=OpenProcess( PROCESS_ALL_ACCESS, false,lppid);

后面的就是读表 写算法 我都在代码中已经给出来了
最后的效果
Image text
当然其他的文章大家也能看看
最后就是我永远喜欢珂朵莉!!!
Image text

hackerminesweeper's People

Contributors

asmjmp0 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.