Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-23-2013, 08:56 AM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › Assembly v
« Previous 1 2 3 Next »

shellcode execve("/bin/ps",NULL,NULL);

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
shellcode execve("/bin/ps",NULL,NULL);
09-30-2011, 04:45 AM
Post: #1
ev1lut10n Offline
./Devilz Officer
Posts: 239
Joined: Aug 2011
Reputation: 82
shellcode execve("/bin/ps",NULL,NULL);
Code:
;by: ev1lut10n
global _start
_start:
xor eax,eax ;reset eax ke 0
push eax ; siapkan stack frame
push 0x73702f2f  ; sp//
push 0x6e69622f   ; nib/
mov ebx, esp
mov eax, 11
int 80h

compile:
nasm -f elf ps.asm
ld -o ps ps.o

.
Find all posts by this user
Quote this message in a reply
09-30-2011, 05:20 AM
Post: #2
tridi Offline
Pembaca Setia
Posts: 832
Joined: Jul 2010
Reputation: 33
RE: shellcode execve("/bin/ps",NULL,NULL);
bisa dijelasin dikit ga kang?
Visit this user's website Find all posts by this user
Quote this message in a reply
09-30-2011, 01:08 PM
Post: #3
darkslayer Offline
./Devilz Advisor
Posts: 570
Joined: May 2010
Reputation: 38
RE: shellcode execve("/bin/ps",NULL,NULL);
buat apa nih kang?
kgk bs baca assembly suram
Find all posts by this user
Quote this message in a reply
09-30-2011, 01:38 PM
Post: #4
konspirasi Offline
./Devilz Officer
Posts: 65
Joined: Aug 2011
Reputation: 3
RE: shellcode execve("/bin/ps",NULL,NULL);
ini shellcode buat di OS apa bro? yg pasti x86 kan..
Visit this user's website Find all posts by this user
Quote this message in a reply
10-01-2011, 12:38 AM (This post was last modified: 10-01-2011 12:40 AM by syahrini.)
Post: #5
syahrini Offline
./Devilz 1st Cadet
Posts: 26
Joined: Sep 2011
Reputation: 0
RE: shellcode execve("/bin/ps",NULL,NULL);
Segmentaion fault om smangat
tapi setelah ane jadiin shellcode dan di kasih c source
Code:
syahrini@sesuatubanget:~$ objdump -d ps

o:     file format elf32-i386


Disassembly of section .text:

08048060 <_start>:
8048060:    31 c0                    xor    %eax,%eax
8048062:    50                          push   %eax
8048063:    68 2f 0f 72 73           push   $0x73720f2f
8048068:    68 2f 62 69 6e           push   $0x6e69622f
804806d:    89 e3                    mov    %esp,%ebx
804806f:    b8 0b 00 00 00           mov    $0xb,%eax
8048074:    cd 80                    int    $0x80
Quote:#include <unistd.h>
char shellcode[]="\x31\xc0\x50\x68\x2f\x0f\x72\x73\x68\x2f\x62\x69\x6e"
"\x89\xe3\xb8\x0b\x00\x00\x00\xcd\x80";
int main(int argc, char *arg[])
{
/*function pointer*/
int (*funct)();
funct = (int(*)())shellcode;
(int)(*funct)();
return 0;
}
Code:
[syahrini@sesuatubanget]$ gcc -g ps.c -o ps
    [syahrini@sesuatubanget]$ execstack -s ps
    [syahrini@sesuatubanget]$ ./ps
    [syahrini@sesuatubanget]$ echo $?
    1
horewawa om evilution unyu-unyu
Find all posts by this user
Quote this message in a reply
10-01-2011, 07:42 AM
Post: #6
syn_attack Away
execl("/bin/sh", "sh", NULL);
**
Moderators
Posts: 306
Joined: Sep 2011
Reputation: 55
RE: shellcode execve("/bin/ps",NULL,NULL);
mas ev1lut10n ~# keyen mas.... :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
10-01-2011, 08:01 AM
Post: #7
konspirasi Offline
./Devilz Officer
Posts: 65
Joined: Aug 2011
Reputation: 3
RE: shellcode execve("/bin/ps",NULL,NULL);
owh, klo pake nasm segmentation faultm klo dijadiin c bisa, manteb om ketawa
Visit this user's website Find all posts by this user
Quote this message in a reply
10-18-2011, 04:10 PM
Post: #8
syn_attack Away
execl("/bin/sh", "sh", NULL);
**
Moderators
Posts: 306
Joined: Sep 2011
Reputation: 55
RE: shellcode execve("/bin/ps",NULL,NULL);
kak ev1lut10n ~# mau ikut nambahin aja kak...

; execve("/bin//ps", "/bin//ps", NULL)
; Programmer : Paulus Gandung Prakosa_ (0x1337day)
;

section .text

global _start

_start :

; setreuid(0, 0)
xor eax, eax
xor ebx, ebx
push eax
push ebx
mov ecx, esp
mov al, 0x46
int 0x80

; execve("/bin//ps", "/bin//ps", NULL)
xor eax, eax
push eax
push 0x73702f2f
push 0x6e69622f
mov ebx, esp
xor ecx, ecx
push ecx
push ebx
mov edx, esp
mov al, 0xb
int 0x80

; _exit(0)
xor eax, eax
push eax
mov ebx, esp
mov al, 0x1
int 0x80
Visit this user's website Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [POC] sys_execve("/usr/bin/ftp", "sdf.lonestar.org", NULL) syn_attack 21 2,533 10-25-2011 03:34 AM
Last Post: syn_attack
  Membuat shellcode di Freebsd 8.2 mywisdom 4 1,028 07-20-2011 11:00 AM
Last Post: Liyan oz

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-23-2013, 08:56 AM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE