ssl - Java HttpURLConnection connect using Weak Ciphers -
i working on vulnerability scanner in java check websites allow connections using weak cipher suites. would, example, try connect using 56 bits "ssl_dhe_rsa_with_des_cbc_sha" (or other weak ciphers) , if 200 ok, website vulnerable. here far:
1- httpurlconnection works time default ciphers if try use "system.setproperty() set weak cipher, either "cipher not supported exception (for of cipher suites) or "connection rejected" exception when try connect(). know connection rejected answer websites don't accept weak ciphers, how actual http reponse header (with rejection code) instead of exception?
2- not interested in finding vulnerability on ssl level (layer 6) on http level (layer 7) , know http header may deceptive in instances, ok that.
in summary, need work weak cipher suites only:
url url = new url(ip); httpsurlconnection con = (httpsurlconnection) url.openconnection(); con.sethostnameverifier(new hostnameverifier() { public boolean verify(string hostname, sslsession session) { return true; } }); con.connect(); system.out.println("response code : " + con.getresponsecode());
how actual http reponse header (with rejection code) instead of exception?
you don't. ssl connection isn't formed there nothing http headers transmitted over. sslexception.
i not interested in finding vulnerability on ssl level (layer 6) on http level
this statement doesn't make sense. vulnerability exists @ ssl level. there is no http(s)-level connection until ssl connection complete, , fails instead.
Comments
Post a Comment