Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [patching]

Patching is the process of adding or deleting code from an executable file in order to modify its functioning.

0
votes
1answer
13 views

Is it possible to add a label to an ELF executable and then call that label? If so, how?

Let's say we have this simple "hello world" nasm code that will be compiled to an ELF executable: global main section .data message db "Hello World!", 0x00 section .text main: call ...
1
vote
0answers
30 views

How to patch JNI library to call functions on Linux

According to this post it is possible to run functions inside a shared library so long as they do not have a dependency on the JVM It works by patching the .dynamic ELF section to remove ...
2
votes
0answers
53 views

Patching an app that updates frequently

Hello i am working with an app coded in c# which updates very often usually within 2-3 days or sometimes every 12 hours The updates are really needed for the app to work So i was wondering what can i ...
0
votes
0answers
40 views

Assemble function of IDA Pro not working properly

I am using the Patch Program option of IDA Pro to edit the assembly of a binary at runtime. When I enter the following instruction: mov rax, [rsp + 0x48] I get an "Invalid operand" error from IDA ...
0
votes
0answers
29 views

ARM runtime patch

Is it possible patch a memory location at runtime with an instruction located in a different memory segment? For example with str r0, [r1] when r1 points to a code memory location in a different ...
1
vote
0answers
39 views

getting %localappdata% in asm

I have an old windows x86 application that no longer works properly since windows 8. This app creates files within its own folders for things like app settings. Unfortunately, Microsoft no longer ...
0
votes
1answer
53 views

immediate value change when start debugging

I patch the code for my work. I have a problem with code patching. I use IDA pro 6.8. I added code like this. (Assembly) (Hex dump) mov eax, 638BACh --> B8 AC 8B 63 00 Not problem ...
1
vote
1answer
72 views

Does V-Table patching (via DLL injection) only work for COM objects/classes?

Okay so not too long ago i was introduced to the concept of hooking/detouring, it took me some time to get my head around, but despite the lack of information available, eventually i was able to hook ...
2
votes
1answer
55 views

IDAPython Code <-> Data

I'm looking for a way, to make programmatically change of data type. This is the same as you press 'C' or 'D'. For example convert this: .text:00401008 unk_401008 db 55h ; U ; ...
1
vote
1answer
100 views

Java digital signature

I'm using a java application & it validates two parameters from web server one is "signature" & another one is 'id". <signature>...
1
vote
1answer
166 views

Outputting a patched DLL from x64dbg

I've been working on reversing an extremely outdated piece of software that I happen to need in order to get at the information stored in some equally outdated "database" files. Using x64dbg, I've ...
-1
votes
2answers
292 views

Trying to change JE to JNE in x32dbg for instructions that change

I have found two if statements in an application that I want to alter. I've made the two changes and saved the patch file using x32dgb and the application boots up successfully, however; the change ...
2
votes
0answers
76 views

How to solve anti-patch protection involving NtContinue? [duplicate]

I'm having an issue when trying to patch an application. If I open the .exe application with x64dbg, it first goes through ntdll.dll and then runs the application module. It works fine as long as I ...
0
votes
1answer
142 views

ELF binary corrupted after adding instruction in non-executable section

I've been messing around a little with Radare2 trying to master binary exploitation and patching. I added a couple of assembly instructions to an x86 elf binary in a non-executable section of the file,...
1
vote
1answer
205 views

Radare2 - Insert asm instructions without overwriting

In order to patch a x86 elf file on Linux, I'm struggling to insert a specific assembler instruction into the binary file without overwriting any of the preexisting instructions. I've been reading ...
1
vote
2answers
465 views

Patching a class file inside Jar using bytecode

I was trying to patch an application, but the application is required to exact same class size as the original one but editing class file with JByteMod, Recaf or whatsoever always changes the class ...
1
vote
1answer
124 views

How do TDBCtrlGrid or TDBCtrlPanel Borland Delphi controls add new text rows?

I am trying to reverse engineer an old native application written in Borland Delphi in order to modify it for my needs: The application interfaces with the special hardware and displays events that ...
0
votes
0answers
90 views

