
Join this assembly language foundation course for ethical hackers, pentesters, computer science students, programmers, malware analysts, or anyone wanting to learn something new. Acquire programming language fundamentals and Linux basics.
Explore how a computer system uses the CPU, memory, and input/output devices connected by buses to process data from user input to output.
Learn how the cpu processes input via the control unit and execution unit, using registers and the flag register, with instruction retrieval, decoding, data access, and result storage through memory.
Explore CPU registers across 8-, 16-, and 32-bit sizes, including general purpose, segment, and instruction pointer types, with examples like eax, ebx, ecx, edx, and cs, ds, ss, program counter.
Explore how the CPU uses status flags to indicate successful or failed arithmetic and logical operations, and preview the flag register structure.
Explore the 32-bit flag register and its status flags: carry, zero, auxiliary, sign, overflow, and parity. Understand how system flags and the direction flag influence CPU behavior and string handling.
Explore how cpu flags such as carry flag, parity flag, auxiliary flag, zero flag, sign flag, overflow flag, and direction flag indicate arithmetic and string operation results, with binary examples.
Discover the primary memory layout, including text, data, and bss segments, and how command line arguments, environment variables, uninitialized data, and initialized data are organized.
View the stack of a running program by inspecting /proc/[pid]/maps to locate the stack segment, its start and end addresses, and the memory map, to aid assembly programming.
Learn the basic frame of an assembly program, covering dot data, dot bss, and dot text sections, the _start entry point, and assembling with as and linking with ld.
Explore how system calls drive tasks across languages, highlighting the write syscall used to print hello world in C, Python, and Java, and its relevance to assembly programming.
Learn to print hello world with a first assembly program using the write system call, including system call number, arguments, buffer, and adding exit to prevent segmentation fault.
Debug an assembly program with gdb by assembling, linking, and running a hello world; set breakpoints, use nop to fix, and inspect registers and memory to verify the write syscall.
Call C library functions from assembly using printf and exit. Set up data and text sections, push arguments on the stack, and link with the dynamic linker.
Define data in the assembly data section using directives such as dot esc for strings, and dot int, dot float, and dot quad, illustrated by hello world and pi.
Learn to define and use static symbols in assembly with the .eku directive, substituting literals with named symbols like string length to print hello world.
Define data in the bss section with a 15-byte buffer variable, then use read and write syscalls to input and print, and exit.
Move data in assembly with the move instruction, using movl, movw, or movb for 32‑bit, 16‑bit, or 8‑bit moves, with $ and % for immediates and registers like %eax.
Learn how the mov instruction moves data of 32, 16, and 8 bits between registers in assembly, using a simple data movement program and debugging with gdb.
Explore advanced data movements in assembly, including moving data into memory, using registers like x, edx, and address manipulation, demonstrated with a four-byte mydata variable and 32-bit moves.
Learn to create an integer array in assembly and access elements using base address, offset, index, and size, then move the selected value into a register.
Explore direct and indirect memory addressing in assembly by learning how to move data directly to a memory address and how to use a register as a pointer with brackets.
Explore practical direct and indirect addressing in assembly through a simple number variable, moving five with direct addressing and ten via an indirect pointer loaded into a register.
Explore indirect addressing using a simple assembly program, demonstrating memory layout, a base pointer and x register, and byte, word, and four-byte moves.
Learn to access indexed memory locations in assembly by using a base address, offset, index, and element size to retrieve list elements and move them into a register.
Create a stack frame in assembly by copying ESP to the base pointer and subtracting eight bytes to allocate space, illustrating top and bottom of the stack and memory growth.
Learn how to add and remove 32-bit data on the stack using push and pop, and manage the stack frame with esp and ebp in assembly.
Demonstrate exchanging data between registers with the xchg instruction, swap values between x and ebx, and apply a byte swap to reverse a 4-byte order, illustrating endianness.
Learn how to set and clear the carry flag in assembly using STC and CLC, and watch the carry flag evolve in a simple flag dot s program.
Enable the overflow flag by overflowing the x register with maximum data, then clear it with xor x, x, illustrating overflow flag handling in assembly.
Learn how to set and clear the parity flag in assembly by performing arithmetic and logic operations that produce even or odd results, using the AL register and test operations.
Set and clear the sign flag in assembly by using minus one and a test with 42, illustrating how negative results set the flag and positive results clear it.
Set and clear the zero flag in assembly by using the test instruction on x and x; set for zero results, unset for nonzero results.
Understand how the instruction pointer (ip) tracks the next instruction in memory within assembly, and use gdb and breakpoints to observe ip movement between instructions.
Explore how the jump instruction in assembly redirects the instruction pointer by jumping to labels, using a start label and function-like labels, with practical examples and debugging tips.
Understand how the call instruction in assembly saves the return address on the stack, jumps to a target location, and returns to resume at the original point.
Explore how conditional jumps work in assembly using the cmp instruction, subtraction-based comparisons, and the zero flag to decide whether a jump is taken or not.
demonstrates using the zero flag as a conditional jump in assembly, showing how subtracting values sets zero and triggers jump if zero (equal) to a label, with exit syscall example.
Explore how to use the overflow flag for conditional jumps in assembly, by overflowing a 32-bit x register and jumping when the flag is set.
Use the parity flag as a conditional jump in assembly. See how parity status determines a jump versus continuation and affects program exit codes.
Explore the four numeric data types used in assembly programming, including integers (signed and unsigned), simd integers (rmx and sse), binary coded decimal, and floating point numbers.
Explain signed and unsigned integers and how memory stores signed numbers using a sign bit. Illustrate 8-bit and 32-bit register storage, and the -128 to 127 range.
Demonstrate how unsigned numbers are stored in memory using an 8-bit example within a 32-bit register, illustrating the 0 to 255 range and why 500 cannot be stored.
Explore using unsigned integers in an assembly program by declaring a single-byte variable, storing values from 0 to 255, and observing how 256 overflows and is truncated to 0.
Explain how the CPU loads numbers into memory by converting decimal values to hexadecimal and storing them in reverse order, and how direct hexadecimal input is stored reversed.
Demonstrate how the CPU stores numbers in memory by loading a decimal integer and a long hexadecimal value, then inspect the memory bytes in GDB to see their reverse-order storage.
Show how to work with signed integers in assembly by loading -27 and -3, adding them with the add instruction, and storing the result in a register.
Explore SIMD registers in assembly, differentiating 64-bit MSS and 128-bit SSE registers and how they store integer data for SIMD operations.
Explore mmx registers, eight 64-bit m0 to m7 that store integer data in assembly. Pack 8-bit, 16-bit, and 32-bit values into registers and move data with the move q instruction.
Learn to store integers in mmx registers using a simple 32-bit and 64-bit assembly program, moving value one into M0 and inspecting registers with gdb.
Understand sse registers, 128-bit xmm registers, from xmm0 to xmm7, and how to store 16 bytes or eight 16-bit words, using the movdqa instruction for aligned data.
Use sse registers in assembly to move data into xmm0 and xmm1 and view 128-bit representations. Demonstrate how 32-bit integers map into 64-bit and 128-bit layouts across xmm registers.
Explore binary coded decimal, the BCD data type encoding decimal digits 0–9 into binary. Store two digits per byte and move BCD values into 70 bits in FPU registers.
Learn how to store BCD data in memory and the st0 FPU register with the fb instruction, using 72 bits (nine bytes) and a sign bit.
Move floating point numbers in assembly with FLDS to load single and double precision values into the FPU register stack, then store the top value using FSTAL.
Demonstrates storing floating point numbers into the FPU registers and memory using assembly instructions, moving 1.23 and a double into St0 and then into a data variable.
learn to move four floating point values at once into a 128-bit sse register using move ups. observe how an xmm register stores four 32-bit floats in memory.
Learn how to add numbers in assembly using the add instruction, with size specifiers L, W, B and source and destination operands, and how the result stores in the destination.
Demonstrate adding negative numbers in assembly across 8-bit, 16-bit, and 32-bit values using mov and add with al, bl, ax, bx, x, and ebx registers, and exit via interrupt 0x80.
Explore how to detect the carry flag in an eight-bit addition using move, add, and jump if carry (jk) to branch when a carry occurs.
Demonstrate detecting the carry flag in an addition by a simple x86 assembly program that adds two bytes, uses jump if carry, and prints results.
Explore overflow in addition arithmetic in assembly with signed eight-bit registers, showing how -120 plus -10 yields -130 but wraps to 126, and how the overflow flag signals the error.
This lecture demonstrates overflow in an 8-bit addition in assembly and explains how extending to 16-bit registers prevents overflow, using gdb for hands-on debugging.
Detect overflow in signed addition in assembly by checking the overflow flag and jumping to print 'there is an overflow' when -120 and -10 overflow in eight-bit arithmetic.
Explore how the add carry (adc) instruction transfers a carry from one addition to the next in eight-bit group operations, using an example of adding binary numbers.
Learn to perform add with carry using the adc instruction by splitting 16-bit numbers into two 8-bit registers and adding halves with carry to obtain correct results.
Learn how binary subtraction works in assembly programs by converting numbers to binary, flipping bits, adding with carry, and using the final carry to identify positive or negative results.
Learn to perform subtraction in assembly with the sub instruction, using source and destination operands, demonstrated on 12 minus 5 and 5 minus 12 with 8-bit registers.
Master increment and decrement in assembly using i and c for increment and d c for decrement. Apply to 8-bit, 16-bit, or 32-bit destinations in registers or memory.
Explore multiplying two unsigned numbers in assembly using the mul instruction, storing the first input in eax and the second in a source operand, with the result stored in eax.
Master three assembly approaches for multiplying signed numbers: one-input emul, two-input imul with source and destination, and three-input imul with multiplier, source, and destination.
Explore division in assembly using the div instruction. Store the dividend in the x register, set the divisor, and obtain the quotient in x and the remainder in a register.
Explore bit shifting in assembly, practicing shift left and shift right on an eight‑bit register and observing how bits move to produce binary patterns.
Learn how to rotate bits in assembly, using rotate left and rotate right instructions on an 8-bit register, preserving all bits by wrapping them around.
Explore assembly logical operations, including or, and, and xor, with truth-table demonstrations and binary inputs. Learn how these operations underpin encryption and decryption in ethical hacking, with upcoming practicals.
Learn how to use and, or, and xor logical operations in an assembly program. Move data into registers, perform the bitwise operations, and observe results.
Learn how strings move in assembly using move instruction for byte, word, and long moves. See how to link source and destination pointers to esi and edi to transfer data.
Explore how the direction flag governs string movement in assembly, shifting source and destination pointers during byte, word, and four-byte moves. See on and off behaviors and pointer progression.
Explore how the direction flag (STD) alters ESI and EDI during string moves, causing pointer advancement toward the string end and affecting single, double, and four-byte transfers.
Set up ESI and EDI pointers and load the string size, then clear the direction flag and use the rep movsb instruction to copy the string from source to destination.
Learn to compare strings in assembly with cmps, using source in sc and destination in edi, in 32-bit size, and print strings are equal or not based on zero flag.
Learn how to compare large strings in assembly using a repeat (rep) with compare, control string length with a counter register, and verify byte-by-byte equality via the zero flag.
Explore loads and stores string instructions (lods and stos) in assembly, moving strings from source to destination using esi, edi, and al, with byte transfers and a loop.
Explore string encryption in assembly by loading bytes, applying xor with a key, and storing encrypted results using esi and edi pointers across a four-byte loop.
Learn to write an assembly program that encrypts a string from a source to a destination, using an xor key, a loop, and data and text sections.
Learn how to decrypt an encrypted string in assembly by applying xor with a fixed key, using source and destination pointers, load and store operations, and a decrypt loop.
Define a function in assembly by using the .type directive with the function attribute, name the function, implement its code, and end with a return to the caller.
Learn how to create and use a simple add function in assembly, define and call the function, pass numbers in registers, and return to the main program before exiting.
Demonstrates passing two integers from a main program to an assembly add function, calling the function, and returning the sum via registers.
Learn how to create and remove stack frames using function prologue and epilogue. Understand how push and move establish the frame with esp and ebp.
Learn to create and tear down function stack frames in assembly, using prologue and epilogue with push and move to manage base pointer, stack pointer, and return addresses.
Demonstrate passing function parameters on the stack in assembly by building stack frames, pushing values, recording the return address, and accessing data with ESP and the base pointer.
Explore how stack data is managed in an assembly function, including push operations, stack frames, esp and ebp usage, return addresses, and on-the-fly data access with gdb.
Create a separate function file and a main program, assemble and link their object files, then pass inputs via registers and call the add function from main.
Explore how command line inputs become stack-based program arguments, analyze the stack layout around the ESP pointer, and visualize input parameters through a simple hello program and gdb exploration.
Learn Linux system calls in assembly by locating system call numbers in unistd.h, determine parameter counts with man, and implement calls like write using file descriptor, string pointer, and size.
Store the system call number in eax, place inputs in the designated registers (eb, sgx, sc, eddie), and execute the call with int 0x80 to invoke the operating system.
Master using the write system call in 32-bit assembly to print hello world via file descriptor 1, then exit cleanly with the exit system call.
Learn how system calls return values are stored in a register after interrupt 0x80, with a write syscall example showing bytes written.
Find the exit system call return value in a 32-bit assembly program using gdb, showing how the value loaded into the register becomes the exit code.
Apply linux system call rules to fetch the process id using getpid in 32-bit assembly, moving 20 into eax and invoking int 0x80.
Develop an assembly program that uses the getuid system call (syscall 24) via int 0x80 and std_32.h to fetch the current user id into the x register.
Explains handling advanced system call return values, including multiple outputs, using the sysinfo call by passing a structure pointer and reading uptime, loads, and memory statistics.
Assembly language programming for hackers is a specialized skill set that combines the knowledge of computer architecture and low-level programming with the creativity and resourcefulness of a hacker. Assembly language is a low-level programming language that is used to write software that interacts directly with a computer's hardware. It is a powerful tool for hackers who need to perform intricate and precise operations on a system, especially when higher-level languages are not sufficient or efficient enough.
Hackers who specialize in assembly language programming are often able to perform tasks that are impossible or extremely difficult with other programming languages. For example, they can write code that directly manipulates a system's memory or registers, which can be critical for certain types of hacks such as exploiting buffer overflow vulnerabilities. Assembly language programming can also be used for reverse engineering, where hackers analyze and understand the inner workings of a system by examining its assembly code.
However, assembly language programming requires a deep understanding of computer architecture and low-level programming concepts. Hackers who specialize in this area must be familiar with the instruction set of the specific computer or processor they are targeting, as well as be able to write code that is optimized for performance and efficiency. Despite its complexity, assembly language programming remains an essential skill for hackers who want to push the boundaries of what is possible with computers and systems.