protected void initSessionSecurity ( byte[] mk ) { this.signKey = deriveKey(mk, C2S_SIGN_CONSTANT); this.verifyKey = deriveKey(mk, S2C_SIGN_CONSTANT); if ( log.isDebugEnabled() ) { log.debug("Sign key is " + Hexdump.toHexString(this.signKey)); log.debug("Verify key is " + Hexdump.toHexString(this.verifyKey)); } this.sealClientKey = deriveKey(mk, C2S_SEAL_CONSTANT); this.sealClientHandle = Crypto.getArcfour(this.sealClientKey); if ( log.isDebugEnabled() ) { log.debug("Seal key is " + Hexdump.toHexString(this.sealClientKey)); } this.sealServerKey = deriveKey(mk, S2C_SEAL_CONSTANT); this.sealServerHandle = Crypto.getArcfour(this.sealServerKey); if ( log.isDebugEnabled() ) { log.debug("Server seal key is " + Hexdump.toHexString(this.sealServerKey)); } }
@Override public byte[] initSecContext ( byte[] token, int offset, int len ) throws SmbException { switch ( this.state ) { case 1: return makeNegotiate(token); case 2: return makeAuthenticate(token); default: throw new SmbException("Invalid state"); } }
if (nctx == null) { boolean doSigning = (transport.flags2 & ServerMessageBlock.FLAGS2_SECURITY_SIGNATURES) != 0; nctx = new NtlmContext(auth, doSigning); SmbTransport.log.println(nctx); if (nctx.isEstablished()) { netbiosName = nctx.getNetbiosName(); token = nctx.initSecContext(token, 0, token.length); } catch (SmbException se) { byte[] signingKey = nctx.getSigningKey(); if (signingKey != null) request.digest = new SigningDigest(signingKey, true);
public SSPContext createContext ( CIFSContext tc, String targetDomain, String host, byte[] initialToken, boolean doSigning ) throws SmbException { if ( tc.getConfig().isUseRawNTLM() ) { return new NtlmContext(tc, this, doSigning); return new SpnegoContext(tc.getConfig(), new NtlmContext(tc, this, doSigning));
initSessionSecurity(msg3.getMasterKey());
if (nctx == null) { boolean doSigning = (transport.flags2 & ServerMessageBlock.FLAGS2_SECURITY_SIGNATURES) != 0; nctx = new NtlmContext(auth, doSigning); SmbTransport.log.println(nctx); if (nctx.isEstablished()) { netbiosName = nctx.getNetbiosName(); token = nctx.initSecContext(token, 0, token.length); } catch (SmbException se) { byte[] signingKey = nctx.getSigningKey(); if (signingKey != null) request.digest = new SigningDigest(signingKey, true);
public SSPContext createContext ( CIFSContext tc, String targetDomain, String host, byte[] initialToken, boolean doSigning ) throws SmbException { if ( tc.getConfig().isUseRawNTLM() ) { return new NtlmContext(tc, this, doSigning); return new SpnegoContext(tc.getConfig(), new NtlmContext(tc, this, doSigning));
initSessionSecurity(msg3.getMasterKey());
if (nctx == null) { boolean doSigning = (transport.flags2 & ServerMessageBlock.FLAGS2_SECURITY_SIGNATURES) != 0; nctx = new NtlmContext(auth, doSigning); SmbTransport.log.println(nctx); if (nctx.isEstablished()) { netbiosName = nctx.getNetbiosName(); token = nctx.initSecContext(token, 0, token.length); } catch (SmbException se) { byte[] signingKey = nctx.getSigningKey(); if (signingKey != null) request.digest = new SigningDigest(signingKey, true);
@Override public byte[] initSecContext ( byte[] token, int offset, int len ) throws SmbException { switch ( this.state ) { case 1: return makeNegotiate(token); case 2: return makeAuthenticate(token); default: throw new SmbException("Invalid state"); } }
protected void initSessionSecurity ( byte[] mk ) { this.signKey = deriveKey(mk, C2S_SIGN_CONSTANT); this.verifyKey = deriveKey(mk, S2C_SIGN_CONSTANT); if ( log.isDebugEnabled() ) { log.debug("Sign key is " + Hexdump.toHexString(this.signKey)); log.debug("Verify key is " + Hexdump.toHexString(this.verifyKey)); } this.sealClientKey = deriveKey(mk, C2S_SEAL_CONSTANT); this.sealClientHandle = Crypto.getArcfour(this.sealClientKey); if ( log.isDebugEnabled() ) { log.debug("Seal key is " + Hexdump.toHexString(this.sealClientKey)); } this.sealServerKey = deriveKey(mk, S2C_SEAL_CONSTANT); this.sealServerHandle = Crypto.getArcfour(this.sealServerKey); if ( log.isDebugEnabled() ) { log.debug("Server seal key is " + Hexdump.toHexString(this.sealServerKey)); } }
if (nctx == null) { boolean doSigning = (transport.flags2 & ServerMessageBlock.FLAGS2_SECURITY_SIGNATURES) != 0; nctx = new NtlmContext(auth, doSigning); SmbTransport.log.println(nctx); if (nctx.isEstablished()) { netbiosName = nctx.getNetbiosName(); token = nctx.initSecContext(token, 0, token.length); } catch (SmbException se) { byte[] signingKey = nctx.getSigningKey(); if (signingKey != null) request.digest = new SigningDigest(signingKey, true);