1.2.2.1 "-connect HOST" does not work

1.2.2.1 "-connect HOST" does not work

Postby ReD » 2018-07-12 13:48

I use the following to initiate the connection from remote hosts and it's not working anymore.
Code: Select all
"C:\Program Files\uvnc bvba\UltraVNC\winvnc.exe" -connect dave.idp.it

At the same time, the "add new client" function in the menus works as usual.
ReD
 
Posts: 3
Joined: 2018-07-12 12:47

Re: 1.2.2.1 "-connect HOST" does not work

Postby Thomas Levering » 2018-07-12 20:31

I use this Parameter with Repeater -> working (Application Mode)
Code: Select all
-connect myrepeater.com:5500 -autoreconnect -id:1234 -run
Thomas Levering
8
8
 
Posts: 19
Joined: 2015-01-23 06:45

Re: 1.2.2.1 "-connect HOST" does not work

Postby Thomas Levering » 2018-07-13 07:08

I can Confirm, add Client to Service with cmd is not working (UAC?)

this works:
winvnc.exe -startservicehelper

Code: Select all
UltraVNC.ini
[admin]
...
service_commandline=-connect dave.idp.it
...



This is not working, Port+Autoreconnect+Id are ignored (Application Mode)
Code: Select all
winvnc.exe -run
winvnc.exe -connect myrepeater.com:5500 -autoreconnect -id:1234


This is not working, no Client added (Application Mode and Running Service Ignored)
Code: Select all
winvnc.exe -connect myrepeater.com:5500 -autoreconnect -id:1234 -multi -run
Thomas Levering
8
8
 
Posts: 19
Joined: 2015-01-23 06:45

Re: 1.2.2.1 "-connect HOST" does not work

Postby Rudi De Vos » 2018-07-13 08:40

winvnc.exe -connect host : inject a connection in a running winvnc
winvnc.exe -connect host -run: start a winvnc, and connect to

Without the -run, the command try to send a message to the running winvnc. With the latest OS's and there security settings,
the message can be blocked.

The problem is also a security issue. Do you allow a normal program winvnc.exe started from commandline without any security level to control a service running at the higher security leven !!!

with -multi you can run 2 winvnc simultanious. But they must use seperated ports.
if service use port 5900, the manual start winvnc with -Multi must use another port the 5900 ( sample 5901)
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5767
Joined: 2004-04-23 10:21

Re: 1.2.2.1 "-connect HOST" does not work

Postby Thomas Levering » 2018-07-13 13:10

with this small Patch I can make a Repeater Connection in Application Mode and Ignore a Running Service
The Parameter "-multi" must be the first with this Patch


Multi PostMessageToThis and not to other Instance
Code: Select all
vncservice.cpp

extern BOOL SPECIAL_SC_EXIT;
extern BOOL SPECIAL_SC_PROMPT;
extern BOOL multi;
in6_addr G_LPARAM_IN6;

........

PostToWinVNC(UINT message, WPARAM wParam, LPARAM lParam)
{
   // Locate the hidden WinVNC menu window
   // adzm 2010-02-10 - If we are in SC mode, then we know we want to only post messages to our own instance. This prevents
   // conflicts if the user already has another copy of a WinVNC-derived application running.
   if (multi || SPECIAL_SC_EXIT || SPECIAL_SC_PROMPT) {
      return PostToThisWinVNC(message, wParam, lParam);
   }

   //adzm 2010-02-10 - Finds the appropriate VNC window
   HWND hservwnd = FindWinVNCWindow(false);
   if (hservwnd == NULL)
      return FALSE;

   // Post the message to WinVNC
   PostMessage(hservwnd, message, wParam, lParam);
   return TRUE;
}


1.2.2.1
Code: Select all
vncservice.cpp

extern BOOL SPECIAL_SC_EXIT;
extern BOOL SPECIAL_SC_PROMPT;
in6_addr G_LPARAM_IN6;

.........

PostToWinVNC(UINT message, WPARAM wParam, LPARAM lParam)
{
   // Locate the hidden WinVNC menu window
   // adzm 2010-02-10 - If we are in SC mode, then we know we want to only post messages to our own instance. This prevents
   // conflicts if the user already has another copy of a WinVNC-derived application running.
   if (SPECIAL_SC_EXIT || SPECIAL_SC_PROMPT) {
      return PostToThisWinVNC(message, wParam, lParam);
   }

   //adzm 2010-02-10 - Finds the appropriate VNC window
   HWND hservwnd = FindWinVNCWindow(false);
   if (hservwnd == NULL)
      return FALSE;

   // Post the message to WinVNC
   PostMessage(hservwnd, message, wParam, lParam);
   return TRUE;
}
Thomas Levering
8
8
 
