Skip to content

Commit e44aecb

Browse files
authored
Harden System Security v1.0.48.0 (#1114)
# What's New * Updated dependencies to the latest versions. * Added a new button to the app's toolbar which allows you to easily relaunch the app with different privileges. If running as Administrator, pressing this button will launch the app with limited privileges and if running with limited privileges, pressing this button will relaunch the app with Administrator privileges. * Added clickable indicators to the tiles on the home page that are clickable. * You can now click on the open ports tile on the home page to see all open ports on your system, see which programs are using which port and also view source and destination IP addresses of each port. This can give you advanced overview of active open ports on your system and help you identify any suspicious or unwanted activity. * Added a new security measure to the Miscellaneous category: Disables the WebClient service which prevents attackers from abusing WebDAV to intercept and steal NTLM credentials and other sensitive data via malicious links. * Added Security Score to the app! 🎊 When you use the Verify button on the Protect page, at the end there will be a new section displayed which shows you the security score of your system, how many security measures are compliant and how many are not compliant. The details of each category can be viewed by simply browsing to each of their respective pages. Completes the following feature request: #1105 <div align="center"> <img width="242" height="264" alt="Verification Results Score Popup" src="https://github.com/user-attachments/assets/2f2b9f31-08fe-438b-ad98-e8f0a3adc204" /> </div>
1 parent 0338c74 commit e44aecb

27 files changed

Lines changed: 1680 additions & 58 deletions

AppControl Manager/CustomUIElements/InfoBarV2.cs

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,6 @@ private void InitializeTransforms()
225225
typeof(InfoBarV2),
226226
new PropertyMetadata(1.0, OnScaleToChanged)); // DEFAULT: 1.0
227227

228-
// Default: True - animations enabled
229-
private static readonly DependencyProperty EnableAnimationProperty =
230-
DependencyProperty.Register(
231-
nameof(EnableAnimation),
232-
typeof(bool),
233-
typeof(InfoBarV2),
234-
new PropertyMetadata(true, OnEnableAnimationChanged)); // DEFAULT: True
235-
236228
// Default: Zero delay before animation starts
237229
private static readonly DependencyProperty AnimationDelayProperty =
238230
DependencyProperty.Register(
@@ -335,12 +327,6 @@ internal double ScaleTo
335327
set => SetValue(ScaleToProperty, value);
336328
}
337329

338-
internal bool EnableAnimation
339-
{
340-
get => (bool)GetValue(EnableAnimationProperty);
341-
set => SetValue(EnableAnimationProperty, value);
342-
}
343-
344330
internal TimeSpan AnimationDelay
345331
{
346332
get => (TimeSpan)GetValue(AnimationDelayProperty);
@@ -471,18 +457,6 @@ private static void OnScaleToChanged(DependencyObject d, DependencyPropertyChang
471457
}
472458
}
473459

474-
private static void OnEnableAnimationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
475-
{
476-
if (d is InfoBarV2 infoBar && !infoBar._isDisposed && !infoBar._isUnloading)
477-
{
478-
// If animations are disabled, stop any running animations immediately
479-
if (!(bool)e.NewValue)
480-
{
481-
infoBar.StopAllAnimations();
482-
}
483-
}
484-
}
485-
486460
private static void OnAnimationDelayChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
487461
{
488462
if (d is InfoBarV2 infoBar && !infoBar._isDisposed && !infoBar._isUnloading)
@@ -679,9 +653,9 @@ private void InfoBarV2_Closing(InfoBar sender, InfoBarClosingEventArgs args)
679653
return;
680654
}
681655

682-
// Only intercept the close if animations are enabled and we should handle close button clicks
656+
// Only intercept the close if we should handle close button clicks
683657
// The _isHandlingCloseButton flag prevents infinite loops when we set IsOpen=false after animation
684-
if (EnableAnimation && InterceptCloseButton && !_isHandlingCloseButton)
658+
if (InterceptCloseButton && !_isHandlingCloseButton)
685659
{
686660
// Cancel the default close behavior so we can show our custom animation first
687661
args.Cancel = true;
@@ -722,7 +696,7 @@ private void InfoBarV2_Closed(InfoBar sender, InfoBarClosedEventArgs args)
722696
}
723697

