GTFOBins.github.io/_layouts/bin.html

45 lines
1.1 KiB
HTML
Raw Normal View History

2018-05-21 21:14:41 +02:00
---
layout: common
---
{% capture bin_name %}{% include get_bin_name path=page.path %}{% endcapture %}
{% include page_title.html title=bin_name %}
{% include function_list.html bin=page %}
{{ page.description | markdownify }}
2018-09-15 14:00:16 +02:00
{% for function_pair in site.data.functions %}
{% assign function_id = function_pair[0] %}
{% assign function = function_pair[1] %}
{% assign examples = page.functions[function_id] %}
{% unless examples %}{% continue %}{% endunless %}
2018-05-21 21:14:41 +02:00
2018-09-15 14:00:16 +02:00
<h2 id="{{ function_id }}" class="function-name">{{- function.label -}}</h2>
{{ function.description | markdownify }}
2018-05-21 21:14:41 +02:00
<ul class="examples">
2018-05-29 21:52:10 +02:00
{% for example in examples %}
2018-05-21 21:14:41 +02:00
{% capture code %}
2018-10-08 21:11:54 +02:00
{%- if function_id == 'suid' or function_id == 'limited-suid' %}
sudo sh -c 'cp $(which {{ bin_name }}) .; chmod +s ./{{ bin_name }}'
2018-05-21 21:14:41 +02:00
{% endif %}
2018-10-08 21:11:54 +02:00
{%- if function_id == 'capabilities' %}
2018-09-12 22:29:53 +02:00
cp $(which {{ bin_name }}) .
sudo setcap cap_setuid+ep {{ bin_name }}
{% endif %}
2018-05-21 21:14:41 +02:00
{{ example.code }}
{% endcapture %}
<li>
2018-05-29 21:52:10 +02:00
{{ example.description | markdownify }}
<pre><code>{{- code | strip -}}</code></pre>
</li>
2018-05-21 21:14:41 +02:00
2018-05-29 21:52:10 +02:00
{% endfor %}
</ul>
2018-05-22 12:24:49 +02:00
2018-05-21 21:14:41 +02:00
{% endfor %}