Metasploit - opening notepad on victims Windows pc

Using metasploit we connect to a target Windows pc (win7 or xp)

We have access to the cmd prompt.

screenHow do we open new notepad on target pc
through cmd (with text)?
LVL 15
Ess KayEntrapenuerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You mean, you would like to show the guy sitting at the remote computer that you are in charge by opening notepad?
You can do that using  
psexec -s -i notepad
(psexec needs to be downloaded, it's part of the free pstools)
Zephyr ICTCloud ArchitectCommented:
To add to that, if you want text in notepad you first create a file containing this text, example (if the file is not located in the same directory you obviously add it here):

C:\Users\me>echo "Hello we have control" > hello.txt

Open in new window

Then start notepad with that file either with psexec like mentioned above or locally:

C:\Users\me>start notepad hello.txt

Open in new window

Ess KayEntrapenuerAuthor Commented:
psexec is included in kali?
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Zephyr ICTCloud ArchitectCommented:

It's a windows program...

If you type "start notepad" does it start on the "victim's client" ? It might start under another user, not visible... You can check by running "tasklist"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ess KayEntrapenuerAuthor Commented:
all i can tell is it doesn't pop up.  
not sure if its run on diff user.  
its running xp sp1 so whoami doesn't work
Zephyr ICTCloud ArchitectCommented:
You could try another way to go about it, schedule a task through the command line to run notepad on a specific time, to get you started you can check here.
Ess KayEntrapenuerAuthor Commented:
can you tell me how to schedule the task through cmd
Psexec is able to do what you want, I used it like this. So copy it to the remote machine, launch your remote shell and use psexec -s -i notepad. It will work.
Ess KayEntrapenuerAuthor Commented:
had to escalate privileges
Sure you have to escalate privileges... remote command prompts with remote admin rights? Who would have thought of that ;)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.