Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pth into master #44

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
724 changes: 724 additions & 0 deletions SharpSploit/Execution/PassTheHash/SMBExec.cs

Large diffs are not rendered by default.

428 changes: 428 additions & 0 deletions SharpSploit/Execution/PassTheHash/WMIExec.cs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions SharpSploit/LateralMovement/SCM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,5 +327,7 @@ protected internal override IList<SharpSploitResultProperty> ResultProperties
}
}
}


}
}
1,762 changes: 1,762 additions & 0 deletions SharpSploit/LateralMovement/SMB.cs

Large diffs are not rendered by default.

954 changes: 954 additions & 0 deletions SharpSploit/LateralMovement/WMI.cs

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions SharpSploit/Misc/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
// License: BSD 3-Clause

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net.Sockets;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;

Expand Down Expand Up @@ -109,5 +113,47 @@ public static bool Is64Bit
{
get { return IntPtr.Size == 8; }
}

public static ushort DataLength(int length_start, byte[] string_extract_data)
{
byte[] bytes = { string_extract_data[length_start], string_extract_data[length_start + 1] };
ushort string_length = BitConverter.ToUInt16(GetByteRange(string_extract_data, length_start, length_start + 1), 0);
return string_length;
}
public static byte[] GetByteRange(byte[] array, int start, int end)
{
var newArray = array.Skip(start).Take(end - start + 1).ToArray();
return newArray;
}

public static byte[] ConvertStringToByteArray(string hex)
{
return Enumerable.Range(0, hex.Length)
.Where(x => x % 2 == 0)
.Select(x => Convert.ToByte(hex.Substring(x, 2), 16))
.ToArray();
}

public static byte[] ConvertFromPacketOrderedDictionary(OrderedDictionary packet_ordered_dictionary)
{
List<byte[]> byte_list = new List<byte[]>();
foreach (DictionaryEntry de in packet_ordered_dictionary)
{
byte_list.Add(de.Value as byte[]);
}

var flattenedList = byte_list.SelectMany(bytes => bytes);
byte[] byte_Array = flattenedList.ToArray();

return byte_Array;
}
public static byte[] SendStream(NetworkStream stream, byte[] BytesToSend)
{
byte[] BytesReceived = new byte[2048];
stream.Write(BytesToSend, 0, BytesToSend.Length);
stream.Flush();
stream.Read(BytesReceived, 0, BytesReceived.Length);
return BytesReceived;
}
}
}
130 changes: 130 additions & 0 deletions SharpSploit/SharpSploit.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.