Sunday 2 October 2011

REMOTE CONNECTION TO A MACHINE

Blogged by: Anudeep Athlur & Gitanshu Sardana


The primary reason why we selected this topic is because we love & enjoy “Snooping”. Since this topic interests us, we thought researching on this topic would be stimulating. 

Only Passions, Great Passions can elevate the soul to great things.” Passion is the trigger to Success & we have always been passionate about Hacking & Breaking into Computer Networks. This perhaps is the first step towards it, but it is quite LEGAL.

At the outset you may feel what the hell is Remote Access all about??

Imagine being able to access the contents of a PC located on one end of the world from the other sitting on a living room couch. This is what Remote Accessing is all about.

Remote Access is the component that allows a user to access applications and data on a remote computer over a network. Terminal Services is Microsoft's implementation of thin-client terminal server computing, where Windows applications, or even the entire desktop of the computer running Terminal Services, are made accessible to a remote client machine. We may also access Desktops from different Operating Systems.


Without further ado, let us begin our expedition of unveiling the steps involved in accessing other Computers from ours. I hope you find the blog to be Enlightening & Enjoyable or at least semi-coherent and relatively pain free.




(On Destination Computer, i.e. the PC you want to access)

Enabling Remote Access in Ubuntu

First off, we would need to enable remote desktop on the Ubuntu computer that we want to access via Remote desktop. Doing so is easy by using the System > Preferences > Remote Desktop option. In the dialog that shows up – check “Allow other users to view your desktop”. You can also configure additional options like requiring password for remote access and notification icons. It is advisable to use a password for remote access, so that only trusted users may be able to establish a connection.






Enabling Remote Access in Windows


We need to go to Control Panel --> System --> Remote Settings











                                                                 Back to Contents







To find the Remote Desktop Connection shortcut, click the Start button, click All Programs, and then click Accessories. To quickly open Remote Desktop Connection, open the Start menu, and then type mstsc in the Search/Run box.



Note:  This feature is included with all Editions of Windows 7, but you can only connect to computers running the Professional, Ultimate, or Enterprise editions. For other Editions, one needs to install other third party softwares like VNC or Teamviewer.


In General tab, click Options. Now in computer name, type the Remote Desktop’s ip address or host name and type the username of desired user in the dialogue box and click connect.



On Successful Establishment of Connection, we need to logon on the other PC using the user password & we can then find ourselves controlling everything & anything we wish to; as if we were right in front of it .

Snapshot after Gaining Access






Once we gain Access, the other PC automatically gets locked (Although it still shows it to be logged on ) .

Hmm .. Wondering where did your favourite Bugatti Veyron Wallpaper go ?!!

By default, Windows Remote Desktop Utility (after establishing connection) changes the background to black so as to enable faster access.

Using rdesktop



Open the Terminal from Applications--->Accessories--->Terminal  and enter the following command.




REQUIRED COMMAND




rdesktop -u <username> <ip address of the destination>



For eg: I accessed my friend's Windows Lappy from mine. So, I need to type



rdesktop -u Gitanshu 192.168.6.1xx










Snapshot After Gaining Access





In the background, we can see my Desktop/Ubuntu Operating System .

                                                                                   Back to Contents
                

Over VNC Software

Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the RFB protocol to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network. VNC may be installed in a Windows OS from http://www.realvnc.com  & in Ubuntu, may be done by using the given command in the Terminal.

sudo apt-get install vncviewer

Once the VNCviewer is installed, all one needs to do is to find the static IP address (xxx.xxx.xxx.xxx) or host name of the required PC (which one wants to access ) . Then go to the terminal and enter:

REQUIRED COMMAND

vncviewer <ip address> or <hostname>

Whether one will be directly connected or prompted for password or remote computer prompted to give access depends upon remote computer’s “Remote Desktop” settings.




After connection, you can see the remote desktop screen in a windows that pops up.






To close the connection, just close the window.


Using X Windows over SSH

Secure Shell (SSH) is a network protocol for secure data communication. In linux, we normally use SSH to access Terminal of other computer. However, if we try to access a Graphical Application like ‘gedit’ from the terminal, we get an error “can’t open display”.

