Hi readers, Welcome Again To my Blog. readers, Today In This Post I am going To Share Another Mind Blowing Example of Assembly Program in which I simply tried to execute linux command. Actually, This Example is very important to understand if you want to learn exploit writing.
By The Way, If you Are new And Don't Know How To Start, Compile Or Run?
Then, Don't Follow up Our Previous Blog post. Here, it's The List.
1.
Hello World In Assembly2.
Find String Length In Assembly Language3.
Subroutine Demo In Assembly language4.
Some Subroutine Functionality Example5.
User Input Example In Assembly Language6.
Variable Decleration/Include function In Assembly7.
Convert Integer Into ASCII in Assembly Language 8.
Arthematic Functions In Assembly Language9.
Calculator In Assembly Language Here, its my code
Command Execution Program in Assembly language
;
; Program To Execute Commands
;
; author : Suraj Singh Bisht
; Email : surajsinghbisht054@gmail.com
;
; section bss
SECTION .bss
; section data
SECTION .data
filename db "/bin/ping", 0h ; Decleare String
argv db "www.bitforestinfo.com", 0h ; Argument
arg_array dd filename ;
dd argv ; Array of Arguments
dd 0h ; End of Argument
environ db 0h ; Empty Argument
; section text
SECTION .text
global _start ; Linker Trigger
; Routine
_start:
mov eax, 11 ; Invoke SYS_EXECVE () - > execve(const char *filename, char *const argv[], char *const envp[])
mov ebx, filename ; EBX = File name
mov ecx, arg_array; ; ECX = array of argument addresses
mov edx, environ ; EDx= Environment
int 80h ; kernel Interpt
mov eax, 1 ; InVoke SYS_EXIT
mov ebx, 0 ; Return 0
int 80h ; Kernel Interpt
Please Check Github For Latest Error Free Examples Codes. Click here