Skip to main content

Command Execution Program in Assembly language

Hi Friends, Welcome Again To my Blog. Friends, 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 Assembly
2. Find String Length In Assembly Language
3. Subroutine Demo In Assembly language
4. Some Subroutine Functionality Example
5. User Input Example In Assembly Language
6. Variable Decleration/Include function In Assembly
7. Convert Integer Into ASCII in Assembly Language
8. Arthematic Functions In Assembly Language
9. Calculator In Assembly Language

Here, its my code

Command Execution Program in Assembly language

; Program To Execute Commands
; author : Suraj Singh Bisht
; Email  :

; section bss

; section data
 filename db "/bin/ping", 0h ; Decleare String
 argv  db "", 0h ; Argument

 arg_array dd filename ;
   dd argv  ; Array of Arguments
   dd 0h  ; End of Argument

 environ  db 0h ; Empty Argument

; section text
 global _start ; Linker Trigger

; Routine
 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

Related Post

Top Visited

Big List Of Google Dorks For Sqli Injection

List of Keyboard Shortcuts Keys for GNOME Desktop (Kali linux / Linux / Ubuntu/*nix )

Create Simple Packet Sniffer Using Python

how to install burp suite in Linux/Ubuntu 16.04

How to create Phishing Page Using Kali Linux | Webpage Page Cloning Using Kali Linux Social Engineering Toolkit

Best 1000 User-agents List For Web Scraping

How To Install GDB Peda?

Latest Google Dorks List

2 Easiest Way To Enable Monitor Mode in Kali Linux | Airmon-ng | Iwconfig

How To Create Snake Game Using Python And Tkinter - Simple python games