Remote Control - TightVNC Wrapper
This is a utility that I wrote in VB .Net 2010 a number of years ago. It's basically a wrapper application for TightVNC that allows me to remotely control client computers in the domain (think Team Viewer). The inspiration for this came from an older application called 'Gen Control' that basically does the exact same thing, but only worked for Windows XP and earlier. As of this writing I can verify that it works on all version of Windows Vista through 10 1809.
This is what it does in a nutshell:
- Writes configuration registry keys to client's registry
- Copies TightVNC server binary and DLL to client via admin share
- Registers TightVNC as service on the client
- Calls the TightVNC viewer on the support technician's computer and connects to client
- Monitors for closing of TightVNC viewer
- Unregisters TightVNC server service on client computer
- Removes registry keys from client
- Deletes files that were copied over
Some security concerns I took into account when writing this:
- Passwords for the TightVNC session are randomly generated for every connection
- When the server service is registered on the client the startup mode is set to manual
- In the event of a loss of connection before the cleanup can begin a script is placed in startup that will perform the cleanup the next time the client is restarted
Requirements:
- Remote Computer Management is enable and the port open via GPO
Computer Configuration / Admin Templates / Windows Components / Windows Remote Management (WinRM)/WinRM Service: Allow remote server management through WinRM
- Remote Registry Service is started and the port open via GPO
Computer Configuration / Policies / Windows Settings / Security Settings / System Services: Remote Registry
Enabled and set to automatic startup
- Port 5900 is open to incoming connections on client firewall
- Secure Attention Sequence needs to be enable via GPO to send CTRL-ALT-DEL to clients via TightVNC
Computer Configuration / Admin Templates / Windows Components / Windows Logon Options: Disable or enable software Secure Attention
Enabled and limited to services
- The account being used to run this application from needs to have local admin credentials on clients you're attempting to connect to
There are options to to change ports, run ping tests before attempting connections, block user input from the client end, and other things.
When opening ports on the client computers through GPO be sure to do it on the domain profile on the firewall config. This way if you're working with laptops then when the device goes offsite those firewall exceptions are closed.
Attached to this blog post is the source code and compiled binary. The compiled binary can be found here: .\ZenControl v2\ZenControl\bin\Debug
Any questions or comments can be dropped here. I haven't updated this code in quite some time and there might be some bugs, but it is actively used by my department. This handy utility has saved me from having to make plenty of trips to remote buildings in the dead of Winter. I hope this helps someone out there....


0 Comments
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now