Javascript - Webpack
Description
Do you know webpack?
Statement
Find the password.
Solution
Firstly, get the page’s source code:
1
curl http://challenge01.root-me.org/web-client/ch27/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>Javascript - Webpack</title>
<link href=./static/css/app.f213bed71a5d27ded35fdf00a1963840.css rel=stylesheet>
</head>
<body>
<link rel='stylesheet' property='stylesheet' id='s' type='text/css' href='/template/s.css' media='all' />
<iframe id='iframe' src='https://www.root-me.org/?page=externe_header'></iframe>
<div id=app></div>
<script type=text/javascript src=./static/js/manifest.2ae2e69a05c33dfc65f8.js></script>
<script type=text/javascript src=./static/js/vendor.458c9f5863b8f28e5570.js></script>
<script type=text/javascript src=./static/js/app.a92c5074dafac0cb6365.js></script>
</body>
</html>
Let’s check the .js file:
1
curl http://challenge01.root-me.org/web-client/ch27/static/js/app.a92c5074dafac0cb6365.js
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
webpackJsonp([0], {
"0qD8": function(t, a) {},
Gz79: function(t, a) {},
JAfz: function(t, a) {},
NHnr: function(t, a, n) {
"use strict";
Object.defineProperty(a, "__esModule", {
value: !0
});
var s = n("7+uW"),
i = {
render: function() {
var t = this.$createElement,
a = this._self._c || t;
return a("div", {
attrs: {
id: "app"
}
}, [a("div", {
staticClass: "wrapper"
}, [a("header", {
staticClass: "site-header"
}, [a("nav", [a("strong", [this._v("Quack Quack ! | ")]), this._v(" "), a("router-link", {
attrs: {
to: "/duck"
}
}, [this._v("Duck")]), this._v(" or\n "), a("router-link", {
attrs: {
to: "/duck-mandarin"
}
}, [this._v("Mandarin duck")])], 1)]), this._v(" "), a("router-view")], 1)])
},
staticRenderFns: []
};
var e = n("VU/8")({
name: "App"
}, i, !1, function(t) {
n("Ui3U")
}, null, null).exports,
c = n("/ocq"),
r = {
render: function() {
this.$createElement;
this._self._c;
return this._m(0)
},
staticRenderFns: [function() {
var t = this.$createElement,
a = this._self._c || t;
return a("main", [a("div", {
staticClass: "home-page"
}, [a("div", {
staticClass: "block"
}, [a("h1", [this._v("Welcome ! ")]), this._v(" "), a("p", {
staticClass: "intro"
}, [this._v("If you are here, it means that you don't know the difference between a duck and mandarin duck.")]), this._v(" "), a("h2", [this._v("Shame on you !")])]), this._v(" "), a("div", {
staticClass: "block"
})])])
}]
};
var u = n("VU/8")({
name: "Home",
data: function() {
return {}
}
}, r, !1, function(t) {
n("JAfz")
}, "data-v-5c6c3158", null).exports,
o = {
render: function() {
this.$createElement;
this._self._c;
return this._m(0)
},
staticRenderFns: [function() {
var t = this.$createElement,
a = this._self._c || t;
return a("main", [a("div", {
staticClass: "home-page"
}, [a("div", {
staticClass: "block"
}, [a("h1", [this._v("This a normal duck ! ")]), this._v(" "), a("p", {
staticClass: "intro"
}, [this._v("It is just a duck... You can eat this one.")])]), this._v(" "), a("div", {
staticClass: "block"
}, [a("img", {
attrs: {
src: "static/duck.png"
}
})])])])
}]
};
var h = n("VU/8")({
name: "Duck",
data: function() {
return {}
}
}, o, !1, function(t) {
n("Gz79")
}, "data-v-1a7d2945", null).exports,
d = {
render: function() {
this.$createElement;
this._self._c;
return this._m(0)
},
staticRenderFns: [function() {
var t = this.$createElement,
a = this._self._c || t;
return a("main", [a("div", {
staticClass: "home-page"
}, [a("div", {
staticClass: "block"
}, [a("h1", [this._v("This a mandarin duck ! ")]), this._v(" "), a("p", {
staticClass: "intro"
}, [this._v("It is a mandarin duck !!!!! As you can see, it is much more beautiful than a normal duck.")]), this._v(" "), a("h2", [this._v("DO NOT EAT THIS ONE !")])]), this._v(" "), a("div", {
staticClass: "block"
}, [a("img", {
attrs: {
src: "static/duck-mandarin.png"
}
})])])])
}]
};
var l = n("VU/8")({
name: "Duck",
data: function() {
return {}
}
}, d, !1, function(t) {
n("0qD8")
}, "data-v-bb84558a", null).exports,
v = {
render: function() {
this.$createElement;
this._self._c;
return this._m(0)
},
staticRenderFns: [function() {
var t = this.$createElement,
a = this._self._c || t;
return a("main", [a("div", {
staticClass: "home-page"
}, [a("div", {
staticClass: "block"
}, [a("h1", [this._v("This a mandarin duck ! ")]), this._v(" "), a("p", {
staticClass: "intro"
}, [this._v("It is a mandarin duck !!!!! As you can see, it is much more beautiful than a normal duck.")]), this._v(" "), a("h2", [this._v("DO NOT EAT THIS ONE !")])]), this._v(" "), a("div", {
staticClass: "block"
}, [a("img", {
attrs: {
src: "/static/duck-mandarin.png"
}
})])])])
}]
};
n("VU/8")({
name: "Duck",
data: function() {
return {
msg: "Quack quack !! :)."
}
}
}, v, !1, function(t) {
n("TNCB")
}, "data-v-4b9752b8", null).exports;
s.a.use(c.a);
var m = new c.a({
routes: [{
path: "/",
name: "Home",
component: u
}, {
path: "/duck",
name: "Duck",
component: h
}, {
path: "/duck-mandarin",
name: "DuckMandarin",
component: l
}]
});
s.a.config.productionTip = !1, new s.a({
el: "#app",
router: m,
components: {
App: e
},
template: "<App/>"
})
},
TNCB: function(t, a) {},
Ui3U: function(t, a) {}
}, ["NHnr"]);
//# sourceMappingURL=app.a92c5074dafac0cb6365.js.map
The file in the comment is suspected, let’s check it
1
curl http://challenge01.root-me.org/web-client/ch27/static/js/app.a92c5074dafac0cb6365.js.map
The file is so long, but it has this line:
1
Here is your flag : BecauseSourceMapsAreGreatForDebuggingButNotForProduction
The flag is:
1
BecauseSourceMapsAreGreatForDebuggingButNotForProduction
This post is licensed under CC BY 4.0 by the author.