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  : 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

Related Post

Top Visited

Create Simple Packet Sniffer Using Python

how to install burp suite in Linux/Ubuntu 16.04

Big List Of Google Dorks For Sqli Injection

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

Latest Google Dorks List

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

What is the use of Pseudo header in TCP/UDP packets?

how to configure burpsuite with firefox?

Python Beautiful Soup Module - Tutorial - Part 2

Create Ping Sweeping Script Using Python