Not able to set up ZAP on remote machine

86 views
Skip to first unread message

Tom

unread,
Aug 3, 2023, 10:35:11 AM8/3/23
to ZAP User Group
Hi   team,

I am using the selenium new RemoteWebDriver(new Uri("http://" + "sssssssss:xxxx"), options); to run the selenium test on remote machine.
I am able to use the ZAP on local machine but not able to initialize on Remote machine. The zap is installed on remote already but I am not able to launch it with selenium
Notes:
psexec \\server -i -d "C:\Program Files\OWASP\Zed Attack Proxy\ZAP.exe"
this command is not launching the ZAP
I am using C# code like below but on running it is always launching on local machine
ProcessStartInfo zapProcessStartInfo = new ProcessStartInfo();
            zapProcessStartInfo.FileName = @"\\server\C$\Program Files\OWASP\Zed Attack Proxy\ZAP.exe";
            zapProcessStartInfo.WorkingDirectory = @"\\ server \C$\Program Files\OWASP\Zed Attack Proxy";
            zapProcessStartInfo.Arguments = "-host 127.0.0.1 -port 7070";

            Console.WriteLine(zapProcessStartInfo.ToString());
            Console.WriteLine("Issuing command to StartZapUI");
            Process zap = Process.Start(zapProcessStartInfo);

Could anyone suggest on this?

regards,
Tom

psiinon

unread,
Aug 3, 2023, 10:38:18 AM8/3/23
to zaprox...@googlegroups.com
Can you launch a program like Calc on the remote machine that way?
Thats how I would start trying to do something like that.
No other suggestions as its not something I have any experience doing :/

Cheers,

Simon

--
You received this message because you are subscribed to the Google Groups "ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/81eb02fa-7488-4d1b-bf87-cdb16793761dn%40googlegroups.com.


--
ZAP Project leader

Tom

unread,
Aug 4, 2023, 2:29:06 AM8/4/23
to ZAP User Group
Hi Simon,

thanks for your response on this. Actually I am able to run the command successfully but it is not launching either in deamon mode or on GUI mode. 
For other apps like notepad/calc, I am able to launch.

Is there any documentation of how to run ZAP on remote machine and can be integrated by Selenium?
regards,
Tom

psiinon

unread,
Aug 4, 2023, 3:38:04 AM8/4/23
to zaprox...@googlegroups.com
We dont have any docs on how to start/stop a ZAP service on a remote machine I'm afraid.
There are lots of tools that do that sort of thing, we dont recommend any specific ones.
ZAP should play well with all such tools - if not then let us know.


And the ZAP API is documented here: https://www.zaproxy.org/docs/api/#introduction

Cheers,

Simon



--
ZAP Project leader

Tom

unread,
Aug 4, 2023, 11:48:19 AM8/4/23
to ZAP User Group
Hi Simon,

thanks for these docs, just one thing, I am using Psexec tool to launch it on remote machine.
>psexec \\192.168.1.1 -i -d "C:\Program Files\OWASP\Zed Attack Proxy\ZAP.bat" >>log.txt

PsExec v2.43 - Execute processes remotely
Copyright (C) 2001-2023 Mark Russinovich
Sysinternals - www.sysinternals.com

Starting C:\Program Files\OWASP\Zed Attack Proxy\ZAP.bat on 192.168.1.1...
C:\Program Files\OWASP\Zed Attack Proxy\ZAP.bat started on 192.168.1.1 with process ID 6216.


but I am not able to see it on Remote machine. 

The doc you shared having command -config api.addrs.addr.name=123.456.789.123 where and how can I run this if you can point me then it would be a great help.

thanks again for your help on this!!

psiinon

unread,
Aug 7, 2023, 3:50:12 AM8/7/23
to zaprox...@googlegroups.com
Do you really want to launch the ZAP Desktop GUI?
If you are running it on a remove machine I would have though daemon mode would be better.
The built in ZAP command line options are given on https://www.zaproxy.org/docs/desktop/cmdline/
Note that many ZAP add-pons also add commandline options.

Cheers,

Simon



--
ZAP Project leader
Reply all
Reply to author
Forward
0 new messages