-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathemergency_case.jsp
More file actions
430 lines (354 loc) · 16.8 KB
/
emergency_case.jsp
File metadata and controls
430 lines (354 loc) · 16.8 KB
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<%@ page language="java" import="java.sql.*, java.lang.*, java.util.*" contentType="text/html; charset=UTF-8"
pageEncoding="utf-8" %>
<%@ page import="emergency.EmergencyItem" %>
<%@ page import="emergency.EmergencyDAO" %>
<%@ page import="emergency.CyberAttackDAO" %>
<%@ page import="emergency.CyberAttackItem" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.io.PrintWriter" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:useBean id="dao" class="emergency.CyberAttackDAO" />
<%
request.setCharacterEncoding("UTF-8");
%>
<jsp:useBean id="listDAO" class="asset.AssetDAO" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width", initial-scale="1">
<link rel="stylesheet" href="css/bootstrap.css">
<title>취약점 진단 프로그램</title>
<style type="text/css">
#check_div {vertical-align: top;}
</style>
<!-- 부트스트립 css 추가하기 -->
<link rel="stylesheet" href="./css/bootstrap.min.css">
<!-- 커스텀 css 추가하기 -->
<link rel="stylesheet" href="./css/custom.css">
</head>
<body>
<!-- 제이쿼리 자바스크립트 추가하기 -->
<script src="./js/jquery.min.js"></script>
<!-- 파퍼 자바스크립트 추가하기 -->
<script src="./js/popper.js"></script>
<!-- 부트스트랩 자바스크립트 추가하기 -->
<script src="./js/bootstrap.min.js"></script>
<style>
.btn-primary{
background-color:#848484;
border-color:#848484
}
</style>
<% // 로그인여부 확인
String userID = null;
if (session.getAttribute("userID") != null) {
userID = (String) session.getAttribute("userID");
}
%>
<nav class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
aria-expanded="false">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="main.jsp">산업제어시스템 사이버 침해사고 대응체계 프로그램</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="main.jsp">메인</a></li>
<li><a href="asset_list.jsp">자산 리스트</a></li>
<li><a href="asset_eva.jsp" onclick="return eva_button()">자산
평가</a></li>
<li><a href="sec_eva.jsp">보안성 평가 결과</a></li>
<li class="active"><a href="emergency_case.jsp">비상사건 관리</a></li>
<!-- <li><a href="scenario.jsp">시나리오 리스트</a></li>-->
<li><a href="scenario_eva.jsp">시나리오 관리</a></li>
<li><a href="infringement.jsp">침해대응 훈련</a></li>
</ul>
<%
//로그인 여부에 따라 달라지는 탭 구현 위한 코드
if (userID == null) {
%>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">접속하기<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="login.jsp">로그인</a></li>
<li><a href="join.jsp">회원가입</a></li>
</ul>
</li>
</ul>
<%
} else {
%>
<ul class = "nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">회원관리<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="logoutAction.jsp">로그아웃</a></li>
</ul>
</li>
<%
}
%>
</ul>
</div>
</nav>
<br><br>
<div id = "search" style="padding-bottom : 15px; margin-right:370px;" align="right">
<input type = "text" placeholder = "사건명 입력">
<button>검색</button>
</div>
<section class="container">
<div class ="row">
<table name="Control_Item_Table" class="table table-striped" style="text-align:center; border:1px solid #dddddd">
<thead>
<tr>
<th width=2% style="background-color:#eeeeee; text-align:center;">번호</th>
<th width=9% style = "background-color : #eeeeee; text-align:center;">사건명</th>
<th width=11% style = "background-color : #eeeeee; text-align:center;">개요</th>
<th width=4% style = "background-color : #eeeeee; text-align:center;">사건 피해 수준</th>
</tr>
</thead>
<tbody>
<%
int pageNumber = 1;
if (request.getParameter("pageNumber") != null) {
pageNumber = Integer.parseInt(request.getParameter("pageNumber"));
}
EmergencyDAO emergency = new EmergencyDAO();
ArrayList<EmergencyItem> list = emergency.getList(pageNumber);
for( int i =0; i < list.size(); i++) {
%>
<tr>
<td><%=list.get(i).getId() %></td>
<td><strong><font color="blue"><a href="emergencyView.jsp?id=<%=list.get(i).getId()%>"><%=list.get(i).getIncident_name() %></a></font></strong></td>
<td><%=list.get(i).getIncident_sum() %></td>
<td><%=list.get(i).getDamage_level() %></td>
<!--
<form method="get" action="./regAction.jsp" class="form-inline mt-3" style="float:right;">
<a href="#attack_reg" data-toggle="modal" class="btn btn-primary btn-sm" value="<%=i %>">사이버 공격경로 등록</a>ㅤ
</form></td>
</tr>
-->
<% } %>
<!-- ArrayList<EmergencyItem> list = emergency.getList(pageNumber); -->
</tbody>
</table>
</div>
<form method="post" action="./emergencyRegAction.jsp" class="form-inline mt-3" style="float:right;">
ㅤ<input type="button" id="id_check" onclick="location.href='emergencyReg.jsp'"class="btn btn-primary mx-1 mx-2" value="비상사건 등록" style="float:right">
</form>
<!--
<form method="post" action="./emergencyRegAction.jsp" class="form-inline mt-3" style="float:right;">
<a href="#emergency_reg" data-toggle="modal" class="btn btn-primary mx-1 mx-2">추가</a>ㅤ
</form>
<div class="modal fade" id="emergency_reg" tabindex="-1"
role="dialog" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3>비상사건 등록</h3>
<br>
<form action="./emergencyRegAction.jsp" method="post">
<div class="form-row">
<div class="form-group col-sm-12" style = "float:left">
<label>발생연도</label>
<input type="text" name="year" class="form-control" maxlength="5">
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label>발생 국가</label>
<input type="text" name="country" class="form-control" maxlength="5">
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-6">
<label>발생 도시</label>
<input type="text" name="city" class="form-control" maxlength="20">
</div>
<div class="form-group col-sm-6">
<label>발생 기관</label>
<input type="text" name="agency" class="form-control" maxlength="20">
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label>사건명</label>
<input type="text" name="incident_name" class="form-control" maxlength="20">
</div>
</div>
<div class="form-row" style = "border : 20px">
<div class="form-group col-sm-12" style = "margin-right : 20px">
<label>사이버공격 피해수준</label>
<select name = "damage_level">
<option value="상">상</option>
<option value="중">중</option>
<option value="하">하</option>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label>사건 개요</label>
<textarea cols="50" rows="9" placeholder="내용을 입력하세요. " name="incident_sum" class="form-control"></textarea>
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label>사건 내용</label>
<textarea cols="50" rows="9" placeholder="내용을 입력하세요. " name="incident_content" class="form-control"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">취소</button>
<button type="submit" class="btn btn-primary" data-target="#attack_reg">등록하기</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal fade" id="attack_reg" tabindex="-1" role="dialog" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal">사이버 공격 경로</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="./regAction.jsp" method="post">
<div class="form-row">
<div class="form-group col-sm-6" style = "margin-bottom:13px">
<h4>1.운영적 보안조치</h4>
<h4></h4>
<div class = "check_div" id = "checkdiv">
<table class="table table-striped" style="text-align:center; padding: 10px;border:1px solid #dddddd">
<thead>
<h4>1.2 시스템 및 정보의 무결성</h4>
</thead>
<tbody>
<thead>
<tr>
<th style="background-color:#eeeeee; text-align:center;"></th>
<th style="background-color:#eeeeee; text-align:center;">번호</th>
<th style = "background-color : #eeeeee; text-align:center;">통제항목명</th>
</tr>
</thead>
<tbody>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.1</td>
<td>결함 제거</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.2</td>
<td>악성코드 유입 방지</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.3</td>
<td>악성코드 유입 방지</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.4</td>
<td>보안 경고</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.5</td>
<td>보안기능 확인</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.6</td>
<td>소프트웨어 및 정보의 무결성</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.7</td>
<td>정보의 입력 제한</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>1.2.4</td>
<td>에러에 대한 조치</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="form-group col-sm-6" style = "margin-bottom:13px">
<h4>2.관리적 보안 조치</h4>
<div class = "check_div" id = "checkdiv">
<table class="table table-striped" style="text-align:center; padding: 10px;border:1px solid #dddddd">
<thead>
<h4>2.1 시스템 및 서비스 획득</h4>
</thead>
<tbody>
<thead>
<tr>
<th style="background-color:#eeeeee; text-align:center;"></th>
<th style="background-color:#eeeeee; text-align:center;">번호</th>
<th style = "background-color : #eeeeee; text-align:center;">통제항목명</th>
</tr>
</thead>
<tbody>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>2.1.1</td>
<td>공급망 통제</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>2.1.2</td>
<td>신뢰성 확보</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>2.1.3</td>
<td>보안 설계 적용</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>2.1.4</td>
<td>개발자 보안 테스트</td>
</tr>
<tr>
<td><input id = "checkbox" name = "checkBox" type="checkbox"></td>
<td>2.1.5</td>
<td>인수테스트</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">취소</button>
<button type="submit" class="btn btn-primary" onclick="return test_checkbox()">등록하기</button>
</div>
</form>
</div>
</div>
</div>
</div>
-->
</section>
<footer id="mainfooter">
<span>ㅤㅤ ㅤㅤ COPYRIGHT ⓒ 2019 HelloSecurity. All Rights Reserved</span></footer>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.js"></script>
</body>