Strip digital signature check mechanism from windows

I had hex-edited the Windows kernel binary c:\windows\system32\ntoskrnl.exe to fix some assembly bytes in the way i need it. And i want to boot it. However i encounter 0xc0000428 error, saying Windows ...
0
votes
1answer
37 views

OSX User level application Preferences (plist) are not loaded after binary modification

I am working on a project that requires to modify an existing OSX application's dylib binary (few bytes to correct an obsolete URL). I do not have access to the application source code nor the code ...
-1
votes
2answers
243 views

translate arm instructions to hex

I looking for simple tool(not site) to translate arm instruction to hex like http://armconverter.com/. Without linker , I want put 1 instruction , and want get the hex . Do you know one please?
1
vote
3answers
162 views

Remove a mutex on windows (with debugger/disassembler)

I'd like to patch an app to avoid it to use/create a specific mutex, because this one prevents the app from running in multiple instances. I'm already able to close the mutex's handle with the app ...
-1
votes
2answers
35 views

Edit arm thumb2 intelhex file

I have intelhex file to arm 32 bits thumb 2. I want edit this file add/ change instructions. Looking for easy and free tool (prefer gui windows tool ) to do it please.
-1
votes
2answers
131 views

How to patch a binary file and save it? [closed]

I have an ARM executable binary file and I want to patch it at precise virtual addresses. Is there any safe (and automated) way to perform this task ? Any scripts or tools are welcome!
-1
votes
1answer
719 views

How to add code to compiled java class

I have java code that is compiled to a .class file. There is a function that gets few parameters and do some action (e.g. get int x and int y and do x+y) I want to add to this .class file code that ...
1
vote
1answer
2k views

Inject code into exe

I don't know whether this is the right place to ask this question. I want some guide lines on this subject because I don't know how to search my problem in the internet. I want to create an ...
5
votes
1answer
244 views

School project - Cracking a school emulator

John here. I'm in the last half of our IT school, and we got a side project from one of our teachers. He wrote a emulator back in 2009 in delphi, which is in use till that time. Nothing special, just ...
3
votes
2answers
2k views

How to edit and modify a class with ILSpy + Reflexil

