-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
1315 lines (1253 loc) · 51.1 KB
/
Copy pathscript.js
File metadata and controls
1315 lines (1253 loc) · 51.1 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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ---------- Firebase imports ----------
import { auth, db } from "./firebase.js";
import {
doc,
getDoc,
setDoc,
updateDoc
} from "https://www.gstatic.com/firebasejs/12.6.0/firebase-firestore.js";
import { onAuthStateChanged } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-auth.js";
let currentUser;
const questionsHTML = [
{
text: "JavaScript runs in the browser.",
choices: ["True", "False"],
answer: "True"
},
{
text: "In programming, a loop runs only once.",
choices: ["True", "False"],
answer: "False"
},
{
text: "The 'if' statement is used for decision making.",
choices: ["True", "False"],
answer: "True"
},
{
text: "What does 'int' represent in Java?",
choices:["A) Integer", "B) Input", "C) Interface", "D) Internal"],
answer: "A) Integer"
},
{
text: "In Java, System.out.println() is used to:",
choices: ["A) Read input", "B) Display output", "C) Compile code", "D) Comment code"],
answer: "B) Display output"
},
{
text: "Which HTML tag is used to link JavaScript?",
choices: ["A) <script>", "B) <js>", "C) <javascript>", "D) <code>"],
answer: "A) <script>"
},
{
text: "Which operator is used to compare both value and type in JavaScript?",
choices: ["A) ==", "B) ===", "C) !=", "D) <>"],
answer: "B) ==="
},
{
text: "CSS stands for Cascading Style Sheets.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which Java keyword is used to define a class?",
choices: ["A) define", "B) new", "C) class", "D) public"],
answer: "C) class"
},
{
text: "A Java constructor has the same name as the class.",
choices: ["True", "False"],
answer: "True"
},
{
text: "What does HTML stand for?",
choices: ["A) HyperText Markup Language", "B) HighText Machine Language", "C) HyperTool Multi Language", "D) HyperText Manage Language"],
answer: "A) HyperText Markup Language"
},
{
text: "In JavaScript, arrays can contain different data types.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which keyword declares a constant in JavaScript?",
choices: ["A) let", "B) const", "C) var", "D) static"],
answer: "B) const"
},
{
text: "Which Java data type is used to store true/false values?",
choices: ["A) int", "B) char", "C) boolean", "D) double"],
answer: "C) boolean"
},
{
text: "In HTML, which tag is used for the largest heading?",
choices: ["A) <h1>", "B) <h6>", "C) <header>", "D) <title>"],
answer: "A) <h1>"
},
{
text: "The modulus operator (%) returns the remainder of a division.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which of these is NOT a JavaScript data type?",
choices: ["A) String", "B) Boolean", "C) Number", "D) Character"],
answer: "D) Character"
},
{
text: "Which symbol is used for comments in Java?",
choices: ["A) //", "B) #", "C) <!-- -->", "D) **"],
answer: "A) //"
},
{
text: "Which HTML element contains the metadata for the page?",
choices: ["A) <head>", "B) <meta>", "C) <body>", "D) <title>"],
answer: "A) <head>"
},
{
text: "Java is a dynamically typed language.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Which loop ensures the code runs at least once?",
choices: ["A) for", "B) while", "C) do-while", "D) foreach"],
answer: "C) do-while"
},
{
text: "CSS can change the color and layout of HTML elements.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which keyword is used to inherit a class in Java?",
choices: ["A) inherits", "B) extends", "C) implements", "D) super"],
answer: "B) extends"
},
{
text: "In JavaScript, arrays start with index 1.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Which method adds a new element to an array in JavaScript?",
choices: ["A) push()", "B) add()", "C) append()", "D) insert()"],
answer: "A) push()"
},
{
text: "Which keyword creates an object in Java?",
choices: ["A) class", "B) new", "C) make", "D) construct"],
answer: "B) new"
},
{
text: "HTML is used for structuring web content.",
choices: ["True", "False"],
answer: "True"
},
{
text: "In Java, which keyword is used to stop a loop early?",
choices: ["A) exit", "B) return", "C) break", "D) stop"],
answer: "C) break"
},
{
text: "Which of these is a front-end language?",
choices: ["A) Java", "B) Python", "C) HTML", "D) SQL"],
answer: "C) HTML"
},
{
text: "JavaScript is case-sensitive.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which method converts a string to uppercase in JavaScript?",
choices: ["A) upper()", "B) toUpperCase()", "C) makeUpper()", "D) capitalize()"],
answer: "B) toUpperCase()"
},
{
text: "What does SQL stand for?",
choices: ["A) Structured Query Language", "B) Simple Query Language", "C) Structured Quick List", "D) System Query Log"],
answer: "A) Structured Query Language"
},
{
text: "CSS uses selectors to target HTML elements.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which of the following is a logical operator in JavaScript?",
choices: ["A) &&", "B) **", "C) %%", "D) =="],
answer: "A) &&"
},
{
text: "In Java, 'public static void main' is the entry point of a program.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which CSS property changes text color?",
choices: ["A) text-style", "B) color", "C) font-color", "D) text-color"],
answer: "B) color"
},
{
text: "Which symbol is used for concatenation in JavaScript?",
choices: ["A) +", "B) &", "C) .", "D) #"],
answer: "A) +"
},
{
text: "In Java, which access modifier makes variables visible to all classes?",
choices: ["A) private", "B) protected", "C) public", "D) static"],
answer: "C) public"
},
{
text: "Which HTML element creates a hyperlink?",
choices: ["A) <a>", "B) <link>", "C) <href>", "D) <hlink>"],
answer: "A) <a>"
},
{
text: "Which of these is NOT a Java loop structure?",
choices: ["A) for", "B) while", "C) foreach", "D) loop"],
answer: "D) loop"
},
{
text: "In programming, variables store data.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which function displays output in JavaScript?",
choices: ["A) console.log()", "B) System.out.print()", "C) print()", "D) output()"],
answer: "A) console.log()"
},
{
text: "In JavaScript, 'let' allows you to redeclare a variable in the same scope.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Which tag creates a table row in HTML?",
choices: ["A) <td>", "B) <th>", "C) <tr>", "D) <table>"],
answer: "C) <tr>"
},
{
text: "Which JavaScript keyword declares a variable?",
choices: ["A) var", "B) set", "C) let", "D) both A and C"],
answer: "D) both A and C"
},
{
text: "Which Java data type is used for decimal numbers?",
choices: ["A) int", "B) float", "C) string", "D) char"],
answer: "B) float"
},
{
text: "JavaScript was created in 10 days.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which HTML attribute specifies an image file?",
choices: ["A) src", "B) href", "C) alt", "D) link"],
answer: "A) src"
},
{
text: "CSS stands for Cascading Style Sheets.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Which tag defines the main content of an HTML document?",
choices: ["A) <main>", "B) <section>", "C) <body>", "D) <article>"],
answer: "A) <main>"
}
];
// ---------- Cyber Questions ----------
const questionsCyberExam = [
{
text: "A flaw or weakness in a system's design, implementation, or operation and management that could be exploited to violate the system's security policy is a(n) ________.",
choices: ["vulnerability", "countermeasure", "adversary", "risk"],
answer: "vulnerability"
},
{
text: "User authentication is a procedure that allows communicating parties to verify that the contents of a received message have not been altered and that the source is authentic.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Data integrity assures that information and programs are changed only in a specified and authorized manner.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The purpose of a ________ is to produce a 'fingerprint' of a file, message, or other block of data.",
choices: ["hash function", "secret key", "digital signature", "keystream"],
answer: "hash function"
},
{
text: "Release of message contents and traffic analysis are two types of ________ attacks.",
choices: ["passive", "active", "cryptographic", "network"],
answer: "passive"
},
{
text: "In a ________ attack, an application or physical device masquerades as an authentic application or device for the purpose of capturing a user password, passcode, or biometric.",
choices: ["Trojan horse", "active", "masquerade", "phishing"],
answer: "Trojan horse"
},
{
text: "A loss of ________ is the unauthorized disclosure of information.",
choices: ["confidentiality", "authenticity", "integrity", "availability"],
answer: "confidentiality"
},
{
text: "A ________ is any action that compromises the security of information owned by an organization.",
choices: ["security attack", "security mechanism", "security policy", "security service"],
answer: "security attack"
},
{
text: "Presenting or generating authentication information that corroborates the binding between the entity and the identifier is the ________.",
choices: ["verification step", "identification step", "authentication step", "corroboration step"],
answer: "verification step"
},
{
text: "Two of the most important applications of public-key encryption are digital signatures and key management.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ is a separate file from the user IDs where hashed passwords are kept.",
choices: ["shadow password file", "password file", "hash file", "credential file"],
answer: "shadow password file"
},
{
text: "The 'A' in the CIA triad stands for 'Availability'.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ is to try every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained.",
choices: ["brute-force attack", "mode of operation", "hash function", "cryptanalysis"],
answer: "brute-force attack"
},
{
text: "User authentication is the basis for most types of access control and for user accountability.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Cryptanalytic attacks try every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Security implementation involves four complementary courses of action: prevention, detection, response, and ________.",
choices: ["recovery", "mitigation", "analysis", "reporting"],
answer: "recovery"
},
{
text: "Computer security is protection of the integrity, availability, and confidentiality of information system resources.",
choices: ["True", "False"],
answer: "True"
},
{
text: "User authentication is the fundamental building block and the primary line of defense.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ attack attempts to disable a user authentication service by flooding the service with numerous authentication attempts.",
choices: ["denial-of-service", "flood attack", "DDOS", "brute force"],
answer: "denial-of-service"
},
{
text: "A(n) ________ is an attempt to learn or make use of information from the system that does not affect system resources.",
choices: ["passive attack", "outside attack", "inside attack", "active attack"],
answer: "passive attack"
},
{
text: "A message authentication code is a small block of data generated by a secret key and appended to a message.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ is a password guessing program.",
choices: ["password cracker", "password hash", "password biometric", "password salt"],
answer: "password cracker"
},
{
text: "A ________ attack is directed at the user file at the host where passwords, token passcodes, or biometric templates are stored.",
choices: ["Host", "active", "passive", "network"],
answer: "Host"
},
{
text: "In the context of security, our concern is with the vulnerabilities of system resources.",
choices: ["True", "False"],
answer: "True"
},
{
text: "An authentication process consists of the ________ step and the verification step.",
choices: ["identification", "validation", "authorization", "authentication"],
answer: "identification"
},
{
text: "Symmetric encryption is used primarily to provide integrity.",
choices: ["True", "False"],
answer: "False"
},
{
text: "The ________ algorithm takes the ciphertext and the secret key and produces the original plaintext.",
choices: ["decryption", "encryption", "hashing", "signing"],
answer: "decryption"
},
{
text: "Availability assures that systems work promptly and service is not denied to authorized users.",
choices: ["True", "False"],
answer: "True"
},
{
text: "There are two general approaches to attacking a symmetric encryption scheme: cryptanalytic attacks and ________ attacks.",
choices: ["brute force", "passive", "active", "network"],
answer: "brute force"
},
{
text: "A ________ is data appended to, or a cryptographic transformation of, a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery.",
choices: ["digital signature", "hash", "MAC", "certificate"],
answer: "digital signature"
},
{
text: "A good technique for choosing a password is to use the first letter of each word of a phrase.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Recognition by fingerprint, retina, and face are examples of ________.",
choices: ["static biometrics", "dynamic biometrics", "token authentication", "face recognition"],
answer: "static biometrics"
},
{
text: "A ________ is created by using a secure hash function to generate a hash value for a message and then encrypting the hash code with a private key.",
choices: ["digital signature", "keystream", "one way hash function", "secret key"],
answer: "digital signature"
},
{
text: "With the ________ policy a user is allowed to select their own password, but the system checks to see if the password is allowable.",
choices: ["complex password", "security", "proactive", "reactive"],
answer: "complex password"
},
{
text: "The first step in devising security services and mechanisms is to develop a security policy.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Public-key cryptography is asymmetric based on simple operations on bit patterns.",
choices: ["True", "False"],
answer: "False"
},
{
text: "The purpose of the Digital Signature Standard (DSS) algorithm is to enable two users to securely reach agreement about a shared secret that can be used as a secret key for subsequent symmetric encryption of messages.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Which biometric factor is the most accurate for user authentication?",
choices: ["Iris", "Hand", "Finger", "Voice"],
answer: "Iris"
},
{
text: "Confidentiality, Integrity, and Availability form what is often referred to as the ________.",
choices: ["CIA", "CIA Triad", "security triad", "information security"],
answer: "CIA"
},
{
text: "If the only form of attack that could be made on an encryption algorithm is brute-force, then the way to counter such attacks would be to ________.",
choices: ["use longer keys", "use less keys", "use more keys", "use shorter keys"],
answer: "use longer keys"
},
{
text: "A(n) ________ is an action, device, procedure, or technique that reduces a threat, a vulnerability, or an attack by eliminating or preventing it, by minimizing the harm it can cause, or by discovering and reporting it so that correct action can be taken.",
choices: ["countermeasure", "attack", "adversary", "protocol"],
answer: "countermeasure"
},
{
text: "A ________ strategy is one in which the system periodically runs its own password cracker to find guessable passwords.",
choices: ["reactive password checking", "user education", "proactive password checking", "computer-generated password"],
answer: "reactive password checking"
},
{
text: "The assurance that data received are exactly as sent by an authorized entity is ________.",
choices: ["data integrity", "authentication", "access control", "data confidentiality"],
answer: "data integrity"
},
{
text: "Unlike the MAC, a hash function takes a secret key as input.",
choices: ["True", "False"],
answer: "True"
},
{
text: "________ is the scrambled message produced as output.",
choices: ["Ciphertext", "Plaintext", "Secret key", "Cryptanalysis"],
answer: "Ciphertext"
},
{
text: "________ is the traditional method of implementing access control.",
choices: ["DAC", "MBAC", "MAC", "RBAC"],
answer: "DAC"
},
{
text: "A ________ is a collection of bots capable of acting in a coordinated manner.",
choices: ["botnet", "network", "zombie army", "malware group"],
answer: "botnet"
},
{
text: "The ideal solution to the threat of malware is ________.",
choices: ["prevention", "identification", "removal", "detection"],
answer: "prevention"
},
{
text: "A ________ is an action that prevents or impairs the authorized use of networks, systems, or applications by exhausting resources such as central processing units, memory, bandwidth, and disk space.",
choices: ["denial-of-service (DoS)", "DOS", "DDOS", "flood attack"],
answer: "denial-of-service (DoS)"
},
{
text: "________ attacks flood the network link to the server with a torrent of malicious packets competing with valid traffic flowing to the server.",
choices: ["Flooding", "DDOS", "DOS", "amplification"],
answer: "Flooding"
},
{
text: "________ technology is an anti-virus approach that enables the anti-virus program to easily detect even the most complex polymorphic viruses and other malware, while maintaining fast scanning speeds.",
choices: ["Generic decryption (GD)", "heuristic", "signature", "behavior"],
answer: "Generic decryption (GD)"
},
{
text: "In a ________ attack the attacker creates a series of DNS requests containing the spoofed source address for the target system.",
choices: ["DNS amplification", "SYN flood", "UDP flood", "poison packet"],
answer: "DNS amplification"
},
{
text: "The ________ is what the virus 'does'.",
choices: ["payload", "infection mechanism", "trigger", "logic bomb"],
answer: "payload"
},
{
text: "During a ________ attack, the attacker sends packets to a known service on the intermediary with a spoofed source address of the actual target system and when the intermediary responds, the response is sent to the target.",
choices: ["reflection", "amplification", "spoofing", "flooding"],
answer: "reflection"
},
{
text: "________ attempts to monopolize all of the available request handling threads on the Web server by sending HTTP requests that never complete.",
choices: ["Slowloris", "HTTP", "Reflection attacks", "SYN flooding"],
answer: "Slowloris"
},
{
text: "When a DoS attack is detected, the first step is to ________.",
choices: ["identify the attack", "shut down the network", "design blocking filters", "analyze the response"],
answer: "identify the attack"
},
{
text: "A ________ is an action that prevents or impairs the authorized use of networks, systems, or applications by exhausting resources such as central processing units, memory, bandwidth, and disk space.",
choices: ["denial of service (DoS)", "DOS", "DDOS", "attack"],
answer: "denial of service (DoS)"
},
{
text: "In reflection attacks, the ________ address directs all the packets at the desired target and any responses to the intermediary.",
choices: ["spoofed source", "spoofed", "source", "target"],
answer: "spoofed source"
},
{
text: "A ________ flood refers to an attack that bombards Web servers with HTTP requests.",
choices: ["HTTP", "TCP", "UDP", "ICMP"],
answer: "HTTP"
},
{
text: "________ is verification that the credentials of a user or other system entity are valid.",
choices: ["Authentication", "Adequacy", "Authorization", "Audit"],
answer: "Authentication"
},
{
text: "A bot can use a ________ to capture keystrokes on the infected machine to retrieve sensitive information.",
choices: ["keylogger", "sniffer", "trojan", "rootkit"],
answer: "keylogger"
},
{
text: "________ is the granting of a right or permission to a system entity to access a system resource.",
choices: ["Authorization", "Authentication", "Control", "Monitoring"],
answer: "Authorization"
},
{
text: "Flooding attacks take a variety of forms based on which network protocol is being used to implement the attack.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A Trojan horse is an apparently useful program containing hidden code that, when invoked, performs some harmful function.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The ________ step is presenting or generating authentication information that corroborates the binding between the entity and the identifier in the operation of a biometric system.",
choices: ["verification", "identification", "authentication", "validation"],
answer: "verification"
},
{
text: "Slowloris is a form of ICMP flooding.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Attribute-based access control (ABAC) controls access based on the roles that users have within the system and on rules stating what accesses are allowed to users in given roles.",
choices: ["True", "False"],
answer: "False"
},
{
text: "A macro virus infects executable portions of code.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Using forged source addresses is known as ________.",
choices: ["source address spoofing", "a three-way address", "random dropping", "directed broadcast"],
answer: "source address spoofing"
},
{
text: "The SYN spoofing attack targets the capacity of the network connection to the target organization.",
choices: ["True", "False"],
answer: "False"
},
{
text: "E-mail is a common method for spreading macro viruses.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ is a set of programs installed on a system to maintain covert access to that system with administrator (root) privileges while hiding evidence of its presence.",
choices: ["rootkit", "backdoor", "trojan", "virus"],
answer: "rootkit"
},
{
text: "________ is the first function in the propagation phase for a network worm.",
choices: ["Fingerprinting", "Propagating", "Keylogging", "Spear phishing"],
answer: "Fingerprinting"
},
{
text: "________ is the traditional method of implementing access control system.",
choices: ["RBAC", "MAC", "DAC", "MBAC"],
answer: "RBAC"
},
{
text: "________ implements a security policy that specifies who or what may have access to each specific system resource and the type of access that is permitted in each instance.",
choices: ["Access control", "System control", "Resource control", "Audit control"],
answer: "Access control"
},
{
text: "A virus that attaches to an executable program can do anything that the program is permitted to do.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ uses macro or scripting code, typically embedded in a document and triggered when the document is viewed or edited, to run and replicate itself into other such documents.",
choices: ["macro virus", "boot sector infector", "file infector", "multipartite virus"],
answer: "macro virus"
},
{
text: "________ is malware that encrypts the user's data and demands payment in order to access the key needed to recover the information.",
choices: ["Ransomware", "Trojan horse", "Polymorphic", "Crimeware"],
answer: "Ransomware"
},
{
text: "Traditional RBAC systems control access based on attributes of the user, the resource to be accessed, and current environmental conditions.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Using forged source addresses is known as ________.",
choices: ["source address spoofing", "random dropping", "a three-way address", "directed broadcast"],
answer: "source address spoofing"
},
{
text: "The ________ attacks the ability of a network server to respond to TCP connection requests by overflowing the tables used to manage such connections.",
choices: ["SYN spoofing attack", "DNS amplification attack", "basic flooding attack", "poison packet attack"],
answer: "SYN spoofing attack"
},
{
text: "An access right describes the way in which a subject may access an object.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The four lines of defense against DDoS attacks are: attack prevention and preemption, attack detection and filtering, attack source traceback and identification and ________.",
choices: ["attack reaction", "attack mitigation", "attack recovery", "attack analysis"],
answer: "attack reaction"
},
{
text: "During the ________ phase the virus is activated to perform the function for which it was intended.",
choices: ["Execution", "triggering", "payload", "dormant"],
answer: "Execution"
},
{
text: "Packet sniffers are mostly used to retrieve sensitive information like usernames and passwords.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The four phases of a typical virus are: dormant phase, triggering phase, execution phase and ________ phase.",
choices: ["propagation", "infection", "replication", "activation"],
answer: "propagation"
},
{
text: "A ________ is code inserted into malware that lies dormant until a predefined condition, which triggers an unauthorized act, is met.",
choices: ["logic bomb", "trapdoor", "worm", "Trojan horse"],
answer: "logic bomb"
},
{
text: "The source of the attack is explicitly identified in the classic ping flood attack.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ is when a user views a Web page controlled by the attacker that contains a code that exploits the browser bug and downloads and installs malware on the system without the user's knowledge or consent.",
choices: ["drive-by-download", "trojan", "exploit", "injection"],
answer: "drive-by-download"
},
{
text: "________ access control controls access based on the roles that users have within the system and on rules stating what accesses are allowed to users in given roles.",
choices: ["Role-based Access Control RBAC", "Role-based", "RBAC", "Attribute-based"],
answer: "Role-based Access Control RBAC"
},
{
text: "A ________ makes use of both signature and anomaly detection techniques to identify attacks.",
choices: ["Network-based IPS (NIPS)", "IDS", "firewall", "HIPS"],
answer: "Network-based IPS (NIPS)"
},
{
text: "An intruder transmitting packets from the outside with a source IP address field containing an address of an internal host is known as IP address ________.",
choices: ["spoofing", "masquerading", "hijacking", "forgery"],
answer: "spoofing"
},
{
text: "The ________ is the ID component that analyzes the data collected by the sensor for signs of unauthorized or undesired activity or for events that might be of interest to the security administrator.",
choices: ["analyzer", "data source", "sensor", "operator"],
answer: "analyzer"
},
{
text: "A ________ firewall applies a set of rules to each incoming and outgoing IP packet and then forwards or discards the packet.",
choices: ["packet filtering", "packet-filtering", "stateful", "application"],
answer: "packet filtering"
},
{
text: "________ scans for attack signatures in the context of a traffic stream rather than individual packets.",
choices: ["Stateful matching", "Pattern matching", "Protocol anomaly", "Traffic anomaly"],
answer: "Stateful matching"
},
{
text: "A ________ makes use of both signature and anomaly detection techniques to identify attacks.",
choices: ["Network-based IPS (NIPS)", "IDS", "firewall", "analyzer"],
answer: "Network-based IPS (NIPS)"
},
{
text: "One advantage of a packet filtering firewall is its ________.",
choices: ["simplicity", "efficiency", "transparency", "speed"],
answer: "simplicity"
},
{
text: "A ________ gateway sets up two TCP connections, one between itself and a TCP user on an inner host and one between itself and a TCP user on an outside host.",
choices: ["circuit-level", "packet filtering", "application-level", "stateful inspection"],
answer: "circuit-level"
},
{
text: "An IDS comprises three logical components: analyzers, user interface and ________.",
choices: ["sensors", "detectors", "monitors", "agents"],
answer: "sensors"
},
{
text: "A ________ is a security event that constitutes a security incident in which an intruder gains access to a system without having authorization to do so.",
choices: ["security intrusion", "intrusion detection", "criminal enterprise", "IDS"],
answer: "security intrusion"
},
{
text: "A prime disadvantage of an application-level gateway is the additional processing overhead on each connection.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The ________ is inserted between the premises network and the Internet to establish a controlled link and to erect an outer security wall or perimeter to protect the premises network from Internet-based attacks.",
choices: ["firewall", "gateway", "router", "proxy"],
answer: "firewall"
},
{
text: "________ is a security service that monitors and analyzes system events for the purpose of finding, and providing real-time warning of attempts to access system resources in an unauthorized manner.",
choices: ["Intrusion Detection", "Intrusion Prevention", "Access Control", "Network Monitoring"],
answer: "Intrusion Detection"
},
{
text: "Snort Inline enables Snort to function as an intrusion prevention capability.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The ________ is responsible for determining if an intrusion has occurred.",
choices: ["analyzer", "host", "user interface", "sensor"],
answer: "analyzer"
},
{
text: "Intrusion detection is based on the assumption that the behavior of the intruder differs from that of a legitimate user in ways that can be quantified.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The IDS component responsible for collecting data is the user interface.",
choices: ["True", "False"],
answer: "False"
},
{
text: "Activists are either individuals or members of an organized crime group with a goal of financial reward.",
choices: ["True", "False"],
answer: "False"
},
{
text: "A ________ monitors the characteristics of a single host and the events occurring within that host for suspicious activity.",
choices: ["host-based IDS", "network-based IDS", "security intrusion", "intrusion detection"],
answer: "host-based IDS"
},
{
text: "Signature-based approaches attempt to define normal, or expected, behavior, whereas anomaly approaches attempt to define proper behavior.",
choices: ["True", "False"],
answer: "False"
},
{
text: "A packet filtering firewall is typically configured to filter packets going in both directions.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A ________ IDS monitors traffic at selected points on a network or interconnected set of networks.",
choices: ["network based", "host-based", "NIDS", "distributed"],
answer: "network based"
},
{
text: "The firewall may be a single computer system or a set of two or more systems that cooperate to perform the firewall function.",
choices: ["True", "False"],
answer: "True"
},
{
text: "________ involves an attempt to define a set of rules or attack patterns that can be used to decide if a given behavior is that of an intruder.",
choices: ["Signature detection", "Profile based detection", "Threshold detection", "Anomaly detection"],
answer: "Signature detection"
},
{
text: "A traditional packet filter makes filtering decisions on an individual packet basis and does not take into consideration any higher layer context.",
choices: ["True", "False"],
answer: "True"
},
{
text: "Unlike a firewall, an IPS does not block traffic.",
choices: ["True", "False"],
answer: "False"
},
{
text: "________ detection techniques detect intrusion by observing events in the system and applying a set of rules that lead to a decision regarding whether a given pattern of activity is or is not suspicious.",
choices: ["Signature", "Anomaly", "Heuristic", "Behavioral"],
answer: "Signature"
},
{
text: "Intrusion detection is based on the assumption that the behavior of the intruder differs from that of a legitimate user in ways that can be quantified.",
choices: ["True", "False"],
answer: "True"
},
{
text: "________ are either individuals or members of a larger group of outsider attackers who are motivated by social or political causes.",
choices: ["Activists", "State-sponsored organizations", "Cyber criminals", "Others"],
answer: "Activists"
},
{
text: "The primary purpose of an IDS is to detect intrusions, log suspicious events, and send alerts.",
choices: ["True", "False"],
answer: "True"
},
{
text: "An intruder can also be referred to as a hacker or cracker.",
choices: ["True", "False"],
answer: "True"
},
{
text: "The broad classes of intruders are: cyber criminals, state-sponsored organizations, ________, and others.",
choices: ["activists", "hacktivists", "script kiddies", "insiders"],
answer: "activists"
},
{
text: "Snort Inline adds three new rule types: drop, reject, and ________.",
choices: ["Sdrop", "accept", "allow", "block"],
answer: "Sdrop"
},
{
text: "Snort can perform intrusion prevention but not intrusion detection.",
choices: ["True", "False"],
answer: "False"
},
{
text: "The firewall can protect against attacks that bypass the firewall.",
choices: ["True", "False"],
answer: "False"
},
{
text: "________ involves the collection of data relating to the behavior of legitimate users over a period of time.",
choices: ["Anomaly detection", "Profile based detection", "Threshold detection", "Signature detection"],
answer: "Anomaly detection"
},
{
text: "Running a packet sniffer on a workstation to capture usernames and passwords is an example of intrusion.",
choices: ["True", "False"],
answer: "True"
},
{
text: "An example of a circuit-level gateway implementation is the ________ package.",
choices: ["SOCKS", "application-level", "SMTP", "stateful inspection"],
answer: "SOCKS"
},
{
text: "________ are decoy systems that are designed to lure a potential attacker away from critical systems.",
choices: ["Honeypots", "honeypot", "traps", "decoys"],
answer: "Honeypots"
},
{
text: "A ________ is a hacker with sufficient technical skills to modify and extend attack toolkits to use newly discovered vulnerabilities.",
choices: ["journeyman", "expert", "script kiddie", "professional"],
answer: "journeyman"
},
{
text: "The rule ________ tells Snort what to do when it finds a packet that matches the rule criteria.",
choices: ["action", "protocol", "direction", "destination port"],
answer: "action"
},
{
text: "A ________ monitors network traffic for particular network segments or devices and analyzes network, transport, and application protocols to identify suspicious activity.",
choices: ["network-based IDS", "host-based IDS", "security intrusion", "intrusion detection"],
answer: "network-based IDS"
},
{
text: "A packet filtering firewall is typically configured to filter packets going in both directions.",
choices: ["True", "False"],
answer: "True"
},
{
text: "A(n) ________ is inserted into a network segment so that the traffic that it is monitoring must pass through the sensor.",
choices: ["inline sensor", "passive sensor", "analysis sensor", "LAN sensor"],
answer: "inline sensor"
},
{
text: "________ looks for deviation from standards set.",
choices: ["Protocol anomaly", "Statistical anomaly", "Pattern matching", "Traffic anomaly"],
answer: "Protocol anomaly"
}
];
let currentIndex = 0;
let correctCount = 0;
let wrongCount = 0;
let skillCount = 0;
let lifePoints = 5;
let skillMultiplier = 1;
// ---------- Grab elements ----------
const startBtn = document.getElementById("startBtn");
const mainMenuBtn = document.getElementById("mainMenuBtn");
const panel = document.getElementById("panel");
const panelTitle = document.getElementById("panel-title");
const panelText = document.getElementById("panel-text");
const panelChoices = document.getElementById("panel-choices");
const correctDisplay = document.getElementById("correctCount");
const wrongDisplay = document.getElementById("wrongCount");
const skillDisplay = document.getElementById("skillCount");
const message = document.getElementById('message');
const continueBtn = document.getElementById("continueBtn");
const shop = document.getElementById("shop");
const lifeDisplay = document.getElementById("lifePoints");
const skillCountDisplay = document.getElementById("skillCount");
const loginBtn = document.getElementById("loginBtn");
const subscriptionBtn = document.getElementById("subscriptionBtn");
const popup = document.getElementById("popupWindow");
const closeBtn = document.getElementById("closePopupBtn");
const runFuncBtn = document.getElementById("runFuncBtn");
const leftAd = document.getElementById("leftAd");
const rightAd = document.getElementById("rightAd");
const continueGameBtn = document.getElementById("continueGameBtn");
// ---------- Show question ----------
function showQuestion() {
const q = questionsCyberExam[currentIndex];
panelTitle.textContent = `Question ${currentIndex + 1}`;
panelText.textContent = q.text;
panelChoices.innerHTML = "";
const shuffledChoices = [...q.choices];
for (let i = shuffledChoices.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[shuffledChoices[i], shuffledChoices[j]] = [shuffledChoices[j], shuffledChoices[i]];
}
shuffledChoices.forEach(choice => {
const btn = document.createElement("button");
btn.textContent = choice;
btn.onclick = () => checkAnswer(choice, q.answer);
panelChoices.appendChild(btn);
});
}
// ---------- Check answer ----------
function checkAnswer(selected, correct) {
if (selected === correct) {
correctCount++;
skillCount += skillMultiplier;