diff --git a/SMBLibrary/SMB1/TransactionSubcommands/TransactionSubcommand.cs b/SMBLibrary/SMB1/TransactionSubcommands/TransactionSubcommand.cs index d527359..a65cefa 100644 --- a/SMBLibrary/SMB1/TransactionSubcommands/TransactionSubcommand.cs +++ b/SMBLibrary/SMB1/TransactionSubcommands/TransactionSubcommand.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2017 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -68,11 +68,6 @@ namespace SMBLibrary.SMB1 return new TransactionCallNamedPipeRequest(setup, data); } } - else if (setup.Length == 0 && data.Length == 0) - { - // [MS-RAP] Remote Administration Protocol request - throw new NotImplementedException("Remote Administration Protocol request"); - } throw new InvalidRequestException(); } } diff --git a/SMBLibrary/Server/SMB1/TransactionHelper.cs b/SMBLibrary/Server/SMB1/TransactionHelper.cs index 63e437b..b6ab6b8 100644 --- a/SMBLibrary/Server/SMB1/TransactionHelper.cs +++ b/SMBLibrary/Server/SMB1/TransactionHelper.cs @@ -92,6 +92,14 @@ namespace SMBLibrary.Server.SMB1 internal static SMB1Command GetCompleteTransactionResponse(SMB1Header header, string name, byte[] requestSetup, byte[] requestParameters, byte[] requestData, ISMBShare share, SMB1ConnectionState state, List sendQueue) { + if (String.Equals(name, @"\pipe\lanman", StringComparison.InvariantCultureIgnoreCase)) + { + // [MS-RAP] Remote Administration Protocol request + state.LogToServer(Severity.Debug, "Remote Administration Protocol requests are not implemented"); + header.Status = NTStatus.STATUS_NOT_IMPLEMENTED; + return new ErrorResponse(CommandName.SMB_COM_TRANSACTION); + } + TransactionSubcommand subcommand = TransactionSubcommand.GetSubcommandRequest(requestSetup, requestParameters, requestData, header.UnicodeFlag); TransactionSubcommand subcommandResponse = null;