byt3bl33d3r / SILENTTRINITY

An asynchronous, collaborative post-exploitation agent powered by Python and .NET's DLR
GNU General Public License v3.0
2.19k stars 403 forks source link

Deal with them backslashes #88

Closed byt3bl33d3r closed 5 years ago

byt3bl33d3r commented 5 years ago

Backslashes are currently not handled by the CLI so specifying windows paths is a PITA to say the least, needs to be dealt with to preserve my sanity.

image

daddycocoaman commented 5 years ago

Try specifying paths with backticks instead of quotation marks. That way users only have to worry about quoting paths when there's a space. So for minidump, try:

file = `DUMPFILE_PATH`

If the path requires quotes cause of spaces, the user can do that themselves.

jeffmcjunkin commented 5 years ago

Why not single quotes? The same issue affects meterpreter, fwiw

daddycocoaman commented 5 years ago

Why not single quotes? The same issue affects meterpreter, fwiw

It's because Boolang is still gonna remove the slashes, since single quotes and double quotes are treated the same. image

I set the dumpfile option to C:\Windows\Temp\debug.bin while using single/double quotes in the minidump.boo module and got that error (red circle). Using Boolang backticks for paths corrected the error while uncomplicating things with quotes, since it doesn't matter if the user sets the parameter with single or double quotes. This also takes care of spaces in the filename since backticks in Boolang make the string literal:

image

byt3bl33d3r commented 5 years ago

Closing since @daddycocoaman took care of this with backticks, I think that's the way to go. Cheers