refactor: rename exes/ to injectables/

This commit is contained in:
Dobin Rutishauser
2025-06-20 11:48:37 +02:00
parent 4b688f0394
commit 716f7a47ed
23 changed files with 110 additions and 54 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
The original functionality of the EXE/DLL will not work anymore (it will only execute the carrier
with the shellcode it is carrying)
<br>
Located in the <code>data/binary/exes/</code> directory. <br>
Located in the <code>data/binary/injectables/</code> directory. <br>
<h3>Carrier</h3>
@@ -8,18 +8,18 @@
<div class="indent">
Injectables in <code>data/binary/exes</code>
Injectables in <code>data/binary/injectables</code>
{% for exe in exes %}
<h3>{{exe['name']}}</h3>
<a href="/exes/{{exe['name']}}">More details</a>
{% for injectable in injectables %}
<h3>{{injectable['name']}}</h3>
<a href="/injectables/{{injectable['name']}}">More details</a>
<table class="table">
<tr>
<th>name</th>
<th>raw size</th>
</tr>
{% for section in exe['sections'] %}
{% for section in injectable['sections'] %}
<tr>
<td>{{section['name']}}</td>
<td>{{section['raw_size']}}</td>
+2 -2
View File
@@ -23,8 +23,8 @@
href="/projects">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if request.path == '/exes' else '' }}"
href="/exes">Injectables</a>
<a class="nav-link {{ 'active' if request.path == '/injectables' else '' }}"
href="/injectables">Injectables</a>
</li>
</ul>
</div>
+6 -6
View File
@@ -78,18 +78,18 @@
<div class="form-group row">
<label for="exe" class="col-sm-3 col-form-label"
data-bs-toggle="tooltip" data-bs-placement="top"
title="EXE or DLL to infect, from data/binary/exes/"
title="EXE or DLL to infect, from data/binary/injectables/"
>
Injectable
</label>
<div class="col-sm-9">
<select class="form-select" id="exe" name="exe"
aria-label="EXE" onchange="this.form.submit()">
{% for exe in exes %}
<option value="{{exe['filename']}}"
{% if exe['filename'] == settings.injectable_base %} selected {% endif %}
{% for injectable in injectables %}
<option value="{{injectable['filename']}}"
{% if injectable['filename'] == settings.injectable_base %} selected {% endif %}
>
{{exe['filename'] | basename}} ({{exe['size']}})</option>
{{injectable['filename'] | basename}} ({{injectable['size']}})</option>
{% endfor %}
</select>
</div>
@@ -110,7 +110,7 @@
<!-- Row 3: exe and shellcode info -->
<div class="col-2">
<a href="/exes/{{settings.get_inject_exe_in() | basename}}">EXE Info:</a>
<a href="/injectables/{{settings.get_inject_exe_in() | basename}}">EXE Info:</a>
<ul>
<li>
{% if is_64 %}
+11 -11
View File
@@ -17,15 +17,15 @@ def index():
return render_template('index.html')
@views.route("/exes/<exe_name>")
def exe_view(exe_name):
filepath = "{}{}".format(PATH_EXES, exe_name)
@views.route("/injectables/<exe_name>")
def injectable_view(exe_name):
filepath = "{}{}".format(PATH_INJECTABLES, exe_name)
if not os.path.exists(filepath):
return "File not found: {}".format(exe_name)
superpe = SuperPe(filepath)
return render_template('exe.html',
return render_template('injectable.html',
superpe=superpe,
resolved_dlls=resolve_dlls(superpe),
iat=superpe.get_iat_entries(),
@@ -33,16 +33,16 @@ def exe_view(exe_name):
)
@views.route("/exes")
def exes_view():
exes = []
for file in os.listdir(PATH_EXES):
@views.route("/injectables")
def injectables_view():
injectables = []
for file in os.listdir(PATH_INJECTABLES):
if not file.endswith(".dll") and not file.endswith(".exe"):
continue
if '.verify' in file or '.test' in file:
continue
superpe = SuperPe("{}/{}".format(PATH_EXES, file))
superpe = SuperPe("{}/{}".format(PATH_INJECTABLES, file))
e = {
'name': file,
@@ -50,9 +50,9 @@ def exes_view():
#'iat': superpe.get_iat_entries(),
'sections': superpe.pe_sections,
}
exes.append(e)
injectables.append(e)
#break
return render_template('exes.html', exes=exes)
return render_template('injectables.html', injectables=injectables)
@views.app_template_filter('hexint')
+3 -4
View File
@@ -47,8 +47,7 @@ def project(name):
if project_setting == None:
logger.error("Project {} not found".format(name))
return redirect("/projects", code=302)
project_setting.print()
#project_setting.print()
is_built = False
if os.path.exists(project_setting.get_inject_exe_out()):
@@ -97,7 +96,7 @@ def project(name):
project_dir = os.path.dirname(os.getcwd() + "\\" + project_setting.project_path)
log_files = get_logfiles(project_setting.project_path)
exes = list_files_and_sizes(PATH_EXES)
injectables = list_files_and_sizes(PATH_INJECTABLES)
shellcodes = list_files_and_sizes(PATH_SHELLCODES)
carrier_names = get_template_names()
@@ -117,7 +116,7 @@ def project(name):
project_dir=project_dir,
settings=project_setting,
exes=exes,
injectables=injectables,
shellcodes=shellcodes,
carrier_names=carrier_names,
decoder_styles=decoder_styles,