Questions tagged [patching]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

Add MessageBox statically modify

So i'm doing this challenge which i have an exe file and a dll all i have to do is modify it statically to pop a MessageBox. The exe file is loading the dll which load the MessageBox, with ollydbg ...
0
votes
0answers
21 views

Frida: Make executable immune to updates

I have few questions which are related to each other so I'm going to ask all of them here. I have a dll which has no debug symbols(ASLR and relocation is disabled). The functions have names like ...
2
votes
2answers
123 views

In reverse engineering, what does it mean to “patch a file”?

I've been solving some crackmes, and every file that I download, in the "instructions" says: "Patching is obviously not allowed". What does that mean? And how does one patch a file?
11
votes
2answers
3k views

How do the internals of a Windows update security patch work?

Wasn't sure where to ask this on stack exchange, so vote to close if you think it is in the wrong place. I am analyzing a Windows security patch. Having never examined a windows security patch, and ...
1
vote
1answer
445 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
1answer
46 views

Hex editing a program to change variable types

For starters guys please don't get mad at me because I really googled this question for a while and couldn't find a satisfying answer. Also if I'm asking an idiotic question, I apologize beforehand. ...
1
vote
0answers
143 views

How to export to *.so file after patching in ghidra

I'm using ghidra to patch an *.so file in the Android APK. While exporting the patched file from ghidra, using the "Export program" option from the "File" menu, it don't have *.so in the supported "...
0
votes
0answers
45 views

Output address path during .exe execution

I have an obfuscated software. I'm a beginner in this area, so I don't find where a patch would be useful for what I want to do. It turns out that I have an idea of how I could find out in which ...
0
votes
0answers
25 views

Changing a string pointer while debugging

I'm facing an issue, and I'm not sure what is the best way to handle it. While debugging a program (x64, windows), the program copies certain string using errno_t strncpy_s(char *restrict dest, ...
0
votes
1answer
203 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,...
0
votes
1answer
69 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 ...
2
votes
1answer
46 views

How to write sequence of machine code in radare2?

I know how to write an opcode and how to increment and decrement machine code using plus and minus keys. However, how do I write a sequence of machine code at an offset? E.g. if I want to write five ...
-4
votes
1answer
139 views

Defence against cracking [closed]

Say I wrote an application and published demo version of it with a possibility to buy a full version. I was wondering if it is possible to stop people from cracking it, so that the only ones who use ...
0
votes
0answers
46 views

Any way to edit an ELF binary without hex? [duplicate]

So, this is a noob question, I am a complete beginner in this field, so sorry if I'm wasting your time in any way. I wanted to know, if there is a way to edit an ELF binary without using a hex editor....
0
votes
1answer
52 views

Is it possible to change a signed byte to an int in compiled assembly code?

I'm trying to mess around with an old game and I want to reposition a UI element. I found the address of where the x and y position get set (It's set to an X position of 90 and a Y position of 358) ...
0
votes
1answer
90 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
59 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
61 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
259 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 ...
1
vote
1answer
540 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
0answers
48 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 ...
1
vote
1answer
156 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
120 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
387 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
550 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
159 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 ...
1
vote
3answers
322 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
vote
2answers
1k 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 ...
3
votes
2answers
936 views

Patching a Mach-O Binary Header to remove a LC_SEGMENT

i have an ARMv7 Mach-O Executable on which I want to patch out a certain segment in the binary header which prevents DYLD injection. more information here under point 3. of preventing dyld injection....
5
votes
1answer
298 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 ...
1
vote
1answer
274 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
1answer
49 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
449 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
votes
2answers
45 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
774 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
2k 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 ...
4
votes
1answer
2k views

Injecting shellcode in ELF binary

I am trying to inject a piece of shellcode inside a 32-bit ELF executable. I am running Ubuntu 14.04 64-bit. Hence, all the commands I have run require explicit switches to produce 32-bit code. I am ...
1
vote
1answer
3k 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 ...
-2
votes
1answer
2k 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:...
3
votes
2answers
3k 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 (...
2
votes
1answer
295 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 ...
4
votes
1answer
5k 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 ...
4
votes
2answers
169 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
122 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
1k 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 ...
1
vote
1answer
372 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) ...
1
vote
1answer
102 views

Patch methods in COM dll

I have COM DLL with one class and one interface. When I open it with COMView I see all the methods in the class/interface. I want to modify the behavior of one method in this COM but I don't know how....
0
votes
1answer
369 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 ; ...
7
votes
2answers
2k views

Virus uses a custom XOR encryption and need help possibly cracking it / Reversing EXE

As stated in my previous question i was infected by a encrypting virus that encrypts two 1024 byte blocks of any given file (First 1024, and last 1024) in some type of custom CFB XOR encryption. I ...
2
votes
0answers
203 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 ...