nasm
NASM is a general-purpose x86 assembler that outputs various object file formats including flat binary, a.out, COFF, ELF, and Microsoft DOS/Win32 files. It includes NDISASM, a prototype x86 binary-file disassembler using the same instruction table.
Description
NASM, the Netwide Assembler, is a portable 80x86 assembler designed for producing flat-form binary files, Unix object files (a.out, COFF, ELF), and Microsoft 16-bit DOS and Win32 object files. It serves as a key tool for low-level programming and assembly code development in cybersecurity contexts like exploit development.
NDISASM, included with NASM, functions as a prototype disassembler for x86 binary files, leveraging NASM's instruction table for accurate disassembly. This makes it valuable for reverse engineering tasks where analyzing binary code is essential.
Released under the 2-clause BSD license, NASM is lightweight with an installed size of 3.67 MB and depends on libc6. It supports Kali Linux environments for hands-on labs in x86 skill paths and exploit development essentials.
How It Works
NASM assembles x86 assembly code into specified output formats like ELF, COFF, or flat binary using its instruction table. NDISASM disassembles x86 binary files by parsing bytes with the same table, supporting processor modes (16/32/64-bit), auto-sync, and vendor-specific adjustments for accurate instruction recognition.
Installation
sudo apt install nasmFlags
Examples
nasm -hnasm -vnasm -@ response_filenasm -o outfile filenamenasm -h -optnasm -h allndisasm -hndisasm -b 32 file