Before I realized the /k argument was for cmd.exe, I wrote this answer out using batch files. It might be informative and it's just another way to get the job done, so I'll leave that in case it's worthwhile.
I'd like to be able to clear clipboard immediately upon need. I know how to do this via windows shortcut but wondering if there's a way to run it from Keepass via the Placeholder I'm looking in Edit Entry->Auto Type tab, I clicked ADD and scrolled down Placeholder list and found the CMD:/C/O/. I selected that and it copied to list box above. The main auto type box at top has the USERNAMETABPASSWORDENTER and I want to leave that as is. But 2 questions, 1. what is the /O switch for ? Or maybe just move on to 2. How does my added item in lower box actually run? I was thinking to edit it like this clip since the windows cmd.exe will run it from a shell like this %windir%\system32\cmd.exe /c echo. clip.
Appreciate any pointers on questions 1 and 2 or anything else.
Thanks for the reply. I read the docs but I can't seem to find where or how they run in KeePass? I tried putting each of the below in the Edit Entry -> Auto-Type Tab, in the lower "Use custom sequences for specific windows" box. I save it and then in KeePass with that entry selected I click copy username Icon and paste it notepad window. And then in KeePass click the Auto-Type which also again puts User and Pswd into same notepad window. But the same contents remain in clipboard afterwards. I don't see any evidence of either of these running. I.e. the clipboard doesn't clear receive any "Text".
CMD:/C %windir%\system32\cmd.exe /c echo.
CLIPBOARD-SET://
CLIPBOARD-SET:/Text/
Does this require a plugin (?) I guess this is out of my scope.
Appreciate any pointers you can give.
I realize I can set the clipboard to clear after so many seconds in Tools-> Options but that's too short or too long in some cases depending.
I want to manage my Envs via command prompt. What can I do? Usually, Anaconda installs a shortcut to the "Anaconda Prompt", which executes "%windir%\System32\cmd.exe "/K" C:\anaconda\Scripts\activate.bat C:\anaconda".
I have no clue why but yesterday, Malwarebytes was blocking me from running cmd.exe if It was launched from a game on Steam, I was launching the same game the day before and no issues appeared. I could open cmd.exe normally through the windows menu and nothing appeared so I restarted Steam to see if it would do anything, and then it stopped blocking it so I didn't think anything of it.
Each block's event detail is defined being Exploit.PayloadProcessBlock and the cmd.exe one has Exploid.PayloadFileBlock along with it, they all pretty much say the same type of details, the Powershell ones application however says it was cmd?
fsutil hardlink create %WINDIR%\system32\windowspowershell
\v1.0\psh.exe %WINDIR%\system32\windowspowershell\v1.0\powershell.exeIt works from with cmd.exe, as you'd expect, but not from within
powershell.exe. (I didn't really expect it to, though.)It there a way to get powershell to resolve system environment
variables or do I need to retrieve them using PowerShell and build a
command line?
As result, we could notice a spawned cmd.exe with non-existing parent because the rundll32.exe process (PID 1844) is terminated and cmd.exe process (PID 10904) was created as a new and independent process:
However, thanks to the Cybereason Defense Platform, we could examine the history, all loaded modules and all other relevant information and also visualize the processes tree to notice that rundll32.exe is the parent of cmd.exe:
I am using windows 7(64-bit) machine. The same error message is displayed for me also. I have tried running the commands on "%windir%\SysWoW64\cmd.exe" also. It is displaying the same message for all the compatible modes. Any help or further suggestions regarding this.
For simple binary replacement on Windows XP and later as well as and Windows Server 2003/R2 and later, for example, the program (e.g., C:\Windows\System32\utilman.exe) may be replaced with "cmd.exe" (or another program that provides backdoor access). Subsequently, pressing the appropriate key combination at the login screen while sitting at the keyboard or when connected over Remote Desktop Protocol will cause the replaced file to be executed with SYSTEM privileges. (Citation: Tilbury 2014)
Attaches cmd.exe to a list of processes. Configure your own Input arguments to a different executable or list of executables.Upon successful execution, powershell will modify the registry and swap osk.exe with cmd.exe.
every time i start up my computer i get system32\cmd.exe trying to download something. i have no way how to get rid of it,ive used avast, ive used cc cleaner and anti-malware but still unable to figure it out.the picture shows what it says when i disconnected my internet.
This was a good idea.
I modified my Obsidian shortcut (prepended with %windir%\system32\cmd.exe /c start /high) to permanently run the program in high priority mode. Obsidian feels much snappier now.
Gaining access to a Command Shell of some description can be an early win in breakout testing and enables a great amount of control over the Operating System, including the potential to enumerate a lot of information that can help us escalate our privileges further. Some environments have been subjected to very limited hardening and even offer the standard shortcut to cmd.exe within the Start Menu. Naturally it is worth checking this as a first port of call:
Hyperlink / shortcut:
Using the file handler, a link can be created to the binary. This link can be launched from numerous places, including dialog boxes and even within Microsoft Office applications by using the CTRL+Click option. file:///c:/Windows/System32/cmd.exe
Task Scheduler:
An interesting weakness, where some systems prevent access to cmd.exe, however it can still be scheduled to run via Task Scheduler. This can be done either via the command line scheduler (at.exe) or the GUI (taskschd.msc). A basic task can be created to run cmd.exe at a specific time (i.e. 1 minute in the future) or upon certain events such as when a user logs on.
COMMAND.COM
This is a 16-bit binary included in Windows for legacy purposes. Even when cmd.exe is disabled, this can often be accessible. Unfortunately, COMMAND.COM is no longer included within 64-bit versions of Windows.
Powershell.exe
A similar experience to cmd.exe, however PowerShell has some several advanced features over regular cmd.exe such as the ability to use and call features and assemblies in .NET.
MSPAINT.exe
An unusual, yet effective method of gaining a shell by creating a shortcut to cmd.exe by drawing certain colours in Microsoft Paint. Due to the encoding algorithm used to write BMP files, it is possible to dictate ASCII data written into a file by carefully selecting certain RGB colours.