Skip to content

Commit

Permalink
Allow to serve the site from a sub directory
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrus-and committed Jul 10, 2024
1 parent 854c28f commit 37d26c6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions _includes/function_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% include get_contexts_label.html examples=_examples %}

<li data-function-name="{{ _function.label }}" data-function-contexts="{{ return_contexts }}">
<a href="{{ include.gtfobin.url }}#{{ _function_name }}">{{ _function.label }}</a>
<a href="{{ include.gtfobin.url | relative_url }}#{{ _function_name }}">{{ _function.label }}</a>
</li>
{% endfor %}

Expand All @@ -38,7 +38,7 @@
{% unless _inherited_functions contains _function_name %}{% continue %}{% endunless %}

<li class="inherit" title="This function is inherited" data-function-name="{{ _function.label }}" data-function-contexts="">
<a href="{{ include.gtfobin.url }}#inherit">{{ _function.label }}</a>
<a href="{{ include.gtfobin.url | relative_url }}#inherit">{{ _function.label }}</a>
</li>
{% endfor %}
</ul>
2 changes: 1 addition & 1 deletion _includes/gtfobins_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

{% comment %} render the row {% endcomment %}
<tr data-gtfobin-name="{{ gtfobin_name }}">
<td><a href="{{ original_gtfobin.url }}" class="bin-name">{{ gtfobin_name }}</a></td>
<td><a href="{{ original_gtfobin.url | relative_url }}" class="bin-name">{{ gtfobin_name }}</a></td>
<td>{% include function_list.html gtfobin=original_gtfobin functions=gtfobin.functions %}</td>
</tr>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/page_title.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>
{% if page.url != '/' %}
<a href="/">..</a> /
<a href="{{ "/" | relative_url }}">..</a> /
{% endif %}
{{ include.title }}
<div class="github-buttons">
Expand Down
4 changes: 2 additions & 2 deletions _layouts/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<meta charset="utf-8">
<title>{{ title }}</title>
<meta name="description" content="{{ description | escape }}">
<link rel="icon" href="/assets/logo.png">
<link rel="stylesheet" href="/assets/style.css" type="text/css"/>
<link rel="icon" href="{{ "/assets/logo.png" | relative_url }}">
<link rel="stylesheet" href="{{ "/assets/style.css" | relative_url }}" type="text/css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
Expand Down
9 changes: 5 additions & 4 deletions _layouts/gtfobin.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% assign gtfobin = return_gtfobin %}

{% comment %} render a message about being an alias {% endcomment %}
<p>This is an alias of <a href="{{ gtfobin.url }}"><code>{{ return_gtfobin_name }}</code></a>.</p>
<p>This is an alias of <a href="{{ gtfobin.url | relative_url }}"><code>{{ return_gtfobin_name }}</code></a>.</p>
{% else %}
{% assign gtfobin = original_gtfobin %}
{% endif %}
Expand Down Expand Up @@ -61,14 +61,15 @@ <h2 id="{{ function_name }}" class="function-name">{{- function.label -}}</h2>

{% comment %} add a link to the inheriting executable and display the functions {% endcomment %}
{% if function_name == "inherit" %}
{% include get_gtfobin.html name=example.from %}
{% assign gtfobin = return_gtfobin %}

<fieldset>
<legend>Functions</legend>
<p>
Inherits from <a href="/gtfobins/{{ example.from | escape }}/"><code>{{ example.from | escape }}</code></a>, thus possibly granting the following functions:
Inherits from <a href="{{ gtfobin.url | relative_url }}"><code>{{ example.from | escape }}</code></a>, thus possibly granting the following functions:
</p>
<p>
{% include get_gtfobin.html name=example.from %}
{% assign gtfobin = return_gtfobin %}
{% include function_list.html gtfobin=gtfobin functions=gtfobin.functions %}
</p>
</fieldset>
Expand Down
8 changes: 4 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ title: GTFOBins
description: GTFOBins is a curated list of Unix-like executables that can be used to bypass local security restrictions in misconfigured systems.
---

![GTFOBins logo](/assets/logo.png){:.logo}
![GTFOBins logo]({% link /assets/logo.png %}){:.logo}

{{ page.description }}

The project [collects](/model/) legitimate functions of Unix-like executables that can be abused to ~~get the f**k~~ break out restricted shells, escalate or maintain elevated privileges, transfer files, spawn bind and reverse shells, and facilitate other post-exploitation tasks.
The project [collects]({% link model.md %}) legitimate functions of Unix-like executables that can be abused to ~~get the f**k~~ break out restricted shells, escalate or maintain elevated privileges, transfer files, spawn bind and reverse shells, and facilitate other post-exploitation tasks.

GTFOBins is a joint effort by [Emilio Pinna][norbemi] and [Andrea Cardaci][cyrus_and], and many other [contributors][]. Everyone con [get involved](/contributing/) by providing additional entries and techniques!
GTFOBins is a joint effort by [Emilio Pinna][norbemi] and [Andrea Cardaci][cyrus_and], and many other [contributors][]. Everyone con [get involved]({% link CONTRIBUTING.md %}) by providing additional entries and techniques!

If you are looking for Windows binaries you should visit [LOLBAS][].

> Please note that this is **not** a list of exploits, and the programs listed here are not vulnerable per se, rather, GTFOBins is a compendium about how to live off the land when you only have certain executables available.
[GitHub][]
|
[Get involved](/contributing/)
[Get involved]({% link CONTRIBUTING.md %})
|
[Contributors][contributors]
{:.centered}
Expand Down
2 changes: 1 addition & 1 deletion model.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Data model
description: Functions and contexts of the GTFOBins executables.
---

An executable may support one or more [function](#functions) by providing a number of *examples* for their use, each example may support a number of [contexts](#contexts) that determine the ability of that example to work in that particular condition.
An executable may support one or more _function_ by providing a number of *examples* for their use, each example may support a number of _contexts_ that determine the ability of that example to work in that particular condition.

## Functions

Expand Down

0 comments on commit 37d26c6

Please sign in to comment.