This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.
JavaScript algorithmsartificial-intelligencebugbountycryptographycyber-threat-intelligencecybersecurity-projectsethical-hackinghacking-toolsmalwarenessusnetwork-monitoringnetwork-securitynmapportscannerpythonpythonprojectsthreat-intelligencevirus-scanning
Code
.section .data
.section .text
.globl _start
_start:
nop
movl $22, %edx
mov_data_between_registers:
movl %edx, %eax ; Move the value in EDX to EAX
exit:
movl $1, %eax ; syscall: exit
movl $0, %ebx ; exit code 0
int $0x80 ; Call Linux kernel to exit
Explanation
movl $22, %edx:- Loads the immediate value
22into theEDXregister. - The
lsuffix indicates this is a 32-bit operation.
- Loads the immediate value
movl %edx, %eax:- Moves the value from
EDXtoEAX, demonstrating register-to-register data movement.
- Moves the value from
Exit Sequence:
- The
movl $1, %eaxsets up theexitsystem call (syscall number 1). - The
movl $0, %ebxsets the exit status code to0. - The
int $0x80invokes the Linux kernel interrupt to perform the system call.
- The
Assembly Workflow
To assemble, link, and run the program, follow these steps:
Assemble:
nasm -f elf32 moving_data_between_registers.asm -o moving_data_between_registers.oLink:
ld -m elf_i386 moving_data_between_registers.o -o moving_data_between_registersRun:
./moving_data_between_registers
Debugging with GDB
If you want to debug and observe register contents, use GDB:
Start GDB:
gdb -q moving_data_between_registersSet Breakpoints:
b mov_data_between_registersRun and Step Through:
r # Run the program si # Step through instructionsInspect Registers:
- After
movl $22, %edx:i r edx - After
movl %edx, %eax:i r eax
- After