Avatar of Ess Kay
Ess Kay
Flag for United States of America asked on

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)?
VulnerabilitiesOS SecuritySecurity

Avatar of undefined
Last Comment
McKnife

8/22/2022 - Mon
McKnife

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 ICT

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 Kay

ASKER
psexec is included in kali?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
Zephyr ICT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ess Kay

ASKER
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 ICT

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 Kay

ASKER
can you tell me how to schedule the task through cmd
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
McKnife

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 Kay

ASKER
had to escalate privileges
McKnife

Sure you have to escalate privileges... remote command prompts with remote admin rights? Who would have thought of that ;)
Your help has saved me hundreds of hours of internet surfing.
fblack61