Fixing VMWARE tools on kali linux to enable copy paste properly - especially when you are doing OSCP

Hi Folks,

So if you are playing around with kali linux on a VM you might have faced the issue of getting the vmware tools work properly. Especially when you want to copy paste files and clipboard contents between guest and host. This is very annoying thing and took lot of my precious time when i was doing OSCP course. Here is how i fixed it.



My Setup


I run a kali linux distro on vmware player which is recommended for doing the OSCP course. By default it has GNOME as the default GUI. I kind of hate it as it uses lot of resources and has all those stupid animations and stuff. I want something clean and precise when i am working, i am not into looks and too many features, just the bare minimum responsive system is always my favourite.

So I installed LXDE which is light weight GUI for linux. you can install it with following command

apt-get install lxde-core lxde kali-defaults kali-root-login desktop-base


This will not make LXDE you default GUI, so if you reboot, you will need to choose LXDE from the menu while logging in. To make it default you can run the command

 update-alternatives --config x-session-manager

Now you will be presented with a wizard like interface to choose default GUI, choose LXDE if you want to make it default GUI.

First things First


First of all, Kali Linux new versions comes with open vm tools pre installed, this should supposedly enable all functionalities but unfortunately it doesn't work just like that. So typically eveyone installs VMware tools on top of this.

To fix it properly first remove any additional libraries that you have installed, in my case its vmware tools. To uninstall it you have to issue the command

/usr/bin/vmware-uninstall-tools.pl

if you have virtualbox additions you can uninstall it  by the something like this (based on version it may differ)

/opt/VBoxGuestAdditions-5.0.16/uninstall.sh

just make sure its all gone for good

sudo aptitude purge virtualbox-guest-x11 virtualbox-dbg virtualbox-dkms

Now uninstall open vm tools

aptitude purge open-vm-tools open-vm-tools-desktop open-vm-tools-dkms

Remove any residual files

rm -rf /etc/vmware-tools/

Now that everything is properly gone. Do a restart to clean up everything.


Lets start


Lets install open vm tools properly

apt-get install open-vm-tools open-vm-tools-desktop fuse

Now open the file /etc/rc.local on a text editor and add following lines towards the end of file just before the exit 0 statement

sudo mkdir /var/run/vmblock-fuse
sudo su -l -c "vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse"

Now create a file /root/.config/autostart/copypaste-autostart.desktop with following contents

[Desktop Entry]
Type=Application
Name=copypaste start
Comment=Start copy paste and drag n drop for vm tools
Exec=/root/Desktop/OSCP/setup/cpaste.sh
OnlyShowIn=LXDE
Now create a file /root/Desktop/OSCP/setup/cpaste.sh  (note: you can create in any location, just make sure to add that location on the previous step file contents for parameter Exec) with following contents

#!/bin/sh -e
sudo chmod u+s /usr/bin/vmware-user-suid-wrapper
vmware-user-suid-wrapper


Thats it. Now restart and you should have copy paste functionality working properly. In case drag and drop does not work, just right click copy and then paste it works everytime for me.

Enjoy. Please do provide your feedback. 





Comments

  1. Such a shame VMware Tools couldn't work properly by default

    vmware backups

    ReplyDelete
  2. Esay to follow steps for an effective vmware backups , thanks!


    ReplyDelete
  3. online Quran classes on Islam has given, and ensure the youngster numerous rights, and these ?rights are ?ensured by Islam to all kids, ?for example, the privilege to instruction, and charged guardians and moms and different guardians to train youngsters all that they need after adolescence learn Quran particularly Quran internet perusing? Go along with us now and welcome your loved ones both youthful and old and you will discover all that you need to learn here. https://patendo.com/cara-membuat-merek/

    ReplyDelete
  4. Excellent post. I was reviewing this blog continuously, and I am impressed! Extremely helpful information especially this page. Thank you and good luck. semrush pricing

    ReplyDelete
  5. I use only high quality materials - you can see them at: check over here

    ReplyDelete
  6. Additionally, think about the closures of the sledge. There are torn finishes and adjusted closures. power tools

    ReplyDelete
  7. I just would like to give a huge thumbs up for the great info you have here on this post. Thanks for sharing with us. Are you looking for Escort Services in Ahmedabad and Call Girls in Ahmedabad
    Click For More Information Escort Services in Ahmedabad

    ReplyDelete
  8. Good website! I truly love how it is easy on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your RSS which may do the trick? Have a great day! Software for writers

    ReplyDelete
  9. Would you be able to utilize the GUI to characterize boundaries and worldwide information for the experiments or would you say you are needed to compose code as you would on the off chance that you were trying physically? targonca szállítás Debrecen Europa-Road Kft.

    ReplyDelete
  10. I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy. Direct Response Copywriter

    ReplyDelete
  11. Black Anti Static ESD Safe Foam is made from Low Density Polyethylene (LDPE) resins with anti static additive. Black Anti Static ESD Safe Foam are excellent for packaging fine surface finish 3C products and other high grade products. Visit our website anti static foam to learn more.

    ReplyDelete
  12. Impressive web site, Distinguished feedback that I can tackle. Im moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards. Copywriting Services

    ReplyDelete
  13. Supplanting a cracked bath might be the initial step to a significant shower redesigning: since the tub must be supplanted at any rate, why not do the entire room? ix tools

    ReplyDelete
  14. Nice piece of information! May I reference part of this on my blog if I post a backlink to this webpage? Thx. Linux Cloud course

    ReplyDelete
  15. Delta-8 tetrahydrocannabinol, also known as delta-8 THC, is a psychoactive substance found in the Cannabis sativa plant, of which marijuana and hhc vape cartridges

    ReplyDelete
  16. I read the above article and I got some different kind of information from your article about a mattress. It is a helpful article to enhance our knowledge for us. Thankful to you for sharing an article like this.Hire A Social Media Hacker

    ReplyDelete
  17. Great job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Read more info about Hire A Professional Lottery Hacker in Usa. Thank you because you have been willing to share information with us.

    ReplyDelete
  18. Great job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Read more info about building and termite inspection melbourne Thank you because you have been willing to share information with us.

    ReplyDelete

Post a Comment