This repository has been archived by the owner on Feb 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
View.ascx
277 lines (271 loc) · 14.7 KB
/
View.ascx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="DNN.Modules.SecurityAnalyzer.View" EnableViewState="true" %>
<%@ Import Namespace="DNN.Modules.SecurityAnalyzer.Components" %>
<%@ Import Namespace="DotNetNuke.Entities.Users" %>
<%@ Import Namespace="DotNetNuke.Services.Localization" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<div class="dnnForm" id="SecurityAnalyzer">
<ul class="dnnAdminTabNav">
<li>
<a href="#auditChecks"><%= GetString("AuditChecks") %></a>
</li>
<li>
<a href="#scannerChecks"><%= GetString("ScannerChecks") %></a>
</li>
<li>
<a href="#superuserActivity"><%= GetString("SuperuserActivity") %></a>
</li>
<li>
<a href="#modifiedFiles"><%= GetString("ModifiedFiles") %></a>
</li>
<li>
<a href="#modifiedSettings"><%= GetString("ModifiedSettings") %></a>
</li>
</ul>
<div id="auditChecks" class="dnnClear">
<div class="dnnLeft">
<strong>
<asp:Label ID="lblAuditExplanation" runat="server" resourceKey="AuditExplanation"></asp:Label>
</strong>
<div>
<asp:DataGrid id="dgResults" runat="server" AutoGenerateColumns="false" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
<Columns>
<asp:TemplateColumn HeaderText="CheckPurpose">
<ItemTemplate>
<asp:label runat="server" Text="<%# DisplayFriendlyName(((CheckResult) Container.DataItem).CheckNameText) %>" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Severity" HeaderStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Image runat="server"
ImageUrl="<%# GetSeverityImageUrl((int) ((CheckResult) Container.DataItem).Severity) %>"
Visible="<%# ((CheckResult) Container.DataItem).Severity != SeverityEnum.Unverified %>"></asp:Image>
<asp:LinkButton runat="server"
CssClass="dnnPrimaryAction"
ValidationGroup="AuditChecker"
resourcekey="Check"
OnClick="OnAuditCheck"
CommandArgument="<%# ((CheckResult) Container.DataItem).CheckName %>"
Visible="<%# ((CheckResult) Container.DataItem).Severity == SeverityEnum.Unverified %>"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Result">
<ItemTemplate>
<div class="foo" id="resultDiv" runat="server"><%# DisplayResult((CheckResult) Container.DataItem) %></div>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Notes">
<ItemTemplate>
<div class="foo" id="notesDiv" runat="server"><%# DisplayNotes(((CheckResult) Container.DataItem).Notes) %></div>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
</div>
</div>
</div>
<div id="scannerChecks" class="dnnClear">
<asp:Panel ID="panelSearch" runat="server" CssClass="dnnFormItem dnnClear" Width="450px">
<div class="dnnLeft">
<asp:Label ID="lblScannerExplanation" runat="server" resourceKey="ScannerExplanation"></asp:Label>
<div class="dnnFormItem">
<dnn:label id="plSearchTerm" controlname="txtSearchTerm" runat="server" CssClass="dnnFormRequired"/>
<asp:TextBox ID="txtSearchTerm" runat="server" MaxLength="256" Text="rootkit" ValidationGroup="ScannerChecks" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
EnableClientScript="true" ControlToValidate="txtSearchTerm" CssClass="dnnFormMessage dnnFormError"
resourcekey="SearchTermRequired" ValidationGroup="ScannerChecks"/>
<asp:LinkButton ID="cmdSearch" runat="server" CssClass="dnnPrimaryAction" resourcekey="cmdSearch" ValidationGroup="ScannerChecks"/>
</div>
</div>
</asp:Panel>
<br/>
<hr/>
<asp:Panel ID="pnlFileresults" runat="server" CssClass="dnnFormItem dnnClear" Width="450px" Visible="False">
<strong>File Results</strong><br/>
<asp:Label ID="lblfileresults" runat="server"></asp:Label>
</asp:Panel><br/>
<asp:Panel ID="pnlDatabaseresults" runat="server" CssClass="dnnFormItem dnnClear" Width="450px" Visible="False">
<strong>Database Results</strong>
<asp:Label ID="lbldatabaseresults" runat="server"></asp:Label>
</asp:Panel>
</div>
<div id="superuserActivity" class="dnnClear">
<strong>
<asp:Label ID="lblSuperUserActivityExplaination" runat="server" resourceKey="SuperUserActivityExplaination"></asp:Label>
</strong>
<br/>
<br/>
<div>
<asp:DataGrid id="dgUsers" runat="server" AutoGenerateColumns="false" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
<Columns>
<asp:BoundColumn datafield="UserName" headertext="Username"/>
<asp:BoundColumn datafield="FirstName" headertext="FirstName"/>
<asp:BoundColumn datafield="LastName" headertext="LastName"/>
<asp:BoundColumn datafield="DisplayName" headertext="DisplayName"/>
<asp:TemplateColumn HeaderText="Email">
<ItemTemplate>
<asp:Label ID="lblEmail" Runat="server" Text="<%# DisplayEmail(((UserInfo) Container.DataItem).Email) %>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="CreatedDate">
<ItemTemplate>
<asp:Label ID="lblCreateDate" Runat="server" Text="<%# DisplayDate(((UserInfo) Container.DataItem).Membership.CreatedDate) %>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="LastLogin">
<ItemTemplate>
<asp:Label ID="lblLastLogin" Runat="server" Text="<%# DisplayDate(((UserInfo) Container.DataItem).Membership.LastLoginDate) %>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="LastActivityDate">
<ItemTemplate>
<asp:Label ID="Label1" Runat="server" Text="<%# DisplayDate(((UserInfo) Container.DataItem).Membership.LastActivityDate) %>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
</div>
</div>
<div id="modifiedFiles" class="dnnClear">
<asp:Panel ID="panelModifiedFiles" runat="server" CssClass="dnnFormItem dnnClear" Width="450px">
<div class="dnnLeft">
<div class="dnnFormItem">
<asp:LinkButton ID="cmdModifiedFiles" runat="server" CssClass="dnnPrimaryAction" resourcekey="cmdModifiedFiles" ValidationGroup="ModifiedFiles"/>
</div>
<asp:Label ID="LabelCheckModifiedFiles" runat="server" resourceKey="ModifiedFilesLoadWarning"></asp:Label>
</div>
</asp:Panel>
<br/>
<strong>
<asp:Label ID="lblModifiedFilesExplaination" runat="server" resourceKey="ModifiedFilesExplaination"></asp:Label>
</strong>
<br/>
<br/>
<div>
<h2><%=GetString("HighRiskFiles") %></h2>
<asp:DataGrid id="dgModifiedExecutableFiles" runat="server" AutoGenerateColumns="false" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem" horizontalalign="Left"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
<Columns>
<asp:TemplateColumn HeaderText="FileName">
<ItemTemplate>
<span><%# GetFilePath(Eval("FullName").ToString()) %></span>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="LastModifiedDate">
<ItemTemplate>
<span><%# DisplayDate(Convert.ToDateTime(Eval("LastWriteTime"))) %></span>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<h2><%=GetString("LowRiskFiles") %></h2>
<asp:DataGrid id="dgModifiedFiles" runat="server" AutoGenerateColumns="false" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem" horizontalalign="Left"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
<Columns>
<asp:TemplateColumn HeaderText="FileName">
<ItemTemplate>
<span><%# GetFilePath(Eval("FullName").ToString()) %></span>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="LastModifiedDate">
<ItemTemplate>
<span><%# DisplayDate(Convert.ToDateTime(Eval("LastWriteTime"))) %></span>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
</div>
</div>
<div id="modifiedSettings" class="dnnClear">
<strong>
<asp:Label ID="lblModifiedSettingsExplaination" runat="server" resourceKey="ModifiedSettingsExplaination"></asp:Label>
</strong>
<br/>
<br/>
<div>
<h2><%=GetString("PortalSettings") %></h2>
<asp:DataGrid id="dgPortalSettings" runat="server" AutoGenerateColumns="true" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem" horizontalalign="Left"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
</asp:DataGrid>
</div>
<div>
<h2><%=GetString("HostSettings") %></h2>
<asp:DataGrid id="dgHostSettings" runat="server" AutoGenerateColumns="true" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem" horizontalalign="Left"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
</asp:DataGrid>
</div>
<div>
<h2><%=GetString("TabSettings") %></h2>
<asp:DataGrid id="dgTabSettings" runat="server" AutoGenerateColumns="true" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem" horizontalalign="Left"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
</asp:DataGrid>
</div>
<div>
<h2><%=GetString("ModuleSettings") %></h2>
<asp:DataGrid id="dgModuleSettings" runat="server" AutoGenerateColumns="true" AllowPaging="false" visible="true" width="100%" GridLines="None" CssClass="dnnGrid">
<headerstyle CssClass="dnnGridHeader"/>
<itemstyle CssClass="dnnGridItem" horizontalalign="Left"/>
<alternatingitemstyle CssClass="dnnGridAltItem"/>
<edititemstyle/>
<selecteditemstyle/>
<footerstyle/>
</asp:DataGrid>
</div>
</div>
</div>
<asp:Panel runat="server" ID="panelResources" Visible="False">
<script type="text/javascript" src="<%=Page.ResolveUrl("~/DesktopModules/DnnCorp/SecurityAnalyzer/Scripts/jquery-ui.min.js") %>"></script>
<script type="text/javascript" src="<%=Page.ResolveUrl("~/DesktopModules/DnnCorp/SecurityAnalyzer/Scripts/dnnscripts.js?cdv=" + DateTime.Now.Ticks) %>"></script>
<link rel="stylesheet" type="text/css" href="<%=Page.ResolveUrl("~/DesktopModules/DnnCorp/SecurityAnalyzer/Styles/dnnstyles.css?cdv=" + DateTime.Now.Ticks) %>"/>
</asp:Panel>
<script type="text/javascript">
jQuery(function($) {
$("#SecurityAnalyzer").dnnTabs();
});
</script>
<script runat="server">
protected string GetString(string key)
{
return Localization.GetString(key, "~/DesktopModules/DnnCorp/SecurityAnalyzer/App_LocalResources/View.ascx.resx");
}
</script>