Skip to content

Commit

Permalink
v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
VbScrub committed Jan 9, 2022
1 parent f8db97d commit 0aade08
Show file tree
Hide file tree
Showing 37 changed files with 1,248 additions and 723 deletions.
2 changes: 1 addition & 1 deletion GUI/Classes/BruteResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public System.Windows.Media.SolidColorBrush ForegroundColor
case CredentialStatus.UsernameAndPwdValidButPwdExpired:
return System.Windows.Media.Brushes.LightBlue;
default:
//TODO: See if we can get the default text color instead of hard coding white here
//TODO: Get the default text color instead of hard coding white here
return System.Windows.Media.Brushes.White;
}
}
Expand Down
34 changes: 34 additions & 0 deletions GUI/Classes/Converters/DisabledToIconConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media.Imaging;

namespace RubeusGui
{

[ValueConversion(typeof(Boolean), typeof(BitmapFrame))]
public class DisabledToIconConverter : IValueConverter
{

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null || (bool)value == false)
{
return new BitmapImage(new Uri("pack://application:,,,/RubeusGui;component/images/male_user_16px.png"));
}
else
{
return new BitmapImage(new Uri("pack://application:,,,/RubeusGui;component/images/lock_blue_16px.png"));
}
}

public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}

}
}
49 changes: 49 additions & 0 deletions GUI/Classes/CsvWriter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RubeusGui
{
public class CsvWriter
{

//public static void SaveCsvWithPrompt(string defaultFileName, List<Dictionary<string, string>> data)
//{
// if (data?.Count == 0 || data[0].Count == 0)
// {
// return;
// }
// var sfd = new Microsoft.Win32.SaveFileDialog();
// sfd.Filter = "CSV Files (*.csv)|*.csv";
// sfd.FileName = defaultFileName;
// if ((bool)sfd.ShowDialog())
// {
// using (StreamWriter writer = new StreamWriter(sfd.FileName, false, new UTF8Encoding(false)))
// {
// foreach (Dictionary<string, string> currentRow in data)
// {
//
//
// }
// }
// }
//}

public static string MakeCsvSafe(string value)
{
if (string.IsNullOrEmpty(value))
{
return "\" \"";
}
else
{
return "\"" + value.Replace("\"", "\"\"") + "\"";
}
}
}


}
12 changes: 0 additions & 12 deletions GUI/Classes/UiHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ class UiHelpers
public static Uri HourglassIconPath => new Uri("pack://application:,,,/RubeusGui;component/images/hourglass_16px.png");
public static Uri PlayIconPath => new Uri("pack://application:,,,/RubeusGui;component/images/play_16px.png");

public static string MakeCsvSafe(string value)
{
if (string.IsNullOrEmpty(value))
{
return "\" \"";
}
else
{
return "\"" + value.Replace("\"", "\"\"") + "\"";
}
}