Hm... Wondering what to do now?

Alright .. Here is the Fix






The X Window System can do that for you. The X window system is a computer software system and network protocol that provides a basis Graphical User Interfaces (GUIs) and rich input device capability for Networked Computers. In simple words, it brings the GUI of remote computer to your computer without any display activity on remote computer.

REQUIRED ALGORITHM

Go to the terminal and type:

ssh -X <username>@<ip address>

Note: THe username can be omitted if user name of both remote desktop and remote user are same.


This might look like a normal SSH. However if we open a Graphical application, it doesn’t give us that annoying errors but opens the window of that application. Now whatever changes you do in that application like creating a file, it is saved in the remote computer.

To exit,we just need to type exit or logout.

                                                                                                                                       Back to Contents


Using VNC


There are many VNC applications available for windows like tightVNC, RealVNC etc. We have used RealVNC here. It can be downloaded from hereHYPERLINK "http://www.realvnc.com/products/free/4.1/download.html".




To access ubuntu from windows, one just needs to open ‘Run VNC viewer’ utility under RealVNC and just enter the staticip address of ubuntu pc in server. The ip address of the Ubuntu as we know, can be accessed / retrieved from ifconfig command in the Terminal.



and Whoaaa !!! it takes you to the Remote Ubuntu PC.

                                                                                   Back to Contents



The Mr. Dependable (When everything else fails, there is TeamViewer).





TeamViewer is the utility that works on both Windows and Linux platform. On installation, the Team viewer assigns our PC a specific ID which is used by the remote user to connect. However the login password changes every time we open the app.




 It also includes features like chat, VOIP, Video Call also. One just needs to enter the partner ID and then password to gain access. ( In pic, we have accessed Ubuntu from Windows).




It allows us to access the Remote desktop and also provides an option for File transfer.


                                                                                            Back to Contents


File sharing is the practice of distributing or providing access to digitally stored information, such as computer programs, multimedia (audio, images, and video), documents, or electronic books. Common methods of storage, transmission, and distribution used in file sharing include manual sharing using removable media, centralized servers on Computer Networks,www-based hyperlinked documents, and the use of distributed peer to peer networking.


Sharing File/Folder in Windows

To share a file or folder, right click on it and open properties. Under Sharing Tab, click Share.



In the popped up File Sharing window, add the user you want to share your file with (Everyone/homegroup). For custom permissions, use Advanced Sharing.



Now when you have allowed sharing on your file/folder, you can access it from other computer by entering the network path in Run command.



Then a window may pop up asking you to enter user name and password. After loggging in, you can view the respective file/folder.



Sharing File/Folder in Ubuntu

To share a folder in ubuntu, right click on the Folder and select SHARING OPTIONS. Click Share this folder. It may ask you to install sharing service. Select appropriate options and then click Create Share.

This can now be accessed from a windows PC by entering ‘\\<ip address of destination PC>\’ in Run Command.
On a local network, the shared folders can be accessed through NETWORK folder in both Windows and Ubuntu.
                                                                                                       Back to Contents



Alright, Food for Thought for prospective Hackers .


Abbreviated as RATs, a Remote Access Trojan is a major type of Trojan horse which provides attacker Complete Control of the victim’s system. Attackers usually hide these Trojan horses in games and other small programs that unsuspecting users then execute on their PCs. A RAT lets one access practically almsot anything one can think of on the victim’s PC, be it the webcam, change registries, hide taskbars or even crash the system :-P                         
 Wicked Aint It !!??

Image Source:
http://en.wikipedia.org/wiki/Trojan_horse_(computing)


Wonderful Experience

We had an amazing experience researching & implementing on the Project. We were nervous about writing our first blog ever but as time passed, everything moved on smoothly, although we experienced a few hiccups in organisational stuff. We did spend some time on the Design aspect (marquee & the links :-D) of the blog.  All in all, the blog was funtertaining :P as well as educational.


                                                                                                                     Back to Contents
(*definitions taken from www.wikipedia.com)




No comments:

Post a Comment