Setting up proxy for internal sites at work

308 views
Skip to first unread message

anirud...@assurity.co.nz

unread,
Jan 17, 2016, 10:06:38 PM1/17/16
to OWASP ZAP User Group
I've been trying to setup OWASP ZAP to do some testing at work. I had configured ZAP to use localhost and port 8080, and used the same config for Firefox. Now, I can visit all external sites like google and they are picked up and scanned by ZAP. However whenever I try any internal link for my organization, such as confluence pages, test environment, it gives me the following error. 

 "Unknown Host
Description: Unable to locate the server --- the server does not have a DNS entry. Perhaps there is a misspelling in the server name, or the server no longer exists. Double-check the name and try again."

I took this up with our systems team, and was told that standard config for user workstation web browsers is different, and there is a different network which is a supernet that all our internal networks belong to. They gave me the domain and port for the same, and told me to either replicate the config for ZAP or add an exception to it so the internal traffic passes through. I went to Options -> Connection and added the details to 'Skip IP address and domain names' section. It didn't really work so added the details to 'Use proxy chain' option. Then tried to open an internal test environment again and got 502 Bad gateway error. This is the error message:

ZAP Error [java.net.ConnectException]: Connection timed out: connect

Stack Trace:
java.net.ConnectException: Connection timed out: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at java.net.Socket.connect(Socket.java:528)
	at java.net.Socket.<init>(Socket.java:425)
	at java.net.Socket.<init>(Socket.java:280)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.parosproxy.paros.network.HttpSender.executeMethod(Unknown Source)
	at org.parosproxy.paros.network.HttpSender.runMethod(Unknown Source)
	at org.parosproxy.paros.network.HttpSender.send(Unknown Source)
	at org.parosproxy.paros.network.HttpSender.sendAuthenticated(Unknown Source)
	at org.parosproxy.paros.network.HttpSender.sendAndReceive(Unknown Source)
	at org.parosproxy.paros.network.HttpSender.sendAndReceive(Unknown Source)
	at org.parosproxy.paros.core.proxy.ProxyThread.processHttp(Unknown Source)
	at org.parosproxy.paros.core.proxy.ProxyThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)

Can someone please guide me on how to do this? Kindly let me know if more detail is needed. Thanks a lot in advance!
Reply all
Reply to author
Forward
0 new messages