public static void CopyToClipboard(string text)
{
if (string.IsNullOrEmpty(text))
Expand Down
2 changes: 1 addition & 1 deletion GUI/GlobalStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="MinWidth" Value="60"/>
<Setter Property="MinHeight" Value="23"/>
<Setter Property="Foreground" Value="{StaticResource ForegroundTextColor}"/>
<Setter Property="Template">
Expand Down
Binary file added GUI/Images/gold_bars_16px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GUI/Images/movie_ticket_16px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GUI/Images/silver_bars_16px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GUI/Images/train_ticket_16px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions GUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.0.0")]
[assembly: AssemblyFileVersion("0.4.0.0")]
[assembly: AssemblyVersion("0.4.2.0")]
[assembly: AssemblyFileVersion("0.4.2.0")]
21 changes: 20 additions & 1 deletion GUI/RubeusGui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ProjectGuid>{46FB8893-7879-4891-ADEE-3FAC11AC1DD9}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>RubeusGui</RootNamespace>
<AssemblyName>RubeusGui</AssemblyName>
<AssemblyName>RubeusGUI</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Expand Down Expand Up @@ -104,6 +104,8 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Classes\Converters\DisabledToIconConverter.cs" />
<Compile Include="Classes\CsvWriter.cs" />
<Compile Include="Classes\GuiBruteForcer.cs" />
<Compile Include="Classes\BruteResult.cs" />
<Compile Include="Classes\EncryptionDisplayItem.cs" />
Expand All @@ -125,6 +127,9 @@
<Compile Include="Windows\Tabs\ComingSoonTab.xaml.cs">
<DependentUpon>ComingSoonTab.xaml</DependentUpon>
</Compile>
<Compile Include="Windows\Tabs\GoldenTicketTab.xaml.cs">
<DependentUpon>GoldenTicketTab.xaml</DependentUpon>
</Compile>
<Compile Include="Windows\Tabs\KerberoastTab.xaml.cs">
<DependentUpon>KerberoastTab.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -170,6 +175,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Windows\Tabs\GoldenTicketTab.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Windows\Tabs\KerberoastTab.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -342,5 +351,15 @@
<ItemGroup>
<Resource Include="Images\hourglass_16px.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\gold_bars_16px.png" />
<Resource Include="Images\silver_bars_16px.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\train_ticket_16px.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\movie_ticket_16px.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
14 changes: 5 additions & 9 deletions GUI/Windows/AboutWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<RowDefinition Height="27" />
<RowDefinition Height="27" />
<RowDefinition Height="27" />
<RowDefinition Height="27" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<TextBlock Text="Version:" VerticalAlignment="Center" Grid.Row="0" />
Expand All @@ -44,15 +43,12 @@
<TextBlock Text="Me:" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" />
<WrapPanel Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1">
<TextBlock><Hyperlink Name="LnkTwitter" Click="LnkTwitter_Click">@VbScrub</Hyperlink></TextBlock>
<TextBlock Margin="14,0,0,0"><Hyperlink Name="LnkWebsite" Click="WebsiteLnk_Click">http://VbScrub.com</Hyperlink></TextBlock>
<TextBlock Margin="16,0,0,0"><Hyperlink Name="LnkWebsite" Click="WebsiteLnk_Click">http://vbscrub.com</Hyperlink></TextBlock>
</WrapPanel>
<TextBlock Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1"><Hyperlink Name="LnkGithub" Click="LnkGithub_Click">https://github.com/VbScrub/Rubeus-GUI</Hyperlink></TextBlock>
<TextBlock Text="Github:" VerticalAlignment="Center" Grid.Row="3" />
<TextBlock Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1"></TextBlock>
<TextBlock Text="Rubeus:" VerticalAlignment="Center" Grid.Row="4" />
<TextBlock Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="4" Grid.Column="1"><Hyperlink Name="LnkRubeus" Click="LnkRubeus_Click">https://github.com/GhostPack/Rubeus</Hyperlink></TextBlock>
<TextBlock Text="Icons from:" VerticalAlignment="Center" Grid.Row="5" />
<TextBlock Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="5" Grid.Column="1"><Hyperlink Name="LnkIcons" Click="LnkIcons_Click">http://icons8.com</Hyperlink></TextBlock>
<TextBlock Text="Rubeus:" VerticalAlignment="Center" Grid.Row="3" />
<TextBlock Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="3" Grid.Column="1"><Hyperlink Name="LnkRubeus" Click="LnkRubeus_Click">https://github.com/GhostPack/Rubeus</Hyperlink></TextBlock>
<TextBlock Text="Icons from:" VerticalAlignment="Center" Grid.Row="4" />
<TextBlock Margin="8,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="4" Grid.Column="1"><Hyperlink Name="LnkIcons" Click="LnkIcons_Click">http://icons8.com</Hyperlink></TextBlock>

</Grid>

Expand Down
6 changes: 1 addition & 5 deletions GUI/Windows/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public AboutWindow()
private void Window_Loaded(object sender, RoutedEventArgs e)
{
LblVersion.Text = UiHelpers.GetAppVersionString();
LblBuildDate.Text = "2nd December 2021"; // TODO: Update build date label before compiling
LblBuildDate.Text = "9th January 2022"; // TODO: Update build date label before compiling
}

private void WebsiteLnk_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -54,9 +54,5 @@ private void LnkIcons_Click(object sender, RoutedEventArgs e)
UiHelpers.LaunchUrl("http://icons8.com");
}

private void LnkGithub_Click(object sender, RoutedEventArgs e)
{
UiHelpers.LaunchGithubMainUrl();
}
}
}
6 changes: 3 additions & 3 deletions GUI/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:local="clr-namespace:RubeusGui"
xmlns:tabs="clr-namespace:RubeusGui.Windows.Tabs"
mc:Ignorable="d"
Title="Rubeus GUI - ALPHA v0.4" Height="800" Width="1060" MinWidth="650" MinHeight="400" SnapsToDevicePixels="True"
Title="Rubeus GUI - ALPHA v0.4.2" Height="800" Width="1060" MinWidth="650" MinHeight="400" SnapsToDevicePixels="True"
WindowStartupLocation="CenterScreen" Loaded="Window_Loaded"
Icon="/RubeusGui;component/Images/icons8_grand_master_key_colour.ico" Closing="Window_Closing">
<Window.Resources>
Expand Down Expand Up @@ -71,9 +71,9 @@
<WrapPanel x:Name="PnlCredentials" VerticalAlignment="Center" Visibility="Hidden">
<Image Stretch="None" Source="/RubeusGui;component/Images/user_shield_16px.png" Margin="0,0,5,0" />
<TextBlock Text="Username:" VerticalAlignment="Center" />
<TextBox x:Name="TxtCredUsername" Height="22" Width="150" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="3,0,0,0" ToolTip="Must include domain name (e.g mydomain.local\username)" />
<TextBox x:Name="TxtCredUsername" Height="22" Width="150" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="3,0,0,0" ToolTip="The username to use for LDAP connections to the domain" />
<TextBlock Text="Password:" VerticalAlignment="Center" Margin="8,0,0,0" />
<PasswordBox x:Name="TxtCredPassword" Height="22" Width="150" VerticalAlignment="Center" Margin="3,0,0,0" />
<PasswordBox x:Name="TxtCredPassword" Height="22" Width="150" VerticalAlignment="Center" Margin="3,0,0,0" ToolTip="The password to use for LDAP connections to the domain"/>
</WrapPanel>
</WrapPanel>

