mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-28 07:44:24 -08:00
Translated ['src/pentesting-cloud/kubernetes-security/kubernetes-pivotin
This commit is contained in:
@@ -22,6 +22,7 @@ after = ["links"]
|
|||||||
|
|
||||||
[preprocessor.hacktricks]
|
[preprocessor.hacktricks]
|
||||||
command = "python3 ./hacktricks-preprocessor.py"
|
command = "python3 ./hacktricks-preprocessor.py"
|
||||||
|
env = "prod"
|
||||||
|
|
||||||
[output.html]
|
[output.html]
|
||||||
additional-css = ["theme/pagetoc.css", "theme/tabs.css"]
|
additional-css = ["theme/pagetoc.css", "theme/tabs.css"]
|
||||||
|
|||||||
@@ -30,14 +30,16 @@ def ref(matchobj):
|
|||||||
href = matchobj.groups(0)[0].strip()
|
href = matchobj.groups(0)[0].strip()
|
||||||
title = href
|
title = href
|
||||||
if href.startswith("http://") or href.startswith("https://"):
|
if href.startswith("http://") or href.startswith("https://"):
|
||||||
# pass
|
if context['config']['preprocessor']['hacktricks']['env'] == 'dev':
|
||||||
try:
|
pass
|
||||||
raw_html = str(urlopen(Request(href, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0'})).read())
|
else:
|
||||||
match = re.search('<title>(.*?)</title>', raw_html)
|
try:
|
||||||
title = match.group(1) if match else href
|
raw_html = str(urlopen(Request(href, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0'})).read())
|
||||||
except Exception as e:
|
match = re.search('<title>(.*?)</title>', raw_html)
|
||||||
logger.debug(f'Error opening URL {href}: {e}')
|
title = match.group(1) if match else href
|
||||||
pass #nDont stop on broken link
|
except Exception as e:
|
||||||
|
logger.debug(f'Error opening URL {href}: {e}')
|
||||||
|
pass #nDont stop on broken link
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
if href.endswith("/"):
|
if href.endswith("/"):
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Način da se omogući pristup GSA GKE klasteru je povezivanje na sledeći način
|
|||||||
```bash
|
```bash
|
||||||
Copy codekubectl create serviceaccount <service-account-name>
|
Copy codekubectl create serviceaccount <service-account-name>
|
||||||
```
|
```
|
||||||
- Kreirajte Kubernetes Secret koji sadrži akreditive GCP servisnog naloga kojem želite da dodelite pristup GKE klasteru. To možete uraditi koristeći `gcloud` komandnu liniju, kao što je prikazano u sledećem primeru:
|
- Kreirajte Kubernetes Secret koji sadrži akreditive GCP servisnog naloga kojem želite dodeliti pristup GKE klasteru. To možete uraditi koristeći `gcloud` komandnu liniju, kao što je prikazano u sledećem primeru:
|
||||||
```bash
|
```bash
|
||||||
Copy codegcloud iam service-accounts keys create <key-file-name>.json \
|
Copy codegcloud iam service-accounts keys create <key-file-name>.json \
|
||||||
--iam-account <gcp-service-account-email>
|
--iam-account <gcp-service-account-email>
|
||||||
@@ -44,7 +44,7 @@ iam.gke.io/gcp-service-account=<gcp-service-account-email>
|
|||||||
|
|
||||||
### GKE Workload Identity
|
### GKE Workload Identity
|
||||||
|
|
||||||
Sa Workload Identity, možemo konfigurisati a [Kubernetes servisni nalog](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) da deluje kao a [Google servisni nalog](https://cloud.google.com/iam/docs/understanding-service-accounts). Podovi koji rade sa Kubernetes servisnim nalogom će se automatski autentifikovati kao Google servisni nalog prilikom pristupa Google Cloud API-ima.
|
Sa Workload Identity, možemo konfigurisati a[ Kubernetes servisni nalog](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) da deluje kao a[ Google servisni nalog](https://cloud.google.com/iam/docs/understanding-service-accounts). Podovi koji rade sa Kubernetes servisnim nalogom će se automatski autentifikovati kao Google servisni nalog prilikom pristupanja Google Cloud API-ima.
|
||||||
|
|
||||||
**Prva serija koraka** za omogućavanje ovog ponašanja je da **omogućite Workload Identity u GCP** ([**koraci**](https://medium.com/zeotap-customer-intelligence-unleashed/gke-workload-identity-a-secure-way-for-gke-applications-to-access-gcp-services-f880f4e74e8c)) i kreirate GCP SA koji želite da k8s imitira.
|
**Prva serija koraka** za omogućavanje ovog ponašanja je da **omogućite Workload Identity u GCP** ([**koraci**](https://medium.com/zeotap-customer-intelligence-unleashed/gke-workload-identity-a-secure-way-for-gke-applications-to-access-gcp-services-f880f4e74e8c)) i kreirate GCP SA koji želite da k8s imitira.
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ gcloud auth activate-service-account --key-file=/var/run/secrets/google/service-
|
|||||||
```
|
```
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Kao napadač unutar K8s, trebali biste **tražiti SAs** sa **`iam.gke.io/gcp-service-account` anotacijom**, jer to ukazuje da SA može pristupiti nečemu u GCP-u. Druga opcija bi bila da pokušate da zloupotrebite svaki KSA u klasteru i proverite da li ima pristup.\
|
> Kao napadač unutar K8s, trebali biste **tražiti SAs** sa **`iam.gke.io/gcp-service-account` anotacijom**, jer to ukazuje da SA može pristupiti nečemu u GCP-u. Druga opcija bi bila da pokušate da zloupotrebite svaki KSA u klasteru i proverite da li ima pristup.\
|
||||||
> Iz GCP-a je uvek zanimljivo enumerisati veze i znati **koji pristup dajete SAs unutar Kubernetes-a**.
|
> Iz GCP-a je uvek zanimljivo enumerisati vezivanja i znati **koji pristup dajete SAs unutar Kubernetes-a**.
|
||||||
|
|
||||||
Ovo je skripta za lako **iteriranje kroz sve definicije podova** **tražeći** tu **anotaciju**:
|
Ovo je skripta za lako **iteriranje kroz sve definicije podova** **tražeći** tu **anotaciju**:
|
||||||
```bash
|
```bash
|
||||||
@@ -141,7 +141,7 @@ done | grep -B 1 "gcp-service-account"
|
|||||||
|
|
||||||
### Kiam & Kube2IAM (IAM uloga za Podove) <a href="#workflow-of-iam-role-for-service-accounts" id="workflow-of-iam-role-for-service-accounts"></a>
|
### Kiam & Kube2IAM (IAM uloga za Podove) <a href="#workflow-of-iam-role-for-service-accounts" id="workflow-of-iam-role-for-service-accounts"></a>
|
||||||
|
|
||||||
Zastarjeli način davanja IAM uloga Podovima je korišćenje [**Kiam**](https://github.com/uswitch/kiam) ili [**Kube2IAM**](https://github.com/jtblin/kube2iam) **servera.** U suštini, potrebno je pokrenuti **daemonset** u vašem klasteru sa **nekom privilegovanom IAM ulogom**. Ovaj daemonset će biti taj koji će omogućiti pristup IAM ulogama podovima kojima je to potrebno.
|
Zastarjeli način davanja IAM uloga Podovima je korišćenje [**Kiam**](https://github.com/uswitch/kiam) ili [**Kube2IAM**](https://github.com/jtblin/kube2iam) **servera.** U suštini, potrebno je pokrenuti **daemonset** u vašem klasteru sa **nekom privilegovanom IAM ulogom**. Ovaj daemonset će biti onaj koji će omogućiti pristup IAM ulogama podovima kojima je to potrebno.
|
||||||
|
|
||||||
Prvo što treba da uradite je da konfigurišete **koje uloge mogu biti pristupne unutar imenskog prostora**, a to radite sa anotacijom unutar objekta imenskog prostora:
|
Prvo što treba da uradite je da konfigurišete **koje uloge mogu biti pristupne unutar imenskog prostora**, a to radite sa anotacijom unutar objekta imenskog prostora:
|
||||||
```yaml:Kiam
|
```yaml:Kiam
|
||||||
@@ -161,7 +161,7 @@ iam.amazonaws.com/allowed-roles: |
|
|||||||
["role-arn"]
|
["role-arn"]
|
||||||
name: default
|
name: default
|
||||||
```
|
```
|
||||||
Kada je prostor imena konfiguran sa IAM rolama koje Podovi mogu imati, možete **naznačiti ulogu koju želite u svakoj definiciji poda sa nečim poput**:
|
Kada je prostor imena konfigurisan sa IAM rolama koje Podovi mogu imati, možete **naznačiti ulogu koju želite u svakoj definiciji poda sa nečim poput**:
|
||||||
```yaml:Kiam & Kube2iam
|
```yaml:Kiam & Kube2iam
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
@@ -196,10 +196,10 @@ args: ["-c", "sleep 100000"]' | kubectl apply -f -
|
|||||||
|
|
||||||
Ovo je **preporučeni način od strane AWS**.
|
Ovo je **preporučeni način od strane AWS**.
|
||||||
|
|
||||||
1. Prvo, potrebno je da [napravite OIDC provajdera za klaster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html).
|
1. Prvo treba da [napravite OIDC provajder za klaster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html).
|
||||||
2. Zatim kreirajte IAM ulogu sa dozvolama koje će SA zahtevati.
|
2. Zatim kreirajte IAM ulogu sa dozvolama koje će SA zahtevati.
|
||||||
3. Napravite [odnos poverenja između IAM uloge i SA](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html) imenom (ili imenom prostora imena koji daje pristup ulozi svim SA-ima u prostoru imena). _Odnos poverenja će uglavnom proveravati ime OIDC provajdera, ime prostora imena i ime SA_.
|
3. Napravite [odnos poverenja između IAM uloge i SA](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html) imenom (ili imenom prostora imena koji daje pristup ulozi svim SA-ima u prostoru imena). _Odnos poverenja će uglavnom proveravati ime OIDC provajdera, ime prostora imena i ime SA_.
|
||||||
4. Na kraju, **napravite SA sa anotacijom koja ukazuje na ARN uloge**, a podovi koji se pokreću sa tom SA će imati **pristup tokenu uloge**. **Token** je **napisan** unutar datoteke i putanja je specificirana u **`AWS_WEB_IDENTITY_TOKEN_FILE`** (podrazumevano: `/var/run/secrets/eks.amazonaws.com/serviceaccount/token`)
|
4. Na kraju, **napravite SA sa anotacijom koja označava ARN uloge**, a podovi koji se pokreću sa tom SA će imati **pristup tokenu uloge**. **Token** je **napisan** unutar datoteke i putanja je specificirana u **`AWS_WEB_IDENTITY_TOKEN_FILE`** (podrazumevano: `/var/run/secrets/eks.amazonaws.com/serviceaccount/token`)
|
||||||
```bash
|
```bash
|
||||||
# Create a service account with a role
|
# Create a service account with a role
|
||||||
cat >my-service-account.yaml <<EOF
|
cat >my-service-account.yaml <<EOF
|
||||||
@@ -221,12 +221,12 @@ Da **dobijete aws koristeći token** iz `/var/run/secrets/eks.amazonaws.com/serv
|
|||||||
aws sts assume-role-with-web-identity --role-arn arn:aws:iam::123456789098:role/EKSOIDCTesting --role-session-name something --web-identity-token file:///var/run/secrets/eks.amazonaws.com/serviceaccount/token
|
aws sts assume-role-with-web-identity --role-arn arn:aws:iam::123456789098:role/EKSOIDCTesting --role-session-name something --web-identity-token file:///var/run/secrets/eks.amazonaws.com/serviceaccount/token
|
||||||
```
|
```
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Kao napadač, ako možete da enumerišete K8s klaster, proverite za **service accounts sa tom anotacijom** da **escalate-ujete na AWS**. Da biste to uradili, jednostavno **exec/create** **pod** koristeći jedan od IAM **privileged service accounts** i ukradite token.
|
> Kao napadač, ako možete da enumerišete K8s klaster, proverite za **service accounts sa tom anotacijom** da **escalate to AWS**. Da biste to uradili, jednostavno **exec/create** **pod** koristeći jedan od IAM **privileged service accounts** i ukradite token.
|
||||||
>
|
>
|
||||||
> Pored toga, ako ste unutar poda, proverite za env varijable kao što su **AWS_ROLE_ARN** i **AWS_WEB_IDENTITY_TOKEN.**
|
> Pored toga, ako ste unutar poda, proverite za env varijable kao što su **AWS_ROLE_ARN** i **AWS_WEB_IDENTITY_TOKEN.**
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> Ponekad može biti **loše konfigurisana** **Trust Policy** uloga i umesto da daje AssumeRole pristup očekivanom service account-u, daje ga **svim service accounts**. Stoga, ako ste u mogućnosti da napišete anotaciju na kontrolisanom service account-u, možete pristupiti ulozi.
|
> Ponekad **Trust Policy of a role** može biti **loše konfigurisana** i umesto da daje AssumeRole pristup očekivanom service account-u, daje ga **svim service accounts**. Stoga, ako ste u mogućnosti da napišete anotaciju na kontrolisanom service account-u, možete pristupiti roli.
|
||||||
>
|
>
|
||||||
> Proverite **sledeću stranicu za više informacija**:
|
> Proverite **sledeću stranicu za više informacija**:
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ aws sts assume-role-with-web-identity --role-arn arn:aws:iam::123456789098:role/
|
|||||||
../aws-security/aws-basic-information/aws-federation-abuse.md
|
../aws-security/aws-basic-information/aws-federation-abuse.md
|
||||||
{{#endref}}
|
{{#endref}}
|
||||||
|
|
||||||
### Pronađite Podove i SAs sa IAM Ulogama u Klasteru
|
### Pronađite Podove i SAs sa IAM Rolama u Klasteru
|
||||||
|
|
||||||
Ovo je skripta za lako **iteriranje kroz sve podove i sas** definicije **tražeći** tu **anotaciju**:
|
Ovo je skripta za lako **iteriranje kroz sve podove i sas** definicije **tražeći** tu **anotaciju**:
|
||||||
```bash
|
```bash
|
||||||
@@ -265,7 +265,7 @@ kubectl run NodeIAMStealer --restart=Never -ti --rm --image lol --overrides '{"s
|
|||||||
|
|
||||||
Prethodno smo razgovarali o tome kako da **priključite IAM Role na Pods** ili čak kako da **pobegnete na Node da ukradete IAM Role** koji je instanci priključen.
|
Prethodno smo razgovarali o tome kako da **priključite IAM Role na Pods** ili čak kako da **pobegnete na Node da ukradete IAM Role** koji je instanci priključen.
|
||||||
|
|
||||||
Možete koristiti sledeći skript da **ukradete** svoje nove, teško zarađene **IAM role kredencijale**:
|
Možete koristiti sledeći skript da **ukradete** svoje nove teško zarađene **IAM role kredencijale**:
|
||||||
```bash
|
```bash
|
||||||
IAM_ROLE_NAME=$(curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ 2>/dev/null || wget http://169.254.169.254/latest/meta-data/iam/security-credentials/ -O - 2>/dev/null)
|
IAM_ROLE_NAME=$(curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ 2>/dev/null || wget http://169.254.169.254/latest/meta-data/iam/security-credentials/ -O - 2>/dev/null)
|
||||||
if [ "$IAM_ROLE_NAME" ]; then
|
if [ "$IAM_ROLE_NAME" ]; then
|
||||||
|
|||||||
@@ -590,6 +590,62 @@ function playground_text(playground, hidden = true) {
|
|||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(function menubarLanguage() {
|
||||||
|
var menubarLanguageToggleButton = document.getElementById('menubar-languages-toggle');
|
||||||
|
var menubarLanguagePopup = document.getElementById('menubar-languages-popup');
|
||||||
|
var languageButtons = menubarLanguagePopup.querySelectorAll('.menu-bar-link');
|
||||||
|
|
||||||
|
function showLanguage() {
|
||||||
|
menubarLanguagePopup.style.display = 'flex';
|
||||||
|
menubarLanguageToggleButton.setAttribute('aria-expanded', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideLanguage() {
|
||||||
|
menubarLanguagePopup.style.display = 'none';
|
||||||
|
menubarLanguageToggleButton.setAttribute('aria-expanded', false);
|
||||||
|
menubarLanguageToggleButton.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
menubarLanguageToggleButton.addEventListener('click', function () {
|
||||||
|
if (menubarLanguagePopup.style.display === 'flex') {
|
||||||
|
hideLanguage();
|
||||||
|
} else {
|
||||||
|
showLanguage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
menubarLanguagePopup.addEventListener('focusout', function(e) {
|
||||||
|
// e.relatedTarget is null in Safari and Firefox on macOS (see workaround below)
|
||||||
|
if (!!e.relatedTarget && !menubarLanguageToggleButton.contains(e.relatedTarget) && !menubarLanguagePopup.contains(e.relatedTarget)) {
|
||||||
|
hideLanguage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang/mdBook/issues/628
|
||||||
|
document.addEventListener('click', function(e) {
|
||||||
|
if (menubarLanguagePopup.style.display === 'block' && !menubarLanguageToggleButton.contains(e.target) && !menubarLanguagePopup.contains(e.target)) {
|
||||||
|
hideLanguage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
languageButtons.forEach((btn) => {
|
||||||
|
btn.addEventListener('click', function(e) {
|
||||||
|
const regex = /(?:(?:\/)+(?<lang>[a-z]{2}(?=\/|$)))?(?<path>(?:\/)*.*)?/g
|
||||||
|
var match = regex.exec(window.location.pathname)
|
||||||
|
|
||||||
|
var path = match.groups.path
|
||||||
|
console.log(`Path: ${path} ${typeof path}`)
|
||||||
|
|
||||||
|
const lang = match.groups.lang
|
||||||
|
console.log(`Lang: ${lang}`)
|
||||||
|
|
||||||
|
window.location = `/${e.target.id}${path}${window.location.hash}`
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})();
|
||||||
|
|
||||||
(function chapterNavigation() {
|
(function chapterNavigation() {
|
||||||
document.addEventListener('keydown', function (e) {
|
document.addEventListener('keydown', function (e) {
|
||||||
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; }
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; }
|
||||||
|
|||||||
@@ -83,6 +83,13 @@ body.sidebar-visible #menu-bar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right-buttons .icons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
column-gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.icon-button {
|
.icon-button {
|
||||||
border: none;
|
border: none;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
@@ -138,11 +145,13 @@ body.sidebar-visible #menu-bar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Collapse Menu Popup */
|
/* Collapse Menu Popup */
|
||||||
|
#menubar-collapse-toggle {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
#menubar-collapse-popup {
|
#menubar-collapse-popup {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 30px;
|
right: 0px;
|
||||||
top: var(--menu-bar-height);
|
top: 35px;
|
||||||
z-index: 105;
|
z-index: 105;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -172,6 +181,44 @@ body.sidebar-visible #menu-bar {
|
|||||||
background-color: var(--theme-hover);
|
background-color: var(--theme-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Languages Menu Popup */
|
||||||
|
#menubar-languages-toggle {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menubar-languages-popup {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
top: 35px;
|
||||||
|
z-index: 105;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--fg);
|
||||||
|
background: var(--bg);
|
||||||
|
border: 1px solid var(--table-border-color);
|
||||||
|
margin: 0;
|
||||||
|
padding: 0px;
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
max-height: 300px;
|
||||||
|
width: 150px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
#menubar-languages-popup .menu-bar-link {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px 20px;
|
||||||
|
line-height: 25px;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: start;
|
||||||
|
cursor: pointer;
|
||||||
|
color: inherit;
|
||||||
|
background: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
#menubar-languages-popup .menu-bar-link:hover {
|
||||||
|
background-color: var(--theme-hover);
|
||||||
|
}
|
||||||
|
|
||||||
.left-buttons {
|
.left-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -144,34 +144,60 @@
|
|||||||
|
|
||||||
<div class="right-buttons">
|
<div class="right-buttons">
|
||||||
<div id="menubar-collapse">
|
<div id="menubar-collapse">
|
||||||
<a class="menu-bar-link" href="https://training.hacktricks.xyz" target="_blank">
|
<a class="menu-bar-link" href="https://training.hacktricks.xyz" target="_blank">
|
||||||
Hacktricks Training
|
Hacktricks Training
|
||||||
</a>
|
</a>
|
||||||
<a class="menu-bar-link" href="https://twitter.com/hacktricks_live" target="_blank">
|
<a class="menu-bar-link" href="https://twitter.com/hacktricks_live" target="_blank">
|
||||||
Twitter
|
Twitter
|
||||||
</a>
|
</a>
|
||||||
<a class="menu-bar-link" href="https://www.linkedin.com/company/hacktricks" target="_blank">
|
<a class="menu-bar-link" href="https://www.linkedin.com/company/hacktricks" target="_blank">
|
||||||
Linkedin
|
Linkedin
|
||||||
</a>
|
</a>
|
||||||
<a class="menu-bar-link" href="https://github.com/sponsors/carlospolop" target="_blank">
|
<a class="menu-bar-link" href="https://github.com/sponsors/carlospolop" target="_blank">
|
||||||
Sponsor
|
Sponsor
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
<button id="menubar-collapse-toggle" class="icon-button" type="button" title="Toggle menu bar" aria-label="Toggle Menu bar" aria-expanded="false" aria-controls="collapse">
|
|
||||||
<i class="fa fa-ellipsis-h"></i>
|
|
||||||
</button>
|
|
||||||
<div id="menubar-collapse-popup" class="menubar-collapse-popup" aria-label="Menu" role="menu">
|
|
||||||
<a href="https://training.hacktricks.xyz" target="_blank" role="menuitem" class="menu-bar-link">Hacktricks Training</a>
|
|
||||||
<a href="https://twitter.com/hacktricks_live" target="_blank" role="menuitem" class="menu-bar-link">Twitter</a>
|
|
||||||
<a href="https://www.linkedin.com/company/hacktricks" target="_blank" role="menuitem" class="menu-bar-link">Linkedin</a>
|
|
||||||
<a href="https://github.com/sponsors/carlospolop" target="_blank" role="menuitem" class="menu-bar-link">Sponsor</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="icons">
|
||||||
|
<div id="menubar-collapse-toggle" class="icon-button" type="button" title="Toggle menu bar" aria-label="Toggle Menu bar" aria-expanded="false" aria-controls="collapse">
|
||||||
|
<i class="fa fa-ellipsis-h"></i>
|
||||||
|
<div id="menubar-collapse-popup" class="menubar-collapse-popup" aria-label="Menu" role="menu">
|
||||||
|
<a href="https://training.hacktricks.xyz" target="_blank" role="menuitem" class="menu-bar-link">Hacktricks Training</a>
|
||||||
|
<a href="https://twitter.com/hacktricks_live" target="_blank" role="menuitem" class="menu-bar-link">Twitter</a>
|
||||||
|
<a href="https://www.linkedin.com/company/hacktricks" target="_blank" role="menuitem" class="menu-bar-link">Linkedin</a>
|
||||||
|
<a href="https://github.com/sponsors/carlospolop" target="_blank" role="menuitem" class="menu-bar-link">Sponsor</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{#if search_enabled}}
|
{{#if search_enabled}}
|
||||||
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
<div id="menubar-languages-toggle" class="icon-button" type="button" title="Translations" aria-label="Toggle Tanslations" aria-expanded="false" aria-controls="translations">
|
||||||
|
<i class="fa fa-globe"></i>
|
||||||
|
|
||||||
|
<div id="menubar-languages-popup" class="menubar-languages-popup" aria-label="Language menu" role="language menu">
|
||||||
|
<button id="en" role="menuitem" class="menu-bar-link">English</button>
|
||||||
|
<button id="es" role="menuitem" class="menu-bar-link">Spanish</button>
|
||||||
|
<button id="fr" role="menuitem" class="menu-bar-link">French</button>
|
||||||
|
<button id="de" role="menuitem" class="menu-bar-link">German</button>
|
||||||
|
<button id="el" role="menuitem" class="menu-bar-link">Greek</button>
|
||||||
|
<button id="hi" role="menuitem" class="menu-bar-link">Hindi</button>
|
||||||
|
<button id="it" role="menuitem" class="menu-bar-link">Italian</button>
|
||||||
|
<button id="ja" role="menuitem" class="menu-bar-link">Japanese</button>
|
||||||
|
<button id="ko" role="menuitem" class="menu-bar-link">Korean</button>
|
||||||
|
<button id="pl" role="menuitem" class="menu-bar-link">Polish</button>
|
||||||
|
<button id="pt" role="menuitem" class="menu-bar-link">Portuguese</button>
|
||||||
|
<button id="sr" role="menuitem" class="menu-bar-link">Serbian</button>
|
||||||
|
<button id="sw" role="menuitem" class="menu-bar-link">Swahili</button>
|
||||||
|
<button id="tr" role="menuitem" class="menu-bar-link">Turkish</button>
|
||||||
|
<button id="uk" role="menuitem" class="menu-bar-link">Ukrainian</button>
|
||||||
|
<button id="af" role="menuitem" class="menu-bar-link">Afrikaans</button>
|
||||||
|
<button id="zh" role="menuitem" class="menu-bar-link">Chinese</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{#if print_enable}}
|
{{#if print_enable}}
|
||||||
<a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
|
<a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
|
||||||
|
|||||||
@@ -19,13 +19,11 @@
|
|||||||
try {
|
try {
|
||||||
const response = await fetch(url, { method: "GET" })
|
const response = await fetch(url, { method: "GET" })
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
console.log(response)
|
|
||||||
throw new Error(`Response status: ${response.status}`)
|
throw new Error(`Response status: ${response.status}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
var sponsor = json.sponsor
|
var sponsor = json.sponsor
|
||||||
console.log("boop", sponsor)
|
|
||||||
sponsorImg.src = sponsor.image_url
|
sponsorImg.src = sponsor.image_url
|
||||||
sponsorTitle.textContent = sponsor.name
|
sponsorTitle.textContent = sponsor.name
|
||||||
sponsorDescription.innerHTML = sponsor.description
|
sponsorDescription.innerHTML = sponsor.description
|
||||||
|
|||||||
Reference in New Issue
Block a user