Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Error with MITM + Selenium #202

Open
0M1N0U5 opened this issue Jan 3, 2020 · 0 comments
Open

Error with MITM + Selenium #202

0M1N0U5 opened this issue Jan 3, 2020 · 0 comments

Comments

@0M1N0U5
Copy link

0M1N0U5 commented Jan 3, 2020

Describe the bug
I have this example code:

`BrowserUpProxy browserUpServer = new BrowserUpProxyServer();
//browserUpServer.addFirstHttpFilterFactory(new RequestFilterAdapter.FilterSource(requestFilter, 83886080));
//browserUpServer.addLastHttpFilterFactory(new ResponseFilterAdapter.FilterSource(responseFilter, 83886080));
browserUpServer.start();
System.out.println("Iniciado proxy en puerto: "+ browserUpServer.getPort());
Proxy seleniumProxy = ClientUtil.createSeleniumProxy(new InetSocketAddress("localhost", browserUpServer.getPort()));
System.setProperty("webdriver.chrome.driver","chromedriver.exe");
System.setProperty("webdriver.firefox.marionette","geckodriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setAcceptInsecureCerts(true);
chromeOptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
chromeOptions.setCapability(CapabilityType.PROXY, seleniumProxy);

chromeOptions.setProxy(seleniumProxy);
SeleniumDrivers.primitiveDriver = new ChromeDriver(chromeOptions);`

And when i open a https web i have this error:

io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Insufficient buffer remaining for AEAD cipher fragment (2). Needs to be more than or equal to IV size (8) + tag size (16) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491) [netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) [netty-all-4.1.34.Final.jar:4.1.34.Final] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_231] Caused by: javax.net.ssl.SSLException: Insufficient buffer remaining for AEAD cipher fragment (2). Needs to be more than or equal to IV size (8) + tag size (16) at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[na:1.8.0_231] at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1709) ~[na:1.8.0_231] at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:970) ~[na:1.8.0_231] at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:896) ~[na:1.8.0_231] at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:766) ~[na:1.8.0_231] at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) ~[na:1.8.0_231] at io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:295) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1330) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1225) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1272) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) ~[netty-all-4.1.34.Final.jar:4.1.34.Final] ... 15 common frames omitted Caused by: javax.crypto.BadPaddingException: Insufficient buffer remaining for AEAD cipher fragment (2). Needs to be more than or equal to IV size (8) + tag size (16) at sun.security.ssl.CipherBox.applyExplicitNonce(CipherBox.java:936) ~[na:1.8.0_231] at sun.security.ssl.CipherBox.applyExplicitNonce(CipherBox.java:993) ~[na:1.8.0_231] at sun.security.ssl.InputRecord.decrypt(InputRecord.java:157) ~[na:1.8.0_231] at sun.security.ssl.EngineInputRecord.decrypt(EngineInputRecord.java:177) ~[na:1.8.0_231] at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:963) ~[na:1.8.0_231] ... 24 common frames omitted

Expected behavior
I want to use a request filter for modify request when X conditions are true but this part of code is commented.

Why i get this error on console?

Please complete the following information:

  • OS: Windows 10
  • Browser: Chrome
  • Version: Versión 79.0.3945.88 (Build oficial) (64 bits)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant