1DELAY 10002GUI r3DELAY 1004STRING cmd5ENTERCopied!
1DELAY 5002STRING color FE3ENTER4STRING mode con:cols=18 lines=15ENTERCopied!
color FE
sets the command prompt color scheme to yellow text on a white background. Unfortunately the same color cannot be set as both background and foreground, however a yellow on white command prompt is very difficult to read and will obscure our payload. For a complete list of color combinations, issue color *
in a terminal.color a
commandmode con:cols=18 lines=1
, reduces the command prompt window size to 18 columns by 1 line. This, in combination with the above color command, creates a very small and extremely difficult to read command prompt. Best of all, while this makes reading the payload difficult by any observer, it does not impact the function of the payload in any way. The computer simply doesn’t care that the command prompt is illegible.1STRING tree c:\ /F /A2ENTER3DELAY 200004STRING exit5ENTERCopied!
exit
and ENTER
keystrokes while the tree command is executing, depending on the complexity of the running process there is no guarantee it will issue.tree
attack payload while maintaining its obfuscation.1DELAY 10002GUI r3DELAY 1004STRING cmd /C color FE&mode con:cols=18 lines=1&tree c:\ /F /A5ENTERCopied!
/C
, which tells the command prompt to close once the command completes. Alternatively if we were to issue /K
for keep
, the command prompt would stay visible even after the tree command completes.&
) in between our commands, we can string them together on one line. in our case this is “color
“, “mode
“, and “tree
“. This is what we would call a one-liner payload since it utilizes just a single STRING
command.cmd
” and beginning to type the commands.1DELAY 10002GUI r3DELAY 1004STRING cmd /C "start /MIN cmd /C tree c:\ /F /A"5ENTERCopied!
color
” and “mode
” commands have been removed, and instead the “cmd /C tree c:\ /F /A
” command has been wrapped inside another “cmd /C
” command.cmd
” issues the second with the leading “start /MIN
” command. The “start
” command executes everything following with the parameter “/MIN
“. The “/MIN
” parameter opens the second “cmd
” window in a minimized state.cmd
” running the “start
” command completes in an instant, the command prompt is only visible for a split second. The second “cmd
“, which is actually executing our “tree c:\ /F /A
” command, is left minimized in the background mapping the file and directory structure of the C drive.