How do I fix/handle "curl: (52) Empty reply from server" on ActiveScanner and AjaxSpider?

513 views
Skip to first unread message

JWeb Dev

unread,
Sep 27, 2023, 10:48:26 AM9/27/23
to ZAP User Group
Hi, I try to start OWASP with different urls. And the scan cannot be success because of "curl: (52) Empty reply from server"

This error I get if I start Active scanner with example URL => https://www.grunge.com/1228688/the-deadly-trend-behind-australias-push-to-impose-nighttime-curfew-for-cats
Log============================================
82510 [ZAP-Scanner-0] INFO  org.parosproxy.paros.core.scanner.HostProcess - start host https://www.grunge.com | DomXssScanRule strength MEDIUM threshold MEDIUM
16:31:30.493 [http-nio-0.0.0.0-9999-exec-2] INFO  [.......activeScan()] - =#= Active Scan progress: 23%

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:08 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:10 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:11 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:12 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:13 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:14 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:15 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:16 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:17 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:18 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:19 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:20 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:21 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:22 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:23 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:24 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:25 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:26 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:27 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:28 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:28 --:--:--     0
curl: (52) Empty reply from server

============================================

This error I get if I start Ajax Spider with example URL => https://www.coolthings.com/oru-lake-origami-kayak-folding-collapsible/
Log============================================
16:38:17.993 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:19.000 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:20.094 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:21.097 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:22.099 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:23.101 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:24.103 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:25.112 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running
16:38:26.193 [http-nio-0.0.0.0-9999-exec-2] INFO  [..........ajaxSpider()] - =#= Ajax Spider status: running

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:08 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:10 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:11 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:12 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:13 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:14 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:15 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:16 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:17 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:18 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:19 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:20 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:21 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:22 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:23 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:24 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:25 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:26 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:27 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:28 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:29 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:30 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:31 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:32 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:33 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:34 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:35 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:36 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:37 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:38 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:39 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:40 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:41 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:42 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:43 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:44 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:45 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:46 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:47 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:48 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:49 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:50 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:51 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:52 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:53 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:54 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:55 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:56 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:57 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:58 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:59 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:01:00 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:01:00 --:--:--     0
curl: (52) Empty reply from server

============================================

How can I handle/fix such errors? Because the scanner breaks and stops.

Simon Bennetts

unread,
Sep 27, 2023, 11:59:46 AM9/27/23
to ZAP User Group
That is not a ZAP error message.
Its most likely an error from the browser, possibly because its trying to handle something like a file download or similar.
Can you tell from the logs what its actually trying to do?

Cheers,

Simon

Oleg

unread,
Sep 27, 2023, 12:02:54 PM9/27/23
to zaprox...@googlegroups.com
I just start AjaxSpider/Active scan with Java. And simply run it over all scanners. The code to start and handle scans copied from official Owasp API reference.

--
You received this message because you are subscribed to a topic in the Google Groups "ZAP User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zaproxy-users/0zTpx-agL4w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/83e94ac7-a3e6-4ded-b752-f699c42e8069n%40googlegroups.com.

JWeb Dev

unread,
Sep 28, 2023, 2:02:09 AM9/28/23
to ZAP User Group
I just tested this on my local machine.

748742 [ZAP-Scanner-0] INFO  org.parosproxy.paros.core.scanner.HostProcess - completed host/plugin https://www.grunge.com | SqlInjectionSqLiteScanRule in 0.8s with 19 message(s) sent and 0 alert(s) raised.
748742 [ZAP-Scanner-0] INFO  org.parosproxy.paros.core.scanner.HostProcess - start host https://www.grunge.com | DomXssScanRule strength MEDIUM threshold MEDIUM
752658 [Thread-453] INFO  org.zaproxy.zap.extension.domxss.DomXssScanRule - Reaper thread starting
1002667 [ZAP-IO-Server-1-16] INFO  org.apache.hc.client5.http.impl.classic.ZapHttpRequestRetryExec - Recoverable I/O exception (org.apache.hc.core5.http.NoHttpResponseException) caught when processing request to {s}->https://a.audrte.com:443


Owasp Zap thinks for a long time at this step, but eventually it successfully completes the scan.

On the local machine, I run Owasp Zap in a container and the application outside the container.

In the production environment, the application runs together with Owasp Zap in the same container.

At the same time, this container has limitations on memory and cpu.

From the log you can see that there is some kind of timeout happening after 30 seconds. But with the same settings, there is no timeout locally.

Could this be the reason for limiting container resources?
Or maybe you can recommend some parameter at startup that will help either increase the timeout or provide more information about why such an error occurs in the container.

Thanks for the help.

Reply all
Reply to author
Forward
0 new messages