0

So I'm trying to patch a binary (its a GUI app), and i want to patch the title of it as well when I'm patching it, and by title i mean the text that appears on top of the app that usually is the application name

How can i achieve this? should i break on a certain API and modify it or...? (I'm using x32dbg but can use Olly as well), i know there might be many ways, but what is the most common way? i just want some lead to go after

sorry if this is a newbee question, tried googling and came up with some windows APIs but don't know how to patch it to change the title, tried changing some of them but didnt work

5
  • Have you tried to scan app for text of window caption? Commented Oct 17, 2019 at 8:33
  • @OlvinRoght yes but it has more than 200 occurances of the name of application (window caption) in strings search!
    – Mery Ted
    Commented Oct 17, 2019 at 8:47
  • Can you share the binary?
    – Remko
    Commented Oct 18, 2019 at 11:21
  • @Remko its IDM's main binary aka IDMan.exe, you can download it from their website (latest version) and obviously I'm doing this for learning reversing, not actually cracking the software
    – Mery Ted
    Commented Oct 18, 2019 at 13:02
  • If it's a c(++) application, you can often change (static) window titles with a tool such as Resource Hacker, for Delphi with PE Explorer (or another tool that can edit the embedded DFM) etc. So a first step would be to determine what compiler/runtime was used...
    – Remko
    Commented Oct 18, 2019 at 14:01

1 Answer 1

0

There Are many possible means to change Window caption

easiest of them being using a spy app like winspy and use the inbuilt functionality to change

take a look at this answer i wrote a few days back which shows how a title is change

change window title

or if you prefer you can code a simple FindWindow() , SetWindowText() that can do the job

you can also break on wnd proc in ollydbg / x32dbg and code a detour to use SetWindowText()

using ollydbg v2 (32 bit win 7 )
open calc.exe and hit f9 to run and f12 to break
hit alt+w to open List Of Windows
and locate the Window Handle of CalcFrame As below

List of windows, item 3
  Handle = 000206C0  <<<<<<<<<<<<<<<<<<
  Text = Calculator  <<<<<<<<<<<<<<<
  Parent = Topmost
  WinProc =
  ID/menu = 0136046D (menu)
  Type = UNICODE
  Style = 14CA0000 WS_OVERLAPPED|WS_MINIMIZEBOX|WS_CAPTION|WS_SYSMENU|WS_VISIBLE|WS_CLIPSIBLINGS
  ExtStyle = 00000100 WS_EX_WINDOWEDGE
  Thread = Main
  ClsProc = 00361EDE WndProc
  ClsName = CalcFrame

now go to some blank space

type in a new title and note the address where you typed the title

code in blank space

push offset the address you noted
push window handle as found above {this is variable use what you find not what i type in demo} call SetWindowTextA

make a note of existing eip

change the eip to the newly patched in code step three times and change back to the noted eip

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.