Skip to main content

Questions tagged [nasm]

Nasm for *Netwide Assembler* is a very popular and free assembler and disassembler for the x86 architecture (16-bits, 32-bits, and 64-bits).

1 vote
1 answer
79 views

Inject ELF with an entierly self-contained code section that can statically call standard library functions

What I want to do What I want to do is inject an existing ELF binary with additional code that runs before the original .text section and then transfers control back to it. What I can already do Now, ...
PaperTsar's user avatar
  • 111
1 vote
0 answers
114 views

How can I make IDA disassemble in NASM-like syntax instead of MASM-like syntax?

I'm new to reverse engineering, assembly and IDA and I'm learning NASM. Whenever I load an executable (a PE file or an ELF) IDA disassembles it using a MASM-like syntax (it looks to me that it does) ...
LyZeN77's user avatar
  • 11
2 votes
0 answers
69 views

​Why output is disabled in console when using int3?

​I am using NASM(2.15) assembler to generate code. But I am unable to figure out why it does not show output in the console(windows system) when using int3 - software breakpoint, it only shows output ...
Viktor's user avatar
  • 461
0 votes
0 answers
107 views

Starting out with reverse engineering. What assembly is disassembled code

I am new to reverse engineering and want to analyze my own exe/dll files. I took a look at nasm and masm and so far I have the feeling that this is unnecessary for me to learn in detail because it ...
Nur1's user avatar
  • 101
2 votes
1 answer
258 views

far jump do not point to instruction?

My title is kind of ambiguous and not sure if it is true, Hence the question mark at the end. Basically, I was trying to trace windows printf in NASM to identify "what is the last call/function ...
neehack's user avatar
  • 21
0 votes
1 answer
69 views

NULL character (same code) different locations

I'd like to know why NASM generates different opcodes for the same code, when it's in the begin or end of the program? This question is important because I found NULL characters when I compile the ...
bugsam's user avatar
  • 3
9 votes
4 answers
10k views

What is the difference between MOV and LEA in example?

Looking at an assembly code snippet I see: lea rax, [rbp-0x50] Which tells me that the rax register now points to whatever value is in rbp-hex(50). Question. Would I achieve the same result doing ...
user3732445's user avatar
0 votes
1 answer
1k views

Reassembling reversed ASM

I am trying to reassemble code reversed from an executable using radare2. I have managed to extract the asm and am using nasm for reassembling. The question is, the code also contains commands like ...
Flipsyde's user avatar
  • 103
0 votes
1 answer
284 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 ...
Arne's user avatar
  • 103
2 votes
1 answer
242 views

Inversion of input parameters in ASM

the code is: .global asm0 asm0: push ebp mov ebp,esp mov eax,DWORD PTR [ebp+0x8] mov ebx,DWORD PTR [ebp+0xc] mov eax,ebx mov esp,ebp pop ebp The entry is: asm0(0x2a,...
Ricardo Prieto's user avatar
5 votes
1 answer
2k views

What's the meaning of dword_XXXX and offset dword_XXXX in IDA?

Consider the following code: In C++: SomeClass* globalPointer; // we don't know what it points to, but it's not null a pointer, it's initialized void someFunction() { globalPointer->...
anx199's user avatar
  • 175
2 votes
1 answer
3k views

NASM, MASM, Intel, AT&T' syntax?

I see word NASM, MASM, Intel, AT&T. I am confused between them. Is it different types of assembly?
QChí Nguyễn's user avatar
2 votes
1 answer
724 views

Objective-C disassembling - I dont understand this code

I assembled a simple objective-c file that prints hello to the screen. this is the code: #import <Foundation/Foundation.h> int main() { NSString* a = [NSString stringWithUTF8String: "hi"]; ...
Camden's user avatar
  • 123
6 votes
1 answer
1k views

How to Make .text Section in Assembly Writeable for Win7-64 EXE

I have a basic XOR decoder that functions perfectly in Linux, but when I try to move it over to an exe in windows, it fails. I am leaving this question open for historical reference since the issue ...
hexhatchet's user avatar
0 votes
2 answers
1k views

Working Linux assembly XOR Encoder/Decoder Failing on Windows

Should I be able to extract shellcode from a basic (tested and working) Win7-64 message box app and place the extracted shellcode into a tested and working assembly language encoder/decoder and expect ...
hexhatchet's user avatar

15 30 50 per page