Giter Site home page Giter Site logo

kingstvisfontpatcher's Introduction

KingstVis Font Size Patcher

What

Patch to make 8's and B's more distinct in the KingstVis Logic Analyser

How

Patches qwindows.dll's calls to CreateFontIndirectW

But like...

I'm under no illusion that such a direct binary patch without wildcard searches will hold up, but between the source and the info below, it should be relatively easy to recreate it.

Is it that bad?

Before: Is it an 8 or a B? God himself could not help you here. kingstvis with the crappy small font

After: Awww yeah. Look at that. It's hideous. But legible. kingstvis with the awesome big font

Steps:

  • Start spooky bug (X64DBG) and open KingstVis.exe
  • At the first sys breakpoint open the Symbols page, select gdi32.dll on the left and breakpoint on CreateFontIndirectW on the right (F2)
  • Let it run.
  • The first few return addresses to qwindows.dll from the BP will be the same. Ignore those until it changes. ( in my case the first 4 BPs return to an address ending in A2, then switch to BE on 5 )
  • Follow this one, we'll code cave it
  • RAX/EAX is pretty much always 0 so we'll cram that value into the font struct via code cave ( https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfonta )
  • @ Drop a JMP instr over call qword ptr ds:[<&CreateFontIndirectw>] to the int3s at the end of the function
  • RCX has the logfont struct so mov dword ptr ds:[rcx], eax gives us a 4 byte write instruction in 2 bytes
  • Pop in call qword ptr ds:[<&CreateFontIndirectw>]
  • And jump back jmp 0x00007FFA545767BE or something similar (E9 DE F8 FF FF)

an image showing how the codecave might look

kingstvisfontpatcher's People

Contributors

jonathandotcel avatar

Watchers

 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.