Expand Down
36 changes: 25 additions & 11 deletions GUI/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,37 @@ public partial class MainWindow : Window

public MainWindow()
{
InitializeComponent();
try
{
InitializeComponent();
}
catch (Exception ex)
{
MessageBox.Show("Unexpected error in application startup: " + ex.Message + "\n" + ex.InnerException?.Message, "Unexpected Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}

private void Window_Loaded(object sender, RoutedEventArgs e)
{
// Redirect all the Rubeus Console.WriteLine calls to a string that we can add to our log
Console.SetOut(_outputWriter);
Console.SetError(_outputWriter);
try
{
// Redirect all the Rubeus Console.WriteLine calls to a string that we can add to our log
Console.SetOut(_outputWriter);
Console.SetError(_outputWriter);

// Give each tab a reference to this main window so that they can get the global settings like domain and username etc
foreach (TabItem tab in TabCtrlMain.Items)
// Give each tab a reference to this main window so that they can get the global settings like domain and username etc
foreach (TabItem tab in TabCtrlMain.Items)
{
((RubeusTab)tab.Content).OwnerWindow = this;
}

// Load user preferences and last used domain name etc from XML file
LoadUserPreferences();
}
catch (Exception ex)
{
((RubeusTab)tab.Content).OwnerWindow = this;
MessageBox.Show("Unexpected error in window load: " + ex.Message + "\n" + ex.InnerException?.Message, "Unexpected Error", MessageBoxButton.OK, MessageBoxImage.Error);
}

// Load user preferences and last used domain name etc from XML file
LoadUserPreferences();
}

private void MenuItemFileExit_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -115,7 +129,7 @@ private void SaveUserPreferences()
}
}

// Called by individual tabs to get the global settings from this main window
// Called by individual tabs to get the global domain settings from this main window
public DomainSettings GetDomainSettings()
{
DomainSettings settings = new DomainSettings();
Expand Down
11 changes: 8 additions & 3 deletions GUI/Windows/Tabs/BruteTab.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:RubeusGui.Windows.Tabs"
mc:Ignorable="d"
d:DesignHeight="550" d:DesignWidth="990">
d:DesignHeight="650" d:DesignWidth="990">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down Expand Up @@ -104,7 +104,7 @@
</StackPanel>

<WrapPanel Margin="0,28,0,0" HorizontalAlignment="Left" DockPanel.Dock="Bottom">
<Button x:Name="BtnExecute" Width="130" Height="23" Click="BtnExecute_Click" ToolTip="Runs a Rubeus operation based on the currently selected tab" >
<Button x:Name="BtnExecute" Width="130" Height="23" Click="BtnExecute_Click" ToolTip="Start the brute force attack">
<StackPanel Orientation="Horizontal" Margin="-2,0,0,0">
<Image x:Name="ImgExecuteBtn" Stretch="None" VerticalAlignment="Center" Source="/RubeusGui;component/Images/play_16px.png" Margin="0,0,4,0" />
<TextBlock x:Name="LblExecuteBtn" Text="Run" VerticalAlignment="Center" />
Expand Down Expand Up @@ -138,7 +138,12 @@

</WrapPanel>
</StackPanel>
<ListView x:Name="LsvResults" Margin="0,10,0,10" MinHeight="90" SelectionMode="Single" IsEnabled="False">
<WrapPanel x:Name="PnlExport" DockPanel.Dock="Bottom" HorizontalAlignment="Left" Margin="0,8,0,12">
<Button x:Name="BtnExportAll" Margin="0,0,0,0" Height="23" Width="130" ToolTip="Save results table to CSV file. Only includes items that are visible with the current filter" Click="BtnExportAll_Click" IsEnabled="False">
<TextBlock Text="Export Results" />
</Button>
</WrapPanel>
<ListView x:Name="LsvResults" Margin="0,10,0,0" MinHeight="90" SelectionMode="Single" IsEnabled="False">
<ListView.ContextMenu>
<ContextMenu x:Name="CtxResultsListView">
<MenuItem x:Name="CtxItemCopyUsernameAndPassword" Header="Copy Username &amp; Password" Click="CtxItemCopyUsernameAndPassword_Click" />
Expand Down
Loading

0 comments on commit 0aade08

Please sign in to comment.