16

Main is usually a programmer-defined entry point, while entry is defined by the compiler, it's doing many other operations such as libc initializations, heap allocation, and so on, and eventually, call the user-defined main entry point. You can see main as a callback function that defined by the user and eventually called by entry.


6

In x86 assembly, al is the least significant byte of eax register, which is typically used to return values from function calls. The test al,al is a bitwise AND operation between al and itself. If al & al == 0, the zero flag will be set to 1. je (or jz) instruction will jump to the address of label, if the zero flag is 1. Otherwise, the je will do ...


6

It is rather C++ question, but nonetheless: what you see is an assignment operator for the class QString. It enables you to write things like a = b, where a, b are of QString type. The reason why it returns value is to enable you to write: a = b = c instead of a = c and b = c and you may see this pattern in case of other operators overloading (see question ...


6

src sub_408678 is probably a label given by your tool to the address 408678 [esp+0x35] the destination is a pointer to a 32 bit value it can take anything from 0x0 to 0xffffffff so after executing this instruction 00401234 mov dword [esp+0x35], sub_408678 [esp+0x35 will point to 0x408678 in high level construct this will be <sometype *>foo ; // ...


4

In short, the difference is in the format into which Java and native code are compiled and executed. Compilation into native code formats eliminates from resulting executable a lot of information that Java code keeps by design, including, but not limited to the following list: Class names Method names Properties names and types Methods borders Exact ...


4

If you were given a piece of source code written in a language you had never seen before, you would want to study the syntax and rules of the language so that you could understand what the piece of code is doing. A compiler transforms a high-level human friendly language (C for example) into in binary instructions that a CPU can run directly. These binary ...


3

Regarding unaff_ and in_ prefixes (source): in or unaff : this typically indicates that a register is read before it is written (and it does not contain a parameter passed to the function) So, if you encounter them in decompilator, it means that their values are used before they are initialised in the function (they contain the values assigned earlier, in ...


3

Two additional methods that haven't been mentioned yet. binwalk's disassembly scan (note: must have capstone installed) Disassembly Scan Options: -Y, --disasm Identify the CPU architecture of a file using the capstone disassembler -T, --minsn=<int> Minimum number of consecutive instructions to be considered valid (...


3

Since local variables are usually placed on the stack in x86 and esp register can change during function execution, it is more convenient to save the value of esp register on function entry and access data relatively to that value. ebp register is used for this purpose. So you will often see push ebp mov ebp, esp lines at the begining of functions. In the ...


3

IIRC the typeid operator returns a pointer to a type info instance. Overall the code looks like a lambda expression implementation; the “constructor” captures the context so that the “handler” (lambda body) can access the variables it needs from the outer scope.


3

I don't think IDA handle multiple PE instance, one of the solution I used in the past was to create a new segment, load the .text and ask IDA to decompile this segment.


3

Last year, I released an IDB for a piece of large, complex malware written in C++, which made regular use of virtual functions, which produce patterns of indirect call instructions like the ones your question discusses. I conducted that analysis purely statically, and I may release more IDBs like it later this year that were also done via static analysis. ...


3

Although these terms are being used interchangeably, There is an intrinsic difference between disassembler and decompiler definitions traditionally. Lets first consider common steps involved in converting low level code to high level human readable code. This is similar to compilation where you convert high level code to low level machine code or an ...


3

This is compiled to simple jump-table. Firstly it subtracts 1 from the a variable, so now your switch-case is for values in range <0;4> inclusive (instead of <1;5>). Next it checks if a is > 4, if so it jumps to the default label at 0A1109F. Note that the JA instruction is for the unsigned values, so it will jump to the default label in case ...


3

those are pointer arithmetics marks is an <<<;ADDRESS;>>>>> assume 0x10000000 it points to an integer whose size is 4 in 32 bit machine so the next integer will be at 0x10000004 , and the next will be at 0x10000008 and so on &marks[0] = 0x10000000 &marks[1] = 0x10000004 &marks[2] = 0x10000008,c,10,14,18,.....nn each of ...


2

Machine learning can be used to identify the target CPU of machine code with a high degree of accuracy. For example, the ISAdetect tool can identify machine code targeting 23 different architectures using machine learning. There is a web API that one can use to upload executable binaries or pieces of machine code to be analyzed by this tool. Here is the ...


2

This is a relatively old question, but I recently stumbled across the same problem myself. In the interest of the greater good, I will explain what is going on. It is likely that the structure of your payload (the entire sequence of bytes you send to the process) is something like this: PADDING + SHELLCODE + RETURN_ADDRESS Sadly, this does not work well ...


2

As long as you can find a static library for a similar version of libc, you can use IDA Pro's FLIRT signatures. Generally this code is not obfuscated, as the system's libc.a will be used. It's possible to compile libc from source and use obfuscations, but this is not what you'll usually encounter. I've got a script (link below) that I use to generate a &...


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 ...


2

While ARMv7-A does include the Thumb-2 subset used in ARMv7-M, the actually used instructions in ARMv7-A binaries will likely be pretty different from those used in ARMv7-M microcontrollers. For one example, microcontrollers rarely use NEON floating-point or vector instructions from ARMv7-A (Cortex-M4F has FPU but IIRC it’s single precision only). Conversely,...


2

Starting from address 0x56 all your instructions seems to be off. And if you look closely it there is a pattern how much off they are from the original. For example, at offset 0x58, there's supposed to be push edx so the byte should be 0x52, but you have push esp which is 0x54. Since the article mentions that this part is encrypted with a xor (with a single ...


2

Unlike Linux, syscall numbers can and do change between Windows versions, so any program using raw syscalls would not run properly on a different OS release. The only officially supported API is provided by the system DLLs such as kernel32.dll, user32.dll and so on. So while fully static Windows binaries are possible, they are not practical and so are very ...


2

In ida you can make use of a idapython function called MakeFunction. You can basically iterate through the code and define undefined functions. ExampleScipts: IDA MakeFunction However If you ask this question specifically for Ghidra then I believe there's a plugin to run idapython scipts in Ghidra. Run IDAPython scripts in Ghidra Hope this helps.


2

Binary-level code coverage analysis can be done either statically or dynamically. Static instrumentation can, among other things, offer drastic performance improvements over dynamic tools like Pin. However, it is considered, somewhat traditionally, to be brittle, i.e., it breaks binaries. For example, see the last note on static rewriting in afl-qemu. Hence, ...


2

Depending on the specific instruction set encoding, regular expressions operating on the binary itself may be flexible enough to ignore the parts which would change based on address. Piping the code through a naive disassembler and running the regular expression engine on the textual ouptut may be preferable to doing so on the binary as it's a lot easier to ...


2

Yes, this sounds perfectly normal. If the program did not use C++, you won't see thiscall with usage of ecx but just standard stdcall or cdecl which use only stack for passing arguments.


1

According to the documentation Page 1320 The result is stored in register AX, register pair DX:AX, or register pair EDX:EAX (depending on the operand size), with the high-order bits of the product contained in register AH, DX, or EDX, respectively. If the high-order bits of the product are 0, the CF and OF flags are cleared; otherwise, the flags are set. In ...


1

From your question it is not quite clear what you want to achieve: I assume you need the address in memory where you can find the "Address of Entry Point", as well as the file offset where the code at "Address of Entry Point" is stored. Let us look at your screenshots for the file offset of "Address of Entry Point" In your ...


1

In PE file, AddressOfEntryPoint is a relative address to the image base, so you will have 0x11046 - 0x10000 = 0x1046 value in Optional Header. For more information, see PE format and search for "AddressOfEntryPoint". The reason you see 0x00011046 being displayed as the entry point (in CFF Explorer I suppose) is that when the file is loaded into ...


1

The entry function you mentioned is the function where the entry point of the program is located. This entry function contains the first instructions of the program executed when you run the program. The main function recognized by disassemblers is the the function where the main function of the program which code is compiled directly from the the developer'...


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