Pular para o conteúdo

FreeBSD Execve

Usando syscall execve em um FreeBSD.
Perfil removido removido
Hits: 5.844 Categoria: C/C++ Subcategoria: Assembly
  • Download
  • Nova versão
  • Indicar
  • Denunciar

Descrição

Usando syscall execve em um FreeBSD.
Download execve.c Enviar nova versão

Esconder código-fonte

#Assembly FreeBSD x86
#syscall(59,"/bin/sh".....);
#as execve.s -o execve.o
#ld execve.o -o execve
#______[execve.s]_________

.section .text
.globl _start
_start:

        xor %eax,%eax          #%eax = 0
        push %eax                 #Empurra %eax = 0 = NULL na stack 
        push $0x68732f6e       #Empurra sh/n
        push $0x69622f2f       #Empurra ib//
        mov %esp,%edx        #Move %esp = sh/nib// para %edx
        push %eax                 #Empurra %eax = 0 = NULL 
        push %esp                 #Empurra %esp  = /bin/sh terminando com NULL
        push %edx                 #Empurra %edx  = /bin/sh
        push %eax                 #Empurra %eax  = NULL
        mov $0x3b,%al           #Syscall 0x3b = 59 = execve
        int $0x80                    #Interupção do Kernel

Calculadora em C com Assembly (multiplataforma)

GAS Inteiro para String

Inverter uma string, Assembly8086

Relógio em assembly NES 8 bits (variante do 6502)

Retorna o maior e menor elemento de um vetor em Assembly

Nenhum comentário foi encontrado.

Contribuir com comentário

Entre na sua conta para comentar.