-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChallenge2.html
220 lines (214 loc) · 13.2 KB
/
Challenge2.html
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
<!DOCTYPE html>
<head></head>
<body>
<form method="post" action="https://formspree.io/f/mjvzpjvb" id="form_id">
<p><b>Activity 2: Self-Assessment<br>
Instructions : Please answer the following questions related to Activity 2</b></p>
<p>Question 1: In RestClient.smali, what are the two values stored in param p1 and param p2 in the method getAccount ?</p>
<input type="radio" name="question1" id="correct1" value="server, port"><label for="server, port"> server, port </label><br>
<input type="radio" name="question1" value="IP Address, host"><label for="IP Address, host"> IP Address, host </label><br>
<input type="radio" name="question1" value="account name, account number"><label for="account name, account number"> account name, account number </label><br>
<input type="radio" name="question1" value="username, password"><label for="username, password"> username, password </label><br>
<br><br>
<p>Question 2: How many param are there in method performLogin ?</p>
<input type="radio" name="question2" value="3"><label for="3"> 3 </label><br>
<input type="radio" name="question2" id="correct2" value="4"><label for="4"> 4 </label><br>
<input type="radio" name="question2" value="1"><label for="1"> 1 </label><br>
<input type="radio" name="question2" value="5"><label for="5"> 5 </label><br>
<br><br>
<p>Question 3: BankingApplication.smali contains the method checkPassword. What is the prompt on param, p1 ?</p>
<input type="radio" name="question3" id="correct3" value="param p1, enteredPassword"><label for="param p1, enteredPassword"> param p1, enteredPassword </label><br>
<input type="radio" name="question3" value="param p1, newPassword"><label for="param p1, newPassword"> param p1, newPassword </label><br>
<input type="radio" name="question3" value="param p1, checkPassword"><label for="param p1, checkPassword"> param p1, checkPassword </label><br>
<input type="radio" name="question3" value="param p1, oldPassword"><label for="param p1, oldPassword"> param p1, oldPassword </label><br>
<br><br>
<p>Question 4: Which folder contains the files where payload is injected ?</p>
<input type="radio" name="question4" id="correct4" value="smali"><label for="smali"> smali </label><br>
<input type="radio" name="question4" value="build"><label for="build"> build </label><br>
<input type="radio" name="question4" value="dist"><label for="dist"> dist </label><br>
<input type="radio" name="question4" value="assets"><label for="assets"> assets </label><br>
<br><br>
<p>Question 5: After which .line the payload is injected ?</p>
<input type="radio" name="question5" id="correct5" value=".line 258"><label for=".line 258"> .line 258 </label><br>
<input type="radio" name="question5" value=".line 408"><label for=".line 408"> .line 408 </label><br>
<input type="radio" name="question5" value=".line 155"><label for=".line 155"> .line 155 </label><br>
<input type="radio" name="question5" value=".line 300"><label for=".line 300"> .line 300 </label><br>
<br><br>
<p>Question 6: What is the extension of the files contained in the base folder ?</p>
<input type="radio" name="question6" value=".xml"><label for=".xml"> .xml </label><br>
<input type="radio" name="question6" value=".apk"><label for=".apk"> .apk </label><br>
<input type="radio" name="question6" value=".java"><label for=".java"> .java </label><br>
<input type="radio" name="question6" id="correct6" value=".smali"><label for=".smali"> .smali </label><br>
<br><br>
<p>Question 7: Which folder of the disassembled APK contains the bootstrap ?</p>
<input type="radio" name="question7" id="correct7" value="assets"><label for="assets"> assets </label><br>
<input type="radio" name="question7" value="Apkfile"><label for="Apkfile"> Apkfile </label><br>
<input type="radio" name="question7" value="res"><label for="res"> res </label><br>
<input type="radio" name="question7" value="build"><label for="build"> build </label><br>
<br><br>
<p>Question 8: What is the access modifier of the method where payload is injected ?</p>
<input type="radio" name="question8" value="None"><label for="None"> None </label><br>
<input type="radio" name="question8" value="Private"><label for="Private"> Private </label><br>
<input type="radio" name="question8" value="Protected"><label for="Protected"> Protected </label><br>
<input type="radio" name="question8" id="correct8" value="Public"><label for="Public"> Public </label><br>
<br><br>
<p>Question 9: What is the .source of RestClient.smali ?</p>
<input type="radio" name="question9" value="RestClient.yml"><label for="RestClient.yml"> RestClient.yml </label><br>
<input type="radio" name="question9" id="correct9" value="RestClient.java"><label for="RestClient.java"> RestClient.java </label><br>
<input type="radio" name="question9" value="RestClient.c"><label for="RestClient.c"> RestClient.c </label><br>
<input type="radio" name="question9" value="RestClient.xml"><label for="RestClient.xml"> RestClient.xml </label><br>
<br><br>
<p>Question 10: How many files are there in base folder ?</p>
<input type="radio" name="question10" id="correct10" value="39"><label for="39"> 39 </label><br>
<input type="radio" name="question10" value="22"><label for="22"> 22 </label><br>
<input type="radio" name="question10" value="27"><label for="27"> 27 </label><br>
<input type="radio" name="question10" value="31"><label for="31"> 31 </label><br>
<br><br>
<p>Question 11: In which method is the malicious payload injected ?</p>
<input type="radio" name="question11" id="correct11" value="performLogin"><label for="performLogin"> performLogin </label><br>
<input type="radio" name="question11" value="getStatement"><label for="getStatement"> getStatement </label><br>
<input type="radio" name="question11" value="parseError"><label for="parseError"> parseError </label><br>
<input type="radio" name="question11" value="getAccount"><label for="getAccount"> getAccount </label><br>
<br><br>
<p>Question 12: Which part was replaced in the injected payload ?</p>
<input type="radio" name="question12" value="Username"><label for="Username"> Username </label><br>
<input type="radio" name="question12" value="IP Address"><label for="IP Address"> IP Address </label><br>
<input type="radio" name="question12" value="Password"><label for="Password"> Password </label><br>
<input type="radio" name="question12" id="correct12" value="YOURNAME"><label for="YOURNAME"> YOURNAME </label><br>
<br><br>
<p>Question 13: How many folders are there in the extracted folder "app-release" ?</p>
<input type="radio" name="question13" id="correct13" value="6"><label for="6"> 6 </label><br>
<input type="radio" name="question13" value="4"><label for="4"> 4 </label><br>
<input type="radio" name="question13" value="2"><label for="2"> 2 </label><br>
<input type="radio" name="question13" value="7"><label for="7"> 7 </label><br>
<br><br>
<p>Question 14: How many "uses-permission" tags are there in the AndroidManifest.xml file ?</p>
<input type="radio" name="question14" value="10"><label for="10"> 10 </label><br>
<input type="radio" name="question14" id="correct14" value="2"><label for="2"> 2 </label><br>
<input type="radio" name="question14" value="5"><label for="5"> 5 </label><br>
<input type="radio" name="question14" value="0"><label for="0"> 0 </label><br>
<br><br>
<p>Question 15: What is the name of folder containing the "RestClient.smali" file ?</p>
<input type="radio" name="question15" value="bootstrap"><label for="bootstrap"> bootstrap </label><br>
<input type="radio" name="question15" id="correct15" value="base"><label for="base"> base </label><br>
<input type="radio" name="question15" value="apk"><label for="apk"> apk </label><br>
<input type="radio" name="question15" value="res"><label for="res"> res </label><br>
<br><br>
<p>Question 16: There is an "activity" tag in the AndroidManifest.xml file ?</p>
<input type="radio" name="question16" id="correct16" value="True"><label for="True"> True </label><br>
<input type="radio" name="question16" value="False"><label for="True"> False </label><br>
<br><br>
<p>Question 17: What is the size (approximately) of "RestClient.smali" file ?</p>
<input type="radio" name="question17" value="145k"><label for="145k"> 145k </label><br>
<input type="radio" name="question17" value="10k"><label for="10k"> 10k </label><br>
<input type="radio" name="question17" id="correct17" value="45k"><label for="45k"> 45k </label><br>
<input type="radio" name="question17" value="35k"><label for="35k"> 35k </label><br>
<br><br>
<p>Question 18: What is the first parameter in the "performLogin" method of the "RestClient.smali" file ?</p>
<input type="radio" name="question18" value="port"><label for="port"> port </label><br>
<input type="radio" name="question18" id="correct18" value="server"><label for="server"> server </label><br>
<input type="radio" name="question18" value="file"><label for="file"> file </label><br>
<input type="radio" name="question18" value="language"><label for="language"> language </label><br>
<br><br>
<p>Question 19: There is an "username" and "password" field in the RestClient.smali file ?</p>
<input type="radio" name="question19" id="correct19" value="True"><label for="True"> True </label><br>
<input type="radio" name="question19" value="False"><label for="True"> False </label><br>
<br><br>
<p>Question 20: What is the name of the folder containing the final android app ?</p>
<input type="radio" name="question20" value="smali"><label for="smali"> smali </label><br>
<input type="radio" name="question20" id="correct20" value="dist"><label for="dist"> dist </label><br>
<input type="radio" name="question20" value="assets"><label for="assets"> assets </label><br>
<input type="radio" name="question20" value="java"><label for="java"> java </label><br>
<br><br>
<br>
<p>Please provide your name and email to register an attempt for the assessment</p>
<br>
<div class="fields">
<div class="field half">
<input type="text" name="name" id="name" placeholder="Name" />
</div>
<div class="field half">
<input type="email" name="email" id="email" placeholder="Email" />
</div>
</div>
<ul class="actions">
<li><button onclick="result()">Check Score</button></li>
<p id="demo"></p>
<li><input type="submit" value="Submit Your Answers" class="primary" /></li>
</ul>
</form>
<script>
function result() {
var score=0;
if (document.getElementById('correct1').checked) {
score++;
}
if (document.getElementById('correct2').checked) {
score++;
}
if (document.getElementById('correct3').checked) {
score++;
}
if (document.getElementById('correct4').checked) {
score++;
}
if (document.getElementById('correct5').checked) {
score++;
}
if (document.getElementById('correct6').checked) {
score++;
}
if (document.getElementById('correct7').checked) {
score++;
}
if (document.getElementById('correct8').checked) {
score++;
}
if (document.getElementById('correct9').checked) {
score++;
}
if (document.getElementById('correct10').checked) {
score++;
}
if (document.getElementById('correct11').checked) {
score++;
}
if (document.getElementById('correct12').checked) {
score++;
}
if (document.getElementById('correct13').checked) {
score++;
}
if (document.getElementById('correct14').checked) {
score++;
}
if (document.getElementById('correct15').checked) {
score++;
}
if (document.getElementById('correct16').checked) {
score++;
}
if (document.getElementById('correct17').checked) {
score++;
}
if (document.getElementById('correct18').checked) {
score++;
}
if (document.getElementById('correct19').checked) {
score++;
}
if (document.getElementById('correct20').checked) {
score++;
}
if (score >= 15) {
document.getElementById("demo").innerHTML = "Your score is: "+score+"/20"+"\n Congratulations, you have answered more than 75% of the questions correctly and can proceed for next Activity.";
} else {
document.getElementById("demo").innerHTML = "Your score is: "+score+"/20"+"\n It is recommended that you retry Activity 2 until you receive a score of 15 or better.";
}
console.log("Hello");
setTimeout(() => { console.log("World!"); }, 10000);
console.log("Goodbye!");
}
</script>
</body>
</html>