634 Practical Hacking Techniques and Countermeasures
Repeat the IP verification on the attacking machine.
To execute the ipconfig command from the attacking computer to the target
computer, type:
psexec \\
??“i ??“u -p
command
is the target??™s IP address or hostname.
??“i instructs psexec to interact with the desktop on the target system.
??“u is the username switch.
??“p is the password switch.
command is the command to execute on the target.
Redirection 635
PsExec will now execute the ipconfig command on the target machine and
display the results on the attacker??™s computer.
To try something dangerous on the target, tell PsExec to execute a command
shell of the target machine on the attacker??™s computer by typing:
psexec \\w2kas ??“i ??“u administrator ??“p 123 cmd
636 Practical Hacking Techniques and Countermeasures
With a successful connection the prompt will now change to the c:\WINNT\
system32 directory because that is where the cmd.exe command resides on
the target.
Now by running the ipconfig command, you display the target information.
This indicates you can operate the target computer from the command shell
as though you were sitting directly behind the target computer.
Redirection 637
To exit the command shell on the target, type exit and press Enter.
You will now be returned to the attacker??™s desktop.
*Note: Several readers at this point may wonder what the point is by running this program as
you are already required to have Administrative access for PsExec to execute commands
on the target system.
Pages:
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216