724698
// Update state tracking if InfoBar was closed without my custom animation
725-
if (!_isClosingViaButton && EnableAnimation && !IsOpen && _lastKnownIsOpenState)
699+
if (!_isClosingViaButton && !IsOpen && _lastKnownIsOpenState)
726700
{
727701
_lastKnownIsOpenState = false;
728702
}
@@ -837,15 +811,6 @@ private void OnIsOpenPropertyChanged(DependencyObject sender, DependencyProperty
837811
bool oldState = _lastKnownIsOpenState;
838812
_lastKnownIsOpenState = newIsOpenValue;
839813

840-
// If animations are disabled, use default InfoBar behavior
841-
if (!EnableAnimation)
842-
{
843-
Visibility = IsOpen ? Visibility.Visible : Visibility.Collapsed;
844-
Opacity = IsOpen ? 1.0 : 0.0;
845-
ResetTransforms();
846-
return;
847-
}
848-
849814
// Enhanced conflict handling: if there's an opposite animation in progress, interrupt it
850815
if (_animationInProgress)
851816
{
@@ -977,7 +942,7 @@ private void AnimateInfoBarState(bool shouldOpen)
977942
}
978943

979944
/// <summary>
980-
/// Fallback method when animations cannot be created or are disabled.
945+
/// Fallback method when animations cannot be created.
981946
/// Ensures InfoBar still functions correctly without animations.
982947
/// </summary>
983948
private void FallbackToNonAnimatedBehavior(bool shouldOpen)
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
<customUI:ContentDialogV2
2+
x:Class="AppControlManager.CustomUIElements.OpenPortsDialog"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:AppControlManager.CustomUIElements"
6+
xmlns:customUI="using:AppControlManager.CustomUIElements"
7+
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
8+
Title="Open Network Ports"
9+
PrimaryButtonText="Close"
10+
DefaultButton="Primary"
11+
Closed="{x:Bind OpenPortsDialog_Closed}">
12+
13+
<Grid>
14+
<Grid.RowDefinitions>
15+
<RowDefinition Height="Auto" />
16+
<RowDefinition Height="*" />
17+
</Grid.RowDefinitions>
18+
19+
<!-- Top Bar Controls -->
20+
<controls:WrapPanel Grid.Row="0"
21+
Orientation="Horizontal"
22+
Margin="0,0,0,10"
23+
HorizontalSpacing="8"
24+
VerticalSpacing="5"
25+
HorizontalAlignment="Center"
26+
VerticalAlignment="Top">
27+
28+
<!-- Counts card -->
29+
<Border CornerRadius="8"
30+
VerticalAlignment="Bottom"
31+
HorizontalAlignment="Center"
32+
Padding="10,6"
33+
BorderThickness="1"
34+
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
35+
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}">
36+
<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
37+
<FontIcon Glyph="&#xE8A9;" Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" />
38+
<TextBlock VerticalAlignment="Center">
39+
<Run x:Uid="TotalText" />
40+
<Run Text="{x:Bind DisplayedPorts.Count, Mode=OneWay}" FontWeight="SemiBold" />
41+
</TextBlock>
42+
</StackPanel>
43+
</Border>
44+
45+
<!-- Search Box -->
46+
<TextBox x:Name="SearchBox"
47+
HorizontalAlignment="Center"
48+
Header="Search"
49+
PlaceholderText="Search ports, IPs, states, or protocols..."
50+
TextChanged="{x:Bind ApplyFilterAndSort}"
51+
VerticalAlignment="Center"/>
52+
53+
<!-- Refresh Interval -->
54+
<NumberBox HorizontalAlignment="Center"
55+
Header="Refresh Interval (s)"
56+
Value="5"
57+
Minimum="1"
58+
Maximum="60"
59+
SpinButtonPlacementMode="Inline"
60+
VerticalAlignment="Center"
61+
ValueChanged="{x:Bind RefreshIntervalBox_ValueChanged}"/>
62+
63+
<!-- Auto Refresh Toggle -->
64+
<ToggleSwitch x:Name="AutoRefreshToggle"
65+
HorizontalAlignment="Center"
66+
Header="Auto Refresh"
67+
IsOn="True"
68+
VerticalAlignment="Center"
69+
Toggled="{x:Bind AutoRefreshToggle_Toggled}"/>
70+
71+
</controls:WrapPanel>
72+
73+
<ListView Grid.Row="1"
74+
ItemsSource="{x:Bind DisplayedPorts}"
75+
SelectionMode="None"
76+
ScrollViewer.HorizontalScrollMode="Enabled"
77+
ScrollViewer.IsHorizontalRailEnabled="True"
78+
ScrollViewer.HorizontalScrollBarVisibility="Visible"
79+
ShowsScrollingPlaceholders="True"
80+
ScrollViewer.VerticalScrollBarVisibility="Visible">
81+
82+
<ListView.Header>
83+
<Border CornerRadius="5" Background="Black" customUI:StickyHeaderBehaviorV2.IsEnabled="True">
84+
<Grid Padding="5">
85+
<Grid.ColumnDefinitions>
86+
<ColumnDefinition Width="80" />
87+
<ColumnDefinition Width="80" />
88+
<ColumnDefinition Width="160" />
89+
<ColumnDefinition Width="180" />
90+
<ColumnDefinition Width="120" />
91+
<ColumnDefinition Width="150" />
92+
</Grid.ColumnDefinitions>
93+
94+
<!-- Sortable Headers -->
95+
<Button Content="Port" Tag="Port" Grid.Column="0" Background="Transparent" Foreground="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="0" Click="HeaderSortingButton_Click" />
96+
<Button Content="Protocol" Tag="Protocol" Grid.Column="1" Background="Transparent" Foreground="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="0" Click="HeaderSortingButton_Click" />
97+
<Button Content="Local Address" Tag="LocalAddress" Grid.Column="2" Background="Transparent" Foreground="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="0" Click="HeaderSortingButton_Click" />
98+
<Button Content="Remote Address" Tag="RemoteAddressAndPort" Grid.Column="3" Background="Transparent" Foreground="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="0" Click="HeaderSortingButton_Click" />
99+
<Button Content="State" Tag="State" Grid.Column="4" Background="Transparent" Foreground="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="0" Click="HeaderSortingButton_Click" />
100+
<Button Content="Process" Tag="Process" Grid.Column="5" Background="Transparent" Foreground="LightGray" FontWeight="Bold" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" BorderThickness="0" Click="HeaderSortingButton_Click" />
101+
</Grid>
102+
</Border>
103+
</ListView.Header>
104+
105+
<ListView.ItemTemplate>
106+
<DataTemplate x:DataType="local:OpenPortItem">
107+
<Grid Background="Transparent">
108+
<Grid.ColumnDefinitions>
109+
<ColumnDefinition Width="80" />
110+
<ColumnDefinition Width="80" />
111+
<ColumnDefinition Width="160" />
112+
<ColumnDefinition Width="180" />
113+
<ColumnDefinition Width="120" />
114+
<ColumnDefinition Width="150" />
115+
</Grid.ColumnDefinitions>
116+
117+
<TextBlock Text="{x:Bind Port}" Grid.Column="0" VerticalAlignment="Center" Margin="5,10,5,10" IsTextSelectionEnabled="True"/>
118+
<TextBlock Text="{x:Bind Protocol}" Grid.Column="1" VerticalAlignment="Center" Margin="5,10,5,10" IsTextSelectionEnabled="True"/>
119+
<TextBlock Text="{x:Bind LocalAddress}" Grid.Column="2" VerticalAlignment="Center" Margin="5,10,5,10" IsTextSelectionEnabled="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" ToolTipService.ToolTip="{x:Bind LocalAddress}"/>
120+
<TextBlock Text="{x:Bind RemoteAddressAndPort}" Grid.Column="3" VerticalAlignment="Center" Margin="5,10,5,10" IsTextSelectionEnabled="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" ToolTipService.ToolTip="{x:Bind RemoteAddressAndPort}"/>
121+
<TextBlock Text="{x:Bind State}" Grid.Column="4" VerticalAlignment="Center" Margin="5,10,5,10" IsTextSelectionEnabled="True"/>
122+
<TextBlock Text="{x:Bind ProcessName}" Grid.Column="5" VerticalAlignment="Center" Margin="5,10,5,10" IsTextSelectionEnabled="True" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" ToolTipService.ToolTip="{x:Bind ProcessName}"/>
123+
</Grid>
124+
</DataTemplate>
125+
</ListView.ItemTemplate>
126+
</ListView>
127+
</Grid>
128+
</customUI:ContentDialogV2>

0 commit comments

Comments
 (0)