Posts: 19
Joined: 2015-01-23 06:45

Re: 1.2.2.1 "-connect HOST" does not work

Postby ReD » 2018-07-24 07:31

Rudi De Vos wrote:The problem is also a security issue. Do you allow a normal program winvnc.exe started from commandline without any security level to control a service running at the higher security leven !!!


But it has always worked and changing behaviour out of the blue breaks any use case for this function.
For example I use a service script which tries to reconnect to my machine every few minutes in order to maintain remote access across reboots (that is, on customer's computers with no publicly accessible addresses/ports).
At the moment this is utterly broken - and the alternatives are way more involved (eg. exposing a port + dyndns, vpn, repeater, etc).

BTW, I'm actually using -connect from an elevated prompt (ie "run as administrator") and from a script launched as a service, but it still does not work.
ReD
 
Posts: 3
Joined: 2018-07-12 12:47

Re: 1.2.2.1 "-connect HOST" does not work

Postby Rudi De Vos » 2018-07-24 10:33

MS blocked the connection from normal apps to services. This is a change in the OS not a vnc change.
This is a OS options UAC... that protect possible unwated application todo nasty things. It's not recommended to disable it.

Ultravnc has already for a long time the option todo an invers connection from service. This way the service restart the outgoing connection on timeout or reboot.

service_commandline=
This is used to instruct the service to start winvnc (in service mode) with a specific command line. This is the same syntax as the commandline except
you don't put -run at the end.
sample: service_commandline=-autoreconnect -connect 192.168.1.30
This tell the service to make an invers connection to 192.168.1.30 and retry when it fail.

If you add this to the ultravnc.ini you can start/stop the service
net start uvnc_service
net stop uvnc_service

perhaps this help
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5767
Joined: 2004-04-23 10:21

Re: 1.2.2.1 "-connect HOST" does not work

Postby CidiRome » 2018-08-16 21:40

Hi.

I stopped updating UltraVNC since UltraVNC_1_2_16_X64_Setup.exe because of this problem.

MS blocked the connection from normal apps to services. This is a change in the OS not a vnc change.
This is a OS options UAC... that protect possible unwated application todo nasty things. It's not recommended to disable it.

If this is a change in the OS why does it work correctly with previous versions and not with with recent ones?

Please note that in most of the tests I've made it was with updated Windows 10, I always tried the lasted version of Ultra VNC when there is one before reverting back to to 1.2.16.

Cheers.
CidiRome
 
Posts: 2
Joined: 2018-08-16 21:20

Re: 1.2.2.1 "-connect HOST" does not work

Postby Rudi De Vos » 2018-08-17 09:23

2 different version of vnc and the same OS and one works then it isn't the OS.

What does -connect HOST do ?
This start winvnc.exe and send a message to the running winvnc.exe version.
You can only send message to apps of the same elevation level or >, the level depend on how an app is started.
( internet = low, normal, high =start with runas admin or service)

There is a way that you can overwrite this in code, just accept messages from all.
Then theoretical someone could use the browser to send a message to winvnc and instruct them to make a connection.
It could be that we got a warning from CERN and needed to modify our code, I need to look back in the archieve.

some people do
This start an invers connection by the service and reconnect when broken
cmd
net stop uvnc service
ultravnc.ini change servicecommandline = -autoreconnect -connect a.b.c.d
net start uvnc_service
And after remove the servicecommandline
ultravnc.ini is in program files and only an admin can change, this is 100% secure.

Theoretical, you can run winvnc from a "all alowed" folder, then even a guest can change the ini.
Rudi De Vos
Admin & Developer
Admin & Developer
 
Posts: 5767
Joined: 2004-04-23 10:21

Re: 1.2.2.1 "-connect HOST" does not work

Postby CidiRome » 2018-08-18 19:26

Hi.

Generally I use a shortcut with
Code: Select all
"C:\Program Files\uvnc bvba\UltraVNC\winvnc.exe" -connect myaddress.com::5999

that I leave to my customers to use so they can initiate a remote control to me.
I have previously installed UltraVNC as a service on their computers.

With the later versions the command seems to be incompletely ignore as nothing happens.

Cheers.
CidiRome
 
Posts: 2
Joined: 2018-08-16 21:20


Return to 1.2.2.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron