Hot answers tagged

7

This is just a preferred address. Windows can load the binary at almost any address and rebase it to this new location. ImageBase: The preferred address of the first byte of image when loaded into memory; must be a multiple of 64 K. The default for DLLs is 0x10000000. The default for Windows CE EXEs is 0x00010000. The default for Windows NT, Windows 2000, ...


4

the last byte of API/library call instructions is always 0x0A It's because calls needs to have method (ref) as a parameter and methods are defined in the table that has an id of 0x0A. Having bytes of the call like this 280600000A let's go one by one. 0x28 - is the value for opcode 'call' and it takes one operand. the rest of the opcode is the metadata ...


4

This script is mostly obfuscated through renaming of variables and function names. I recommend using a tool such as Visual Studio Code Where you can right click the variable or function and select option "Rename all occurrences" and give everything human readable name. You can search for how a variable or function is generally used and give it a name based ...


4

It is also easy using x64dbg. When you break on the WriteProcessMemory the handle will be at [esp+0x4] in the memory. After you write down the handle (in this case 0xDC) you may go to the Handles tab in the x64dbg main window, then Right click -> Refresh. All the handles associated with your debugged process will be listed. Now you need to find the ...


3

which debugger are you using ? most debuggers will decipher the handle on the spot that is you can find out the handle info when you have broken on the WriteProcessMemory() Call itself here is how you can do it with windbg i am debugging ollydbg and olllydbg ais debugging calc.exe ollydbg is setting a breakpoint in calc.exe (uses WriteProcessMemory() ) ...


3

I am assuming that the malware is already on your disk (not all malware hits the disk!). So keep that in mind when following this answer. If this is not the case, please provide more information. On Windows many files that are in use and therefore cannot be deleted can be dealt in one of two ways: rename the file (the ren command on the command prompt ...


2

Encrypted and compressed data have high entropy. Tools for visualizing the entropy of information in binary files include binvis.io and binwalk.


2

Yep, I think I've seen a similar case before. It happens very rarely, but because you can do some stunts at the C preprocessor level as well as at the linker level, this happens to work. In this case I looked it up in the 3790.1830 DDK (Windows 2003 Server) and several newer WDKs and SDKs. Windows 2000/XP target (3790.1830/inc/w2k/winbase.h and 3790.1830/...


2

Many programs, especially malware, start a suspended child process (CreateProcess variants), overwrite its code with their own (WriteProcessMemory with or without VirtualAllocEx) and resume the main thread (ResumeThread). Also look for ReadProcessMemory, it is possible that the call to OpenProcess that you see is actually the same process reading from its ...


2

The -b switch specifies the format as binary, telling objdump to ignore the header and treat everything as instructions. The -D switch is also present in your question and this one means that objdump will treat the content of all sections as instructions even if it did take the header/file type into account. If you onlt specify -D then it will treat all ...


2

First of all, I want to clarify some of the concepts about "API calls." I will explain these concepts, mainly thinking of WinAPI and PE files. I'm not claiming these definitions are correct for all systems. Operating system programming interfaces I assume you are referring to OS API libraries as API. OS API is consists of different interfaces that ...


1

Nobody is going to publish their source code for active ransomware, there are various reasons for that: Its a business and the author makes money from it, and by giving away the source code there is a competitor. Of course that is not wanted It is possible that someone will find weaknesses, obviously that is possible for binaries aswell but usually it's ...


1

I figured it out: Right click and go to hex editor, then search the bytes you are looking for, then after finding it right click and select go to code reference.


1

Try to learn the structure of the apk, learn SMALI, understand how the apk works, after understanding what your calls are like and learning smali, it is essential to be able to make calls from resources, but stay tuned for apk protections , even considering a somewhat rare factor, there are also several online tools to assist in this factor, with a simple ...


1

Some ideas: Try using Image File Execution Options registry key to automatically run the debugger when the process starts. Patch an infinite loop (EB FE) at the entry point, start the binary, then attach to it from a debugger started as admin. Use kernel debugger or hypervisor-based debugger to debug the process without relying on user mode debugging ...


1

Agree with Robert - The common way to avoid false positives is having a large software pool of known benign software you can check your rules with. If you are just starting to write yara rules then concentrate on the easy way that is strings, write yara rules based on the unique strings. To answer this: Can anyone tell me which code is suitable and which ...


1

There are probably better answers I'd love to know about but let's say you're looking for instructions that have 0x10 as second operand like: cmp eax, 10 mov esi, 10 You could do something like: for func in idautils.Functions(): flags = idc.get_func_attr(func, FUNCATTR_FLAGS) if flags & FUNC_LIB or flags & FUNC_THUNK: continue ...


1

You can write values to the $zero register, it will simply remain zero. These 3 instructions are NOPs.


1

So, objdump's -d will only disassemble known code sections, usually .text and possibly other sections marked executable. If the section table is corrupted or missing, this will fail. However, the section table is not actually required for a file to be executable by the OS, so it can be removed or modified without affecting the file's behavior. In such ...


1

There are several ways you can achieve this. I assume you don't have source code of the executable, otherwise you would just tell the compiler to for example generate few nops for you after the call opcode, so you would simply patch the call without any data shifting. As you said, you could replace the call with long call (but as far as I know all calls on ...


1

Turns out: adb shell uiautomator dump adb pull /sdcard/window_dump.xml path/to/output or adb shell uiautomator dump --compressed adb pull /sdcard/window_dump.xml path/to/output


1

If I get your question right This link can help you to get the password of office files.


1

Relax. Don't panic. Those "highly suspicious binary bytes" are the UTF-8 representation of U+2026, which is the Ellipsis .... It's just to print exactly that string that you're quoting. It probably got shortened by an algorithm to make it fit in a preallocated space. The fact that you can disassemble it into "valid opcodes" does not mean a thing. You ...


1

Fileless malware is a bit of a misnomer. Fileless malware is still stored on disk just not directly on the filesystem. For example on windows systems most of the time fileless malware is stored in the registry which is not apart of the filesystem proper. You can get those types of samples from the same sources you cited.


1

Based on that command-line, I think that there's a scheduled task (or WMI entry) that is running periodically to download the file again, which is why it's not being removed. Defender might not be searching those locations without a full scan, for performance reasons.


1

I would say this really depends on your definition of packing. Typically packing is limited to compression moreso than protection. In this case the binary is updated to maintain virtual memory while minimizing file size. The entry point will decompress everything so, despite the files differing, the virtual memory at the point of executing the original entry ...


1

Is there a difference between unpacked and dumped that I should know about while loading it in IDA to see the actual imports section? You can dump anything not only packed binaries, but with packed ones it usually comes with stripped imports table just to make it hard(-er) to analyze. After sample is unpacked it usually rebuild its import table so it can ...


1

I think you are confusing yourself somehow and mixing up file offsets with virtual offsets lets try a simple example open a random exe in windbg patch the bytes in the current instruction Pointer disassemble subtract and look explanation for commands below cdb is console equivalent for windbg -c is the command line to be passed to the debugger eb . ...


Only top voted, non community-wiki answers of a minimum length are eligible