In the Maxsea.SmartDesktop.dll, I want to edit and modify class b1g. There is this in : if (isCrackedResult != null && isCrackedResult.IsCracked) and I want to modify for this : if (...
4
votes
2answers
161 views

What's the best way of improving already compiled binary?

Like if I want to patch a function in a PE. Now my way of doing this would be inserting a new section using lets say LordPE and then compiling anything I want to add up here and patching the original ...
1
vote
1answer
119 views

Is it possible to make a string bigger on an executable without breaking it?

I am a new reverse enigneerer. I know I can patch strings using a hex editor, but I obviously can't add or remove a single byte. Is there any workaround that will let me make a... let's say, 10 byte ...
1
vote
1answer
295 views

Get list of functions (including non-exported functions!) in running executable

I'm working on a native binary patching library. It currently works on Linux and I'm trying to add Windows support. For that, I need to implement a way to enumerate all functions in a PE binary (EXE) ...
-2
votes
1answer
1k views

Make this function return true

Sorry, I'm quite new to assembly, and I'm trying to make the code bellow return true: .text:1000E3E0 ; =============== S U B R O U T I N E ======================================= .text:1000E3E0 .text:...
0
votes
1answer
304 views

How to patch file by adding a branch instruction to another address in arm

I have disassembled two armv7 files in IDA. I am trying to figure out how I can create a patch to change one to another. The original file has: __text:00017B60 loc_17B60 ; ...
0
votes
0answers
125 views

IDA Pro Calling Codecave crashes program

I have a simple program written in C++: #include <Windows.h> #include <iostream> using namespace std; void test() { cout << "This is simple test!" << endl; } int main() {...
1
vote
1answer
817 views

How to bind two EXE files?

I'm working on a project that needs to be a stand-alone executable but run another executable whenever it is started. Unfortunately I don't have access to the source code of the second program to ...
2
votes
1answer
246 views

How can I create an appropriate Japanese .tbl file for Hex Editing?

I'm trying to edit a Japanese Configuration executable using Resource Hacker and I just want to translate the UI stuff to English. There are also a few English text that I was able to find and ...
3
votes
0answers
179 views

IDA does not follow relative jump, executable patching

I created small C program (x86) with this asm code inside main: __asm { jmp label // EB 02 nop // 90 nop // 90 } label: Loaded it in IDA (in static mode, so ...
1
vote
2answers
3k views

Binary patching using radare2 in debug mode

Im a newbe in radare and while I tried to patch a crackme binary, I opened it the first time in debug mode (-d), while debugging I used oo+ to reopen it with write mode, when I modify an instruction ...
0
votes
1answer
348 views

patch function in ARM binary to always return 0

I have an ARM binary in which I want to patch a function to always return 0. My understanding is this means I need to set r0 register to 0. The disassembly looks like this STMFD SP!, {R4-...
0
votes
1answer
783 views

Patch packed DLL by themida [closed]

How to patch dll file packed by themida? I've dumped the unpacked file and patched it. But the program didn't recognize the unpacked dll. The original file and dumped file have ~8mb different size. I ...
1
vote
1answer
274 views

IDA & patching question

I have an app in which I have to manually alter several flags in order to get to the part of the code Im interested in (imagine altering ZF to pass JNZ instruction). I have to do this every time I run ...
3
votes
1answer
475 views

Are PATCH shims (.sdb's) no longer functional in Windows 10?

No matter what I do, I can't seem to be able to get my Windows 10 (64-bit, build 1607) to apply any patches in custom SDB's (as described in the article of Jon Erickson from 2014). I'm using Jon's ...
3
votes
1answer
4k views

Remove code signature from a Mac binary

How can I remove the code signature from a binary so that I can patch it without the binary refusing to run afterwards? Needless to say, I'm not the original creator of the binary, nor I have the ...
3
votes
1answer
851 views

Getting Access Violation when patching a program

I'm very very newbie in assembly / ollydbg / reverse engineering. I'm totally lost with this error. I have created a simple program in Delphi, just to explore in ollydbg. Here is the program's code: ...
0
votes
1answer
63 views

Is it possible to change/disable the keybindings for a game by modifying the exe using x64db or a similar program? [closed]

So I have a game I've been making mods for. I'd rather not reference the title here to avoid it showing up in google searches and leading people to exploits. By, default, it doesn't allow keybind ...
1
vote
1answer
540 views

VirtualProtect return value

VirtualProtect is straightforward but I get some results that I can't explain. Something's going on in the background probably but I'd like to know what. The following is under Windows 7 SP1 Ultimate ...
1
vote
0answers
84 views

Patch is detected yet hardware access breakpoint isn't hit

I wonder how is that possible. I found debugger detection in TLS Callback function - there is conditional jump after some check. When I step over it with debugger and modify ZF flag to bypass ...
1
vote
0answers
332 views

Patching Application on OSX (Memory Protection)

I'm patching an executable on OSX. So far I know the patches have been applied successfully. Steps taken (via LLDB): lldb /users/Brandon/Desktop/Test.app/Contents/MacOS/Test b start run br del 1 ...
0
votes
0answers
107 views

Hex-editing string in OpenVPN ELF binary breaks its commandline parsing

I'm trying to make OpenVPN (MIPS binary from Entware package repository) to use custom ifconfig instead of hardcoded /sbin/ifconfig. To do this, I've created symlink to custom ifconfig and modified ...
1
vote
1answer
220 views

Patching MIPS binary file on IDA fails at build

I'm working on reverse a binary from a MIPS based router. In order to do it I'm emulating the binary with qemu, but the binary executes some routines before stating with the logic that skips the ...
2
votes
1answer
1k views

In-memory patching of .net code

Are there techniques for patching .net executables in memory? Let's say we've have a .net dll/exe, we identified what method we want to patch and what IL to replace the existing code with. Executing ...