-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathToolEmbed.html
475 lines (448 loc) · 36.8 KB
/
ToolEmbed.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>ToolEmbed — DFIR ORC documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/solar.css" />
<link rel="stylesheet" type="text/css" href="_static/css/custom.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="DFIR ORC Local Configuration File" href="orc_local_config.html" />
<link rel="prev" title="WolfLauncher Configuration File" href="wolf_config.html" /><link href='http://fonts.googleapis.com/css?family=Source+Code+Pro|Open+Sans:300italic,400italic,700italic,400,300,700' rel='stylesheet' type='text/css'>
<link href="_static/solarized-dark.css" rel="stylesheet">
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" >
<a href="orc_local_config.html" title="DFIR ORC Local Configuration File"
accesskey="N">next</a>
<li class="right" >
<a href="wolf_config.html" title="WolfLauncher Configuration File"
accesskey="P">previous</a>
|</li>
<li class="nav-item nav-item-0"><a href="index.html">DFIR ORC documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="configuration.html" accesskey="U">Configuration</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/logo.jpg" alt="Logo"/>
</a></p>
<h3><a href="index.html">Table of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="tuto.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="platforms.html">Requirements</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro_to_data_collection.html">Design and Architecture</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="configuration.html">Configuration</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="resources.html">Referencing Resources in Configurations</a></li>
<li class="toctree-l2"><a class="reference internal" href="cli_options.html">DFIR ORC Command-line Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="wolf_config.html">WolfLauncher Configuration File</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">ToolEmbed</a></li>
<li class="toctree-l2"><a class="reference internal" href="orc_local_config.html">DFIR ORC Local Configuration File</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="embedded_tool_suite.html">Embedded Tool Suite</a></li>
<li class="toctree-l1"><a class="reference internal" href="licenses.html">Licenses</a></li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="toolembed">
<h1>ToolEmbed<a class="headerlink" href="#toolembed" title="Permalink to this heading">¶</a></h1>
<p id="anchor-root-toolembed">ToolEmbed is used to add resources (binaries, configuration files) to a DFIR ORC binary. It takes an XML configuration file as input.
To understand why this is needed and what happens when <code class="docutils literal notranslate"><span class="pre">DFIR-Orc.exe</span></code> is executed, please refer to <a class="reference internal" href="architecture.html"><span class="doc">Architecture</span></a>. A <a class="reference internal" href="tuto.html"><span class="doc">tutorial</span></a> presents how to configure and reconfigure binaries.</p>
<p>In daily life, when using a repository as <a class="reference external" href="https://github.com/dfir-orc/dfir-orc-config">DFIR ORC configuration GitHub</a>, one can directly edit configuration files and run the script <code class="docutils literal notranslate"><span class="pre">Configure.cmd</span></code>, which essentially sets a few environment variables and runs ToolEmbed.</p>
<p>ToolEmbed is also able to extract all the resources from a configured binary, thanks to the <code class="docutils literal notranslate"><span class="pre">/dump</span></code> option. This can be useful to quickly edit a configuration and obtain a new configured binary.The <a class="reference internal" href="tuto.html"><span class="doc">tutorial</span></a> illustrates this scenario.</p>
<p>The layout of the XML configuration file is as follows:</p>
<div class="line-block">
<div class="line"><<a class="reference external" href="#toolembed-toolembed-element">toolembed</a> attributes=”…” ></div>
<div class="line-block">
<div class="line"><<a class="reference external" href="#toolembed-input-element">input</a> > <em>value</em> </input></div>
<div class="line"><<a class="reference external" href="#toolembed-output-element">output</a> > <em>value</em> </output></div>
<div class="line"><<a class="reference external" href="#toolembed-run-element">run</a> attributes=”…”></run></div>
<div class="line"><<a class="reference external" href="#toolembed-run32-element">run32</a> attributes=”…”></run32></div>
<div class="line"><<a class="reference external" href="#toolembed-run64-element">run64</a> attributes=”…”></run64></div>
<div class="line"><<a class="reference external" href="#toolembed-file-element">file</a> attributes=”…” /></div>
<div class="line"><<a class="reference external" href="#toolembed-pair-element">pair</a> attributes=”…” /></div>
<div class="line"><<a class="reference external" href="#toolembed-archive-element">archive</a> attributes=”…” ></div>
<div class="line-block">
<div class="line"><<a class="reference external" href="#toolembed-archive-file-element">file</a> attributes=”…” /></div>
</div>
<div class="line"><<a class="reference external" href="#toolembed-archive-element">/archive</a>></div>
</div>
<div class="line"><<a class="reference external" href="#toolembed-toolembed-element">/toolembed</a>></div>
</div>
<p>Here is a typical ToolEmbed configuration file.</p>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><toolembed></span>
<span class="w"> </span><span class="nt"><input></span>.\tools\DFIR-Orc_x86.exe<span class="nt"></input></span>
<span class="w"> </span><span class="nt"><output></span>.\output\DFIR-Orc.exe<span class="nt"></output></span>
<span class="w"> </span><span class="nt"><run32</span><span class="w"> </span><span class="na">args=</span><span class="s">"WolfLauncher"</span><span class="nt">></span>self:#<span class="nt"></run32></span>
<span class="w"> </span><span class="nt"><run64</span><span class="w"> </span><span class="na">args=</span><span class="s">"WolfLauncher"</span><span class="nt">></span>7z:#Tools|DFIR-Orc_x64.exe<span class="nt"></run64></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"WOLFLAUNCHER_CONFIG"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\DFIR-ORC_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"GetHives_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\GetHives_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"GetUserHives_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\GetUserHives_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"GetSamHive_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\GetSamHive_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"GetEvents_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\GetEvents_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"NTFSInfo_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\NTFSInfo_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"NTFSInfoHashPE_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\NTFSInfoHashPE_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"FatInfo_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\FatInfo_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"FatInfoHashPE_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\FatInfoHashPE_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"GetArtefacts_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\GetArtefacts_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"GetYaraSamples_config.xml"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\GetYaraSamples_config.xml"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"ruleset.yara"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\ruleset.yara"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><archive</span><span class="w"> </span><span class="na">name=</span><span class="s">"Tools"</span><span class="w"> </span><span class="na">format=</span><span class="s">"7z"</span><span class="w"> </span><span class="na">compression=</span><span class="s">"Ultra"</span><span class="nt">></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"DFIR-Orc_x64.exe"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\tools\DFIR-Orc_x64.exe"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"autorunsc.exe"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\tools\autorunsc.exe"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"></archive></span>
<span class="nt"></toolembed></span>
</pre></div>
</div>
<section id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this heading">¶</a></h2>
<p>There are two most classical ways to use ToolEmbed:</p>
<ul class="simple">
<li><p>The following command allows to obtain a configured binary, using an XML configuration file specifying all necessary elements.</p></li>
</ul>
<div class="highlight-bat notranslate"><div class="highlight"><pre><span></span>DFIR-Orc.exe ToolEmbed /config=DFIR-Orc_embed.xml
</pre></div>
</div>
<ul class="simple">
<li><p>The line below allows to extract resources from a configured binary in a directory of choice.</p></li>
</ul>
<div class="highlight-bat notranslate"><div class="highlight"><pre><span></span>DFIR-Orc.exe ToolEmbed /dump=Configured-binary.exe /out=dump-dir\
</pre></div>
</div>
<section id="toolembed-element">
<span id="toolembed-toolembed-element"></span><h3><code class="docutils literal notranslate"><span class="pre">toolembed</span></code> Element<a class="headerlink" href="#toolembed-element" title="Permalink to this heading">¶</a></h3>
<p><em>optional=no, default=N/A</em></p>
<p>Root element.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
<section id="input-element-input-path-option">
<span id="toolembed-input-element"></span><h3><code class="docutils literal notranslate"><span class="pre">input</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/input=<Path></span></code> Option<a class="headerlink" href="#input-element-input-path-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=no except with /dump option, default=N/A</em></p>
<p>This element contains the path to the binary which ToolEmbed uses as a <strong>Mothership</strong> (see <a class="reference internal" href="architecture.html#architecture-config-process"><span class="std std-ref">here</span></a>).
This base is augmented with new resources to create the output of ToolEmbed.
This input file remains unmodified by ToolEmbed.
Environment variables will be substituted.</p>
<p>The element is compulsory in an XML configuration file, and during a configuration operation. On the contrary, when dumping resources from a configured binary, it is irrelevant.</p>
<section id="example">
<h4>Example<a class="headerlink" href="#example" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><input></span>.\tools\DFIR-Orc_x86.exe<span class="nt"></input></span>
</pre></div>
</div>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="output-element-out-path-option">
<span id="toolembed-output-element"></span><h3><code class="docutils literal notranslate"><span class="pre">output</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/out=<Path></span></code> Option<a class="headerlink" href="#output-element-out-path-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=no, default=N/A</em></p>
<p>This element contains the path to the output file created by ToolEmbed.
It is first created as a copy of the input file and, then, the specified resources are added.
Environment variables will be substituted.</p>
<p>For details on the <code class="docutils literal notranslate"><span class="pre">output</span></code> element syntax, please refer to the <a class="reference internal" href="configuring_tool_output.html"><span class="doc">output documentation</span></a>.</p>
<section id="id5">
<h4>Example<a class="headerlink" href="#id5" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><output></span>.\output\DFIR-Orc.exe<span class="nt"></output></span>
</pre></div>
</div>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="run-element-run-ressource-option">
<span id="toolembed-run-element"></span><h3><code class="docutils literal notranslate"><span class="pre">run</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/run=<Ressource></span></code> Option<a class="headerlink" href="#run-element-run-ressource-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>This element specifies the unconfigured binary which should run. See <a class="reference internal" href="architecture.html"><span class="doc">Architecture</span></a> for details.
This element can be overridden by <code class="docutils literal notranslate"><span class="pre">run32</span></code> or <code class="docutils literal notranslate"><span class="pre">run64</span></code> elements (or options).</p>
<section id="attributes">
<h4>Attributes<a class="headerlink" href="#attributes" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>args</strong> <em>(optional=yes, default=N/A)</em></dt><dd><p>The optional <code class="docutils literal notranslate"><span class="pre">args</span></code> attribute allows the addition of arguments. This yields a command line starting with the specified binary, followed by the optional args, then potentially followed by arguments passed on by Mothership.</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id7">
<h4>Example<a class="headerlink" href="#id7" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><input></span>.\tools\DFIR-Orc_x86.exe<span class="nt"></input></span>
...
<span class="nt"><run</span><span class="w"> </span><span class="na">args=</span><span class="s">"WolfLauncher"</span><span class="nt">></span>self:#<span class="nt"></run></span>
</pre></div>
</div>
<p>This example results in the Mothership binary relaunching itself with the added argument “WolfLauncher” (which results in the execution of the code of WolfLauncher, the scheduler for DFIR ORC).
Notation <code class="docutils literal notranslate"><span class="pre">self:#</span></code> and resources are documented in <a class="reference internal" href="resources.html"><span class="doc">Referencing Resources in Configurations</span></a>.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="run32-element-run32-ressource-option">
<span id="toolembed-run32-element"></span><h3><code class="docutils literal notranslate"><span class="pre">run32</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/run32=<Ressource></span></code> Option<a class="headerlink" href="#run32-element-run32-ressource-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>This element specifies the unconfigured binary which should run on 32-bit platforms. See <a class="reference internal" href="architecture.html"><span class="doc">Architecture</span></a> for details.
When specified this element overrides a <code class="docutils literal notranslate"><span class="pre">run</span></code> element (or option).</p>
<section id="id9">
<h4>Attributes<a class="headerlink" href="#id9" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>args</strong> <em>(optional=yes, default=N/A)</em></dt><dd><p>The optional <code class="docutils literal notranslate"><span class="pre">args</span></code> attribute allows the addition of arguments. This yields a command line starting with the specified binary, followed by the optional args, then potentially followed by arguments passed on by Mothership.</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id10">
<h4>Example<a class="headerlink" href="#id10" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><input></span>.\tools\DFIR-Orc_x86.exe<span class="nt"></input></span>
...
<span class="nt"><run32</span><span class="w"> </span><span class="na">args=</span><span class="s">"WolfLauncher"</span><span class="nt">></span>self:#<span class="nt"></run32></span>
</pre></div>
</div>
<p>This example results in the Mothership binary relaunching itself with the added argument “WolfLauncher” (the scheduler for DFIR ORC).
Notation <code class="docutils literal notranslate"><span class="pre">self:#</span></code> and resources are documented in <a class="reference internal" href="resources.html"><span class="doc">Referencing Resources in Configurations</span></a>.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="run64-element-run64-ressource-option">
<span id="toolembed-run64-element"></span><h3><code class="docutils literal notranslate"><span class="pre">run64</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/run64=<Ressource></span></code> Option<a class="headerlink" href="#run64-element-run64-ressource-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>This element specifies the unconfigured binary which should run on 64-bit platforms. See <a class="reference internal" href="architecture.html"><span class="doc">Architecture</span></a> for details.
When specified this element overrides a <code class="docutils literal notranslate"><span class="pre">run</span></code> element (or option).</p>
<section id="id12">
<h4>Attributes<a class="headerlink" href="#id12" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>args</strong> <em>(optional=yes, default=N/A)</em></dt><dd><p>The optional <code class="docutils literal notranslate"><span class="pre">args</span></code> attribute allows the addition of an argument (before all transmitted arguments)</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id13">
<h4>Example<a class="headerlink" href="#id13" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><run64</span><span class="w"> </span><span class="na">args=</span><span class="s">"WolfLauncher"</span><span class="nt">></span>7z:#Tools|Orc_x64.exe<span class="nt"></run64></span>
</pre></div>
</div>
<p>This example results in the launch of <code class="docutils literal notranslate"><span class="pre">Orc_x64.exe</span></code> contained in the 7z archive Tools, with the added argument “WolfLauncher” (the scheduler for DFIR ORC).
Notation <code class="docutils literal notranslate"><span class="pre">7z:#Tools</span></code> and resources are documented in <a class="reference internal" href="resources.html"><span class="doc">Referencing Resources in Configurations</span></a>.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="file-element-addfile-path-name-option">
<span id="toolembed-file-element"></span><h3><code class="docutils literal notranslate"><span class="pre">file</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/AddFile=<Path>,<Name></span></code> Option<a class="headerlink" href="#file-element-addfile-path-name-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>The file element provides a simple way to embed a file as a resource in the destination binary.</p>
<section id="id15">
<h4>Attributes<a class="headerlink" href="#id15" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>name</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The name of the resource to be created in the target binary</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><strong>path</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The path to the file to be added to the resource</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id16">
<h4>Example<a class="headerlink" href="#id16" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"WOLFLAUNCHER_CONFIG"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\config\DFIR-ORC_config.xml"</span><span class="nt">/></span>
</pre></div>
</div>
<p>This creates a resource named WOLFLAUNCHER_CONFIG which contains the <code class="docutils literal notranslate"><span class="pre">.\config\DFIR-ORC_config.xml</span></code> file.
On a command line, the equivalent resource is created by using <code class="docutils literal notranslate"><span class="pre">/AddFile=.\config\DFIR-ORC_config.xml,WOLFLAUNCHER_CONFIG</span></code>.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="pair-element-name-value-option">
<span id="toolembed-pair-element"></span><h3><code class="docutils literal notranslate"><span class="pre">pair</span></code> Element, <code class="docutils literal notranslate"><span class="pre">/name=<Value></span></code> Option<a class="headerlink" href="#pair-element-name-value-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>This element is used internally to allow a level of indirection between a tool binary code and the configured resources.
This should not be necessary in a user-created configuration.</p>
<section id="id18">
<h4>Attributes<a class="headerlink" href="#id18" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>name</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The name of the resource</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><strong>value</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The string value of the resource.</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id19">
<h4>Example<a class="headerlink" href="#id19" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><pair</span><span class="w"> </span><span class="na">name=</span><span class="s">"XMLLITE_X86DLL"</span><span class="w"> </span><span class="na">value=</span><span class="s">"7z:#Tools|xmllite.dll"</span><span class="w"> </span><span class="nt">/></span>
</pre></div>
</div>
<p>This line creates a resource named XMLLITE_X86DLL which contains the string “7z:#Tools|xmllite.dll”.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="archive-element">
<span id="toolembed-archive-element"></span><h3><code class="docutils literal notranslate"><span class="pre">archive</span></code> Element<a class="headerlink" href="#archive-element" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>The archive element provides the ability to embed files in a resource but in a compressed archive (to minimize the size of the resulting binary). This element is a container for <code class="docutils literal notranslate"><span class="pre">file</span></code> sub-elements used to define the archive (see below).</p>
<p>This mechanism is deemed too complex to be described on a command line, there is no equivalent option. To use it, an XML configuration file must be passed as an argument through the <code class="docutils literal notranslate"><span class="pre">/config</span></code> option.</p>
<section id="id21">
<h4>Attributes<a class="headerlink" href="#id21" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>name</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The name attribute is the name of the resource to be created in the target binary</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><strong>format</strong> <em>(optional=no, default=”cab”)</em></dt><dd><p>The archive format to use to archive the files. Allowed values are:</p>
<ul>
<li><p>cab</p></li>
<li><p>zip</p></li>
<li><p>7z</p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><strong>compression</strong> <em>(optional=yes, default=”fast”)</em></dt><dd><p>The level of compression in the archive (for zip and 7zip format). Supported values are:</p>
<ul>
<li><p>None</p></li>
<li><p>Fastest</p></li>
<li><p>Fast</p></li>
<li><p>Normal</p></li>
<li><p>Maximum</p></li>
<li><p>Ultra</p></li>
</ul>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id22">
<h4>Example<a class="headerlink" href="#id22" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><archive</span><span class="w"> </span><span class="na">name=</span><span class="s">"Tools"</span><span class="w"> </span><span class="na">format=</span><span class="s">"7z"</span><span class="w"> </span><span class="na">compression=</span><span class="s">"Ultra"</span><span class="nt">></span>
<span class="w"> </span>...
<span class="nt"></archive></span>
</pre></div>
</div>
<p>This creates a resource in the output file named “Tools” in the 7zip archive file format.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="file-element-in-archive">
<span id="toolembed-archive-file-element"></span><h3><code class="docutils literal notranslate"><span class="pre">file</span></code> Element (in <code class="docutils literal notranslate"><span class="pre">archive</span></code>)<a class="headerlink" href="#file-element-in-archive" title="Permalink to this heading">¶</a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">file</span></code> element provides a simple way to embed a file in an archive in the configured binary.</p>
<section id="id24">
<h4>Attributes<a class="headerlink" href="#id24" title="Permalink to this heading">¶</a></h4>
<ul class="simple">
<li><dl class="simple">
<dt><strong>name</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The name attribute is the name of the resource to be created in the target binary</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><strong>path</strong> <em>(optional=no, default=N/A)</em></dt><dd><p>The file system path to the file to be added to the resource relative to the current directory.</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="id25">
<h4>Example<a class="headerlink" href="#id25" title="Permalink to this heading">¶</a></h4>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="nt"><archive</span><span class="w"> </span><span class="na">name=</span><span class="s">"Tools"</span><span class="w"> </span><span class="na">format=</span><span class="s">"7z"</span><span class="w"> </span><span class="na">compression=</span><span class="s">"Ultra"</span><span class="nt">></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"DFIR-Orc_x64.exe"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\tools\DFIR-Orc_x64.exe"</span><span class="nt">/></span>
<span class="w"> </span><span class="nt"><file</span><span class="w"> </span><span class="na">name=</span><span class="s">"autorunsc.exe"</span><span class="w"> </span><span class="na">path=</span><span class="s">".\tools\autorunsc.exe"</span><span class="nt">/></span>
<span class="nt"></archive></span>
</pre></div>
</div>
<p>This creates a resource named “Tools” in the 7zip file format. This archive will contain two files:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">DFIR-Orc_x64.exe</span></code> copied from <code class="docutils literal notranslate"><span class="pre">.\tools\DFIR-Orc_x64.exe</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">autorunsc.exe</span></code> copied from <code class="docutils literal notranslate"><span class="pre">.\tools\autorunsc.exe</span></code></p></li>
</ul>
<p>These paths are relative to the directory where <code class="docutils literal notranslate"><span class="pre">DFIR-Orc.exe</span> <span class="pre">toolembed</span></code> is launched.</p>
<p><a class="reference external" href="#anchor-root-toolembed">Back to Root</a></p>
</section>
</section>
<section id="dump-path-option">
<h3><code class="docutils literal notranslate"><span class="pre">/dump[=<Path>]</span></code> Option<a class="headerlink" href="#dump-path-option" title="Permalink to this heading">¶</a></h3>
<p><em>optional=yes, default=N/A</em></p>
<p>This option allows to extract the resources from a configured binary (stored at the given path), in a directory specified using <code class="docutils literal notranslate"><span class="pre">/out</span></code>.
This option has no equivalent XML element, it just exists as a switch to revert the behavior of ToolEmbed, and when extracting resources no configuration file is needed.</p>
<div class="highlight-bat notranslate"><div class="highlight"><pre><span></span>DFIR-Orc.exe toolembed /dump=DFIR-Orc-1.exe /out=dumpdir\
</pre></div>
</div>
<p>This command writes the unconfigured binaries and configurations embedded in <code class="docutils literal notranslate"><span class="pre">dumpdir\</span></code>.</p>
<p>If this option is used without specifying a <code class="docutils literal notranslate"><span class="pre"><Path></span></code>, the resources of the executed DFIR ORC binary itself are dumped.</p>
<div class="highlight-bat notranslate"><div class="highlight"><pre><span></span>DFIR-Orc.exe toolembed /dump /out=dumpdir\
</pre></div>
</div>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" >
<a href="orc_local_config.html" title="DFIR ORC Local Configuration File"
>next</a>
<li class="right" >
<a href="wolf_config.html" title="WolfLauncher Configuration File"
>previous</a>
|</li>
<li class="nav-item nav-item-0"><a href="index.html">DFIR ORC documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="configuration.html" >Configuration</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2019, ANSSI. The contents of this documentation is available under the Open License version 2.0 as published by Etalab (French task force for Open Data). The name DFIR ORC and the associated logo belong to ANSSI, no use is permitted without its express approval. Le contenu de cette documentation est disponible sous license Open License version 2.0 telle que publiée par Etalab (organisation francaise pour Open Data). Le nom DFIR ORC et le logo associé appartiennent à l'ANSSI, tout usage doit être expressément autorisé par l'ANSSI..
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 5.3.0.Theme is <a href="http://github.com/vimalkvn/solar-theme">Solar</a>
</div>
<script type="text/javascript">
$(document).ready(function() {
$(".toggle > *").hide();
$(".toggle .header").show();
$(".toggle .header").click(function() {
$(this).parent().children().not(".header").toggle(400);
$(this).parent().children(".header").toggleClass("open");
})
});
</script>
</body>
</html>